/* Complementos propios de la versión WordPress (main.css = estilos originales). */

/* Barra de admin de WP sobre el header fijo. */
.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } }

/* Tarjetas: imagen y título ahora son enlaces. */
.card-image { display: block; }
.card-body h3 a:hover { color: var(--blue); }

/* Ficha: sin hero, el header parte sólido (también sin JS). */
.single-evento .topbar { background: rgba(8,18,36,.84); backdrop-filter: blur(12px); }
.single-evento .tabsnav a { text-shadow: none; }

/* Ficha: la descripción viene de the_content(). */
.evento-wrap { padding-top: 104px; }
.evento-desc p { margin: 0 0 1em; white-space: pre-line; }
.evento-desc p:last-child { margin-bottom: 0; }

/* Chip del local en la ficha del evento. */
.local-chip { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.local-chip:hover { border-color: var(--blue); }
.local-chip-img { width: 48px; height: 48px; border-radius: 10px; background: #eef5fb center/cover no-repeat; flex-shrink: 0; }
.local-chip b { display: block; font-size: 14px; }
.local-chip small { color: var(--muted); font-size: 12px; }

/* Ficha de local. */
.local-hero { background: linear-gradient(90deg, rgba(3,18,39,.86), rgba(3,18,39,.5)), var(--local-bg) center/cover no-repeat; }
.local-hero .evento-kicker { color: var(--orange); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; margin: 0 0 6px; }
.local-hero .meta-item { display: inline-flex; gap: 6px; align-items: center; }
.local-info { display: grid; gap: 14px; }
.local-desc p { margin: 0 0 .8em; }
.local-links { display: flex; gap: 8px; flex-wrap: wrap; }
.local-links .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Paginación. */
.av-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.av-pagination .page-numbers { min-width: 40px; padding: 9px 12px; text-align: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--navy); }
.av-pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Contenido de páginas genéricas. */
.entry-content { line-height: 1.6; }
.entry-content > :first-child { margin-top: 0; }

/* WooCommerce (carrito, checkout, mi cuenta) dentro del layout del tema. */
.woocommerce-page .entry-content { max-width: 100%; }
.woocommerce-cart .panel, .woocommerce-checkout .panel, .woocommerce-account .panel { padding: 24px; }
.woocommerce .button, .woocommerce button.button, .wc-block-components-button:not(.is-link) { border-radius: 10px !important; font-weight: 800 !important; }
.woocommerce .button.alt, .wc-block-components-checkout-place-order-button { background: var(--orange) !important; color: #fff !important; }
/* WooCommerce aplica `.woocommerce-page img{height:auto}` y agranda el logo. */
.topbar .logo .logo-img { height: 52px; width: auto; max-width: none; }
.footer .footer-brand img { height: 42px; width: auto; }

/* Fondos editables desde el admin (hero de portada y cabecera de páginas internas). */
.hero { background: linear-gradient(90deg, rgba(3,18,39,.83), rgba(3,18,39,.46)), var(--hero-bg, url('../assets/hero-antofagasta.jpg')) center/cover no-repeat; }
.page-hero:not(.local-hero) { background: linear-gradient(90deg, rgba(3,18,39,.83), rgba(3,18,39,.46)), var(--page-hero-bg, url('../assets/hero-antofagasta.jpg')) center/cover no-repeat; }

/* Sección texto + imagen. */
.av-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.av-split.is-reversed .av-split-media { order: -1; }
.av-split-text h2 { margin: 0 0 12px; }
.av-split-text .btn { display: inline-block; margin-top: 8px; }
.av-split-media img { width: 100%; height: auto; border-radius: 16px; display: block; box-shadow: var(--shadow); }
@media (max-width: 760px) { .av-split { grid-template-columns: 1fr; } .av-split.is-reversed .av-split-media { order: 0; } }

/* Sección CTA. */
.av-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, var(--navy), #0e5d9c); }
.av-cta h2 { margin: 0 0 6px; }
.av-cta p { margin: 0; opacity: .9; }

/* Redes en el footer. */
.footer-social { display: inline-flex; gap: 10px; margin-left: auto; }
.footer-social a { color: var(--navy); display: inline-flex; }

/* SEO: imágenes reales en tarjetas (indexables, lazy, srcset). */
.card-image { overflow: hidden; }
.card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-image .badge { z-index: 1; }

/* Migas de pan. */
.av-breadcrumbs { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.av-breadcrumbs a { color: var(--navy); font-weight: 600; }
.av-breadcrumbs a:hover { color: var(--blue); }

/* AEO: respuesta directa y fecha de actualización. */
.evento-answer { font-size: 16px; line-height: 1.55; padding: 14px 16px; border-left: 4px solid var(--orange); background: #fff; border-radius: 0 12px 12px 0; margin: 0 0 8px; }
.evento-updated { margin: 6px 0 0; text-align: center; }
.av-intro { max-width: 860px; margin-bottom: 20px; line-height: 1.6; }

/* Preguntas frecuentes. */
.av-faq h2 { margin: 0 0 14px; }
.av-faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.av-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.av-faq summary::-webkit-details-marker { display: none; }
.av-faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--blue); }
.av-faq details[open] summary::after { content: "–"; }
.av-faq-a { padding: 0 16px 14px; color: #33475b; line-height: 1.6; }
.av-faq-a p { margin: 0; }

/* Footer: enlaces internos. */
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-links a { color: var(--navy); font-weight: 600; font-size: 12px; }
.footer-links a:hover { color: var(--blue); }

/* Accesibilidad (WCAG AA 4.5:1) — mismos tonos de marca, levemente más oscuros. */
:root { --muted: #5a6b7c; }
.subtle { color: var(--muted); }
.badge { background: #0a6cb8; }
.free { color: #0f6e33; }
.btn-blue { background: #0b74c4; }
.btn-blue:hover { background: #0960a2; }
.evento-kicker { color: #0a6cb8; }
.footer { color: #5a6b7c; }

/* ---------- Barra de filtros (categorías) ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.04); display: grid; gap: 10px; }
.filter-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.filter-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; border: 1px solid #dbe3ea; border-radius: 10px; padding: 0 12px; color: var(--muted); font-weight: 400; }
.filter-search input { border: 0; outline: 0; padding: 11px 0; background: transparent; }
.filter-search:focus-within, .filter-select select:focus { border-color: var(--blue); outline: 2px solid rgba(17,156,243,.18); }
.filter-select { flex: 0 1 240px; }
.filter-select select { height: 100%; padding: 11px 12px; font-size: 14px; }
.filter-toggle { display: flex; align-items: center; gap: 8px; border: 1px solid #dbe3ea; border-radius: 10px; padding: 0 14px; cursor: pointer; font-size: 14px; color: var(--text); }
.filter-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.filter-toggle:has(input:checked) { border-color: #9cd6ae; background: #effff4; color: #0f6e33; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-chip { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; font-weight: 400; }
.filter-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.filter-chip span { padding: 7px 12px; border-radius: 999px; border: 1px solid #dbe3ea; background: #fff; color: #34536f; font-size: 13px; font-weight: 700; }
.filter-chip:hover span { border-color: var(--blue); }
.filter-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.filter-clear { margin-left: auto; font-size: 13px; font-weight: 700; color: #0a6cb8; text-decoration: underline; }
.filter-bar.js-ready .filter-submit { display: none; }
@media (max-width: 760px) {
	.filter-row { flex-direction: column; }
	.filter-select, .filter-search, .filter-toggle { flex: 1 1 auto; }
	.filter-toggle { padding: 11px 14px; }
	.filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.filter-chips::-webkit-scrollbar { display: none; }
	.filter-chip span { white-space: nowrap; }
	.filter-clear { margin-left: 0; white-space: nowrap; }
}

/* ---------- Tarjetas: precio y botones siempre alineados abajo ---------- */
.card { display: flex; flex-direction: column; }
.card-body { flex: 1; display: flex; flex-direction: column; }
.card-body h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; min-height: 2.5em; }
.card .meta-item > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 10px; }
.card-foot .price { margin-top: 0; }
@media (max-width: 520px) { .card-body h3 { min-height: 0; } }

/* ---------- Mini mapa del local ---------- */
.local-map { margin-top: 18px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.04); background: #eef5fb; height: 320px; }
.local-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.local-directions { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
@media (max-width: 760px) { .local-map { height: 260px; } }

/* ---------- Datos del local ---------- */
.local-facts h2 { margin: 0 0 12px; font-size: 18px; }
.local-facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; margin: 0; }
.local-facts dl > div { border-left: 3px solid #e4eef7; padding-left: 10px; }
.local-facts dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.local-facts dd { margin: 3px 0 0; font-size: 14px; color: var(--text); }
.local-facts dd a { color: #0a6cb8; font-weight: 700; }
.local-services { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.local-services li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #effff4; color: #0f6e33; border: 1px solid #9cd6ae; font-size: 12px; font-weight: 700; }

/* ---------- Ficha del local: orden y carrusel ---------- */
.local-all { font-weight: 700; color: #0a6cb8; white-space: nowrap; }
.local-all:hover { text-decoration: underline; }
.local-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.local-desc, .local-facts { margin-top: 22px; }
.local-desc h2 { margin: 0 0 12px; font-size: 18px; }
.av-carousel { position: relative; }
.av-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 8px; scrollbar-width: none; -ms-overflow-style: none; }
.av-carousel-track::-webkit-scrollbar { display: none; }
.av-carousel-track > .card { scroll-snap-align: start; }
.av-carousel-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 12px; }
.av-carousel-btn { position: absolute; top: 40%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); box-shadow: 0 6px 18px rgba(0,0,0,.15); display: grid; place-items: center; cursor: pointer; }
.av-carousel-btn[hidden] { display: none; }
.av-carousel-btn.prev { left: -14px; }
.av-carousel-btn.next { right: -14px; }
.av-carousel-btn:hover { background: var(--navy); color: #fff; }
@media (max-width: 1050px) { .av-carousel-track { grid-auto-columns: calc((100% - 2 * 14px) / 3); } }
@media (max-width: 760px) { .av-carousel-track { grid-auto-columns: calc((100% - 14px) / 2); } .av-carousel-btn { display: none; } }
@media (max-width: 520px) { .av-carousel-track { grid-auto-columns: 82%; } }
