/* ==========================================================================
   Maquetación de la tienda: cabecera, portada con imagen, catálogo y pie
   (con los beneficios). La cabecera flota sobre la portada y se vuelve
   blanca al bajar (clase .is-scrolled, la pone store/main.js).
   ========================================================================== */
:root { --header-h: 72px; }

/* ---------- Cabecera: buscador | logo centrado | acciones ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: #fff; transition: box-shadow .35s var(--ease), color .35s; animation: fadeIn .8s .1s both; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .35s var(--ease); }
.site-header.is-scrolled { color: var(--brand); box-shadow: 0 6px 24px rgba(8, 36, 62, .1); }
.site-header.is-scrolled::before { opacity: 1; }
.site-header__in {
  max-width: var(--max); margin: auto; padding: 12px 24px; min-height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  grid-template-areas: "search brand actions";
}
.search { grid-area: search; position: relative; max-width: 340px; width: 100%; }
.search__btn { position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 42px; display: grid; place-items: center; border: 0; background: none; color: rgba(255,255,255,.85); cursor: pointer; border-radius: var(--r-md) 0 0 var(--r-md); transition: color .3s, transform .25s var(--ease); }
.search__btn:hover { color: var(--gold-300); transform: scale(1.12); }
.search__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.search input { width: 100%; min-height: 42px; padding: 0 14px 0 40px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-md); background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); transition: background-color .3s, border-color .3s, box-shadow .3s; }
.search input::placeholder { color: rgba(255,255,255,.78); }
.search input:hover { border-color: rgba(255,255,255,.6); }
.search input:focus { background: #fff; color: var(--ink); border-color: var(--gold); outline: 0; box-shadow: 0 0 0 3px rgba(189,159,78,.35); }
.search input:focus::placeholder { color: var(--muted); }
.search:focus-within .search__btn { color: var(--muted); }
.search:focus-within .search__btn:hover { color: var(--brand); }
.site-header.is-scrolled .search__btn { color: var(--muted); }
.site-header.is-scrolled .search__btn:hover { color: var(--brand); }
.site-header.is-scrolled .search input { background: var(--soft); border-color: transparent; color: var(--ink); backdrop-filter: none; }
.site-header.is-scrolled .search input::placeholder { color: var(--muted); }
.site-header.is-scrolled .search input:hover { border-color: #cfcabd; }
.site-header.is-scrolled .search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,58,97,.15); }

/* El logo grande ya está en la portada: en la cabecera aparece al bajar. */
.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
.site-header.is-scrolled .brand { opacity: 1; visibility: visible; transform: none; transition: opacity .35s .1s var(--ease), transform .35s .1s var(--ease); }
.brand img { height: 46px; width: auto; }
.brand__word { font-size: 20px; letter-spacing: .06em; font-weight: 400; white-space: nowrap; }
.brand__word b { font-weight: 800; }

.header-actions { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: 8px; }
.site-header:not(.is-scrolled) .header-actions .btn--ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); color: #fff; backdrop-filter: blur(6px); }
.site-header:not(.is-scrolled) .header-actions .btn--ghost:hover { background: rgba(255,255,255,.24); border-color: #fff; }
.site-header:not(.is-scrolled) .icon-btn:hover { background: rgba(255,255,255,.16); }
.cart-btn { position: relative; color: inherit; }
.count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: var(--brand-900); font-size: 11px; font-weight: 800; }
.count.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.55); } 100% { transform: scale(1); } }

/* ---------- Portada: carrusel horizontal + contenido centrado ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: clamp(600px, 86vh, 800px); padding: calc(var(--header-h) + 28px) 0 96px; background: var(--brand-900); color: #fff; border-bottom: 3px solid var(--gold); text-align: center; }

/* Carrusel: las fotos se deslizan en horizontal con una curva suave y un
   zoom lento (Ken Burns) en la foto activa. */
.hero__slides { position: absolute; inset: 0; z-index: -3; overflow: hidden; animation: fadeIn 1.2s var(--ease) both; }
.hero__track { display: flex; height: 100%; will-change: transform; transition: transform 1.4s cubic-bezier(.77, 0, .18, 1); }
.hero__track.is-still { transition: none; }
.hero__slide { flex: 0 0 100%; height: 100%; margin: 0; overflow: hidden; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.04); transform: scale(1.14); transition: transform 9s linear; }
.hero__slide.is-active img { transform: scale(1.03); }

/* Capas de color: velo azul marino parejo para leer el texto centrado, más
   oscuro en el centro, y un brillo dorado suave abajo. */
.hero__shade { position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(70% 62% at 50% 48%, rgba(8,36,62,.52) 0%, rgba(8,36,62,.28) 70%, rgba(8,36,62,.1) 100%),
  linear-gradient(180deg, rgba(8,36,62,.78) 0%, rgba(8,36,62,0) 28%, rgba(8,36,62,0) 62%, rgba(8,36,62,.8) 100%),
  radial-gradient(60% 40% at 50% 100%, rgba(189,159,78,.22), transparent 70%),
  rgba(13,58,97,.16); }

.hero__in { width: 100%; max-width: var(--max); margin: auto; padding: 0 24px; display: flex; flex-direction: column; align-items: center; }
.hero__in > * { animation: rise .9s var(--ease) both; }
.hero__in > :nth-child(1) { animation-delay: .15s; }
.hero__in > :nth-child(2) { animation-delay: .3s; }
.hero__in > :nth-child(3) { animation-delay: .45s; }
.hero__in > :nth-child(4) { animation-delay: .55s; }
.hero__in > :nth-child(5) { animation-delay: .7s; }
.hero__logo { width: auto; height: 112px; margin: 0 0 24px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }

/* Frase con escritura elegante: cada letra aparece enfocándose, con un cursor dorado. */
.hero h1 { max-width: 54rem; text-wrap: balance; font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif; font-size: clamp(28px, 4.6vw, 58px); font-weight: 600; line-height: 1.18; letter-spacing: .13em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 22px rgba(8,36,62,.6); }
.hero__type .w { display: inline-block; white-space: nowrap; }
.hero__type .c { display: inline-block; opacity: 0; transform: translateY(.16em); filter: blur(5px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease); }
.hero__type .c.on { opacity: 1; transform: none; filter: none; }
.hero__type .caret { display: inline-block; width: 2px; height: .82em; margin: 0 -2px 0 2px; vertical-align: -.06em; background: var(--gold-300); box-shadow: 0 0 10px rgba(214,187,112,.7); animation: caretBlink .9s steps(1) infinite; transition: opacity .8s; }
.hero__type .caret.is-done { opacity: 0; animation: none; }
@keyframes caretBlink { 50% { opacity: 0; } }

.rule { display: block; width: 56px; height: 3px; margin: 22px auto; background: var(--gold); border: 0; border-radius: 2px; }
.catalog__head .rule { margin: 14px auto 10px; width: 48px; height: 2px; }
.hero__in p { max-width: 34rem; font-size: 17px; color: #e3ebf3; text-shadow: 0 1px 14px rgba(8,36,62,.6); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.btn--gold { background: var(--gold); color: var(--brand-900); font-weight: 700; box-shadow: 0 8px 24px rgba(189,159,78,.35); transition: transform .25s var(--ease), box-shadow .25s, background-color .15s; }
.btn--gold:hover { background: var(--gold-300); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(189,159,78,.45); }
.btn--glass { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); backdrop-filter: blur(8px); transition: transform .25s var(--ease), background-color .2s, border-color .2s; }
.btn--glass:hover { background: rgba(255,255,255,.22); border-color: #fff; transform: translateY(-2px); }

/* Indicadores del carrusel: nombre del estilo con barra dorada de progreso. */
.hero__nav { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 22px; width: max-content; max-width: calc(100% - 32px); }
.hero__tab { position: relative; padding: 12px 2px 10px; border: 0; background: none; color: rgba(255,255,255,.62); font: 700 11px/1 var(--font); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; transition: color .3s; }
.hero__tab::before, .hero__tab::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; }
.hero__tab::before { background: rgba(255,255,255,.28); }
.hero__tab::after { background: var(--gold-300); transform: scaleX(0); transform-origin: left; }
.hero__tab:hover { color: #fff; }
.hero__tab.is-active { color: #fff; }
.hero__tab.is-active::after { animation: tabFill var(--slide-ms, 5500ms) linear forwards; }
.hero__nav.is-paused .hero__tab.is-active::after { animation-play-state: paused; }
.hero__nav.is-static .hero__tab.is-active::after { animation: none; transform: scaleX(1); }
.hero__tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@keyframes tabFill { to { transform: scaleX(1); } }

/* ---------- Catálogo ---------- */
.catalog { max-width: var(--max); margin: 0 auto; padding: 56px 24px 80px; scroll-margin-top: calc(var(--header-h) - 40px); }
.catalog__head { text-align: center; }
.catalog__head h2 { font-size: 30px; color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 260px)); justify-content: center; gap: 28px 22px; margin-top: 36px; }

/* ---------- Pie: beneficios y contacto de WhatsApp ---------- */
.site-footer { background: var(--brand-900); color: #b6c3d1; border-top: 3px solid var(--gold); text-align: center; }
.trust { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.trust ul { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid rgba(255,255,255,.12); }
.trust li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 12px; text-align: center; font-size: 14px; border-left: 1px solid rgba(255,255,255,.12); }
.trust li:first-child { border-left: 0; }
.trust .ico { font-size: 28px; color: var(--gold-300); transition: transform .4s var(--ease); }
.trust li:hover .ico { transform: translateY(-3px) scale(1.1); }
.trust b { display: block; font-weight: 600; color: #fff; }
.trust li span span { color: #9fb0c2; font-size: 13px; }
.site-footer__in { max-width: var(--max); margin: auto; padding: 40px 24px 36px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.site-footer .brand { color: #fff; opacity: 1; visibility: visible; transform: none; }
.site-footer .brand img { height: 52px; }
.site-footer__in p { font-size: 14px; }
.site-footer__copy { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 20px; max-width: var(--max); margin: auto; padding: 18px 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.admin-link { display: inline-flex; align-items: center; gap: 6px; color: #8fa1b4; text-decoration: none; transition: color .2s; }
.admin-link:hover { color: #fff; }

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 900px) {
  :root { --header-h: 118px; }
  .site-header__in { grid-template-columns: 1fr auto 1fr; grid-template-areas: ". brand actions" "search search search"; gap: 12px 16px; padding: 10px 16px; }
  .search { max-width: none; }
  .trust ul { grid-template-columns: repeat(2, 1fr); }
  .trust li:nth-child(odd) { border-left: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }

  .hero { min-height: 640px; padding: calc(var(--header-h) + 24px) 0 92px; }
  .hero__shade { background:
    radial-gradient(90% 60% at 50% 50%, rgba(8,36,62,.6) 0%, rgba(8,36,62,.38) 75%, rgba(8,36,62,.2) 100%),
    linear-gradient(180deg, rgba(8,36,62,.8) 0%, rgba(8,36,62,0) 30%, rgba(8,36,62,0) 60%, rgba(8,36,62,.85) 100%),
    rgba(13,58,97,.18); }
}
@media (max-width: 600px) {
  :root { --header-h: 112px; }
  .brand img { height: 40px; }
  .brand__word { font-size: 17px; }
  .header-actions .btn span:last-child { display: none; }
  .header-actions .btn { width: 42px; padding: 0; }
  .hero__in { padding: 0 16px; }
  .hero__logo { height: 76px; margin-bottom: 16px; }
  .hero h1 { font-size: 25px; letter-spacing: .1em; }
  .hero__in p { font-size: 15.5px; }
  .hero__nav { gap: 14px; bottom: 18px; }
  .hero__tab { font-size: 10px; letter-spacing: .16em; }
  .rule { margin: 16px 0; }
  .hero__cta { margin-top: 22px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .trust, .catalog { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .card { padding: 7px 7px 10px; border-radius: 10px; }
  .price { font-size: 16.5px; }
}

/* Sección "Ofertas limitadas": mismo formato que el catálogo, va antes de "Todos los productos" */
#catalogo { scroll-margin-top: calc(var(--header-h) - 40px); }
.catalog--combos { padding-bottom: 28px; }
.catalog--combos:not(.hidden) + .catalog { padding-top: 12px; }
.countdown { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 10px; }
.countdown__lbl { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.countdown__t { display: inline-flex; align-items: flex-start; gap: 8px; }
.countdown__t i { font-style: normal; font-weight: 800; font-size: 26px; line-height: 52px; color: var(--gold); }
.countdown__u { display: grid; justify-items: center; gap: 4px; }
.countdown__u b { min-width: 58px; padding: 0 8px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 28px; font-weight: 800; line-height: 52px; letter-spacing: .04em; font-variant-numeric: tabular-nums; box-shadow: 0 6px 16px rgba(8,36,62,.18), inset 0 -2px 0 var(--gold); }
.countdown__u small { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* Portada: logo -> frase escribiéndose -> línea, texto y botones (de arriba hacia abajo) */
.seq-on .hero__in > :nth-child(n+3) { opacity: 0; animation: none; }
.seq-on.seq-go .hero__in > :nth-child(n+3) { animation: rise .9s var(--ease) both; }
.seq-on.seq-go .hero__in > :nth-child(3) { animation-delay: 0s; }
.seq-on.seq-go .hero__in > :nth-child(4) { animation-delay: .18s; }
.seq-on.seq-go .hero__in > :nth-child(5) { animation-delay: .36s; }
@media (max-width: 640px) {
  .countdown__u b { min-width: 50px; font-size: 24px; line-height: 46px; }
  .countdown__t i { line-height: 46px; font-size: 22px; }
}

/* La frase de portada solo usa el efecto de escritura (sin deslizamiento previo) */
.hero__in > .hero__title { animation: none; }

/* La frase no se ve (ni siquiera como texto normal) hasta que empieza a escribirse */
.seq-on .hero__type:not(.is-ready) { visibility: hidden; }
.seq-on.seq-go .hero__type { visibility: visible; }
