/* =====================================================================
   SARDCY3D · Sistema de diseño
   Se carga DESPUÉS de style.css: redefine los tokens heredados y añade los componentes nuevos.
   Modo oscuro = html.dark-mode (por defecto). Modo claro = sin la clase.
   ===================================================================== */

:root {
    /* --- tokens heredados (los usan las páginas antiguas) --- */
    --bg: #f5f5f7;
    --text: #0c0c10;
    --card-bg: #1a1a21;
    --card-item-bg: #23232c;
    --shadow: rgba(0, 0, 0, .18);
    --nav-links: #2b2b33;
    --primary: #e60000;

    /* --- tokens nuevos --- */
    --surface: #ffffff;
    --surface-2: #eeeef2;
    --border: rgba(12, 12, 16, .10);
    --muted: #5f5f6b;
    --accent: #e60000;
    --accent-hot: #ff3b30;
    --ember: #ff8a3d;
    --ok: #16a34a;
    --glow: rgba(230, 0, 0, .35);

    --font-display: 'Orbitron', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-pill: 999px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --header-h: 72px;
    --maxw: 1280px;
}

html.dark-mode, :root:has(body.admin-page) {
    --bg: #08080b;
    --text: #f4f4f7;
    --card-bg: #14141a;
    --card-item-bg: #1b1b23;
    --shadow: rgba(0, 0, 0, .55);
    --nav-links: #c9c9d3;

    --surface: #12121a;
    --surface-2: #1a1a24;
    --border: rgba(255, 255, 255, .08);
    --muted: #9b9bab;
    --glow: rgba(255, 45, 45, .45);
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, button, input, select, textarea { font-family: var(--font-body); }
body { background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: .01em; }
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 3px; border-radius: 6px; }

html.dark-mode ::-webkit-scrollbar { width: 12px; height: 12px; }
html.dark-mode ::-webkit-scrollbar-track { background: #0b0b10; }
html.dark-mode ::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 10px; border: 3px solid #0b0b10; }
html.dark-mode ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 112px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-hot); }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.1; margin: 10px 0 14px; }
.section-lead { color: var(--muted); max-width: 56ch; font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.grad-text { background: linear-gradient(100deg, #ff3b30 0%, #ff8a3d 45%, #ff3b30 90%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s linear infinite; }
@keyframes gradShift { to { background-position: 200% center; } }

/* ---------- botones ---------- */
.btn, .btn-primary, .btn-secondary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: 1px solid transparent; border-radius: var(--r-pill); cursor: pointer; text-decoration: none;
    font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: .01em; line-height: 1;
    padding: 15px 28px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn-primary {
    color: #fff; background: linear-gradient(135deg, #ff3b30 0%, #d40000 100%);
    box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-secondary, .btn-ghost { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--border); backdrop-filter: blur(8px); }
.btn-secondary:hover, .btn-ghost:hover { border-color: var(--accent-hot); color: var(--accent-hot); transform: translateY(-2px); }
.btn-lg { padding: 18px 34px; font-size: 16px; }
.btn[disabled], .btn-primary[disabled] { opacity: .55; pointer-events: none; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =====================================================================
   CABECERA
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid transparent; transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 10px 40px -20px rgba(0, 0, 0, .6); }
.site-header::after { /* barra de progreso de lectura */
    content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--accent), var(--ember)); box-shadow: 0 0 12px var(--glow);
}
.header-bar { max-width: 1400px; margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 20px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img.logo-img { height: 42px; width: auto; transition: transform .5s var(--ease); }
.brand:hover img.logo-img { transform: rotate(-8deg) scale(1.06); }
.brand img.logo-text-img { height: 26px; width: auto; }

.nav-main { display: flex; align-items: center; gap: 2px; margin-left: 28px; }
.nav-link {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 15px; border-radius: var(--r-pill);
    font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--text); }
.nav-link.active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-hot); transform: translateX(-50%); box-shadow: 0 0 8px var(--glow); }
.nav-dd { position: relative; }
.nav-dd-panel {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: .25s var(--ease);
}
.nav-dd:hover .nav-dd-panel, .nav-dd:focus-within .nav-dd-panel { opacity: 1; visibility: visible; transform: none; }
.nav-dd-panel a { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); }
.nav-dd-panel a:hover { background: var(--surface-2); color: var(--accent-hot); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
    position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
    color: var(--text); background: none; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); transform: translateY(-1px); }
.icon-btn.active { color: var(--accent-hot); }
.icon-btn .badge {
    position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill);
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
    transform: scale(0); transition: transform .3s var(--ease);
}
.icon-btn .badge.show { transform: scale(1); }
.icon-btn .badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }
.search-trigger {
    display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 14px; border-radius: var(--r-pill);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 14px; cursor: pointer; transition: .2s;
}
.search-trigger:hover { border-color: var(--accent-hot); color: var(--text); }
.search-trigger kbd { font: 600 11px var(--font-body); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); }
.burger { display: none; }

@media (max-width: 1240px) {
    .search-trigger span, .search-trigger kbd { display: none; }
    .search-trigger { width: 44px; padding: 0; justify-content: center; }
    .nav-link { padding: 10px 11px; }
}
@media (max-width: 1020px) {
    .nav-main { display: none; }
    .search-trigger { width: 44px; padding: 0; justify-content: center; }
    .burger { display: inline-grid; }
    .header-bar { padding: 0 14px; gap: 8px; }
    .brand img.logo-text-img { height: 22px; }
}

@media (max-width: 520px) {
    .header-bar { gap: 4px; padding: 0 10px; }
    .header-actions { gap: 2px; }
    #open-search, .header-actions a[href="/logout"] { display: none; }   /* el buscador está en el menú móvil */
    .icon-btn { width: 40px; height: 40px; }
    .brand img.logo-img { height: 36px; }
    .brand img.logo-text-img { height: 19px; }
}

/* ---------- buscador instantáneo ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(4, 4, 8, .72); backdrop-filter: blur(10px); }
.search-overlay.open { display: flex; animation: fadeIn .2s ease; }
.search-box { width: min(680px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 40px 100px -20px #000; overflow: hidden; animation: popIn .35s var(--ease); }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-input-row input { flex: 1; height: 64px; background: none; border: 0; outline: 0; color: var(--text); font-size: 18px; }
.search-results { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.search-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.search-item.sel, .search-item:hover { background: var(--surface-2); }
.search-item img { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: var(--bg); padding: 4px; }
.search-item .t { font-weight: 700; }
.search-item .s { font-size: 12px; color: var(--muted); }
.search-item .p { margin-left: auto; font-weight: 800; color: var(--accent-hot); }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- menú móvil ---------- */
.mobile-menu-overlay { position: fixed; inset: 0; z-index: 1900; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .3s; display: block !important; }
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 340px); z-index: 1950; background: var(--surface); border-right: 1px solid var(--border); transform: translateX(-102%); transition: transform .45s var(--ease); display: flex; flex-direction: column; padding: 18px; overflow-y: auto; }
.mobile-menu-drawer.open { transform: none; }
.mm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mm-links { display: flex; flex-direction: column; gap: 2px; }
.mm-links a { padding: 14px 12px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; color: var(--text); font-size: 17px; }
.mm-links a:hover, .mm-links a.active { background: var(--surface-2); color: var(--accent-hot); }
.mm-links a.sub { font-size: 14px; font-weight: 600; color: var(--muted); padding-left: 28px; }
.mm-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }

/* =====================================================================
   HERO (portada)
   ===================================================================== */
.hero { position: relative; overflow: clip; isolation: isolate; min-height: min(860px, calc(100svh - var(--header-h))); display: grid; align-items: center; padding: 40px 0 70px; }
.hero::before, .hero::after { content: ''; position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); opacity: .55; }
.hero::before { width: 620px; height: 620px; left: -160px; top: -200px; background: radial-gradient(circle, #ff2d2d 0%, transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.hero::after { width: 560px; height: 560px; right: -120px; bottom: -180px; background: radial-gradient(circle, #ff7a1a 0%, transparent 65%); opacity: .35; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.hero-grid-bg { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
.hero-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); }
.hero-pill b { background: var(--accent); color: #fff; border-radius: var(--r-pill); padding: 3px 10px; font-size: 11px; letter-spacing: .08em; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5.3rem); line-height: .98; margin: 22px 0 22px; font-weight: 900; text-wrap: balance; }
.hero p.lead { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 44px; color: var(--muted); font-size: 13px; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { color: var(--accent-hot); }

.hero-stage { position: relative; aspect-ratio: 1 / 1; max-width: 560px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.stage-ring { position: absolute; inset: 4%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, var(--accent-hot) 75%, transparent 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 8s linear infinite; opacity: .9; }
.stage-ring.r2 { inset: 14%; animation-duration: 12s; animation-direction: reverse; opacity: .45; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 68%); filter: blur(30px); }
.stage-slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.92) translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); pointer-events: none; }
.stage-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.stage-slide img { width: 70%; height: 70%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
.stage-tag { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 22px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: var(--r-pill); text-decoration: none; color: var(--text); white-space: nowrap; box-shadow: 0 20px 50px -20px #000; }
.stage-tag .n { font-family: var(--font-display); font-weight: 700; }
.stage-tag .p { font-weight: 800; color: var(--accent-hot); }
.stage-tag .go { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.stage-chip { position: absolute; padding: 8px 14px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--border); backdrop-filter: blur(10px); animation: floaty 7s ease-in-out infinite; }
.stage-chip.c1 { top: 10%; left: 2%; } .stage-chip.c2 { top: 24%; right: 0; animation-delay: -2s; } .stage-chip.c3 { bottom: 26%; left: -2%; animation-delay: -4s; }
.stage-dots { position: absolute; bottom: -4px; display: flex; gap: 8px; }
.stage-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: var(--border); cursor: pointer; transition: .3s; padding: 0; }
.stage-dots button.on { width: 26px; background: var(--accent-hot); }

@media (max-width: 900px) {
    .hero { padding-top: 24px; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero p.lead, .hero-cta, .hero-trust { margin-inline: auto; justify-content: center; }
    .hero-stage { max-width: 380px; order: -1; }
    .stage-chip { display: none; }
}

/* marquee */
.marquee { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marq 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 48px; white-space: nowrap; }
.marquee-track span::after { content: '◆'; color: var(--accent); font-size: 10px; }
@keyframes marq { to { transform: translateX(-50%); } }

/* categorías */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.cat-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; padding: 24px; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: #fff; background: var(--surface); border: 1px solid var(--border); isolation: isolate; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.cat-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%), linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .85)); }
.cat-card:hover { transform: translateY(-8px); border-color: var(--accent-hot); box-shadow: 0 30px 60px -25px var(--glow); }
.cat-imgs { position: absolute; top: 18px; left: 0; right: 0; height: 58%; display: flex; justify-content: center; align-items: center; z-index: -1; }
.cat-imgs img { width: 46%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .5)); transition: transform .6s var(--ease); }
.cat-imgs img:nth-child(1) { transform: translateX(14%) rotate(-8deg) scale(.85); }
.cat-imgs img:nth-child(2) { z-index: 2; transform: scale(1.12); }
.cat-imgs img:nth-child(3) { transform: translateX(-14%) rotate(8deg) scale(.85); }
.cat-card:hover .cat-imgs img:nth-child(1) { transform: translateX(2%) rotate(-14deg) scale(.9); }
.cat-card:hover .cat-imgs img:nth-child(2) { transform: scale(1.2) translateY(-6px); }
.cat-card:hover .cat-imgs img:nth-child(3) { transform: translateX(-2%) rotate(14deg) scale(.9); }
.cat-card h3 { font-size: 1.5rem; }
.cat-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .75); font-weight: 600; }
.cat-card .arrow { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: .3s var(--ease); }
.cat-card:hover .arrow { background: var(--accent); transform: translateX(4px); }

/* pasos */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: st; }
.step-card { position: relative; padding: 32px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; counter-increment: st; }
.step-card::before { content: counter(st, decimal-leading-zero); position: absolute; right: 18px; top: 4px; font: 900 5rem var(--font-display); color: var(--accent); opacity: .12; }
.step-card .ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--accent-hot), #a30000); color: #fff; margin-bottom: 20px; box-shadow: 0 12px 28px -12px var(--glow); }
.step-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 15px; }

/* banda CTA */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(36px, 6vw, 72px); background: linear-gradient(135deg, #1b0505 0%, #3a0707 50%, #1b0505 100%); border: 1px solid rgba(255, 60, 48, .25); display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; color: #fff; isolation: isolate; }
.cta-band::before { content: ''; position: absolute; width: 420px; height: 420px; right: -80px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 60, 48, .55), transparent 65%); z-index: -1; }
.cta-band h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); max-width: 18ch; }
.cta-band p { color: rgba(255, 255, 255, .7); margin-top: 10px; max-width: 46ch; }

/* =====================================================================
   TARJETA DE PRODUCTO
   ===================================================================== */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; padding: 0; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease); }
.pcard:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent-hot) 70%, transparent); box-shadow: 0 30px 60px -28px var(--glow); }
.pcard-media { position: relative; display: block; aspect-ratio: 1 / 1; cursor: pointer; background-color: var(--surface-2); text-decoration: none; }
.pcard-media.product-image { height: auto !important; min-height: 0 !important; width: 100%; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transition: transform .6s var(--ease); background-origin: content-box; }
.pcard-media-inner { position: absolute; inset: 0; transition: transform .6s var(--ease); }
.pcard:hover .pcard-media-inner { transform: scale(1.06); }
.pcard-media img.fig { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); transition: transform .6s var(--ease); }
.pcard:hover .pcard-media img.fig { transform: scale(1.08) translateY(-4px); }
.pcard-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .35)); pointer-events: none; }
.pcard-tools { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.pcard-tools > * { pointer-events: auto; }
.pcard-badge { align-self: flex-start; padding: 5px 11px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(8, 8, 11, .7); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
.pcard-badge.last { background: rgba(230, 0, 0, .85); border-color: transparent; }
.pcard-badge.out { background: rgba(60, 60, 70, .9); }
.pcard-badge.made { background: rgba(255, 138, 61, .9); color: #1a0a00; border-color: transparent; }
.pcard-fav { margin: 0; }
.pcard-fav button, .pcard-zoom { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(8, 8, 11, .6); backdrop-filter: blur(8px); color: #fff; cursor: pointer; font-size: 16px; transition: transform .25s var(--ease), background .2s; }
.pcard-fav button:hover, .pcard-zoom:hover { background: var(--accent); transform: scale(1.1); }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.pcard-cat { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pcard-title { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; margin: 0; color: var(--text) !important; letter-spacing: .02em !important; }
.pcard-title a { text-decoration: none; color: inherit; }
.pcard-buy { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; }
.pcard-price { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; color: var(--accent-hot); }
.pcard-add { padding: 11px 18px; font-size: 13px; }
.pcard-add svg { flex-shrink: 0; }
.pcard .qty-container { display: none; }
.pcard-types { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard-types i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); text-transform: uppercase; letter-spacing: .06em; }

/* skeleton / carga en vivo */
.pgrid.loading { opacity: .45; pointer-events: none; transition: opacity .2s; }
.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* =====================================================================
   TIENDA
   ===================================================================== */
.shop-hero { padding: clamp(36px, 5vw, 64px) 0 10px; text-align: center; }
.shop-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.shop-hero p { color: var(--muted); margin-top: 8px; }
.shop-bar { position: sticky; top: var(--header-h); z-index: 50; padding: 14px 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.shop-bar-inner { display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; padding: 11px 22px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: .25s var(--ease); }
.tab:hover { color: var(--text); border-color: var(--accent-hot); }
.tab.active { color: #fff; background: linear-gradient(135deg, var(--accent-hot), #b30000); border-color: transparent; box-shadow: 0 10px 24px -10px var(--glow); }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field { height: 46px; padding: 0 18px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 14px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: var(--accent-hot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-hot) 20%, transparent); }
.field-search { flex: 1 1 240px; padding-left: 44px; background-repeat: no-repeat; background-position: 16px center; background-size: 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9bab' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
select.field { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9bab' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.check { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 7px 15px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-decoration: none; cursor: pointer; transition: .2s; }
.pill:hover { color: var(--text); border-color: var(--accent-hot); transform: translateY(-1px); }
.pill.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.result-meta { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 18px; color: var(--muted); font-size: 14px; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 48px 0 12px; flex-wrap: wrap; }
.pager a { min-width: 46px; height: 46px; padding: 0 16px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-weight: 700; text-decoration: none; color: var(--text); transition: .2s; }
.pager a:hover { border-color: var(--accent-hot); }
.pager a.cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty-state { text-align: center; padding: 70px 24px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--muted); }
.empty-state h3 { color: var(--text); margin-bottom: 8px; }

/* visor de imagen */
.lightbox { position: fixed; inset: 0; z-index: 2100; display: none; place-items: center; background: rgba(4, 4, 8, .88); backdrop-filter: blur(10px); padding: 24px; }
.lightbox.open { display: grid; animation: fadeIn .2s; }
.lightbox img { max-width: min(92vw, 900px); max-height: 86vh; object-fit: contain; border-radius: var(--r-md); animation: popIn .35s var(--ease); }
.lightbox button { position: absolute; top: 18px; right: 22px; font-size: 38px; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1; }

/* =====================================================================
   CARRITO EN PASOS
   ===================================================================== */
.cart-overlay { position: fixed; inset: 0; z-index: 1990; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); display: block !important; opacity: 0; visibility: hidden; transition: .3s; }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(100vw, 440px); height: 100%; z-index: 2000; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-left: 1px solid var(--border); transform: translateX(104%); transition: transform .5s var(--ease); box-shadow: -40px 0 80px -30px #000; padding: 0; right: 0 !important; }
.cart-drawer.open { transform: none; }
.cd-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; }
.cd-head h2 { font-size: 1.1rem; letter-spacing: .12em; }
.cd-steps { display: flex; align-items: center; gap: 8px; padding: 0 22px 16px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); }
.cd-steps .st { display: inline-flex; align-items: center; gap: 8px; }
.cd-steps .st i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); transition: .3s; }
.cd-steps .st.on { color: var(--text); }
.cd-steps .st.on i, .cd-steps .st.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.cd-steps .bar { flex: 1; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cd-steps .bar::after { content: ''; display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s var(--ease); }
.cd-steps .bar.fill::after { width: 100%; }
.cd-pane { flex: 1; display: none; flex-direction: column; min-height: 0; }
.cd-pane.on { display: flex; animation: paneIn .4s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateX(18px); } }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 22px; }
.cd-empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.cd-empty .big { font-size: 46px; margin-bottom: 10px; }
.cd-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); animation: paneIn .35s var(--ease); }
.cd-item img { width: 68px; height: 68px; object-fit: contain; border-radius: 14px; background: var(--surface-2); padding: 4px; }
.cd-item h4 { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 2px; }
.cd-item .unit { font-size: 12px; color: var(--muted); }
.cd-item .line { font-weight: 800; color: var(--accent-hot); font-size: 15px; text-align: right; }
.cd-qty { display: inline-flex; align-items: center; margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); }
.cd-qty button { width: 30px; height: 30px; border: 0; background: none; color: var(--text); cursor: pointer; font-size: 16px; border-radius: 50%; }
.cd-qty button:hover { color: var(--accent-hot); }
.cd-qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 13px; }
.cd-rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; margin-top: 8px; display: block; margin-left: auto; }
.cd-rm:hover { color: var(--accent-hot); }
.cd-addon { grid-column: 2 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.cd-addon img { width: 28px; height: 28px; padding: 0; border-radius: 6px; }
.cd-addon b { color: var(--text); }
.cd-addon button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.cd-foot { padding: 16px 22px 22px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, #000); }
.ship-progress { margin-bottom: 14px; }
.ship-progress .txt { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.ship-progress .txt b { color: var(--ok); }
.ship-progress .track { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ship-progress .fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--ember)); transition: width .6s var(--ease); }
.ship-progress.done .fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
.cart-summary { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.cart-summary div { display: flex; justify-content: space-between; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 1.15rem; margin: 10px 0 16px; padding: 0; background: none; border: 0; }
.cart-total span:last-child { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-hot); }
.cd-foot .btn { width: 100%; }
.cd-back { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; padding: 12px 0 0; width: 100%; text-align: center; }
.cd-back:hover { color: var(--text); }
.cd-form { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.cd-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cd-form input { height: 48px; padding: 0 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 15px; outline: 0; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cd-form input:focus { border-color: var(--accent-hot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-hot) 18%, transparent); }
.cd-secure { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 12px; color: var(--muted); line-height: 1.45; }
.cd-secure svg { color: var(--ok); flex-shrink: 0; margin-top: 1px; }
.cd-review { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.cd-review b { color: var(--text); font-size: 14px; }

/* toast */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; display: grid; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: 0 20px 50px -15px #000; animation: toastIn .5s var(--ease); pointer-events: auto; }
.toast.out { animation: toastOut .35s ease forwards; }
.toast button { background: var(--accent); color: #fff; border: 0; border-radius: var(--r-pill); padding: 6px 14px; font-weight: 800; font-size: 12px; cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateY(24px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px); } }

/* flash */
.flash-bar { position: relative; text-align: center; padding: 14px 20px !important; font-weight: 700; font-size: 14px; background: linear-gradient(90deg, #14532d, #166534) !important; color: #dcfce7 !important; border-bottom: 1px solid rgba(255, 255, 255, .1); }

/* volver arriba */
#back-to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; z-index: 800; opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: .35s var(--ease); box-shadow: 0 12px 30px -8px var(--glow); }
#back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* =====================================================================
   PIE
   ===================================================================== */
.site-footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--border); padding: 0; }
.site-footer .footer-container { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px 40px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .footer-brand p { color: var(--muted); margin: 16px 0 22px; max-width: 34ch; }
.site-footer h4 { font-family: var(--font-display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; color: var(--text); }
.site-footer ul { list-style: none; display: grid; gap: 11px; padding: 0; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.site-footer a:hover { color: var(--accent-hot); }
.footer-logo-img { height: 38px; } .footer-logo-text-img { height: 24px; }
.footer-logo .brand-name { display: flex; align-items: center; gap: 10px; }
.social-icons-footer { display: flex; gap: 10px; }
.social-icons-footer a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: .25s var(--ease); }
.social-icons-footer a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.site-footer .footer-bottom { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.site-footer .footer-bottom p { margin: 0; }
@media (max-width: 860px) { .site-footer .footer-container { grid-template-columns: 1fr 1fr; } .site-footer .footer-brand { grid-column: 1 / -1; } }

/* =====================================================================
   PRODUCTO · visor 3D
   ===================================================================== */
.viewer-wrap { position: relative; }
.viewer-toggle { position: absolute; z-index: 6; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: rgba(8, 8, 11, .75); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14); }
.viewer-toggle button { border: 0; background: none; color: #ddd; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 12px; cursor: pointer; }
.viewer-toggle button.on { background: var(--accent); color: #fff; }
model-viewer { width: 100%; height: 100%; min-height: 360px; --poster-color: transparent; background: transparent; border-radius: inherit; }
.model-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(8, 8, 11, .7); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }

/* =====================================================================
   Páginas antiguas: refrescos suaves heredados
   ===================================================================== */
.product-page-image, .profile-card, .order-card { border-radius: var(--r-lg) !important; }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus { border-color: var(--accent-hot) !important; outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
