/* 1.8.41: Combos listos (portada). Botón = zfl-btn-primary (zfl-ui.css). */
.zfh-combos { --zc-card: #fff; --zc-ink: #111827; --zc-muted: #5b6472; --zc-line: #e5e7eb; }
html.dark-mode .zfh-combos { --zc-card: #1f232b; --zc-ink: #f3f4f6; --zc-muted: #a7afbb; --zc-line: #374151; }
.zfh-combos .zfh-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.zfh-combos-arrows { display: none; gap: 8px; }
.zfh-combos-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--zc-line); background: var(--zc-card); color: var(--zc-ink); font-size: 24px; line-height: 1; cursor: pointer; }
.zfh-combos-arrow:hover { border-color: #e0b400; }
.zfh-combos-track { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.zfh-combo { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--zc-card); color: var(--zc-ink); border: 1px solid var(--zc-line); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(17, 24, 39, .06); min-width: 0; }
.zfh-combo-img { aspect-ratio: 2 / 1; background: #f3f4f6; }
.zfh-combo-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.zfh-combo-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; flex: 1; }
.zfh-combo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.zfh-combo-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--zc-muted); }
.zfh-combo-title { margin: 2px 0 0; font-size: 15px; line-height: 1.25; font-weight: 800; color: var(--zc-ink); }
.zfh-combo-price { text-align: right; flex: none; }
.zfh-combo-price strong { display: block; font-size: 19px; font-weight: 900; color: var(--zc-ink); white-space: nowrap; }
.zfh-combo-price small { display: block; font-size: 11px; color: var(--zc-muted); font-weight: 600; white-space: nowrap; }
.zfh-combo-list summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--zc-muted); }
.zfh-combo-list ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.zfh-combo-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border-bottom: 1px dashed var(--zc-line); padding: 3px 0; }
.zfh-combo-list li a { color: var(--zc-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zfh-combo-list li span { flex: none; font-weight: 700; color: var(--zc-muted); }
.zfh-combo-list li.is-out a { text-decoration: line-through; color: var(--zc-muted); }
.zfh-combo-warn { margin: 0; font-size: 12px; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 6px 8px; }
html.dark-mode .zfh-combo-warn { color: #fde68a; background: rgba(245, 158, 11, .15); }
.zfh-combo-form { margin: auto 0 0; }
html body .zfh-combo-add { width: 100%; }
html body .zfh-combo-add[disabled] { opacity: .55 !important; cursor: not-allowed !important; }
.zfh-combo-status { margin: 6px 0 0; min-height: 0; font-size: 13px; font-weight: 600; color: var(--zc-muted); }
.zfh-combo-status:empty { display: none; }
.zfh-combo-status.is-ok { color: #15803d; }
html.dark-mode .zfh-combo-status.is-ok { color: #4ade80; }
.zfh-combo-status.is-err { color: #b91c1c; }
html.dark-mode .zfh-combo-status.is-err { color: #fca5a5; }
.zfh-combo-status a { color: inherit; font-weight: 800; }
@media (min-width: 640px) { .zfh-combos-track { grid-auto-columns: calc((100% - 12px) / 2); } }
@media (min-width: 1024px) {
    .zfh-combos-arrows { display: flex; }
    .zfh-combos-track { grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; }
}
.zfh-combo-status.is-warn { color: #92400e; } html.dark-mode .zfh-combo-status.is-warn { color: #fde68a; }
.zfl-store-active .zfh > .zfh-combos { order: 1; } /* justo después del hero (storefront-desktop-polish ordena las secciones) */

/* ---- 1.8.44 ---------------------------------------------------------------- */
/* Imagen = botón que abre el lightbox (la imagen ya trae el precio). */
.zfh-combo-zoom { display: block; width: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: #f3f4f6; cursor: zoom-in; position: relative; aspect-ratio: 2 / 1; overflow: hidden; }
html.dark-mode .zfh-combo-zoom { background: #111318; }
.zfh-combo-zoom img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.zfh-combo-zoom:hover img { transform: scale(1.03); }
.zfh-combo-zoom:focus-visible { outline: 3px solid #ffcc00; outline-offset: -3px; }
.zfh-combo-zoom::after { content: "⤢"; position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(17, 24, 39, .6); color: #fff; font-size: 16px; line-height: 30px; text-align: center; opacity: .85; pointer-events: none; }
/* Precio: solo en la imagen; la tarjeta deja el nº de productos en pequeño. */
.zfh-combo-price small { font-size: 12px; }
.zfh-combos-arrow:focus-visible, .zfh-ctab:focus-visible { outline: 3px solid #ffcc00; outline-offset: 2px; }
.zfh-combos-arrow[disabled] { opacity: .35; cursor: default; }

/* Pestañas por tema: solo escritorio de la landing (el móvil queda como 1.8.43). */
.zfh-combo-tabs { display: none; }
@media (min-width: 1024px) {
    .zfh-combos--landing .zfh-combos-track { scrollbar-width: none; }
    .zfh-combos--landing .zfh-combos-track::-webkit-scrollbar { display: none; }
    .zfh-combos-arrow { width: 44px; height: 44px; }
    .zfh-combos--landing .zfh-combos-arrow:not([disabled]):hover { background: #ffcc00; color: #111827; border-color: #ffcc00; }

    /* /shop: cuadrícula 3x3 fija, sin flechas ni desplazamiento. */
    .zfh-combos--shop .zfh-combos-arrows { display: none; }
    .zfh-combos--shop .zfh-combos-track { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; gap: 18px; }

    .zfh-combo-tabs { display: block; --zc-card: #fff; --zc-ink: #111827; --zc-muted: #5b6472; --zc-line: #e5e7eb; --zc-sec: #f3f4f6; }
    html.dark-mode .zfh-combo-tabs { --zc-card: #1f232b; --zc-ink: #f3f4f6; --zc-muted: #a7afbb; --zc-line: #374151; --zc-sec: #262b34; }
    .zfh-combo-tabs .zfh-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
    html body .zfh-combo-tabs-all { width: auto; }
    .zfh-ctabs { display: flex; gap: 10px; margin: 6px 0 18px; flex-wrap: wrap; }
    .zfh-ctab { padding: 10px 22px; border-radius: 999px; border: 1px solid var(--zc-line); background: var(--zc-sec); color: var(--zc-ink); font-weight: 700; font-size: 15px; cursor: pointer; }
    .zfh-ctab:hover { border-color: #e0b400; }
    .zfh-ctab[aria-selected="true"] { background: #ffcc00; border-color: #ffcc00; color: #111827; }
    .zfh-cpanel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .zfh-cpanel[hidden] { display: none; }
    .zfh-cmini { display: flex; flex-direction: column; background: var(--zc-card); color: var(--zc-ink); border: 1px solid var(--zc-line); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(17, 24, 39, .06); }
    .zfh-cmini-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
    .zfh-cmini .zfh-combo-title { font-size: 14px; }
    .zfh-cmini .zfh-combo-form { margin-top: auto; }
}

/* Lightbox (sin librerías). */
.zfl-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; background: rgba(5, 7, 12, .9); }
.zfl-lb[hidden] { display: none; }
.zfl-lb img { display: block; max-width: min(100%, 1600px); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.zfl-lb-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ffcc00; color: #111827; font-size: 26px; font-weight: 800; line-height: 44px; text-align: center; cursor: pointer; padding: 0; }
.zfl-lb-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html.zfl-lb-open, html.zfl-lb-open body { overflow: hidden; }

/* 1.8.45: pestañas justo después del carrusel dentro de la portada-tienda. */
.zfl-store-active .zfh > .zfh-combo-tabs { order: 1; }

/* 1.8.46: «Ver la tienda» arriba de la portada y «Ver toda la tienda» al final. */
.zfh-shop-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #fff8d6; border: 1px solid #ffcc00; color: #111827; order: -1; }
html.dark-mode .zfh-shop-cta { background: rgba(255, 204, 0, .1); border-color: rgba(255, 204, 0, .45); color: #f3f4f6; }
.zfh-shop-cta p { margin: 0; font-size: 14px; line-height: 1.35; }
.zfh-shop-cta p span { opacity: .8; }
html body .zfh-shop-cta-btn { width: auto; flex: none; padding-left: 22px; padding-right: 22px; }
@media (max-width: 639px) { html body .zfh-shop-cta-btn { width: 100%; } .zfh-shop-cta p span { display: none; } }
.zfh-home-end { display: flex; justify-content: center; margin: 28px 0 8px; order: 99; }
html body .zfh-home-end-btn { width: auto; min-width: 260px; }
@media (max-width: 639px) { html body .zfh-home-end-btn { width: 100%; } }
.zfh-shop-head { margin: 8px 0 4px; order: 0; }
.zfh-shop-head .zfh-h2 { margin: 2px 0 0; }

/* 1.8.46: total pequeño en tarjetas generadas, filtro de /shop/, lightbox con la lista del combo. */
.zfh-combo-meta { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--zc-muted); }
.zfh-combo-meta strong { color: var(--zc-ink); font-weight: 800; }
.zfh-combo[hidden] { display: none !important; }
.zfh-cfilter { display: flex; gap: 8px; margin: 4px 0 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.zfh-cfilter .zfh-ctab { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--zc-line); background: var(--zc-card); color: var(--zc-ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.zfh-cfilter .zfh-ctab small { opacity: .65; font-weight: 700; margin-left: 2px; }
.zfh-cfilter .zfh-ctab[aria-pressed="true"] { background: #ffcc00; border-color: #ffcc00; color: #111827; }
.zfl-lb-box { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(100%, 1600px); max-height: calc(100dvh - 72px); overflow: auto; }
.zfl-lb.has-info .zfl-lb-box img { max-height: 60vh; max-height: 60dvh; }
.zfl-lb-side:empty { display: none; }
.zfl-lb-info { background: #fff; color: #111827; border-radius: 14px; padding: 14px 16px; width: min(100%, 720px); box-sizing: border-box; }
html.dark-mode .zfl-lb-info { background: #1f232b; color: #f3f4f6; }
.zfl-lb-info h3 { margin: 2px 0 8px; font-size: 17px; font-weight: 800; }
.zfl-lb-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.zfl-lb-info li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px dashed rgba(127, 127, 127, .35); }
.zfl-lb-info li b { font-weight: 800; white-space: nowrap; }
.zfl-lb-info li em { font-style: normal; opacity: .75; white-space: nowrap; }
.zfl-lb-total { margin: 10px 0 0; font-size: 15px; }
.zfl-lb-total small { opacity: .7; font-size: 12px; }
@media (min-width: 1024px) {
    .zfl-lb.has-info .zfl-lb-box { flex-direction: row; align-items: flex-start; }
    .zfl-lb.has-info .zfl-lb-box img { max-width: 64vw; max-height: calc(100vh - 100px); }
    .zfl-lb-info { width: 360px; flex: none; }
}

.zfh-combos-more { display: none; justify-content: center; margin: 14px 0 0; }
@media (min-width: 1024px) {
    .zfh-combos-more { display: flex; }
    .zfh-combos-more[hidden] { display: none; }
    .zfh-combos--shop .zfh-combos-track.is-collapsed > .zfh-combo:nth-child(n+10) { display: none; }
    html body .zfh-combos-more .zfl-btn-secondary { width: auto; min-width: 240px; }
}

/* 1.8.47: «Ver la tienda» no se sale de la franja en el móvil. */
.zfh-shop-cta, .zfh-shop-cta * { box-sizing: border-box; }
.zfh-shop-cta { width: 100%; max-width: 100%; min-width: 0; }
@media (max-width: 639px) {
    .zfh-shop-cta { flex-direction: column; align-items: stretch; padding: 12px; }
    html body .zfh-shop-cta .zfh-shop-cta-btn { display: flex; justify-content: center; width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 0 !important; flex: none; }
    html body .zfh-home-end-btn { box-sizing: border-box; max-width: 100%; min-width: 0; }
}

/* 1.8.47: botón «Ver todos los combos» (solo móvil/tableta en /shop/). */
.zfh-combos-mgrid { margin: 0 0 12px; }
html body .zfh-combos-mgrid .zfl-btn-primary { display: flex; justify-content: center; width: 100%; max-width: 100%; box-sizing: border-box; margin: 0; }
.zfh-combos-track.is-mgrid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; scroll-snap-type: none; }
@media (min-width: 640px) { .zfh-combos-track.is-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .zfh-combos-mgrid { display: none; } }

/* 1.8.52: portada con todos los combos en cuadrícula (/?combos=todos#zfh-combos). */
.zfh-combos-all { width: auto !important; white-space: nowrap; min-height: 40px; padding: 8px 14px !important; font-size: 14px; }
.zfh-combos--landing .zfh-combos-arrows { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1023px) { .zfh-combos--landing .zfh-combos-arrow { display: none; } }
.zfh-combos-track.is-allgrid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; scroll-snap-type: none; }
@media (min-width: 640px) { .zfh-combos-track.is-allgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .zfh-combos-track.is-allgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.zfh-combos-track.is-allgrid ~ * .zfh-combos-arrow, .zfh-combos:has(.is-allgrid) .zfh-combos-arrow { display: none; }
