/* =========================================================
   Totonitos — landing / catálogo
   Paleta original: crema, durazno (brand) y marrón osito (bear)
   ========================================================= */
:root {
    --cream-50: #FFFBF7;
    --cream-100: #FDF6F0;
    --cream-200: #FAE8D8;
    --brand-50: #FFF1EC;
    --brand-100: #FDECE6;
    --brand-200: #FAD2C8;
    --brand-300: #F6CAC0;
    --brand-400: #F4A261;
    --brand-500: #E89F88;
    --brand-600: #D6836B;
    --brand-700: #B9654D; /* para texto chico sobre claro (contraste AA) */
    --bear-100: #EAE2DC;
    --bear-300: #CBBAB4;
    --bear-500: #A88B7D;
    --bear-600: #7F6759;
    --bear-800: #5D4D43;
    --bear-900: #3E332C;
    --wa: #25D366;
    --wa-dark: #128C7E;

    --font-body: 'Quicksand', system-ui, sans-serif;
    --font-display: 'Fredoka', 'Quicksand', system-ui, sans-serif;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 10px -4px rgba(93, 77, 67, .12);
    --shadow: 0 14px 40px -14px rgba(214, 131, 107, .35);
    --shadow-lg: 0 30px 70px -20px rgba(62, 51, 44, .35);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

    --topbar-h: 64px;
    --gutter: 16px;
}

@media (min-width: 768px) {
    :root { --topbar-h: 76px; --gutter: 32px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-h) + 12px);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}
body {
    margin: 0;
    background: var(--cream-50);
    color: var(--bear-800);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); color: var(--bear-900); line-height: 1.1; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
::selection { background: var(--brand-200); color: var(--bear-900); }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; border-radius: 8px; }
[hidden], .hidden { display: none !important; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px;
    background: var(--bear-900); color: #fff; border-radius: 999px; transform: translateY(-150%);
    transition: transform .2s;
}
.skip-link:focus { transform: none; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.6em; height: 1.6em; }

/* ---------- Botones ---------- */
.btn {
    --bg: var(--brand-600); --fg: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 48px; padding: 0 22px; border-radius: 999px;
    background: var(--bg); color: var(--fg);
    font-weight: 700; font-size: 1rem; letter-spacing: .01em; white-space: nowrap;
    transition: transform .25s var(--ease-spring), box-shadow .25s, background-color .2s, color .2s;
    user-select: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.96); transition-duration: .1s; }
.btn--primary { box-shadow: 0 10px 24px -10px rgba(214, 131, 107, .8); }
.btn--primary:hover { --bg: var(--brand-700); }
.btn--wa { --bg: var(--wa); --fg: #fff; box-shadow: 0 10px 24px -10px rgba(37, 211, 102, .7); }
.btn--wa:hover { --bg: var(--wa-dark); }
.btn--ghost { --bg: #fff; --fg: var(--bear-800); box-shadow: var(--shadow-sm); }
.btn--ghost .icon { color: var(--wa); }
.btn--outline { --bg: #fff; --fg: var(--brand-700); border: 2px solid var(--brand-200); }
.btn--outline:hover { border-color: var(--brand-500); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--icon {
    width: 54px; min-height: 54px; padding: 0; flex-shrink: 0;
    --bg: var(--brand-50); --fg: var(--brand-700);
}
.btn--icon:hover { --bg: var(--brand-100); }

/* ---------- Barra superior ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--topbar-h);
    background: rgba(255, 251, 247, .82);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.topbar.is-scrolled { border-color: var(--brand-100); box-shadow: 0 6px 24px -18px rgba(93, 77, 67, .5); }
.topbar__inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.topbar__brand { display: block; margin-right: auto; transition: transform .3s var(--ease-spring); }
.topbar__brand:hover { transform: scale(1.04) rotate(-1deg); }
.topbar__brand img { height: calc(var(--topbar-h) - 18px); width: auto; }
.topbar__nav { display: none; gap: 28px; font-weight: 700; color: var(--bear-600); }
.topbar__nav a { position: relative; padding: 6px 0; }
.topbar__nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px;
    background: var(--brand-500); transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.topbar__nav a:hover { color: var(--bear-900); }
.topbar__nav a:hover::after { transform: scaleX(1); }
@media (min-width: 768px) { .topbar__nav { display: flex; } }
@media (max-width: 380px) { .hide-xs { display: none; } .topbar .btn--sm { width: 40px; padding: 0; } }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: 24px 0 60px;
    background:
        radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%),
        linear-gradient(180deg, var(--cream-50), var(--cream-100));
}
.hero__inner { position: relative; display: grid; gap: 28px; align-items: center; }
.hero__copy { text-align: center; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    background: #fff; color: var(--brand-700); font-weight: 700; font-size: .875rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--brand-100);
}
.pill .icon { color: var(--brand-400); animation: twinkle 2.4s ease-in-out infinite; }
.hero__title {
    margin: 18px 0 14px;
    font-size: clamp(2.3rem, 9vw, 4.2rem);
    letter-spacing: -.02em;
}
.hero__highlight { position: relative; display: inline-block; color: var(--brand-600); white-space: nowrap; }
.hero__highlight::after {
    content: ""; position: absolute; left: -4px; right: -4px; bottom: .02em; height: .32em; z-index: -1;
    background: var(--brand-200); border-radius: 999px;
    transform-origin: left; transform: scaleX(0);
    animation: underline .9s .7s var(--ease-out) forwards;
}
.hero__lead { max-width: 34ch; margin-inline: auto; font-size: 1.08rem; color: var(--bear-600); }
.hero__ctas { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 480px) { .hero__ctas { flex-direction: row; justify-content: center; } }

.hero__art { position: relative; width: min(52vw, 230px); aspect-ratio: 1; margin: 0 auto; order: -1; }
.hero__circle {
    position: absolute; inset: 8%; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--brand-100) 70%);
    box-shadow: var(--shadow), inset 0 -10px 30px rgba(232, 159, 136, .25);
    display: grid; place-items: center;
}
.hero__circle::before {
    content: ""; position: absolute; inset: -10px; border-radius: 50%;
    border: 2px dashed var(--brand-300); animation: spin 40s linear infinite;
}
.hero__bear { width: 66%; height: auto; animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 90%; }
.float { position: absolute; width: 28px; height: 28px; animation: drift 6s ease-in-out infinite; }
.float--1 { top: 4%; left: 6%; color: var(--brand-500); }
.float--2 { top: 10%; right: 2%; color: var(--brand-400); width: 22px; height: 22px; animation-delay: -1.5s; }
.float--3 { bottom: 8%; right: 8%; color: var(--brand-300); width: 34px; height: 34px; animation-delay: -3s; }
.float--4 { bottom: 14%; left: 0; color: var(--brand-400); width: 18px; height: 18px; animation-delay: -4.5s; }
.dot { position: absolute; border-radius: 50%; background: var(--brand-200); animation: drift 7s ease-in-out infinite; }
.dot--1 { width: 12px; height: 12px; top: 48%; left: -2%; }
.dot--2 { width: 8px; height: 8px; top: 0; left: 50%; animation-delay: -2s; background: var(--cream-200); }
.dot--3 { width: 14px; height: 14px; bottom: 0; left: 40%; animation-delay: -4s; background: var(--brand-100); }

.hero__blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .6; animation: blob 14s ease-in-out infinite; }
.hero__blob--a { width: 260px; height: 260px; top: -60px; left: -80px; background: #FFE8C2; }
.hero__blob--b { width: 320px; height: 320px; bottom: -120px; right: -100px; background: var(--brand-200); animation-delay: -7s; }

.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 48px; fill: var(--cream-50); }

@media (min-width: 900px) {
    .hero { padding: 56px 0 110px; }
    .hero__inner { grid-template-columns: 1.15fr .85fr; gap: 48px; }
    .hero__copy { text-align: left; }
    .hero__lead { margin-inline: 0; }
    .hero__ctas { justify-content: flex-start; }
    .hero__art { order: 0; width: 100%; max-width: 420px; }
    .hero__wave { height: 80px; }
}

/* Entrada escalonada del hero */
.enter { opacity: 0; animation: enter .9s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 110ms + 80ms); }

/* ---------- Encabezados de sección ---------- */
.section-head { text-align: center; max-width: 560px; margin: 0 auto 20px; }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--brand-700); margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(1.9rem, 6vw, 2.8rem); letter-spacing: -.01em; }
.section-head p { margin-top: 8px; color: var(--bear-600); }

/* ---------- Catálogo ---------- */
.catalog { padding: 12px 0 56px; }
@media (min-width: 768px) { .catalog { padding-top: 32px; } }

.searchbar {
    position: sticky; top: var(--topbar-h); z-index: 40;
    padding: 10px 0;
    transition: background-color .3s, box-shadow .3s;
}
.searchbar.is-stuck {
    background: rgba(255, 251, 247, .9);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 20px -18px rgba(93, 77, 67, .6);
}
.search {
    position: relative; max-width: 640px; margin: 0 auto;
    display: flex; align-items: center;
    background: #fff; border-radius: 999px; border: 2px solid var(--brand-100);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .3s;
}
.search:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 5px var(--brand-100); }
.search__icon { position: absolute; left: 18px; color: var(--brand-500); pointer-events: none; }
.search input {
    flex: 1; min-width: 0; height: 52px; padding: 0 48px 0 50px;
    border: 0; background: transparent; outline: none; border-radius: 999px;
    font: inherit; font-size: 16px; /* 16px evita el zoom automático de iOS */
    color: var(--bear-900); font-weight: 600;
}
.search input::placeholder { color: var(--bear-300); font-weight: 500; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
    position: absolute; right: 8px; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700);
    animation: pop .25s var(--ease-spring);
}

.chips {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    max-width: 640px; margin: 10px auto 0; padding: 2px var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
@media (min-width: 700px) { .chips { margin-inline: auto; padding-inline: 0; flex-wrap: wrap; justify-content: center; mask-image: none; } }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    min-height: 38px; padding: 0 16px; border-radius: 999px;
    background: #fff; border: 1.5px solid var(--brand-100); color: var(--bear-600);
    font-weight: 700; font-size: .9rem;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-spring);
}
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--bear-800); border-color: var(--bear-800); color: #fff; }

.results { text-align: center; margin: 14px 0 18px; font-size: .92rem; font-weight: 600; color: var(--bear-500); min-height: 1.5em; }

.grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; } }

.card {
    position: relative; display: flex; flex-direction: column; text-align: left;
    background: #fff; border-radius: var(--radius); padding: 8px;
    box-shadow: var(--shadow-sm); border: 1px solid rgba(250, 210, 200, .5);
    transition: transform .4s var(--ease-spring), box-shadow .4s;
    animation: card-in .7s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 55ms);
    width: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:active { transform: scale(.97); transition-duration: .15s; }
.card__media {
    position: relative; aspect-ratio: 1; border-radius: calc(var(--radius) - 6px); overflow: hidden;
    background: linear-gradient(110deg, var(--cream-100) 30%, var(--cream-200) 50%, var(--cream-100) 70%);
    background-size: 250% 100%; animation: shimmer 1.6s linear infinite;
}
.card__media img {
    position: relative; width: 100%; height: 100%; object-fit: contain; object-position: center;
    opacity: 0; transform: scale(1.04);
    transition: opacity .6s, transform 1s var(--ease-out);
}
.card__media img.is-loaded { opacity: 1; transform: scale(1); }
.card__media.is-done { animation: none; background: var(--cream-100); }
.card:hover .card__media img.is-loaded:not(.media-fill) { transform: scale(1.04); }

/* Fondo desenfocado: rellena los costados cuando la foto no es cuadrada */
.media-fill {
    position: absolute !important; inset: 0;
    object-fit: cover !important;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.25) !important;
}
.media-fill.is-loaded { opacity: .55 !important; }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.card__placeholder img { width: 46%; height: auto; opacity: .55; transform: none; object-fit: contain; }
.card__body { display: flex; align-items: flex-end; gap: 8px; padding: 10px 4px 4px 6px; flex: 1; }
.card__title {
    flex: 1; font-family: var(--font-body); font-weight: 700; font-size: .95rem; line-height: 1.3; color: var(--bear-900);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.6em; align-self: flex-start;
}
.card__plus {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700);
    transition: background-color .25s, color .25s, transform .4s var(--ease-spring);
}
.card:hover .card__plus { background: var(--brand-600); color: #fff; transform: rotate(90deg); }
@media (min-width: 700px) {
    .card { padding: 10px; }
    .card__title { font-size: 1.02rem; }
}

.grid.is-quiet .card { animation: none; }

/* Skeletons */
.skeleton { pointer-events: none; animation: none; }
.skeleton .card__title { min-height: 0; }
.sk-line { height: 12px; border-radius: 99px; background: var(--cream-200); margin: 6px 0; }
.sk-line--s { width: 55%; }

/* Estados */
.wake, .empty {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
    padding: 28px 16px; color: var(--bear-600);
}
.wake { padding-top: 24px; }
.wake__bear { width: 72px; animation: bob 1.6s ease-in-out infinite; }
.empty { background: #fff; border-radius: var(--radius-lg); border: 2px dashed var(--brand-200); margin-top: 10px; animation: card-in .5s var(--ease-out); }
.empty__bear { width: 84px; filter: grayscale(.2); }
.empty h3 { font-size: 1.4rem; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.more__info { font-size: .9rem; font-weight: 600; color: var(--bear-500); }
.more__bar { width: 180px; height: 6px; border-radius: 99px; background: var(--brand-100); overflow: hidden; }
.more__bar span { display: block; height: 100%; width: 0; background: var(--brand-500); border-radius: inherit; transition: width .6s var(--ease-out); }

/* ---------- Cómo comprar ---------- */
.steps { padding: 56px 0 72px; background: linear-gradient(180deg, var(--cream-50), var(--cream-100)); }
.steps__list {
    list-style: none; margin: 32px auto 0; padding: 0; max-width: 520px;
    display: grid; gap: 0; counter-reset: step;
}
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding-bottom: 30px; }
.step:last-child { padding-bottom: 0; }
/* línea punteada que une los pasos */
.step:not(:last-child)::before {
    content: ""; position: absolute; left: 27px; top: 60px; bottom: 6px;
    border-left: 2px dashed var(--brand-300);
}
.step__num {
    grid-row: span 2; width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 2px solid var(--brand-300); color: var(--brand-700);
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1;
    box-shadow: 0 6px 16px -10px rgba(214, 131, 107, .7);
    transition: background-color .3s, color .3s, transform .4s var(--ease-spring);
}
.step:hover .step__num { background: var(--brand-600); border-color: var(--brand-600); color: #fff; transform: scale(1.06); }
.step h3 { font-size: 1.3rem; align-self: end; padding-top: 4px; }
.step p { color: var(--bear-600); font-size: .98rem; margin-top: 4px; }

@media (min-width: 768px) {
    .steps__list { max-width: none; grid-template-columns: repeat(3, 1fr); gap: 32px; }
    .step { display: block; text-align: center; padding: 0 8px; }
    .step:not(:last-child)::before {
        left: calc(50% + 44px); right: calc(-50% + 28px); top: 32px; bottom: auto;
        border-left: 0; border-top: 2px dashed var(--brand-300);
    }
    .step__num { width: 64px; height: 64px; margin: 0 auto 16px; font-size: 1.8rem; }
    .step h3 { margin-bottom: 6px; }
}

/* ---------- Footer ---------- */
.footer { background: var(--bear-900); color: var(--bear-300); padding: 44px 0 calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .footer { padding-bottom: 44px; } }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer__logo { height: 64px; width: auto; background: var(--cream-50); border-radius: 18px; padding: 6px 14px; }
.footer__tag { color: var(--bear-100); }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.1rem;
    transition: background-color .25s, transform .3s var(--ease-spring);
}
.footer__social a:hover { background: var(--brand-600); transform: translateY(-3px); }
.footer__copy { font-size: .85rem; }

/* ---------- Botones flotantes ---------- */
.fabs {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fab {
    width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
    box-shadow: var(--shadow-lg);
    transition: transform .35s var(--ease-spring), opacity .3s, background-color .2s;
}
.fab:active { transform: scale(.92); }
.fab--wa { background: var(--wa); color: #fff; }
.fab--wa::before {
    content: ""; position: absolute; width: 58px; height: 58px; border-radius: 50%;
    background: var(--wa); z-index: -1; animation: ping 2.8s var(--ease-out) infinite;
}
.fab--top { width: 46px; height: 46px; background: #fff; color: var(--brand-700); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; }
.fab--top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab--wa:not(.is-visible), .fab--wa.is-hidden { transform: scale(0); pointer-events: none; }

/* ---------- Hoja / modal de producto ---------- */
.sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet__backdrop {
    position: absolute; inset: 0; background: rgba(62, 51, 44, .5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .35s;
}
.sheet__panel {
    position: relative; width: 100%; max-height: 94dvh; max-height: 94vh;
    display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden;
    box-shadow: var(--shadow-lg); outline: none;
    transform: translateY(100%); transition: transform .5s var(--ease-out);
    touch-action: pan-y;
}
@supports (max-height: 1dvh) { .sheet__panel { max-height: 94dvh; } }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translateY(var(--drag, 0px)); }
.sheet.is-dragging .sheet__panel { transition: none; }

.sheet__grab { position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 3; display: grid; place-items: center; cursor: grab; }
.sheet__grab span { width: 44px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.sheet__close {
    position: absolute; top: 14px; right: 14px; z-index: 4;
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); color: var(--bear-800); box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease-spring), background-color .2s;
}
.sheet__close:hover { transform: rotate(90deg); background: #fff; }
.sheet__media { position: relative; flex-shrink: 1; min-height: 0; background: var(--cream-100); overflow: hidden; }
.sheet__media #sheet-img { position: relative; width: 100%; height: 100%; max-height: 56vh; aspect-ratio: 1; object-fit: contain; }
.sheet__media #sheet-img.is-placeholder { padding: 18%; opacity: .6; }
.sheet__media .media-fill { width: 100%; height: 100%; opacity: .55; }
.sheet__body { display: flex; flex-direction: column; min-height: 0; }
.sheet__scroll { padding: 20px 22px 8px; overflow-y: auto; }
.sheet__scroll h2 { margin: 6px 0 10px; font-size: clamp(1.5rem, 5.5vw, 2rem); }
.sheet__scroll p { color: var(--bear-600); white-space: pre-line; }
.sheet__actions { display: flex; gap: 10px; padding: 12px 22px 6px; }
.sheet__hint { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: .82rem; color: var(--bear-500); padding: 0 22px calc(14px + env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
    .sheet { align-items: center; padding: 32px; }
    .sheet__panel {
        max-width: 880px; max-height: min(620px, 88vh); flex-direction: row;
        border-radius: var(--radius-lg);
        transform: translateY(24px) scale(.96); opacity: 0;
        transition: transform .45s var(--ease-spring), opacity .3s;
    }
    .sheet.is-open .sheet__panel { transform: none; opacity: 1; }
    .sheet__grab { display: none; }
    .sheet__media { width: 52%; flex-shrink: 0; }
    .sheet__media #sheet-img { max-height: none; aspect-ratio: auto; }
    .sheet__body { flex: 1; }
    .sheet__scroll { flex: 1; padding: 40px 34px 12px; }
    .sheet__actions { padding: 12px 34px 8px; }
    .sheet__hint { padding-bottom: 24px; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--bear-900); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem;
    box-shadow: var(--shadow-lg); transition: transform .4s var(--ease-spring), opacity .3s;
    display: flex; align-items: center; gap: 8px;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 120ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes underline { to { transform: scaleX(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 33% { transform: translate(6px, -10px) rotate(10deg); } 66% { transform: translate(-6px, -4px) rotate(-8deg); } }
@keyframes blob { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 20px) scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.3) rotate(20deg); } }
@keyframes shimmer { to { background-position: -150% 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .enter, .reveal { opacity: 1; transform: none; }
}

/* ---------- Página de producto / 404 (generadas por el build) ---------- */
.subpage main { padding-top: var(--topbar-h); }
.product { padding: 20px 0 48px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--bear-500); margin-bottom: 16px; }
.crumbs a { color: var(--brand-700); }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--bear-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.product__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.product__media {
    position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--cream-100); box-shadow: var(--shadow);
}
.product__media .media-fill { width: 100%; height: 100%; }
.product__img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.product__media.is-placeholder .product__img { padding: 22%; opacity: .6; }
.product__info { display: flex; flex-direction: column; gap: 14px; }
.product__info h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.product__desc { color: var(--bear-600); font-size: 1.02rem; white-space: pre-line; }
.product__actions { display: flex; gap: 10px; margin-top: 6px; }
.product .sheet__hint { padding: 0; justify-content: flex-start; }
.product .empty { padding: 40px 20px; }
.notfound__title { font-size: 1.6rem; }
.related { padding: 8px 0 64px; }
.noscript-list { columns: 2; padding: 0 var(--gutter) 24px 40px; }
@media (min-width: 860px) {
    .product { padding: 32px 0 64px; }
    .product__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
}
.sheet__actions .btn--block, .product__actions .btn--block { flex: 1; width: auto; min-width: 0; }
.subpage .fabs { display: none; } /* la página ya tiene su botón grande de WhatsApp */
