/* Discover Loop — base styles. Neutral defaults; tune to match the site theme.
   Column counts come from CSS vars set inline per loop:
   --dl-cols, --dl-cols-tablet, --dl-cols-mobile. */

.dl-loop { --dl-gap: 28px; margin: 2.5em 0; }

.dl-grid {
	display: grid;
	grid-template-columns: repeat(var(--dl-cols, 3), minmax(0, 1fr));
	gap: var(--dl-gap);
}

@media (max-width: 980px) {
	.dl-grid { grid-template-columns: repeat(var(--dl-cols-tablet, 2), minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.dl-grid { grid-template-columns: repeat(var(--dl-cols-mobile, 1), minmax(0, 1fr)); }
}

/* Card ------------------------------------------------------------------ */
.dl-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* Fixed-aspect image: any upload dimension is cropped to a consistent box. */
.dl-card-image {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eee;
	overflow: hidden;
}

.dl-card-image .dl-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dl-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 22px;
}

.dl-card-title { margin: 0; font-size: 1.25rem; line-height: 1.25; padding-bottom: 20px; }
.dl-card-title a { text-decoration: none; }

.dl-card-details { display: flex; flex-direction: column; gap: 10px; }

.dl-field { font-size: 0.95rem; line-height: 1.4; }

.dl-field.dl-price { }

.dl-address,
.dl-tel { display: flex; align-items: flex-start; gap: 6px; }

.dl-field svg { width: 1em; height: 1em; flex: 0 0 auto; margin-top: 0.15em; }

.dl-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Grouped chip row (restaurant type, district, ...): one flex row that wraps,
   kept separate from the price above it. */
.dl-chips-row { display: flex; flex-wrap: wrap; gap: 6px; }

.dl-chip {
	display: inline-block;
	padding: 2px 10px;
	font-size: 0.8rem;
	border-radius: 999px;
	background: #f0f0f0;
}

.dl-cost { font-weight: 600; letter-spacing: 1px; }

/* Meta rows with a Font Awesome icon (price, district). Icon aligns with the text. */
.dl-price,
.dl-icon-text { display: flex; align-items: center; gap: 6px; }

/* Buttons ---------------------------------------------------------------
   Buttons carry Divi's `.et_pb_button` class so they inherit the site's exact
   button styling. We only add layout spacing here, not their appearance. */
.dl-website { margin: 12px 0; }
.dl-card-readmore { margin-top: auto; padding-top: 28px; }
.dl-btn:hover { cursor: pointer; }

/* Load More ------------------------------------------------------------- */
.dl-loadmore-wrap { text-align: center; margin-top: 32px; }
.dl-loadmore-wrap[hidden] { display: none; }
.dl-loadmore.dl-loading { opacity: 0.6; pointer-events: none; }

/* Social ----------------------------------------------------------------
   Font Awesome brand icons; inherit the theme link colour (blue), dim slightly
   on hover. */
.dl-social { display: flex; gap: 10px; margin-top: 6px; }

.dl-social-link {
	display: inline-flex;
	font-size: 1.6rem;
	line-height: 1;
	opacity: 1;
	transition: opacity 0.15s ease;
}
.dl-social-link:hover { opacity: 0.8; }

/* Empty state ----------------------------------------------------------- */
.dl-empty { padding: 40px 0; text-align: center; opacity: 0.7; }

/* Filter bar ------------------------------------------------------------
   Neutral layout only; inputs inherit the theme. Sits above the loop inside
   .dl-filter-wrap. */
.dl-filter-wrap { margin: 2.5em 0; }
.dl-filter-wrap .dl-loop { margin-top: 0; }

/* Two stacked rows: Search (row 1) then Filters (row 2). The whole bar is wrapped
   in a rounded black border to match the site; a 1px line divides the two rows.
   Tune the border colour/width/radius here. */
.dl-filters {
	display: flex;
	flex-direction: column;
	margin-bottom: 18px;
	border: 2px solid #000;
	border-radius: 10px;
}
.dl-filters-section { padding: 16px 20px; }
.dl-filters-section + .dl-filters-section { border-top: 1px solid #000; }

/* Section heading ("Search", "Filters") — larger/bolder than a control label. */
.dl-filters-heading {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Row 1 — Search: heading to the LEFT of the input + button. */
.dl-filters-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dl-filters-search .dl-filters-heading { white-space: nowrap; }
.dl-filters-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 320px; }
.dl-filters-search .dl-filter--search { flex: 1 1 260px; min-width: 0; }

/* Row 2 — Filters: inline heading + controls, Reset last. Border/padding come from
   the shared .dl-filters-section rules above. */
.dl-filters-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
}
.dl-filters-row .dl-filters-heading { padding-bottom: 8px; }

.dl-filters-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	flex: 1 1 auto;
}

.dl-filter { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }

.dl-filter-label { font-size: 0.8rem; font-weight: 600; opacity: 0.8; }

.dl-filter-input {
	width: 100%;
	padding: 9px 12px;
	font-size: 0.95rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	background: #fff;
	line-height: 1.3;
}
.dl-filter-select { appearance: auto; }

.dl-filter-options { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dl-filter-option { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }

.dl-filter-range { display: flex; align-items: center; gap: 8px; }
.dl-filter-range .dl-filter-input { width: 90px; }
.dl-range-sep { opacity: 0.6; }

.dl-filters-actions { display: flex; align-items: flex-end; gap: 10px; }

/* Reset: last item on the Filters row. margin-left:auto anchors it to the far end. */
.dl-filters-reset {
	margin-left: auto;
	align-self: flex-end;
	background: none;
	border: 0;
	padding: 9px 6px;
	font-size: 0.9rem;
	text-decoration: underline;
	opacity: 0.75;
	cursor: pointer;
}
.dl-filters-reset:hover { opacity: 1; }
.dl-filters-reset[hidden] { display: none; }

.dl-results-count { font-size: 0.9rem; opacity: 0.7; margin: 0 0 16px; }

/* Subtle busy state while a filter request is in flight. */
.dl-loop.dl-busy { opacity: 0.55; transition: opacity 0.15s ease; pointer-events: none; }

@media (max-width: 767px) {
	.dl-filters-controls { gap: 12px; }
	.dl-filter { min-width: 100%; }
}
