/* ==========================================================================
   TCreateKey — "Capa a capa"
   Sistema de diseño de la web pública. Claro, cálido y táctil: papel crema con
   líneas de capa de impresión 3D, tinta negra, naranja filamento y pops pastel.
   Independiente de main.css/theme.css (que solo usa el panel admin).
   ========================================================================== */

/* ----------------------------------------------------------------- Tokens */
:root {
    --paper: #f4eee4;
    --paper-2: #ebe2d4;
    --card: #fffcf6;
    --ink: #1b1712;
    --ink-2: #463f36;
    --muted: #776d61;
    --line: rgba(27, 23, 18, .14);
    --line-strong: rgba(27, 23, 18, .85);

    --orange: #ff5a1f;
    --orange-d: #e0460f;
    --orange-soft: #ffe1d3;
    --lilac: #cdbcff;
    --mint: #a9eacb;
    --butter: #ffe07a;
    --sky: #a7d6ff;
    --rose: #ffbccb;

    --ok: #1f9d55;
    --bad: #d83a2c;

    --radius: 22px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --pill: 999px;

    --hard: 4px 4px 0 var(--ink);
    --hard-lg: 7px 7px 0 var(--ink);
    --hard-sm: 2px 2px 0 var(--ink);
    --soft: 0 22px 44px -26px rgba(27, 23, 18, .45);

    --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --wrap: 1240px;
}

/* ------------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    /* Líneas de capa de impresión 3D: la firma de la marca */
    background-image: repeating-linear-gradient(0deg, rgba(27, 23, 18, .032) 0 1px, transparent 1px 7px);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4, .display {
    font-family: var(--f-display);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -.02em;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
h1 em, h2 em, h3 em, .display em {
    font-style: italic;
    font-weight: 500;
    color: var(--orange);
    font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}

.wrap, .container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.section-sm { padding-top: 56px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.center, .text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- Eyebrow/tag */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--f-mono); font-size: .76rem; font-weight: 500;
    letter-spacing: .08em; text-transform: uppercase; color: var(--orange-d);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: currentColor; }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
    padding: 5px 11px; border-radius: var(--pill);
    background: var(--card); border: 1.5px solid var(--ink);
    white-space: nowrap;
}
.tag-orange { background: var(--orange); color: #fff; border-color: var(--ink); }
.tag-butter { background: var(--butter); }
.tag-mint { background: var(--mint); }
.tag-lilac { background: var(--lilac); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin-top: 14px; max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 46ch; margin-top: 10px; }

/* --------------------------------------------------------------- Buttons */
.btn {
    --b: var(--card);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 24px; border-radius: var(--pill);
    font-weight: 600; font-size: .95rem; line-height: 1.1;
    background: var(--b); color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: var(--hard-sm);
    transition: transform .25s var(--spring), box-shadow .25s var(--ease), background .2s;
    white-space: nowrap; cursor: pointer; text-align: center;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
.btn i { font-size: .95em; }
.btn-primary { --b: var(--orange); color: #fff; }
.btn-primary:hover { --b: var(--orange-d); color: #fff; }
.btn-ink { --b: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--orange); }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--orange); }
.btn-ghost, .btn-secondary { --b: transparent; box-shadow: none; }
.btn-ghost:hover, .btn-secondary:hover { --b: var(--card); box-shadow: var(--hard-sm); }
.btn-lg { padding: 17px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.link { font-weight: 600; border-bottom: 2px solid var(--orange); padding-bottom: 1px; transition: color .2s; }
.link:hover { color: var(--orange-d); }

.icon-btn {
    position: relative; display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid transparent; transition: border-color .2s, background .2s, transform .25s var(--spring);
    font-size: 1.1rem;
}
.icon-btn:hover { border-color: var(--ink); background: var(--card); transform: rotate(-6deg); }
.badge-count {
    position: absolute; top: -3px; right: -3px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--pill);
    background: var(--orange); color: #fff; border: 2px solid var(--paper);
    font-family: var(--f-mono); font-size: .68rem; font-weight: 700;
    display: grid; place-items: center;
}

/* ----------------------------------------------------------------- Cards */
.card, .glass {
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--hard);
}
.card-pad { padding: 32px; }
.card-flat { box-shadow: none; border-color: var(--line-strong); }
.card-hover { transition: transform .3s var(--spring), box-shadow .3s var(--ease); }
.card-hover:hover { transform: translate(-3px, -3px); box-shadow: var(--hard-lg); }

/* --------------------------------------------------------------- Ribbon */
.ribbon {
    background: var(--orange); color: #fff;
    border-bottom: 2px solid var(--ink);
    overflow: hidden; white-space: nowrap;
    font-family: var(--f-mono); font-size: .76rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.ribbon-track { display: inline-flex; gap: 48px; padding: 9px 0; animation: marquee 32s linear infinite; }
.ribbon-track span { display: inline-flex; align-items: center; gap: 48px; }
.ribbon-track span::after { content: '✦'; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- Header */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(244, 238, 228, .86);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 2px solid transparent;
    transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--ink); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; transition: transform .5s var(--spring); }
.brand:hover img { transform: rotate(-18deg); }
.brand b { color: var(--orange); font-weight: 700; }
.nav-links {
    display: flex; align-items: center; gap: 4px;
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--pill);
    padding: 5px; box-shadow: var(--hard-sm);
}
.nav-links a {
    padding: 8px 16px; border-radius: var(--pill);
    font-weight: 500; font-size: .93rem; transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--paper-2); }
.nav-links a.is-active { background: var(--ink); color: var(--paper); }
.nav-links a.hot { color: var(--orange-d); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.burger { display: none; }

/* Drawer móvil */
.drawer {
    position: fixed; inset: 0; z-index: 1200;
    background: var(--paper);
    background-image: repeating-linear-gradient(0deg, rgba(27, 23, 18, .04) 0 1px, transparent 1px 7px);
    padding: 24px; display: flex; flex-direction: column;
    transform: translateY(-100%); transition: transform .5s var(--ease);
    visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; }
.drawer-links { margin-top: 40px; display: flex; flex-direction: column; gap: 6px; }
.drawer-links a {
    font-family: var(--f-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -.02em;
    padding: 6px 0; border-bottom: 1.5px solid var(--line); display: flex; justify-content: space-between; align-items: center;
}
.drawer-links a i { font-size: 1.2rem; color: var(--orange); }
.drawer-foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- Hero */
.hero { padding: 56px 0 88px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6.4rem); margin: 22px 0 24px; }
.hero-lead { font-size: 1.18rem; color: var(--ink-2); max-width: 34ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-specs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }

/* Escenario de impresión: la imagen se "imprime" capa a capa */
.print-stage {
    position: relative; aspect-ratio: 4 / 5;
    border: 2px solid var(--ink); border-radius: 30px;
    background: var(--butter); box-shadow: var(--hard-lg);
    overflow: hidden; isolation: isolate;
}
.print-stage::before { /* cama de impresión */
    content: ''; position: absolute; inset: auto 0 0 0; height: 14%;
    background: repeating-linear-gradient(90deg, rgba(27,23,18,.12) 0 2px, transparent 2px 16px), var(--paper-2);
    border-top: 2px solid var(--ink); z-index: 0;
}
.print-stage .print-img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
    clip-path: inset(100% 0 0 0);
    animation: printUp 4.2s steps(42, end) .5s forwards;
}
.print-stage .print-img.no-anim { animation: none; clip-path: none; }
.print-stage .layers { /* textura de capas encima de la imagen */
    position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: multiply;
    background: repeating-linear-gradient(0deg, rgba(27,23,18,.07) 0 1px, transparent 1px 4px);
}
.nozzle {
    position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3;
    background: var(--orange); box-shadow: 0 0 14px 2px rgba(255, 90, 31, .7);
    animation: nozzleUp 4.2s steps(42, end) .5s forwards, fadeAway .4s 4.9s forwards;
}
.nozzle::after { /* cabezal */
    content: ''; position: absolute; top: -26px; width: 34px; height: 24px;
    background: var(--ink); border-radius: 6px 6px 3px 3px;
    animation: nozzleX .42s ease-in-out infinite alternate;
    clip-path: polygon(0 0, 100% 0, 100% 62%, 64% 62%, 50% 100%, 36% 62%, 0 62%);
}
@keyframes printUp { to { clip-path: inset(0 0 0 0); } }
@keyframes nozzleUp { to { bottom: 100%; } }
@keyframes nozzleX { from { left: 6%; } to { left: calc(94% - 34px); } }
@keyframes fadeAway { to { opacity: 0; visibility: hidden; } }

.sticker {
    position: absolute; z-index: 5;
    font-family: var(--f-display); font-weight: 600; font-size: 1.02rem;
    padding: 10px 18px; border-radius: var(--pill);
    border: 2px solid var(--ink); box-shadow: var(--hard-sm);
    animation: bob 4s ease-in-out infinite;
}
.sticker i { margin-right: 6px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(var(--r, 0deg)); } }

/* Sello giratorio */
.stamp { position: absolute; width: 132px; height: 132px; z-index: 6; }
.stamp svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.stamp text { font-family: var(--f-mono); font-size: 10.6px; font-weight: 600; letter-spacing: 2.6px; fill: var(--ink); text-transform: uppercase; }
.stamp .stamp-core {
    position: absolute; inset: 30%; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink);
    display: grid; place-items: center; color: #fff; font-size: 1.3rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Spools */
.spools { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scrollbar-width: none; }
.spools::-webkit-scrollbar { display: none; }
.spool { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 92px; }
.spool-disc {
    width: 78px; height: 78px; border-radius: 50%;
    border: 2px solid var(--ink); position: relative; box-shadow: var(--hard-sm);
    background: radial-gradient(circle at 50% 50%, var(--paper) 0 17%, var(--ink) 17% 20%, var(--c) 20% 100%);
    transition: transform .5s var(--spring);
}
.spool-disc::after { /* hilos */
    content: ''; position: absolute; inset: 22%; border-radius: 50%;
    background: repeating-radial-gradient(circle, rgba(0,0,0,.08) 0 1px, transparent 1px 4px);
}
.spool:hover .spool-disc { transform: rotate(140deg) scale(1.06); }
.spool span { font-family: var(--f-mono); font-size: .72rem; text-align: center; color: var(--ink-2); }

/* -------------------------------------------------------- Categories */
.cats { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.cat {
    grid-column: span 4; min-height: 300px;
    position: relative; overflow: hidden;
    border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard);
    padding: 28px; display: flex; flex-direction: column; justify-content: space-between;
    background: var(--c, var(--card));
    transition: transform .35s var(--spring), box-shadow .35s var(--ease);
}
.cat:hover { transform: translate(-4px, -4px) rotate(-.6deg); box-shadow: var(--hard-lg); }
.cat.wide { grid-column: span 8; }
.cat h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); max-width: 12ch; }
.cat p { color: var(--ink-2); max-width: 30ch; margin-top: 8px; }
.cat-ico {
    width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
    background: var(--card); border: 2px solid var(--ink); font-size: 1.6rem;
    transition: transform .5s var(--spring);
}
.cat:hover .cat-ico { transform: rotate(-12deg) scale(1.08); }
.cat-arrow {
    position: absolute; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%;
    background: var(--ink); color: var(--paper); display: grid; place-items: center;
    transition: transform .35s var(--spring);
}
.cat:hover .cat-arrow { transform: rotate(-45deg) scale(1.1); }
.cat-count { font-family: var(--f-mono); font-size: .75rem; }

/* ---------------------------------------------------------- Products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.p-card {
    display: flex; flex-direction: column;
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--hard); overflow: hidden;
    transition: transform .35s var(--spring), box-shadow .35s var(--ease);
}
.p-card:hover { transform: translate(-3px, -4px); box-shadow: var(--hard-lg); }
.p-media { position: relative; aspect-ratio: 1 / 1; background: var(--c, var(--paper-2)); border-bottom: 2px solid var(--ink); overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.07) rotate(-1.5deg); }
.p-media .tag { position: absolute; top: 14px; left: 14px; }
.p-quick {
    position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%;
    background: var(--ink); color: var(--paper); display: grid; place-items: center;
    transform: translateY(12px) scale(.8); opacity: 0; transition: all .35s var(--spring);
}
.p-card:hover .p-quick { transform: none; opacity: 1; }
.p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-cat { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.p-name { font-family: var(--f-display); font-size: 1.28rem; font-weight: 600; line-height: 1.15; }
.p-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.p-price { font-family: var(--f-mono); font-weight: 600; font-size: 1.08rem; }
.p-stock { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.p-stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.p-stock.low::before { background: var(--orange); }
.p-stock.out::before { background: var(--bad); }
/* Fondos pastel rotatorios */
.products > :nth-child(5n+1) { --c: var(--butter); }
.products > :nth-child(5n+2) { --c: var(--mint); }
.products > :nth-child(5n+3) { --c: var(--lilac); }
.products > :nth-child(5n+4) { --c: var(--sky); }
.products > :nth-child(5n+5) { --c: var(--rose); }

/* ------------------------------------------------------------ Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px; border: 2px dashed var(--ink); border-radius: var(--radius); background: rgba(255, 252, 246, .6); }
.step-n {
    font-family: var(--f-display); font-style: italic; font-size: 4.4rem; line-height: 1; color: var(--orange);
    font-variation-settings: 'opsz' 144, 'WONK' 1;
}
.step h3 { font-size: 1.6rem; margin: 10px 0 8px; }
.step p { color: var(--muted); }

/* --------------------------------------------------- Live font demo */
.demo { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.keytag-wrap { display: grid; place-items: center; padding: 30px; }
.keytag {
    --kc: var(--orange);
    position: relative; min-width: 290px; max-width: 100%;
    padding: 28px 46px 28px 78px; border-radius: 26px;
    background: var(--kc); color: #fff;
    border: 3px solid var(--ink); box-shadow: var(--hard-lg);
    transform: rotate(-4deg); transition: background .3s, transform .5s var(--spring);
}
.keytag:hover { transform: rotate(2deg) scale(1.02); }
.keytag::before { /* agujero */
    content: ''; position: absolute; left: 22px; top: 50%; width: 30px; height: 30px; margin-top: -15px;
    border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
}
.keytag::after { /* anilla */
    content: ''; position: absolute; left: -38px; top: 50%; width: 66px; height: 66px; margin-top: -33px;
    border-radius: 50%; border: 5px solid #8a8a8a; border-right-color: transparent; transform: rotate(-30deg);
}
.keytag .kt-text {
    font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.05; word-break: break-word;
    text-shadow: 2px 2px 0 rgba(0,0,0,.18);
}
.keytag.light-text .kt-text { color: var(--ink); text-shadow: none; }
.font-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.font-chip {
    padding: 8px 14px; border-radius: var(--pill); border: 2px solid var(--ink); background: var(--card);
    font-size: 1rem; transition: transform .2s var(--spring), background .2s;
}
.font-chip:hover { transform: translateY(-2px); }
.font-chip.is-on { background: var(--ink); color: var(--paper); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink);
    background: var(--c); box-shadow: var(--hard-sm); transition: transform .25s var(--spring);
    position: relative;
}
.swatch:hover { transform: scale(1.12); }
.swatch.is-on { transform: scale(1.12); outline: 3px solid var(--orange); outline-offset: 3px; }

/* ----------------------------------------------------------- Reviews */
.reviews { columns: 3 280px; column-gap: 22px; }
.review { break-inside: avoid; margin-bottom: 22px; padding: 26px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--hard-sm); }
.review:nth-child(3n+2) { background: var(--mint); }
.review:nth-child(3n+3) { background: var(--butter); }
.stars { color: var(--orange); letter-spacing: 2px; }
.review p { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.4; margin: 12px 0 16px; }
.review footer { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-2); }

/* --------------------------------------------------------------- CTA */
.cta-band {
    position: relative; overflow: hidden;
    background: var(--ink); color: var(--paper);
    border-radius: 34px; padding: 72px 56px;
    display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center;
    box-shadow: 8px 8px 0 var(--orange);
}
.cta-band h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
.cta-band p { color: #cfc6b8; margin-top: 14px; max-width: 44ch; }
.cta-band .btn { --b: var(--orange); color: #fff; border-color: var(--paper); box-shadow: 3px 3px 0 var(--paper); }
.cta-band .bg-lines { position: absolute; inset: 0; opacity: .1; pointer-events: none; background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 7px); }

/* ------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label, .form-group label { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.field .req { color: var(--orange-d); }
.input, .field input, .field select, .field textarea,
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px;
    background: var(--card); color: var(--ink);
    border: 2px solid var(--ink); border-radius: var(--radius-sm);
    font-size: 1rem; transition: box-shadow .2s, transform .2s;
}
.field textarea, .form-group textarea { min-height: 120px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; box-shadow: 4px 4px 0 var(--orange);
}
.field input[type="file"] { padding: 10px; border-style: dashed; background: var(--paper); }
.form-group { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); margin-top: 2px; flex: none; }

/* Opción tipo tarjeta (radio) */
.opt {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer;
    border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card);
    transition: box-shadow .2s, background .2s;
}
.opt:has(input:checked) { background: var(--orange-soft); box-shadow: var(--hard-sm); }
.opt input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.opt .opt-main { flex: 1; display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.opt small { display: block; color: var(--muted); font-weight: 400; }

/* Cantidad */
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: var(--pill); background: var(--card); overflow: hidden; }
.qty button { width: 44px; height: 44px; font-size: 1rem; transition: background .2s; }
.qty button:hover { background: var(--paper-2); }
.qty input { width: 52px; border: 0; background: transparent; text-align: center; font-family: var(--f-mono); font-weight: 600; font-size: 1.05rem; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ------------------------------------------------------------ Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); border: 2px solid var(--ink); margin-bottom: 20px; font-weight: 500; }
.alert-ok { background: var(--mint); }
.alert-bad { background: #ffd1cb; }
.alert-info { background: var(--sky); }
.alert-warn { background: var(--butter); }

/* --------------------------------------------- Free shipping progress */
.shipbar { padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); }
.shipbar p { font-size: .92rem; margin-bottom: 10px; }
.shipbar-track { height: 14px; border-radius: var(--pill); border: 2px solid var(--ink); background: var(--paper-2); overflow: hidden; }
.shipbar-fill {
    height: 100%; border-radius: var(--pill); background: var(--orange); width: var(--p, 0%);
    background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px);
    background-size: 17px 17px; animation: extrude 1s linear infinite;
    transition: width 1s var(--ease);
}
.shipbar.done .shipbar-fill { background-color: var(--ok); }
@keyframes extrude { to { background-position: 17px 0; } }

/* ------------------------------------------------------- Layouts (2 col) */
.split { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.sticky { position: sticky; top: 100px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.row.total { border-top: 2px solid var(--ink); margin-top: 10px; padding-top: 16px; font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; }
.divider { height: 2px; background: var(--ink); opacity: .12; margin: 18px 0; border: 0; }

/* Línea de carrito */
.line-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; padding: 20px 0; border-bottom: 1.5px dashed var(--line-strong); align-items: start; }
.line-item:last-child { border-bottom: 0; }
.line-thumb { width: 96px; height: 96px; border-radius: var(--radius-sm); border: 2px solid var(--ink); object-fit: cover; background: var(--paper-2); }
.line-meta { font-size: .82rem; color: var(--ink-2); background: var(--paper); border-left: 3px solid var(--orange); padding: 8px 12px; border-radius: 0 10px 10px 0; margin-top: 10px; line-height: 1.55; }
.line-meta a { color: var(--orange-d); font-weight: 600; }

/* Stepper de checkout */
.stepper { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 34px; font-family: var(--f-mono); font-size: .78rem; }
.stepper .st { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: var(--pill); background: var(--card); }
.stepper .st.done { background: var(--mint); }
.stepper .st.now { background: var(--ink); color: var(--paper); }
.stepper .sep { width: 24px; height: 2px; background: var(--ink); }

/* -------------------------------------------------------- Page head */
.page-head { padding: 60px 0 36px; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-top: 14px; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 54ch; font-size: 1.08rem; }
.crumbs { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--orange-d); }

/* Prosa (legales, FAQ) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.9rem; margin: 40px 0 12px; }
.prose h3 { font-size: 1.35rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 12px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose a { color: var(--orange-d); font-weight: 600; text-decoration: underline; }

/* Acordeón */
.acc { border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--card); margin-bottom: 12px; overflow: hidden; transition: box-shadow .2s; }
.acc[open] { box-shadow: var(--hard-sm); }
.acc summary { list-style: none; cursor: pointer; padding: 18px 22px; font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-family: var(--f-mono); font-size: 1.4rem; transition: transform .3s var(--spring); }
.acc[open] summary::after { transform: rotate(45deg); color: var(--orange); }
.acc .acc-body { padding: 0 22px 20px; color: var(--ink-2); }

/* Tabla */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--ink); color: var(--ink-2); }
table.t td { padding: 16px 14px; border-bottom: 1.5px dashed var(--line-strong); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }

/* Estado */
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 5px 11px; border-radius: var(--pill); border: 2px solid var(--ink); background: var(--card); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.s-paid { background: var(--mint); }
.status.s-ship { background: var(--sky); }
.status.s-done { background: var(--lilac); }
.status.s-wait { background: var(--butter); }
.status.s-bad { background: #ffd1cb; }

/* Vacío */
.empty { text-align: center; padding: 70px 30px; }
.empty .empty-art { font-size: 4.4rem; margin-bottom: 18px; display: inline-block; animation: bob 3.5s ease-in-out infinite; }
.empty h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.empty p { color: var(--muted); margin: 12px auto 26px; max-width: 42ch; }

/* Galería de producto */
.gallery-main { position: relative; aspect-ratio: 1 / 1; border: 2px solid var(--ink); border-radius: 28px; background: var(--c, var(--butter)); box-shadow: var(--hard-lg); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .5s var(--ease); }
.gallery-main:hover img { transform: scale(1.04); }
.gallery-main model-viewer { width: 100%; height: 100%; background: var(--paper-2); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.thumb { aspect-ratio: 1; border-radius: var(--radius-xs); border: 2px solid var(--ink); overflow: hidden; opacity: .55; transition: opacity .2s, transform .25s var(--spring), box-shadow .2s; background: var(--paper-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; transform: translateY(-3px); }
.thumb.is-on { opacity: 1; box-shadow: var(--hard-sm); }
.buy-box { padding: 26px; }
.price-big { font-family: var(--f-mono); font-size: 2rem; font-weight: 600; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.perk { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); font-size: .82rem; font-weight: 500; background: var(--paper); }
.perk i { color: var(--orange); font-size: 1.1rem; }

/* Chips de filtro */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--pill);
    border: 2px solid var(--ink); background: var(--card); font-weight: 500; font-size: .92rem;
    transition: background .2s, transform .2s var(--spring), box-shadow .2s;
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--hard-sm); }
.chip.is-on { background: var(--ink); color: var(--paper); }
.chip small { font-family: var(--f-mono); opacity: .7; }
.toolbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 34px; }
.search { position: relative; flex: 1; max-width: 380px; min-width: 220px; }
.search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; border-radius: var(--pill); }
.select-pill { border-radius: var(--pill); padding: 12px 18px; border: 2px solid var(--ink); background: var(--card); font-weight: 500; }

/* ------------------------------------------------------------ Footer */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 110px; border-top: 2px solid var(--ink); position: relative; }
.site-footer::before { /* borde ondulado de filamento */
    content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
    background: radial-gradient(circle at 10px -4px, transparent 12px, var(--ink) 13px) 0 0 / 20px 14px repeat-x;
}
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 80px 0 50px; }
.foot-top h4 { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: #a89f92; margin-bottom: 16px; font-weight: 500; }
.foot-top ul li { margin-bottom: 10px; }
.foot-top a { color: #e8e0d3; transition: color .2s; }
.foot-top a:hover { color: var(--orange); }
.foot-news h3 { font-size: 2.2rem; margin-bottom: 12px; }
.foot-news p { color: #a89f92; margin-bottom: 18px; }
.news-form { display: flex; gap: 8px; background: #2a251f; border: 2px solid #4a4339; border-radius: var(--pill); padding: 5px; }
.news-form input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--paper); padding: 0 16px; }
.news-form input:focus { outline: none; }
.news-form button { background: var(--orange); color: #fff; font-weight: 600; border-radius: var(--pill); padding: 11px 20px; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #4a4339; display: grid; place-items: center; transition: background .2s, border-color .2s, transform .25s var(--spring); }
.socials a:hover { background: var(--orange); border-color: var(--orange); transform: rotate(-10deg); color: #fff; }
.foot-word { font-family: var(--f-display); font-weight: 700; font-size: clamp(4rem, 17vw, 15rem); line-height: .8; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px #3d372f; text-align: center; padding-bottom: 20px; user-select: none; }
.foot-word em { font-style: italic; -webkit-text-stroke: 2px var(--orange); }
.foot-bottom { border-top: 1px solid #3d372f; padding: 22px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-family: var(--f-mono); font-size: .74rem; color: #8d8478; }
.foot-pay { display: flex; gap: 12px; font-size: 1.5rem; color: #a89f92; }

/* ----------------------------------------------------- Floating widgets */
.fab { position: fixed; z-index: 800; bottom: 24px; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); box-shadow: var(--hard); display: grid; place-items: center; font-size: 1.5rem; transition: transform .3s var(--spring), box-shadow .3s; }
.fab:hover { transform: translate(-2px, -2px) rotate(-8deg); box-shadow: var(--hard-lg); }
.fab-wa { right: 24px; background: #25d366; color: #fff; }
.fab-ai { left: 24px; background: var(--lilac); color: var(--ink); }

.ai-panel {
    position: fixed; z-index: 1100; left: 24px; bottom: 96px; width: min(380px, calc(100vw - 32px)); height: 520px; max-height: calc(100vh - 140px);
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard-lg);
    display: none; flex-direction: column; overflow: hidden;
}
.ai-panel.is-open { display: flex; animation: popIn .35s var(--spring); }
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.ai-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: var(--lilac); border-bottom: 2px solid var(--ink); }
.ai-head strong { font-family: var(--f-display); font-size: 1.15rem; }
.ai-head small { display: block; font-family: var(--f-mono); font-size: .68rem; color: var(--ink-2); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--ink); font-size: .92rem; line-height: 1.45; }
.ai-msg.bot { background: var(--card); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--orange); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-typing { padding: 6px 16px; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); background: var(--paper); display: none; }
.ai-form { display: flex; gap: 8px; padding: 12px; border-top: 2px solid var(--ink); background: var(--card); }
.ai-form input { flex: 1; border: 2px solid var(--ink); border-radius: var(--pill); padding: 10px 16px; background: var(--paper); }
.ai-form input:focus { outline: none; box-shadow: 3px 3px 0 var(--orange); }
.ai-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); flex: none; }
.ai-reco { display: flex; gap: 10px; align-items: center; align-self: flex-start; max-width: 85%; padding: 8px; border: 2px solid var(--ink); border-radius: 14px; background: var(--butter); box-shadow: var(--hard-sm); }
.ai-reco img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 2px solid var(--ink); }
.ai-reco b { display: block; font-size: .85rem; }
.ai-reco span { font-family: var(--f-mono); font-size: .78rem; }

/* Popup de descuento */
.pop-overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(27, 23, 18, .55); display: none; place-items: center; padding: 20px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pop-overlay.is-open { display: grid; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.pop { position: relative; width: min(440px, 100%); background: var(--butter); border: 2px solid var(--ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink); padding: 40px 34px 32px; text-align: center; animation: popIn .45s var(--spring); }
.pop-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); font-size: 1.1rem; }
.pop h2 { font-size: 2.6rem; margin: 12px 0 6px; }
.pop .big { font-family: var(--f-display); font-style: italic; font-size: 4.6rem; line-height: 1; color: var(--orange); font-variation-settings: 'WONK' 1; }
.pop-code { display: inline-block; margin: 18px 0 20px; padding: 12px 22px; border: 2px dashed var(--ink); border-radius: var(--radius-sm); background: var(--card); font-family: var(--f-mono); font-size: 1.3rem; font-weight: 700; letter-spacing: .15em; cursor: pointer; }
.pop small { display: block; margin-top: 14px; font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); }

/* Toasts */
.toasts { position: fixed; z-index: 2000; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--hard); animation: toastIn .4s var(--spring); font-weight: 500; }
.toast.ok { background: var(--mint); }
.toast.bad { background: #ffd1cb; }
.toast i { margin-top: 3px; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* Confeti de filamento */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1500; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 18px; border-radius: 3px; border: 1.5px solid var(--ink); animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Spinner */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }

/* -------------------------------------------- Entrada (CSS puro, above the fold) */
.rise { animation: rise .9s var(--ease) both; }
.rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* ----------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
    .print-stage .print-img { clip-path: none; }
}

/* ------------------------------------------------- Compat (legacy pages) */
.mt-100 { margin-top: 60px; } .pb-100 { padding-bottom: 60px; }
.btn-secondary { border-color: var(--ink); }
.fade-in, .fade-in-up { animation: fadeIn .6s both; }

/* Las columnas de las rejillas nunca se ensanchan por su contenido mínimo */
.split > *, .hero-grid > *, .demo > *, .foot-top > *, .steps > *, .pdp > *, .cats > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.news-form input { width: 100%; }

/* -------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
    .nav-links { display: none; }
    .burger { display: inline-grid; }
    .hero-grid { grid-template-columns: 1fr; gap: 46px; }
    .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
    .split { grid-template-columns: 1fr; }
    .sticky { position: static; }
    .demo { grid-template-columns: 1fr; }
    .foot-top { grid-template-columns: 1fr 1fr; }
    .foot-news { grid-column: 1 / -1; }
    .cta-band { grid-template-columns: 1fr; padding: 54px 34px; }
}
@media (max-width: 760px) {
    .section { padding-top: 68px; padding-bottom: 68px; }
    .cat, .cat.wide { grid-column: span 12; min-height: 230px; }
    .steps { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .perks { grid-template-columns: 1fr 1fr 1fr; }
    .line-item { grid-template-columns: 72px 1fr; }
    .line-item .line-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
    .line-thumb { width: 72px; height: 72px; }
    .stamp { width: 100px; height: 100px; }
    .hide-sm { display: none !important; }
    .fab { width: 52px; height: 52px; bottom: 16px; }
    .fab-wa { right: 16px; } .fab-ai { left: 16px; }
    .ai-panel { left: 16px; bottom: 80px; }
}
@media (max-width: 520px) {
    .wrap, .container { padding: 0 18px; }
    .products { grid-template-columns: 1fr 1fr; gap: 14px; }
    .p-body { padding: 12px 12px 14px; }
    .p-name { font-size: 1.02rem; }
    .p-quick { display: none; }
    .foot-top { grid-template-columns: minmax(0, 1fr); }
    .perks { grid-template-columns: 1fr; }
    .news-form button { padding: 11px 14px; }
    .card-pad { padding: 22px; }
    .cta-band { padding: 44px 24px; border-radius: 26px; }
    .brand span.brand-text { display: none; }
}
