/* Modern Listings Page CSS */

.listings-page {
	background-color: #f0f8ff;
	/* AliceBlue - Light Blue */
	width: 100%;
	min-height: 100vh;
}

.listings-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Header */
.listings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 15px;
}

.listings-header h1 {
	font-size: 2rem;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.sort-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sort-wrapper select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background-color: white;
	font-size: 0.95rem;
	cursor: pointer;
}

/* Filters Panel */
.filters-panel {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 30px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	width: 100%;
	/* Ensure it takes full width of container */
	box-sizing: border-box;
	/* Include padding in width */
}

.filters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 25px;
}

.filter-group h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: #444;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 8px;
}

.filter-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 200px;
	overflow-y: auto;
	padding-right: 5px;
}

/* Scrollbar styling for filters */
.filter-options::-webkit-scrollbar {
	width: 6px;
}

.filter-options::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.filter-options::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.checkbox-item,
.radio-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
	color: #555;
}

.checkbox-item input,
.radio-item input {
	accent-color: var(--primary-color, #007bff);
	width: 16px;
	height: 16px;
}

/* Resize stars in filters */
.checkbox-item label img {
	width: 14px;
	height: 14px;
	vertical-align: middle;
}

.filters-actions {
	display: flex;
	justify-content: flex-end;
	border-top: 1px solid #eee;
	padding-top: 15px;
	margin-top: 20px;
}

/* Places Grid */
.places-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
	margin-bottom: 40px;
}

/* Place Card */
.place-card {
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.place-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.place-card a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.place-img {
	position: relative;
	height: 200px;
	overflow: hidden;
}

.place-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.place-card:hover .place-img img {
	transform: scale(1.05);
}

.badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	color: white;
	z-index: 2;
}

.badge.open {
	background-color: #28a745;
}

.badge.closed {
	background-color: #dc3545;
}

.place-info {
	padding: 15px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 10px;
}

.place-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.place-header h3 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #222;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rating {
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.stars {
	color: #ffc107;
	font-size: 0.9rem;
}

.count {
	font-size: 0.8rem;
	color: #777;
}

.place-meta {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 0.9rem;
	color: #666;
}

.distance {
	display: flex;
	align-items: center;
	gap: 4px;
}

.distance img {
	width: 14px;
	height: 14px;
	opacity: 0.6;
}

.place-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cat-badge {
	background: #f0f2f5;
	color: #555;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 500;
}

.place-services {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
	display: flex;
	gap: 8px;
	overflow-x: auto;
}

.place-services img {
	width: 20px;
	height: 20px;
	opacity: 0.7;
}

/* Ad Card */
.ad-card {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f9f9f9;
	border: 1px dashed #ddd;
}

/* No Results */
.no-results-section {
	text-align: center;
	padding: 50px 20px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.no-results {
	font-size: 1.1rem;
	color: #555;
}

/* Buttons */
.button {
	padding: 10px 20px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.95rem;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.button.primary {
	background-color: var(--primary-color, #007bff);
	color: white;
}

.button.primary:hover {
	background-color: var(--primary-dark, #0056b3);
}

.button.outline {
	background-color: transparent;
	border: 1px solid #ddd;
	color: #555;
}

.button.outline:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
}

.button img {
	width: 18px;
	height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
	.places-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}

	.listings-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.header-actions {
		width: 100%;
		justify-content: space-between;
	}
}

@media (max-width: 480px) {
	.places-grid {
		grid-template-columns: 1fr;
	}
}

/* Pagination */
#pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.pagination-text {
	font-size: 0.9rem;
	color: #666;
}

#pagination ul {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 5px;
	flex-wrap: wrap;
	justify-content: center;
}

.page-item {
	display: flex;
}

.page-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border-radius: 8px;
	background: white;
	border: 1px solid #ddd;
	color: #555;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: all 0.2s;
	cursor: pointer;
}

.page-link:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
	color: #333;
}

.page-item.active .page-link {
	background-color: var(--primary-color, #007bff);
	border-color: var(--primary-color, #007bff);
	color: white;
}

.page-item.disabled .page-link {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #f9f9f9;
}

.page-link img {
	width: 14px;
	height: 14px;
	opacity: 0.7;
}

.page-item.active .page-link img {
	filter: brightness(0) invert(1);
	opacity: 1;
}

/* Fix Star Rating Size */
.stars img {
	width: 14px;
	height: 14px;
}

/* Header */
.listings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 15px;
}

.listings-header h1 {
	font-size: 2rem;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.sort-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sort-wrapper select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background-color: white;
	font-size: 0.95rem;
	cursor: pointer;
}

/* Filters Panel */
.filters-panel {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 30px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 25px;
	margin-bottom: 20px;
}

.filter-group h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: #444;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 8px;
}

.filter-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 200px;
	overflow-y: auto;
	padding-right: 5px;
}

/* Scrollbar styling for filters */
.filter-options::-webkit-scrollbar {
	width: 6px;
}

.filter-options::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.filter-options::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.checkbox-item,
.radio-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
	color: #555;
}

.checkbox-item input,
.radio-item input {
	accent-color: var(--primary-color, #007bff);
	width: 16px;
	height: 16px;
}

.filters-actions {
	display: flex;
	justify-content: flex-end;
	border-top: 1px solid #eee;
	padding-top: 15px;
}

/* Places Grid */
.places-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
	margin-bottom: 40px;
}

/* Place Card */
.place-card {
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.place-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.place-card a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.place-img {
	position: relative;
	height: 200px;
	overflow: hidden;
}

.place-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.place-card:hover .place-img img {
	transform: scale(1.05);
}

.badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	color: white;
	z-index: 2;
}

.badge.open {
	background-color: #28a745;
}

.badge.closed {
	background-color: #dc3545;
}

.place-info {
	padding: 15px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 10px;
}

.place-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.place-header h3 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #222;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rating {
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.stars {
	color: #ffc107;
	font-size: 0.9rem;
}

.count {
	font-size: 0.8rem;
	color: #777;
}

.place-meta {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 0.9rem;
	color: #666;
}

.distance {
	display: flex;
	align-items: center;
	gap: 4px;
}

.distance img {
	width: 14px;
	height: 14px;
	opacity: 0.6;
}

.place-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cat-badge {
	background: #f0f2f5;
	color: #555;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 500;
}

.place-services {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
	display: flex;
	gap: 8px;
	overflow-x: auto;
}

.place-services img {
	width: 20px;
	height: 20px;
	opacity: 0.7;
}

/* Ad Card */
.ad-card {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f9f9f9;
	border: 1px dashed #ddd;
}

/* No Results */
.no-results-section {
	text-align: center;
	padding: 50px 20px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.no-results {
	font-size: 1.1rem;
	color: #555;
}

/* Buttons */
.button {
	padding: 10px 20px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.95rem;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.button.primary {
	background-color: var(--primary-color, #007bff);
	color: white;
}

.button.primary:hover {
	background-color: var(--primary-dark, #0056b3);
}

.button.outline {
	background-color: transparent;
	border: 1px solid #ddd;
	color: #555;
}

.button.outline:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
}

.button img {
	width: 18px;
	height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
	.places-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}

	.listings-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.header-actions {
		width: 100%;
		justify-content: space-between;
	}
}

@media (max-width: 480px) {
	.places-grid {
		grid-template-columns: 1fr;
	}
}

/* Pagination */
#pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.pagination-text {
	font-size: 0.9rem;
	color: #666;
}

#pagination ul {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 5px;
	flex-wrap: wrap;
	justify-content: center;
}

.page-item {
	display: flex;
}

.page-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border-radius: 8px;
	background: white;
	border: 1px solid #ddd;
	color: #555;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: all 0.2s;
	cursor: pointer;
}

.page-link:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
	color: #333;
}

.page-item.active .page-link {
	background-color: var(--primary-color, #007bff);
	border-color: var(--primary-color, #007bff);
	color: white;
}

.page-item.disabled .page-link {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #f9f9f9;
}

.page-link img {
	width: 14px;
	height: 14px;
	opacity: 0.7;
}

.page-item.active .page-link img {
	filter: brightness(0) invert(1);
	opacity: 1;
}

/* Fix Star Rating Size */
.stars img {
	width: 14px;
	height: 14px;
}