/* AB - Directorio de Fichas
   Paleta tomada del modelo anterior (tabs.jpg / restaurante.jpg) y de la
   línea gráfica del sitio (verde oliva, acento celeste, dorado de resalte).
   Los valores por defecto se pueden ajustar por widget desde Elementor
   (pestaña Estilo); estas son las variables de respaldo. */
.abdf-widget {
	--abdf-accent: #2F9BC4;
	--abdf-tab-text: #FFFFFF;
	--abdf-highlight: #F2B705;
	--abdf-highlight-text: #3B2A00;
	--abdf-badge-bg: #E9EFC5;
	--abdf-badge-text: #748029;
	--abdf-title: #2F4B24;
	--abdf-primary: #8BC34A;
	--abdf-border: #E3E7EC;
	--abdf-muted: #8A93A3;
	--abdf-text: #4B5563;

	font-family: inherit;
}

.abdf-widget * {
	box-sizing: border-box;
}

/* Buscador */
.abdf-search {
	margin-bottom: 22px;
}

.abdf-search-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.abdf-search-box {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 320px;
	max-width: 440px;
	background: #fff;
	border: 1px solid var(--abdf-border);
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(20, 30, 15, 0.03);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.abdf-search-box:focus-within {
	border-color: var(--abdf-accent);
	box-shadow: 0 0 0 3px rgba(47, 155, 196, 0.16);
}

.abdf-search-icon {
	flex: none;
	margin-left: 16px;
	color: var(--abdf-accent);
	pointer-events: none;
}

.abdf-search-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 11px 12px;
	border: none;
	background: transparent;
	font-size: 14px;
	color: var(--abdf-text);
	outline: none;
}

.abdf-search-input::-webkit-search-cancel-button {
	display: none;
}

.abdf-search-clear {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-right: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	color: var(--abdf-muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.abdf-search-clear:hover {
	background: rgba(0, 0, 0, 0.12);
	color: var(--abdf-title);
}

.abdf-search-clear[hidden] {
	display: none;
}

.abdf-search-status {
	margin: 8px 2px 0;
	min-height: 18px;
	font-size: 13px;
	color: var(--abdf-muted);
}

/* Botón "Filtros" */
.abdf-filter-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 11px 18px;
	background: #fff;
	border: 1px solid var(--abdf-border);
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(20, 30, 15, 0.03);
	font-size: 14px;
	font-weight: 700;
	color: var(--abdf-title);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.abdf-filter-btn svg {
	color: var(--abdf-accent);
}

.abdf-filter-btn:hover {
	background: rgba(0, 0, 0, 0.03);
	border-color: var(--abdf-accent);
}

.abdf-filter-btn.has-active {
	border-color: var(--abdf-accent);
	background: rgba(47, 155, 196, 0.06);
}

.abdf-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--abdf-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
}

.abdf-filter-count[hidden] {
	display: none;
}

/* Popup de filtros */
.abdf-filters-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(20, 30, 15, 0.45);
	backdrop-filter: blur(1px);
}

.abdf-filters-overlay[hidden] {
	display: none;
}

.abdf-filters-modal {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 480px;
	max-height: min(88vh, 720px);
	background: #fff;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	animation: abdf-sheet-in 0.2s ease-out;
}

@keyframes abdf-sheet-in {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.abdf-filters-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: none;
	padding: 18px 20px;
	border-bottom: 1px solid var(--abdf-border);
}

.abdf-filters-header h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	color: var(--abdf-title);
}

.abdf-filters-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--abdf-title);
	cursor: pointer;
}

.abdf-filters-close:hover {
	background: rgba(0, 0, 0, 0.1);
}

.abdf-filters-reset {
	padding: 0;
	border: none;
	background: none;
	font-size: 13px;
	font-weight: 700;
	color: var(--abdf-accent);
	cursor: pointer;
	text-decoration: underline;
}

.abdf-filters-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 6px 20px 20px;
}

.abdf-filter-section {
	padding: 16px 0;
	border-bottom: 1px solid var(--abdf-border);
}

.abdf-filter-section:last-child {
	border-bottom: none;
}

.abdf-filter-heading {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 800;
	color: var(--abdf-title);
}

.abdf-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.abdf-widget button.abdf-filter-pill {
	padding: 8px 15px;
	background: #F5F6F8;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--abdf-title);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.abdf-widget button.abdf-filter-pill:hover {
	border-color: var(--abdf-accent);
}

.abdf-widget button.abdf-filter-pill.is-selected {
	background: var(--abdf-accent);
	border-color: var(--abdf-accent);
	color: #fff;
}

.abdf-filters-footer {
	flex: none;
	padding: 16px 20px;
	border-top: 1px solid var(--abdf-border);
}

.abdf-filters-apply {
	display: block;
	width: 100%;
	padding: 14px;
	border: none;
	border-radius: 999px;
	background: var(--abdf-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.abdf-filters-apply:hover {
	filter: brightness(1.06);
}

/* Tabs */
.abdf-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border-bottom: 1px solid var(--abdf-border);
	padding-bottom: 14px;
	margin-bottom: 24px;
}

.abdf-widget button.abdf-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: transparent;
	border: none;
	padding: 9px 16px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--abdf-muted);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.abdf-tab-icon {
	flex: none;
	color: var(--abdf-muted);
	transition: color 0.15s ease;
}

.abdf-tab-count {
	flex: none;
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: inherit;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.abdf-widget button.abdf-tab:hover:not(.is-active) {
	background-color: rgba(0, 0, 0, 0.045);
	color: var(--tab-bg, var(--abdf-accent));
}

.abdf-widget button.abdf-tab:hover:not(.is-active) .abdf-tab-icon {
	color: var(--tab-bg, var(--abdf-accent));
}

.abdf-widget button.abdf-tab.is-active {
	background-color: var(--tab-bg, var(--abdf-accent)) !important;
	color: var(--tab-text, var(--abdf-tab-text)) !important;
}

.abdf-widget button.abdf-tab.is-active .abdf-tab-icon {
	color: var(--tab-text, var(--abdf-tab-text)) !important;
}

.abdf-widget button.abdf-tab.is-active .abdf-tab-count {
	background: rgba(255, 255, 255, 0.28);
}

/* Panels */
.abdf-panel {
	display: none;
}

.abdf-panel.is-active {
	display: block;
}

.abdf-empty,
.abdf-no-results {
	color: var(--abdf-muted);
	font-style: italic;
}

.abdf-no-results[hidden] {
	display: none;
}

.abdf-cards {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.abdf-load-more {
	display: block;
	margin: 22px auto 0;
	padding: 10px 28px;
	border-radius: 999px;
	border: 2px solid var(--abdf-primary);
	background: transparent;
	color: var(--abdf-title);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.abdf-load-more:hover {
	background: var(--abdf-primary);
	color: #fff;
}

/* Ficha (card) */
.abdf-card {
	display: flex;
	background: #fff;
	border: 1px solid var(--abdf-border);
	border-radius: 16px;
	box-shadow: 0 2px 10px rgba(20, 30, 15, 0.04);
	padding: 26px 30px;
	gap: 30px;
}

.abdf-card-left {
	flex: 1 1 58%;
	min-width: 0;
}

.abdf-card-right {
	flex: 1 1 42%;
	min-width: 0;
	padding-left: 30px;
	border-left: 1px solid var(--abdf-border);
}

.abdf-badge {
	display: inline-block;
	background: var(--abdf-badge-bg);
	color: var(--abdf-badge-text);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 5px 16px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.abdf-category {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--abdf-muted);
	margin-bottom: 6px;
}

.abdf-title {
	margin: 0 0 14px;
	font-size: 21px;
	font-weight: 800;
	color: var(--abdf-title);
	line-height: 1.25;
}

.abdf-field-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--abdf-title);
	margin: 16px 0 6px;
}

.abdf-card-left > .abdf-field-label:first-child,
.abdf-card-right > .abdf-field-label:first-child {
	margin-top: 0;
}

.abdf-field-label-accent {
	color: var(--abdf-accent);
}

.abdf-icon-pin {
	color: var(--abdf-accent);
	flex: none;
}

.abdf-field-value {
	font-size: 14px;
	color: var(--abdf-text);
	line-height: 1.5;
}

.abdf-pill {
	display: inline-block;
	background: var(--abdf-highlight);
	color: var(--abdf-highlight-text);
	font-size: 13px;
	font-weight: 700;
	padding: 9px 16px;
	border-radius: 999px;
	line-height: 1.35;
	max-width: 100%;
}

.abdf-eco-badge {
	display: inline-block;
	margin-top: 16px;
	background: rgba(139, 195, 74, 0.15);
	color: #4B6B1F;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
}

.abdf-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--abdf-accent);
	text-decoration: none;
}

.abdf-link:hover {
	text-decoration: underline;
}

.abdf-link-button {
	margin-top: 18px;
	padding: 8px 16px;
	border: 1px solid var(--abdf-accent);
	border-radius: 999px;
}

/* En pantallas de escritorio el popup de filtros se centra como modal en
   vez de quedar pegado al borde inferior. */
@media (min-width: 640px) {
	.abdf-filters-overlay {
		align-items: center;
		padding: 24px;
	}

	.abdf-filters-modal {
		border-radius: 20px;
		max-height: min(85vh, 640px);
	}

	@keyframes abdf-sheet-in {
		from { transform: translateY(10px); opacity: 0; }
		to { transform: translateY(0); opacity: 1; }
	}
}

/* Responsive: en pantallas chicas la ficha se apila en una sola columna */
@media (max-width: 720px) {
	.abdf-card {
		flex-direction: column;
		padding: 20px;
	}

	.abdf-card-right {
		padding-left: 0;
		padding-top: 18px;
		border-left: none;
		border-top: 1px solid var(--abdf-border);
	}

	.abdf-tabs {
		gap: 8px;
		overflow-x: auto;
		flex-wrap: nowrap;
	}

	.abdf-widget button.abdf-tab {
		white-space: nowrap;
	}

	.abdf-search-box {
		max-width: 100%;
	}
}
