/* ==========================================================================
   BSG DIECAST · Tienda  —  tema "Pista nocturna"
   Un solo archivo, sin dependencias. Mobile-first.
   ========================================================================== */

:root {
    --bg: #0a0c10;
    --bg-2: #0f121a;
    --surface: #141822;
    --surface-2: #1b2030;
    --line: #262d3f;
    --line-2: #333c55;
    --text: #eceff6;
    --muted: #9aa4ba;
    --faint: #6d7893;
    --accent: #ff6b1a;
    --accent-2: #ffb21f;
    --accent-ink: #1a0d03;
    --ok: #34d17a;
    --err: #ff6a6a;
    --info: #55c7ff;
    --radius: 16px;
    --shadow: 0 12px 34px rgba(0, 0, 0, .38);
    --maxw: 1240px;
    --header-h: 64px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 85% -80px, rgba(255, 107, 26, .10), transparent 60%),
        radial-gradient(700px 380px at -10% 10%, rgba(85, 199, 255, .06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px;
    border-radius: 12px; border: 1px solid var(--line-2);
    background: var(--surface-2); color: var(--text);
    font-weight: 600; font-size: 15px; line-height: 1.2;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { background: #232a3f; border-color: #44506f; }
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--accent-ink); border-color: transparent; font-weight: 700;
    box-shadow: 0 8px 22px rgba(255, 107, 26, .28);
}
.btn--primary:hover { background: linear-gradient(135deg, #ff7d36, #ffc04a); box-shadow: 0 10px 26px rgba(255, 107, 26, .38); }
.btn--ghost { background: transparent; }
.btn--danger { background: rgba(255, 106, 106, .12); border-color: rgba(255, 106, 106, .4); color: #ffb0b0; }
.btn--danger:hover { background: rgba(255, 106, 106, .2); }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .25); border-top-color: var(--accent-ink);
    animation: spin .7s linear infinite;
}
.btn:not(.btn--primary).is-loading::after { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 12, 16, .82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 12, 16, .94); }
.site-header__inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; font-size: 18px; }
.brand__mark {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-weight: 900; font-size: 15px;
}
.brand__text span { color: var(--accent); }

.nav { display: none; align-items: center; gap: 4px; margin-left: 10px; }
.nav__link { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; transition: color .15s, background .15s; }
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--text); background: var(--surface-2); }

.header-search { display: none; flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.header-search input {
    width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); outline: none;
}
.header-search input:focus { border-color: var(--accent); }
.header-search svg { position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; color: var(--faint); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
    position: relative; width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 12px; background: transparent; border: 1px solid transparent; color: var(--text);
}
.icon-btn:hover { background: var(--surface); border-color: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.badge-count {
    position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: var(--accent); color: var(--accent-ink); border: 2px solid var(--bg);
}
.badge-count.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

.menu-toggle { display: grid; }

.account { position: relative; }
.account > summary { list-style: none; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
.account__avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.account__menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); z-index: 120;
}
.account__menu a, .account__menu button {
    display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px;
    color: var(--text); background: none; border: 0; font-size: 14.5px;
}
.account__menu a:hover, .account__menu button:hover { background: var(--surface-2); }
.account__label { padding: 8px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.account__who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.header-auth { display: none; gap: 8px; }

/* Menú móvil */
.mobile-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    background: rgba(10, 12, 16, .98); padding: 18px 16px 30px; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-open .mobile-nav { opacity: 1; transform: none; visibility: visible; }
.nav-open { overflow: hidden; }
.mobile-nav > a:not(.btn) { display: block; padding: 15px 8px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mobile-nav form.search { margin-bottom: 14px; }
.mobile-nav .btn { margin-top: 14px; }

@media (min-width: 900px) {
    .nav, .header-search, .header-auth { display: flex; }
    .menu-toggle, .mobile-nav { display: none; }
    .header-actions { margin-left: 0; }
    .header-search { margin-left: auto; }
}

/* ---------- Avisos ---------- */
.toasts { position: fixed; z-index: 300; left: 12px; right: 12px; bottom: 16px; display: grid; gap: 10px; pointer-events: none; justify-items: center; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 460px; width: 100%;
    padding: 13px 16px; border-radius: 14px; background: #1d2335; border: 1px solid var(--line-2);
    box-shadow: var(--shadow); font-size: 14.5px; animation: toast-in .25s ease;
}
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 209, 122, .18); }
.toast--error::before { background: var(--err); box-shadow: 0 0 0 4px rgba(255, 106, 106, .18); }
.toast--info::before { background: var(--info); box-shadow: 0 0 0 4px rgba(85, 199, 255, .18); }
.toast a { color: var(--accent-2); font-weight: 700; margin-left: auto; white-space: nowrap; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (min-width: 700px) { .toasts { left: auto; right: 20px; justify-items: end; } }

.alert { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15px; }
.alert--danger { background: rgba(255, 106, 106, .08); border-color: rgba(255, 106, 106, .4); color: #ffd0d0; }
.alert--info { background: rgba(85, 199, 255, .08); border-color: rgba(85, 199, 255, .35); color: #cdeeff; }
.alert--ok { background: rgba(52, 209, 122, .08); border-color: rgba(52, 209, 122, .35); color: #c9f5dc; }
.alert ul { margin-top: 6px; padding-left: 18px; list-style: disc; }

/* ---------- Secciones ---------- */
.section { padding: 28px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section__title { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.section__sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.page-title { font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.page-head { padding: 28px 0 8px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 62ch; }

/* ---------- Hero ---------- */
.hero { padding: 22px 0 8px; }
.hero__grid { display: grid; gap: 22px; align-items: center; }
.hero__copy h1 { font-size: clamp(32px, 6.2vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 12px 0 14px; }
.hero__copy h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__copy p { color: var(--muted); font-size: clamp(16px, 2vw, 18px); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1fr 1.05fr; gap: 36px; } .hero { padding-top: 40px; } }

.carousel { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; font-weight: 700; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.carousel__slide--fallback { display: grid; place-items: center; text-align: center; padding: 24px;
    background: radial-gradient(500px 240px at 70% 20%, rgba(255, 107, 26, .35), transparent 60%), linear-gradient(135deg, #1b2236, #0f121a); }
.carousel__slide--fallback strong { font-size: clamp(22px, 4vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
.carousel__slide--fallback span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: none; place-items: center;
    background: rgba(10, 12, 16, .7); border: 1px solid var(--line-2); color: #fff; backdrop-filter: blur(6px); font-size: 22px; line-height: 1; }
.carousel__nav:hover { background: rgba(10, 12, 16, .92); }
.carousel__nav--prev { left: 12px; } .carousel__nav--next { right: 12px; }
.carousel:hover .carousel__nav { display: grid; }
.carousel__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 7px; }
.carousel__dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .4); transition: width .2s, background .2s; }
.carousel__dot.is-active { width: 22px; border-radius: 6px; background: var(--accent-2); }
@media (hover: none) { .carousel:hover .carousel__nav { display: none; } }

/* ---------- Confianza ---------- */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.trust__item { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.trust__item svg { width: 24px; height: 24px; flex: none; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust__item strong { display: block; font-size: 14px; line-height: 1.2; }
.trust__item span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Chips ---------- */
.chips-wrap { position: relative; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; scroll-behavior: smooth; }
.chips::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .chips { scroll-behavior: auto; } }

/* Flechas (celular): desplazan la fila de marcas */
.chips-arrow {
    position: absolute; top: 1px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
    border-radius: 50%; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45); cursor: pointer;
}
.chips-arrow[hidden] { display: none; }
.chips-arrow svg { width: 18px; height: 18px; }
.chips-arrow--prev { left: -4px; }
.chips-arrow--next { right: -4px; }
.chips-arrow:hover { border-color: var(--accent); }

.chips-more { display: none; }

/* Computador: las marcas se acomodan en filas (2 visibles) y se despliegan con un botón */
@media (min-width: 900px) {
    .chips { flex-wrap: wrap; overflow: hidden; max-height: 92px; scroll-behavior: auto; }
    .chips-wrap.is-open .chips { max-height: none; }
    .chips-arrow { display: none !important; }
    .chips-more.is-needed { display: inline-flex; margin-top: 4px; background: none; border: 0; padding: 4px 2px; font-weight: 700; font-size: 14px; color: var(--accent-2); cursor: pointer; }
    .chips-more.is-needed:hover { text-decoration: underline; }
}
.chip {
    flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { background: rgba(255, 107, 26, .14); border-color: var(--accent); color: #ffd7bd; }

/* ---------- Búsqueda y filtros ---------- */
.toolbar { display: grid; gap: 10px; margin: 6px 0 16px; }
.toolbar__row { display: grid; gap: 10px; grid-template-columns: 1fr; }
.search { position: relative; }
.search input {
    width: 100%; height: 50px; padding: 0 110px 0 46px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--line); outline: none; font-size: 16px;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 26, .12); }
.search > svg { position: absolute; left: 15px; top: 15px; width: 20px; height: 20px; color: var(--faint); }
.search .btn { position: absolute; right: 6px; top: 6px; min-height: 38px; padding: 6px 16px; border-radius: 10px; }
.mobile-nav .search input { padding-right: 14px; margin-bottom: 10px; }
.mobile-nav .search .btn { position: static; width: 100%; margin-top: 0; }

.field select, .field input, .field textarea, .form-field select, .form-field input, .form-field textarea {
    width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea, .form-field textarea { min-height: 96px; resize: vertical; }
.field select:focus, .field input:focus, .form-field select:focus, .form-field input:focus, .form-field textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 26, .12);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239aa4ba' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px !important; }
option { background: #151a27; color: var(--text); }
input[type="file"] { padding: 10px; }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.filters > summary { list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-2); }
.filters[open] > summary::after { content: "–"; }
.filters__panel { padding: 4px 16px 16px; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.filters__panel .filters__actions { grid-column: 1 / -1; }
.filters__actions { display: flex; gap: 10px; }
.field label, .form-field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
@media (min-width: 760px) {
    .toolbar__row { grid-template-columns: 1fr 220px; }
    .filters__panel { grid-template-columns: repeat(5, 1fr); }
    .filters__panel .filters__actions { grid-column: auto; align-items: end; }
}

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; }
.pill a { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1; }
.pill a:hover { color: #fff; background: var(--err); }
.results-count { color: var(--muted); font-size: 14px; }

/* ---------- Grilla y tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.card {
    display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: #3a4566; box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; mix-blend-mode: multiply; transition: transform .35s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #8a93a8; font-size: 14px; }
.card__badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.card__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.card__meta { font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.card__title { font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a:hover { color: var(--accent-2); }
.card__series { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.card__add { flex: none; width: 42px; height: 42px; padding: 0; border-radius: 12px; }
.card__add svg { width: 20px; height: 20px; }

.price { display: flex; flex-direction: column; line-height: 1.15; }
.price__now { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.price__old { font-size: 13px; color: var(--faint); text-decoration: line-through; }
.price--offer .price__now { color: var(--accent-2); }

.badge {
    display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
    background: rgba(10, 12, 16, .82); color: #fff; backdrop-filter: blur(4px);
}
.badge--offer { background: var(--accent); color: var(--accent-ink); }
.badge--preorder { background: #2b8fd1; color: #fff; }
.badge--low { background: #ffb21f; color: #2a1a00; }
.badge--out { background: #3a4156; color: #d5dae6; }

/* ---------- Paginación ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 30px 0 10px; flex-wrap: wrap; }
.pager__pages { display: none; gap: 6px; }
.pager__btn, .pager__page, .pager__gap {
    min-width: 42px; height: 42px; padding: 0 14px; display: inline-grid; place-items: center;
    border-radius: 11px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px;
}
.pager__btn:hover, .pager__page:hover { border-color: var(--accent); }
.pager__page.is-current { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; font-weight: 800; }
.pager .is-disabled { opacity: .4; }
.pager__gap { border-color: transparent; background: none; padding: 0 4px; min-width: 20px; }
@media (min-width: 640px) { .pager__pages { display: flex; } }

/* ---------- Vacío ---------- */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: 20px; background: var(--bg-2); }
.empty svg { width: 56px; height: 56px; color: var(--faint); margin: 0 auto 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.empty h2, .empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 18px; }

/* ---------- Detalle de producto ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--faint); padding: 18px 0 6px; }
.crumbs a:hover { color: var(--accent-2); }
.crumbs span[aria-current] { color: var(--muted); }

.product { display: grid; gap: 24px; padding: 8px 0 28px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; } }

.gallery__main { aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); border: 1px solid var(--line); position: relative; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 14px; mix-blend-mode: multiply; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: none; width: 74px; height: 74px; padding: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); border: 2px solid var(--line); opacity: .75; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--accent); opacity: 1; }
@media (min-width: 900px) { .gallery { position: sticky; top: calc(var(--header-h) + 20px); } }

.buybox { display: grid; gap: 14px; }
.buybox__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.buybox__badges .badge { background: var(--surface-2); border: 1px solid var(--line-2); }
.buybox__badges .badge--offer { background: var(--accent); border-color: transparent; }
.buybox__badges .badge--preorder { background: #2b8fd1; border-color: transparent; }
.buybox h1 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.facts b { color: var(--text); font-weight: 600; }
.buybox__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buybox__price .now { font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.buybox__price .old { font-size: 18px; color: var(--faint); text-decoration: line-through; }
.buybox__price .off { font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 8px; background: rgba(255, 107, 26, .16); color: var(--accent-2); }
.buybox__price.is-offer .now { color: var(--accent-2); }
.note { font-size: 14px; color: var(--muted); }
.desc { color: #c6cde0; white-space: pre-line; }

.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 209, 122, .16); }
.stock--low { color: var(--accent-2); } .stock--low::before { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(255, 178, 31, .16); }
.stock--out { color: var(--err); } .stock--out::before { background: var(--err); box-shadow: 0 0 0 4px rgba(255, 106, 106, .16); }

.buy-actions { display: grid; gap: 12px; }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.buy-row .btn--primary { flex: 1; min-width: 190px; min-height: 52px; font-size: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; height: 52px; }
.qty button { width: 46px; height: 100%; border: 0; background: transparent; font-size: 20px; color: var(--text); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 50px; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 16px; -moz-appearance: textfield; outline: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 38px; border-radius: 10px; } .qty--sm button { width: 36px; font-size: 18px; } .qty--sm span { min-width: 30px; text-align: center; font-weight: 700; }
.qty--sm form { display: contents; }
.qty--sm button[disabled] { opacity: .35; cursor: not-allowed; }

.accordion { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.accordion + .accordion { margin-top: 10px; }
.accordion > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary::after { content: "+"; color: var(--accent-2); font-size: 20px; line-height: 1; }
.accordion[open] > summary::after { content: "–"; }
.accordion__body { padding: 0 16px 16px; color: var(--muted); font-size: 14.5px; display: grid; gap: 8px; }
.accordion__body strong { color: var(--text); }

.buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 14px; background: rgba(15, 18, 26, .96); border-top: 1px solid var(--line-2); backdrop-filter: blur(10px);
}
.buybar .price { flex: none; }
.buybar .btn { flex: 1; min-height: 48px; }
body.has-buybar { padding-bottom: 76px; }
@media (min-width: 900px) { .buybar { display: none; } body.has-buybar { padding-bottom: 0; } }

/* ---------- Carrito y checkout ---------- */
.steps { display: flex; gap: 8px; margin: 6px 0 22px; counter-reset: step; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--faint); font-size: 14px; font-weight: 700; }
.step::before { counter-increment: step; content: counter(step); width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; }
.step.is-current { color: var(--text); border-color: var(--accent); }
.step.is-current::before { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.step.is-done { color: var(--muted); }
.step.is-done::before { content: "✓"; background: var(--ok); color: #05210f; }
.step span { display: none; }
@media (min-width: 640px) { .step span { display: inline; } }

.checkout__grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 960px) { .checkout__grid { grid-template-columns: 1fr 360px; gap: 26px; } .summary { position: sticky; top: calc(var(--header-h) + 18px); } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel + .panel, form .panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.panel__sub { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.js [data-step-panel] { display: none; }
.js [data-step-panel].is-active { display: block; animation: toast-in .25s ease; }
.panel__nav { display: flex; gap: 10px; margin-top: 20px; justify-content: space-between; flex-wrap: wrap; }
.panel__nav .btn--primary { flex: 1; min-width: 160px; }

.cart-list { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.cart-item__img { grid-row: span 3; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); }
.cart-item__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.cart-item__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.cart-item__title:hover { color: var(--accent-2); }
.cart-item__meta { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.cart-item__warn { font-size: 13px; color: var(--accent-2); margin-top: 6px; font-weight: 600; }
.cart-item__row { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cart-item__price { text-align: right; line-height: 1.2; }
.cart-item__price strong { font-size: 16px; display: block; }
.cart-item__price small { color: var(--faint); font-size: 12px; }
.cart-item__remove { background: none; border: 0; color: var(--faint); font-size: 13px; text-decoration: underline; padding: 6px 0; }
.cart-item__remove:hover { color: var(--err); }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.summary h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--muted); font-size: 15px; }
.summary__row strong { color: var(--text); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 8px; border-top: 1px dashed var(--line-2); }
.summary__total span { font-weight: 700; }
.summary__total strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-2); }
.summary__note { margin-top: 12px; font-size: 13px; color: var(--faint); }

.login-cta { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 107, 26, .12), rgba(255, 178, 31, .06)); border: 1px solid rgba(255, 107, 26, .35); }
.login-cta p { color: #f1d9c8; margin-top: 4px; }
.login-cta .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.delivery-options { display: grid; gap: 10px; margin-bottom: 20px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option__box { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding: 14px 14px 14px 44px; position: relative; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); transition: .15s; }
.option__box::before { content: ""; position: absolute; left: 14px; top: 16px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); }
.option input:checked + .option__box { border-color: var(--accent); background: rgba(255, 107, 26, .07); }
.option input:checked + .option__box::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.option input:focus-visible + .option__box { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.option__title { font-weight: 700; }
.option__desc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.option__cost { font-weight: 800; white-space: nowrap; }

.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field input[readonly] { opacity: .65; }
.field-error { margin-top: 6px; font-size: 13px; color: var(--err); font-weight: 600; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--err); }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

.sinpe { border-radius: 16px; padding: 16px; background: linear-gradient(135deg, rgba(85, 199, 255, .10), rgba(85, 199, 255, .03)); border: 1px solid rgba(85, 199, 255, .35); }
.sinpe h3 { font-size: 16px; margin-bottom: 4px; }
.sinpe__steps { margin: 10px 0 14px; padding-left: 20px; list-style: decimal; color: #cfe9f7; font-size: 14.5px; display: grid; gap: 4px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(10, 12, 16, .55); border: 1px solid var(--line-2); margin-top: 8px; }
.copy-row small { display: block; color: var(--muted); font-size: 12px; }
.copy-row strong { font-size: 20px; letter-spacing: .02em; }
.copy-row .btn { min-height: 38px; padding: 6px 14px; }

.dropzone { display: block; position: relative; cursor: pointer; padding: 20px; text-align: center; border-radius: 14px; border: 2px dashed var(--line-2); background: var(--bg-2); transition: .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: rgba(255, 107, 26, .06); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { display: block; overflow-wrap: anywhere; }
.dropzone span { color: var(--muted); font-size: 13.5px; }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: rgba(52, 209, 122, .07); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent-2); text-decoration: underline; }

/* ---------- Pedidos ---------- */
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; }
.order-card + .order-card { margin-top: 14px; }
.order-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.order-card__head h2 { font-size: 18px; font-weight: 800; }
.order-card__head p { color: var(--muted); font-size: 14px; }
.order-thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.order-thumbs img { width: 52px; height: 52px; object-fit: contain; padding: 3px; border-radius: 10px; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); }
.order-thumbs span { font-size: 13px; color: var(--muted); }
.order-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-card__foot strong { font-size: 20px; }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.status--ok::before { background: var(--ok); } .status--warn::before { background: var(--accent-2); } .status--bad::before { background: var(--err); }
.status--bad { color: #ffc4c4; }

.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 4px 0; }
.timeline li { position: relative; text-align: center; font-size: 11.5px; color: var(--faint); padding-top: 26px; line-height: 1.25; }
.timeline li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--line-2); }
.timeline li:first-child::before { left: 50%; } .timeline li:last-child::before { right: 50%; }
.timeline li::after { content: ""; position: absolute; top: 2px; left: 50%; width: 15px; height: 15px; margin-left: -7px; border-radius: 50%; background: var(--surface-2); border: 3px solid var(--line-2); }
.timeline li.is-done { color: var(--muted); }
.timeline li.is-done::before { background: var(--ok); }
.timeline li.is-current::before { background: linear-gradient(90deg, var(--ok) 50%, var(--line-2) 50%); }
.timeline li.is-done::after { background: var(--ok); border-color: var(--ok); }
.timeline li.is-current { color: var(--text); font-weight: 700; }
.timeline li.is-current::after { background: var(--accent); border-color: rgba(255, 107, 26, .35); box-shadow: 0 0 0 4px rgba(255, 107, 26, .18); }
@media (min-width: 640px) { .timeline li { font-size: 13px; } }

.detail-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.kv { display: grid; gap: 10px; margin: 0; }
.kv div { display: grid; gap: 2px; }
.kv dt { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.line-items { display: grid; gap: 10px; }
.line-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.line-item img { width: 56px; height: 56px; object-fit: contain; padding: 3px; border-radius: 10px; background: linear-gradient(180deg, #f6f7fa, #e3e6ee); }
.line-item small { color: var(--muted); display: block; }
.orders-filter .filters__panel { grid-template-columns: 1fr; }
@media (min-width: 760px) { .orders-filter .filters__panel { grid-template-columns: repeat(3, 1fr) auto; } }

/* ---------- Footer ---------- */
.site-foot { margin-top: 56px; background: #07090d; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 26px; padding: 38px 0 26px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.footer-grid p, .footer-grid a { color: var(--muted); font-size: 14.5px; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-grid .brand { color: var(--text); }
.footer-grid ul { display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0 22px; color: var(--faint); font-size: 13px; }

.wa-float {
    position: fixed; right: 16px; bottom: 18px; z-index: 80; width: 54px; height: 54px; border-radius: 50%;
    display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 26px rgba(37, 211, 102, .4);
    transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
body.has-buybar .wa-float { bottom: 88px; }
@media (min-width: 900px) { body.has-buybar .wa-float { bottom: 18px; } }

/* ---------- Utilidades ---------- */
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mb-2 { margin-bottom: 12px; }

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