/* ==========================================================================
   Kordero — hoja única (sitio, editor 3D y panel)

   Criterio de Apple (skill apple-design, 2026-09-27):
   - Tipografía del sistema (San Francisco en Apple, Segoe en Windows): trae
     su propio ajuste óptico. El tracking depende del tamaño: los títulos
     grandes se aprietan, el texto chico se abre un poco. Nunca un solo valor.
   - Grises neutros y UN solo azul de acción (--accent). El mismo azul marca
     la capa seleccionada en el 3D (garment3d.js), así que no se usa como
     decoración.
   - La barra superior y los controles que flotan sobre el 3D son material
     translúcido (desenfoque), con respaldo sólido si el usuario pide menos
     transparencia.
   - Respuesta al presionar (:active), nunca sólo al soltar.

   Reglas de siempre:
   - Ninguna regla consulta el tema: el oscuro sólo redefine tokens.
   - --bg es el suelo (lo más lejano); --surface lo que flota encima.
   ========================================================================== */

/* Archivo sólo se usa como tipo de letra para los textos del cliente en el
   editor (designer.js): no se precarga, el navegador la baja al usarla. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/archivo-var-latin.woff2") format("woff2");
}
/* Tipos de letra para los textos del cliente (Google Fonts, licencia OFL,
   sólo latín). Tampoco se precargan: el navegador baja cada uno la primera
   vez que el editor lo usa. */
@font-face { font-family: "Anton"; src: url("/assets/fonts/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("/assets/fonts/bebas-neue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Graduate"; src: url("/assets/fonts/graduate.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Black Ops One"; src: url("/assets/fonts/black-ops-one.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("/assets/fonts/permanent-marker.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pacifico"; src: url("/assets/fonts/pacifico.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Lobster"; src: url("/assets/fonts/lobster.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; font-weight: 800; src: url("/assets/fonts/playfair-800.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bungee"; src: url("/assets/fonts/bungee.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Press Start 2P"; src: url("/assets/fonts/press-start-2p.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "UnifrakturMaguntia"; src: url("/assets/fonts/gotica.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Yellowtail"; src: url("/assets/fonts/yellowtail.woff2") format("woff2"); font-display: swap; }
@font-face {
  font-family: "Archivo Fallback";
  src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial");
  size-adjust: 101%;
  ascent-override: 92%;
  descent-override: 24%;
}

:root {
  --bg: #f5f5f7;
  --bg-2: #e8e8ed;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.16);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --success: #1d8348;
  --success-soft: rgba(29, 131, 72, 0.1);
  --warning: #a05a00;
  --warning-soft: rgba(214, 140, 0, 0.13);
  --danger: #d70015;
  --danger-soft: rgba(215, 0, 21, 0.08);
  --whatsapp: #1f9e55;
  --stage: #f0f0f2;
  --material: rgba(251, 251, 253, 0.72);
  /* Franja oscura (Cómo funciona): oscura en los dos temas, no se invierte. */
  --band: #000000;
  --band-ink: #f5f5f7;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --topbar: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  /* Curva de respuesta sin rebote (resorte críticamente amortiguado). */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  color-scheme: light;
}

/* Modo oscuro: por el sistema, salvo que el cliente eligiera claro con el
   botón sol/luna (data-theme en <html>, ver partials/theme-head.php). Las
   variables van DOS veces (aquí y en :root[data-theme="dark"], abajo): CSS
   no deja compartir un bloque entre una media query y un selector. Si
   cambias una, cambia la otra. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-2: #2c2c2e;
    --surface: #1c1c1e;
    --surface-2: #161617;
    --ink: #f5f5f7;
    --ink-2: #d2d2d7;
    --muted: #98989d;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.2);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-ink: #ffffff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --success: #30d158;
    --success-soft: rgba(48, 209, 88, 0.14);
    --warning: #ffb340;
    --warning-soft: rgba(255, 179, 64, 0.14);
    --danger: #ff6961;
    --danger-soft: rgba(255, 105, 97, 0.14);
    --stage: #161617;
    --material: rgba(22, 22, 23, 0.72);
    --band: #161617;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-2: #2c2c2e;
  --surface: #1c1c1e;
  --surface-2: #161617;
  --ink: #f5f5f7;
  --ink-2: #d2d2d7;
  --muted: #98989d;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --success: #30d158;
  --success-soft: rgba(48, 209, 88, 0.14);
  --warning: #ffb340;
  --warning-soft: rgba(255, 179, 64, 0.14);
  --danger: #ff6961;
  --danger-soft: rgba(255, 105, 97, 0.14);
  --stage: #161617;
  --material: rgba(22, 22, 23, 0.72);
  --band: #161617;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* --- Botón sol / luna ------------------------------------------------------
   Sol: núcleo chico y rayos. Luna: el núcleo crece, una sombra (la máscara)
   le "muerde" un lado y los rayos se encogen girando. Todo con transform y
   opacity. El estado oscuro va con los mismos dos selectores que las
   variables. */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.2s, color 0.2s, transform 0.15s var(--ease); }
.theme-toggle:hover { background: var(--bg-2); color: var(--ink); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-toggle svg { width: 22px; height: 22px; overflow: visible; transition: transform 0.6s var(--ease); }
.theme-toggle__core, .theme-toggle__cut, .theme-toggle__rays { transform-box: fill-box; transform-origin: center; transition: transform 0.6s var(--ease), opacity 0.35s var(--ease); }
.theme-toggle__core { transform: scale(0.56); }
.theme-toggle__cut { transform: translate(9px, -9px); }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(-30deg); }
:root[data-theme="dark"] .theme-toggle__core { transform: scale(1); }
:root[data-theme="dark"] .theme-toggle__cut { transform: translate(0, 0); }
:root[data-theme="dark"] .theme-toggle__rays { transform: rotate(-60deg) scale(0.4); opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle svg { transform: rotate(-30deg); }
  :root:not([data-theme="light"]) .theme-toggle__core { transform: scale(1); }
  :root:not([data-theme="light"]) .theme-toggle__cut { transform: translate(0, 0); }
  :root:not([data-theme="light"]) .theme-toggle__rays { transform: rotate(-60deg) scale(0.4); opacity: 0; }
}
/* El cambio de tema se revela en un círculo que crece desde el botón (lo
   anima theme.js sobre la captura nueva); sin el fundido por omisión. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg, .theme-toggle__core, .theme-toggle__cut, .theme-toggle__rays { transition-duration: 0.01ms; }
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* El atributo hidden gana siempre: si no, un display: grid de un componente lo anula. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; margin: 0; font-weight: 600; }
p { margin: 0; }
small { font-size: 0.85em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon--xl { width: 48px; height: 48px; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.center { text-align: center; }
.eyebrow { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); margin-right: 6px; vertical-align: -1px; }
.fine { font-size: 13px; color: var(--muted); }
.stack > * + * { margin-top: 14px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); font-size: 14px; }
.link--danger { color: var(--danger); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- Botones ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 17px; letter-spacing: -0.015em; text-decoration: none; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.1s ease-out, opacity 0.18s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--ink-2); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--danger-ghost { background: transparent; border-color: var(--danger-soft); color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--lg { min-height: 50px; padding: 12px 26px; font-size: 17px; }
.btn--sm { min-height: 34px; padding: 6px 12px; font-size: 14px; letter-spacing: -0.005em; }
/* Enlace de acción a la manera de Apple: azul, sin caja, con chevrón. */
.btn--link { background: none; border: 0; color: var(--accent); padding-left: 8px; padding-right: 8px; }
.btn--link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn--block { display: flex; width: 100%; }

/* --- Pastillas y avisos --------------------------------------------------- */

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none; letter-spacing: 0; vertical-align: middle; }
.pill--warning { background: var(--warning-soft); color: var(--warning); }
.pill--accent { background: var(--accent-soft); color: var(--accent); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--neutral { background: var(--bg-2); color: var(--muted); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; margin: 0 0 14px; }
.notice .icon { margin-top: 2px; }
.notice--error { background: var(--danger-soft); color: var(--danger); }
.notice--success { background: var(--success-soft); color: var(--success); }
.notice--warning { background: var(--warning-soft); color: var(--warning); }
.flash-wrap { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter) 0; }
.flash-wrap:empty { display: none; }

/* --- Formularios ---------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field__label small { font-weight: 400; color: var(--muted); }
.field__help { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="color"] { width: 46px; height: 46px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.grid-2 { display: grid; gap: 14px; }
.grid-3 { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check--switch { min-height: 46px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }

/* --- Barra superior ------------------------------------------------------- */

/* Material translúcido: el contenido pasa por debajo, desenfocado. Sin borde
   duro: una línea casi invisible que sólo separa cuando hay algo debajo. */
.promo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px var(--gutter); background: var(--band); color: var(--band-ink); font-size: 13px; line-height: 1.3; text-align: center; text-decoration: none; }
.promo svg { width: 16px; height: 16px; flex: none; }
.promo b { font-weight: 600; }
.promo:hover span { text-decoration: underline; text-underline-offset: 2px; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--line); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar { background: var(--surface-2); } }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.topbar__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: var(--topbar); display: flex; align-items: center; gap: 28px; }
/* La marca es sólo la palabra: sin logotipo. */
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; }
.brand__tag { font-family: var(--font); font-weight: 400; letter-spacing: -0.01em; color: var(--muted); font-size: 14px; }
.topbar__nav { display: none; gap: 26px; }
.topbar__nav a { text-decoration: none; font-size: 13px; letter-spacing: -0.005em; color: var(--ink-2); opacity: 0.88; transition: opacity 0.2s; }
.topbar__nav a:hover { opacity: 1; }
@media (min-width: 760px) { .topbar__nav { display: flex; } }
/* Menú lateral (opción A, 2026-10-04). Entra desde la izquierda; el fondo se
   oscurece y cierra al tocarlo, con Escape o al elegir un enlace. */
.menu-btn { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; margin-right: -14px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.menu-btn:hover { background: var(--line); }
.menu-btn .icon { width: 22px; height: 22px; }
.menu { position: fixed; inset: 0; z-index: 60; }
.menu[hidden] { display: none; }
.menu__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity 0.25s var(--ease); }
.menu__panel { position: absolute; inset: 0 auto 0 0; width: min(84%, 340px); display: flex; flex-direction: column; gap: 2px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--surface); box-shadow: 0 0 40px rgba(0, 0, 0, 0.25); transform: translateX(-104%); transition: transform 0.28s var(--ease); }
.menu.is-open .menu__scrim { opacity: 1; }
.menu.is-open .menu__panel { transform: none; }
.menu__head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 8px; }
.menu__brand { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; }
.menu__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.menu__close .icon { width: 22px; height: 22px; }
.menu__item { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.menu__item .icon { flex: none; width: 22px; height: 22px; }
.menu__item small { display: block; margin-top: 1px; font-size: 13px; font-weight: 400; color: var(--muted); }
.menu__item:active, .menu__link:active { background: var(--bg); }
.menu__item--season { background: rgba(242, 140, 40, 0.12); color: #b45309; }
.menu__badge { margin-left: auto; padding: 3px 8px; border-radius: 999px; background: #f28c28; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
.menu__panel hr { margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.menu__link { padding: 11px 8px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 15.5px; }
html.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .menu__panel, .menu__scrim { transition: none; } }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.cart-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 13px; letter-spacing: -0.005em; color: var(--ink-2); transition: background-color 0.2s; }
.cart-link:hover { background: var(--line); }
.topbar__end .cart-link { margin-left: 0; }
.cart-link:active { transform: scale(0.97); }
/* Cuenta en el encabezado (2026-10-25): ícono en el celular, con texto en pantallas anchas. */
.acct-link { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 6px 8px; border-radius: 999px; text-decoration: none; font-size: 13px; letter-spacing: -0.005em; color: var(--ink-2); transition: background-color 0.2s; -webkit-tap-highlight-color: transparent; }
.acct-link:hover { background: var(--line); }
.acct-link:active { transform: scale(0.97); }
.acct-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-link .icon { width: 20px; height: 20px; }
.acct-link__avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.acct-link__text { display: none; }
@media (min-width: 720px) { .acct-link { padding: 6px 12px; } .acct-link__text { display: inline; } }
.cart-link__count { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; letter-spacing: 0; }

/* --- Hero ------------------------------------------------------------------ */

/* Hero centrado, como una página de producto: título, una línea, dos
   acciones y la prenda grande debajo. */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__inner { display: grid; gap: clamp(28px, 4vw, 44px); justify-items: center; }
.hero__copy { text-align: center; display: grid; justify-items: center; }
.hero__title { font-size: clamp(40px, 7vw, 80px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; margin: 8px 0 18px; max-width: 12em; }
.hero__accent { color: var(--muted); }
.hero__lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; letter-spacing: -0.02em; color: var(--ink-2); max-width: 32em; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 30px; }
.hero__facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: var(--muted); font-size: 14px; letter-spacing: -0.005em; }
.hero__facts li { display: inline-flex; align-items: center; gap: 7px; }
/* La oferta de bienvenida es lo único del renglón en color de acción. */
.hero__facts .hero__fact--offer { color: var(--accent); font-weight: 600; }
.hero__pay { margin-top: 16px; }
.hero__pay .pay-mark { width: 34px; height: 22px; }

/* --- Temporada (2026-10-14) ----------------------------------------------
   Franja oscura con el acento de cempasúchil (sólo en el antetítulo: el azul
   sigue siendo el único color de acción). Texto a la izquierda y 8 diseños
   del catálogo a la derecha; en el celular, uno sobre otro. */
.season { background: var(--band); color: var(--band-ink); padding: clamp(40px, 6vw, 72px) 0; }
.season__inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .season__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; } }
.season__copy { display: grid; justify-items: start; gap: 12px; }
.season__eyebrow { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: #f5a524; }
.season__title { margin: 0; font-size: clamp(28px, 4.2vw, 46px); font-weight: 600; letter-spacing: -0.028em; line-height: 1.08; text-wrap: balance; }
.season__lede { margin: 0; font-size: 17px; line-height: 1.45; color: color-mix(in srgb, var(--band-ink) 75%, transparent); max-width: 34em; }
.season__lede strong { color: var(--band-ink); }
.season__copy .btn { margin-top: 6px; }
.season__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.season__grid .catcard { background: #232325; }
.hero__stage { position: relative; width: 100%; max-width: 980px; }
.hero__controls { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 20px; }
.hero__hint { text-align: center; font-size: 12px; letter-spacing: 0; color: var(--muted); margin-top: 12px; }

.stage { position: relative; background: var(--stage); border-radius: var(--radius-lg); overflow: hidden; touch-action: none; }
.stage canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.stage canvas.is-grabbing { cursor: grabbing; }
.stage--hero { aspect-ratio: 1 / 1.05; max-height: 72vh; margin: 0 auto; width: 100%; }
@media (min-width: 760px) { .stage--hero { aspect-ratio: 16 / 11; } }
.stage__loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 14px; pointer-events: none; transition: opacity 0.35s var(--ease); z-index: 2; }
.stage__loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.stage__loading.is-hidden { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Silueta de la prenda mientras carga el 3D, con un brillo que la recorre. */
.stage__loading--ghost { gap: 18px; }
.stage__ghost { width: min(62vw, 300px); height: auto; max-height: 58vh; animation: ghost-breathe 1.6s ease-in-out infinite alternate; }
.stage__ghost-shine { animation: ghost-shine 1.4s ease-in-out infinite; }
.stage__ghost-edge { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
@keyframes ghost-shine { to { transform: translateX(360px); } }
@keyframes ghost-breathe { from { opacity: 0.55; } to { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) {
  .stage__ghost, .stage__ghost-shine { animation: none; }
}
.stage__drop { position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); display: grid; place-content: center; justify-items: center; gap: 8px; font-weight: 600; color: var(--accent); z-index: 3; pointer-events: none; }
.stage__drop .icon { width: 36px; height: 36px; }

.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; padding: 3px; gap: 2px; background: var(--bg-2); border-radius: 22px; max-width: 100%; }
.seg__btn { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 500; font-size: 14px; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap; color: var(--ink-2); transition: background-color 0.2s var(--ease), color 0.2s, transform 0.1s ease-out; }
.seg__btn:active { transform: scale(0.96); }
.seg__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.swatch-btn, .swatch span:not(.sr-only) { width: 30px; height: 30px; }
.swatch-btn { border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.swatch-btn.is-active { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch-btn:hover { transform: scale(1.08); }

/* --- Secciones ------------------------------------------------------------ */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding-top: 0; }
/* Portada más corta en celular (2026-11-05): el aire entre secciones bajó de 64 a 44 px. */
@media (max-width: 720px) { .section { padding: 44px 0; } .section--tight { padding-top: 0; } }
/* Pedidos reales justo bajo la portada: un poco de aire arriba, el resto ya lo da el hero. */
.section--reales { padding-top: 12px; }
.section--ink { background: var(--band); color: var(--band-ink); }
.section__head { margin-bottom: clamp(28px, 4vw, 52px); max-width: 40em; }
.section__title { font-size: clamp(32px, 5vw, 56px); font-weight: 600; letter-spacing: -0.028em; line-height: 1.07; }
.section__lede { margin-top: 12px; color: var(--muted); font-size: clamp(19px, 2vw, 21px); letter-spacing: -0.018em; line-height: 1.38; }
.section--ink .section__lede { color: color-mix(in srgb, var(--band-ink) 70%, transparent); }

/* Pedidos reales (2026-11-04): fila deslizable en el teléfono, 6 columnas en PC. */
.reales { list-style: none; margin: 0 auto; padding: 0 var(--gutter) 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.reales::-webkit-scrollbar { display: none; }
.reales__item { scroll-snap-align: start; margin: 0; }
.reales__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.reales__item span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); letter-spacing: -0.005em; }
@media (min-width: 720px) { .reales { grid-auto-columns: 30%; } }
@media (min-width: 1080px) { .reales { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; } }

/* auto-fit: con 3, 4 o 5 prendas las tarjetas llenan la fila en vez de dejar
   una huérfana (el catálogo se edita en el panel: no hay número fijo). */
/* "Personaliza tu plantilla": huecos de foto y código de Spotify. */
.slots { margin: 0 0 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.slots__title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
/* Encabezado con progreso y ayuda (2026-10-08). */
.slots__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.slots__progress { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.slots__progress.is-done { color: var(--success); }
.slots__help { margin: 0 0 12px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slot-btn { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 10px 6px 6px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; transition: transform 0.1s ease-out, border-color 0.15s; }
.slot-btn img { flex: none; width: 42px; height: 42px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.slot-btn__text { display: grid; gap: 1px; min-width: 0; }
.slot-btn__text strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-btn__text small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.slot-btn.is-empty { border-color: var(--accent); border-style: dashed; }
.slot-btn.is-empty small { color: var(--accent); font-weight: 600; }
.slot-btn.is-done small { color: var(--success); }
.slot-btn:active { transform: scale(0.97); }
/* "Hazla tuya" (maqueta A, 2026-10-19): pasos numerados sólo los visibles. */
.slots { counter-reset: paso; }
.slots__step { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.slots__step[hidden], .slots__manual[hidden] { display: none; }
.slots__step-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.slots__step-title::before { counter-increment: paso; content: counter(paso) " · "; color: var(--muted); }
.slots__step .slots__head .slots__step-title { margin: 0; }
.slots__texts { display: grid; gap: 10px; }
.slots__texts textarea { min-height: 0; resize: vertical; }
.slots__size { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.slots__size .seg__btn { font-weight: 600; font-size: 14px; }
.slots__step .panel-note { margin: 8px 0 0; }
.slots__manual { display: block; width: 100%; margin-top: 14px; padding: 10px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.slots__spotify { display: grid; gap: 8px; }
.slots__spotify .slots__step-title { margin: 0; }
.slots__spotify .field { margin: 0; }
.slots__spotify .panel-note { margin: 0; min-height: 1.2em; }

/* Aviso de conjunto de pareja (editor y carrito). */
.pair-note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent); font-size: 14.5px; line-height: 1.45; }
.pair-note a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* "Diseños listos" (/disenos): categorías y cuadrícula de miniaturas. */
.chips { display: flex; gap: 8px; margin: 0 calc(var(--gutter) * -1) 18px; padding: 0 var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.chip small { font-size: 12px; color: var(--muted); }
.chip.is-on { background: var(--ink); color: var(--surface); box-shadow: none; }
.chip.is-on small { color: inherit; opacity: 0.7; }
.catgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(31%, 180px), 1fr)); }
.catcard { display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 6px; border-radius: 14px; background: #18181a; overflow: hidden; transition: transform 0.2s var(--ease); }
.catcard img { width: 100%; height: 100%; object-fit: contain; }
.catcard:active { transform: scale(0.97); }
.catmore { margin: 18px 0 0; text-align: center; }
/* Subcategorías y páginas de /disenos (2026-10-08). */
.chips--sub { margin-top: -8px; }
.chips--sub .chip { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0 0; }
.pager__info { color: var(--muted); font-size: 14px; }
/* Carga continua en Diseños listos (2026-10-25): reemplaza a .pager. */
.loadmore { display: flex; justify-content: center; margin: 24px 0 0; }
@media (hover: hover) { .catcard:hover { transform: translateY(-2px); } }
/* En qué prenda abrir el diseño (2026-10-14). */
.garment-pick__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
/* Diseños listos dentro del editor (2026-10-14): como la galería de gráficos. */
.cat-picker__head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cat-picker__head select { flex: 1; min-width: 0; }
.cat-picker .catgrid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.cat-picker .catcard { border: 0; cursor: pointer; padding: 4px; border-radius: 10px; font: inherit; }
.cat-picker .catcard[aria-busy="true"] { opacity: 0.5; }
.cat-picker__more { display: block; width: 100%; margin-top: 8px; }

/* Plantillas en la portada (2026-10-04): 2 por fila en el celular. */
.tplgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.tplcard { display: grid; gap: 2px; padding-bottom: 14px; background: var(--surface); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tplcard img { width: 100%; height: auto; aspect-ratio: 386 / 458; object-fit: cover; background: #eef0f3; }
.tplcard__name { padding: 10px 14px 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.tplcard__cta { padding: 0 14px; font-size: 15px; color: var(--accent); }
@media (hover: hover) { .tplcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); } }
.tplcard:active { transform: scale(0.98); }
/* Halloween: grupos y tarjetas de pareja (dos playeras lado a lado). */
.tplgroup { margin: 28px 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.tplgroup small { margin-left: 6px; font-size: 15px; font-weight: 400; color: var(--muted); }
.tplgrid--pairs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.tplcard--pair:active { transform: none; }
.tplcard__duo { display: grid; grid-template-columns: 1fr 1fr; background: #eef0f3; }
.tplcard__duo a { display: block; }
.tplcard__links { display: flex; gap: 18px; padding: 0 14px; }
.tplcard__links .tplcard__cta { padding: 0; text-decoration: none; }
/* En el celular cada grupo es una fila que se desliza de lado (con 46
   tarjetas, en cuadrícula la portada medía metros). */
@media (max-width: 700px) {
  .tplgrid { display: flex; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .tplgrid::-webkit-scrollbar { display: none; }
  .tplgrid > .tplcard { flex: 0 0 42%; scroll-snap-align: start; }
  .tplgrid--pairs > .tplcard { flex-basis: 80%; }
  .tplcard__name { font-size: 15px; }
  .tplcard__cta { font-size: 14px; }
}
.products { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.product { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); text-decoration: none; overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.product:hover { box-shadow: var(--shadow-2); }
.product:active { transform: scale(0.985); transition-duration: 0.1s; }
.product__media { background: var(--surface); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 18px; }
.product__media img { width: 86%; height: auto; transition: transform 0.5s var(--ease); }
.product:hover .product__media img { transform: scale(1.04); }
.product__body { padding: 4px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product__name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.product__desc { color: var(--ink-2); font-size: 15px; letter-spacing: -0.01em; }
.product__fabric { color: var(--muted); font-size: 13px; letter-spacing: -0.005em; }
.product__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.product__price { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.product__price span { font-weight: 400; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.product__dots { display: inline-flex; align-items: center; gap: 4px; }
.product__dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }
.product__dots em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }
.product__cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; font-size: 17px; color: var(--accent); margin-top: 10px; }
.product:hover .product__cta { text-decoration: underline; text-underline-offset: 3px; }
.product__cta .icon { transition: transform 0.25s var(--ease); }
.product:hover .product__cta .icon { transform: translateX(4px); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.step { display: flex; gap: 18px; align-items: flex-start; padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--band-ink) 18%, transparent); }
.step__n { font-family: var(--font-display); font-size: 48px; font-weight: 600; line-height: 1; color: color-mix(in srgb, var(--band-ink) 45%, transparent); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.step p { color: color-mix(in srgb, var(--band-ink) 72%, transparent); font-size: 17px; }

.pricing > *, .faq > * { max-width: 820px; }
.price-table { margin: 0; border-top: 1px solid var(--line-2); }
.price-table > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.price-table dt { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.price-table dt small { display: block; font-weight: 400; font-size: 14px; letter-spacing: -0.005em; color: var(--muted); margin-top: 2px; }
.price-table dd { margin: 0; font-weight: 600; font-size: 21px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pricing__example { margin-top: 20px; color: var(--ink-2); }
/* Mayoreo (2026-10-25). */
.product__bulk { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--success); }
.pricing__bulk { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius); background: var(--success-soft); display: grid; gap: 8px; }
.pricing__bulk h3 { margin: 0; font-size: 17px; }
.pricing__bulk ul { margin: 0; padding-left: 20px; font-weight: 600; }
.pricing__bulk p { margin: 0; color: var(--ink-2); font-size: 15px; }

.faq .section__title { margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; color: var(--muted); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); max-width: 44em; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.footer__brand { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.footer__tag { color: var(--muted); font-size: 12px; letter-spacing: 0; max-width: 30em; margin-top: 4px; }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: 12px; letter-spacing: 0; }
.footer__links a:hover { text-decoration: underline; }
.footer__made { margin-top: 18px; }
.footer__made a { color: var(--muted); font-size: 11px; letter-spacing: 0; text-decoration: none; }
.footer__made a:hover { color: var(--ink-2); text-decoration: underline; }
.footer { font-size: 12px; background: var(--bg); }

/* --- Páginas genéricas ---------------------------------------------------- */

.page { padding-top: clamp(20px, 4vw, 40px); padding-bottom: 72px; }
.page--narrow { max-width: 780px; }
.page__head { margin-bottom: 24px; }
.page__title { font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -0.035em; }
.page__sub { color: var(--muted); margin-top: 6px; }
.page__back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.page__back:hover { color: var(--ink); }
.card { background: var(--surface); border-radius: var(--radius); padding: clamp(18px, 3vw, 24px); box-shadow: var(--shadow-1); }
.card__title { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.card + .card { margin-top: 14px; }
.empty-state { text-align: center; padding: 64px 0; display: grid; justify-items: center; gap: 12px; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 24px; }
.error-page { text-align: center; display: grid; gap: 12px; justify-items: center; padding-top: 80px; }
.error-page__code { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 12px; max-width: 42em; }
.prose h1 { margin-bottom: 20px; }

/* --- Carrito ---------------------------------------------------------------- */

.cart { display: grid; gap: 22px; align-items: start; }
@media (min-width: 940px) {
  .cart { grid-template-columns: minmax(0, 1fr) 340px; }
  /* La tarjeta de "una más" va bajo los renglones; el resumen a la derecha. */
  .cart .upsell { grid-column: 1; }
  .cart .cart__aside { grid-column: 2; grid-row: 1 / span 2; }
}
/* Carrito B (2026-10-25): otra pieza del mismo diseño en un toque. */
.upsell { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius); border: 1.5px dashed var(--accent); background: var(--surface); }
.upsell__title { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.upsell__why { margin: 0; font-size: 14px; color: var(--ink-2); }
.upsell__form { display: grid; gap: 8px; margin-top: 6px; }
.upsell__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.upsell__corte { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.upsell__size { min-width: 44px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 14px var(--font); cursor: pointer; }
.upsell__size:hover { border-color: var(--accent); color: var(--accent); }
.upsell__size:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upsell__price { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cart__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.line { display: grid; gap: 16px; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .line { grid-template-columns: 220px 1fr; } }
.line__media { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.line__media img { width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--stage); }
.line__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.line__top { display: flex; justify-content: space-between; gap: 12px; }
.line__name { font-size: 19px; font-weight: 600; }
.line__meta { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.line__total { font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__sizes { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.mini-size { display: grid; gap: 4px; justify-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mini-size__corte { flex-basis: 100%; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mini-size input { width: 58px; min-height: 40px; padding: 6px; text-align: center; }
/* Tallas plegables con − / + (2026-10-25). */
.sizes-box { border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.sizes-box summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.sizes-box summary::-webkit-details-marker { display: none; }
.sizes-box__now { display: grid; gap: 1px; font-size: 14px; }
.sizes-box__now b { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sizes-box__edit { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.sizes-box__edit .icon { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 0.2s var(--ease); }
.sizes-box[open] .sizes-box__edit .icon { transform: none; }
.sizes-box[open] summary { border-bottom: 1px solid var(--line); }
.sizes-box__form { display: grid; gap: 14px; padding: 14px; }
.sizes-box__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.sizes-box__group legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sizes-box__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* "qty" y no "stepper": ese nombre ya lo usa el editor (más abajo) y se pisaban. */
.qty { display: grid; gap: 4px; justify-items: center; min-width: 0; padding: 8px 2px; border-radius: 12px; background: var(--bg); }
.qty.is-on { background: var(--accent-soft); }
.qty__label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.qty__ctl { display: flex; align-items: center; justify-content: center; gap: 0; }
.qty__ctl button { width: 28px; height: 28px; flex: none; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 17px/1 var(--font); cursor: pointer; }
.qty__ctl button:active { transform: scale(0.94); }
.qty__ctl input { width: 26px; min-height: 28px; padding: 0; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.qty__ctl input:focus { box-shadow: none; }
.qty__ctl input::-webkit-outer-spin-button, .qty__ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line__unit { font-size: 14px; color: var(--muted); }
/* Mayoreo (2026-10-25): precio tachado + etiqueta, y cuántas piezas faltan. */
.line__unit s { opacity: 0.7; }
.line__bulk { color: var(--success); font-weight: 600; }
.line__bulk-hint { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--accent); }
.line__bulk-hint .icon { width: 16px; height: 16px; flex: none; }
.line__actions { display: flex; gap: 18px; align-items: center; margin-top: auto; }
.totals { margin: 0 0 16px; display: grid; gap: 8px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.totals__note dd { color: var(--muted); font-weight: 400; font-size: 14px; }
.totals__grand { padding-top: 10px; border-top: 1px solid var(--line); }
.totals__grand dt, .totals__grand dd { color: var(--ink); font-weight: 600; font-size: 19px; }
.cart__aside .btn + .btn { margin-top: 10px; }

/* --- Pedido ----------------------------------------------------------------- */

.checkout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 940px) { .checkout { grid-template-columns: minmax(0, 1fr) 380px; } }
.fieldset { border: 0; margin: 0; display: grid; gap: 14px; }
.fieldset legend { font-weight: 600; font-size: 18px; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.fieldset legend small { font-weight: 400; color: var(--muted); font-size: 14px; }
.fieldset + .fieldset { margin-top: 14px; }
.options { display: grid; gap: 10px; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.option__body { display: grid; gap: 2px; }
.option__body small { color: var(--muted); font-size: 13.5px; }
.sticky { position: sticky; top: calc(var(--topbar) + 16px); }
.mini-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.mini-lines li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.mini-lines img { width: 48px; height: auto; border-radius: 8px; background: var(--stage); }
.mini-lines small { display: block; color: var(--muted); font-size: 12.5px; }
.mini-lines span { font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout .fine { margin-top: 12px; }

/* Pedido del cliente: tarjeta "Tu envío" con paquetería y número de guía. */
.shipcard { display: grid; gap: 14px; margin-bottom: 18px; }
.shipcard .card__title { margin: 0; }
.shipcard__carrier { display: grid; gap: 2px; }
.shipcard__carrier strong { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.shipcard__carrier span { color: var(--muted); font-size: 14.5px; }
.shipcard__where { margin: 0; font-size: 15px; }
.shipcard__where span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.shipcard__tracking { display: grid; gap: 4px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); }
.shipcard__tracking > span { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.shipcard__tracking strong { font-size: clamp(22px, 6vw, 28px); font-weight: 600; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.shipcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shipcard__actions .btn { flex: 1 1 160px; justify-content: center; }
.shipcard__tracking .fine { margin: 8px 0 0; }

/* Control segmentado (A domicilio | Recoger en sucursal), como el de iOS: un
   riel gris y el segmento elegido como pastilla blanca. */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-2); }
.segmented label { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 9px 8px; border-radius: 9px; text-align: center; font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; color: var(--ink-2); transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s; }
.segmented label:active span { opacity: 0.7; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.segmented + .field__help:empty { display: none; }

/* Envío por paquetería: CP → colonia → calle → lista agrupada estilo iOS. */
.ship { display: grid; gap: 14px; }
.ship__row { display: grid; gap: 14px; }
@media (min-width: 520px) { .ship__row { grid-template-columns: 1fr 1fr; } .ship__row--cp { grid-template-columns: 150px 1fr; } }
.ship__place { margin: -6px 0 0; min-height: 1.3em; font-size: 13.5px; color: var(--muted); }
.ship__place:empty { display: none; }
/* Dirección guardada de un cliente que regresa, dentro de Entrega (2026-10-08). */
.ship__saved { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14.5px; line-height: 1.4; }
.ship__saved[hidden] { display: none; }
.ship__saved b { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ship__saved .link { flex: none; white-space: nowrap; }
.ship__street { position: relative; }
.suggest { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
.suggest li { padding: 10px 12px; border-radius: 8px; font-size: 14.5px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--accent-soft); }
.rates { display: grid; gap: 10px; margin-top: 4px; }
.rates__status { margin: 0; font-size: 14px; color: var(--muted); }
.rates__status.is-error { color: var(--danger); }
.rates__status.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.rates__label { margin: 6px 0 -2px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.rates__list { display: grid; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.rates__list:empty { display: none; }
.rates__list > .rates__label { margin: 0; padding: 12px 16px 6px; background: var(--bg); border-top: 1px solid var(--line); }
.rates__list > .rates__label:first-child { border-top: 0; }
.rates__list > .rates__status { padding: 14px 16px; }
.rate { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; border-top: 1px solid var(--line); transition: background-color 0.12s; -webkit-tap-highlight-color: transparent; }
.rates__list > .rate:first-child, .rates__label + .rate { border-top: 0; }
.rate:active { background: var(--bg); }
.rate:has(input:checked) { background: var(--accent-soft); }
.rate input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.rate__main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rate__main strong { font-weight: 600; font-size: 15.5px; letter-spacing: -0.012em; }
.rate__main small { color: var(--muted); font-size: 13.5px; }
.rate--office .rate__main small { overflow-wrap: anywhere; }
.rate__price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate__price.is-free { color: var(--success); }
.rates__offices { display: grid; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .rates__status.is-loading::before { animation-duration: 2.4s; } }
/* Panel → Archivos para imprimir. */
/* Hoja DTF: varios pedidos acomodados en una hoja de película. */
.dtf-form { margin-bottom: 16px; }
.dtf-orders { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.dtf-orders .check { font-weight: 400; }
.form-actions--start { align-items: center; flex-wrap: wrap; }
.dtf-sheets { display: grid; gap: 16px; }
.dtf-sheet { display: grid; gap: 12px; }
.dtf-sheet__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.dtf-sheet__head h2 { font-size: 19px; }
.dtf-sheet__facts { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.dtf-sheet__map { overflow-x: auto; }
.dtf-sheet__map canvas { display: block; max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.dtf-sheet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Hoja DTF como estudio (2026-11-19): opciones a la izquierda, vista previa en
   vivo a la derecha (pegada al bajar). En el teléfono, una columna y una barrita
   abajo con el resumen que lleva a la vista previa. */
.dtfx { display: grid; gap: 16px; align-items: start; }
@media (min-width: 980px) {
  .dtfx { grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); gap: 20px; }
  .dtfx__preview { position: sticky; top: calc(var(--topbar) + 16px); max-height: calc(100dvh - var(--topbar) - 32px); overflow-y: auto; overscroll-behavior: contain; }
}
.dtfx__opts { display: grid; gap: 12px; margin: 0; }
.dtfx-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.dtfx-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dtfx-card h2, .dtfx-preview__head h2 { font-size: 17px; letter-spacing: -0.02em; margin: 0; }
.dtfx-card h3 { font-size: 14.5px; margin: 0; }
.dtfx-card__meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dtfx-card--fold { gap: 0; }
.dtfx-card--fold[open] { gap: 12px; }
.dtfx-card--fold summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; min-height: 28px; }
.dtfx-card--fold summary::-webkit-details-marker { display: none; }
.dtfx-card--fold summary h2::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform 0.2s var(--ease); }
.dtfx-card--fold[open] summary h2::before { transform: rotate(90deg); }
.dtfx-help { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.dtfx-quick { display: flex; gap: 14px; margin-top: -4px; }
.dtfx-link { border: 0; background: none; padding: 4px 0; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.dtfx-link:hover { text-decoration: underline; }
.dtfx-list { border: 0; margin: 0; padding: 0; display: grid; max-height: 280px; overflow-y: auto; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); }
.dtfx-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; cursor: pointer; border-top: 1px solid var(--line); }
.dtfx-row:first-of-type { border-top: 0; }
.dtfx-row:hover { background: var(--bg); }
.dtfx-row input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.dtfx-row__main { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.dtfx-row__main span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtfx-row__side { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dtfx-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 4px 0 8px; }
.dtfx-more summary small { font-weight: 400; color: var(--muted); }
.dtfx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dtfx-pair[hidden] { display: none; }
.dtfx-range { display: grid; gap: 6px; }
.dtfx-range__top { display: flex; justify-content: space-between; align-items: baseline; }
.dtfx-range output { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dtfx-range input { width: 100%; accent-color: var(--accent); }

/* Interruptor: el texto a la izquierda, el switch a la derecha. */
.dtfx-switch, .dtfx-stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; cursor: pointer; }
.dtfx-stepper-row { cursor: default; }
.dtfx-switch__text { display: grid; gap: 2px; font-size: 14.5px; }
.dtfx-switch__text small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.dtfx-switch__text b { color: var(--ink-2); font-weight: 600; }
.dtfx-switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--bg-2); cursor: pointer; transition: background-color 0.2s var(--ease); }
.dtfx-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.22s var(--ease); }
.dtfx-switch input:checked { background: var(--success); }
.dtfx-switch input:checked::after { transform: translateX(18px); }
.dtfx-switch input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.dtfx-sub { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }

.dtfx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dtfx-chip { min-width: 46px; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.15s, color 0.15s, transform 0.1s ease-out; }
.dtfx-chip:active { transform: scale(0.95); }
.dtfx-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.dtfx-chip:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; }
.dtfx-chip-add { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.dtfx-chip-add input { width: 64px; min-height: 36px; border: 0; background: transparent; padding: 0 4px 0 12px; font: inherit; font-size: 14px; color: var(--ink); text-transform: uppercase; }
.dtfx-chip-add input:focus { outline: none; }
.dtfx-chip-add:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.dtfx-chip-add button { min-width: 36px; min-height: 36px; border: 0; background: var(--bg-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.segmented--3 { grid-template-columns: repeat(3, 1fr); }
.dtfx-ink span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dtfx-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.55); }
.dtfx-dot + .dtfx-dot { margin-left: -9px; }
.dtfx-dot--w { background: #fff; }
.dtfx-dot--b { background: #111; }
.dtfx-sample { border-radius: var(--radius-sm); overflow: hidden; }
.dtfx-sample canvas { display: block; width: 100%; height: auto; }
.dtfx-stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.dtfx-stepper button { width: 38px; height: 36px; border: 0; background: none; color: var(--ink); font-size: 18px; cursor: pointer; border-radius: 999px; }
.dtfx-stepper button:active { background: var(--bg-2); }
.dtfx-stepper input { width: 44px; border: 0; background: none; text-align: center; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); -moz-appearance: textfield; }
.dtfx-stepper input::-webkit-inner-spin-button, .dtfx-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Vista previa */
.dtfx__preview { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.dtfx-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dtfx-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dtfx-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dtfx-live[data-state="ok"] { color: var(--success); }
.dtfx-live[data-state="busy"] { color: var(--accent); }
.dtfx-live[data-state="busy"]::before { animation: dtfx-pulse 1s ease-in-out infinite; }
.dtfx-live[data-state="error"] { color: var(--danger); }
@keyframes dtfx-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .dtfx-live[data-state="busy"]::before { animation: none; } }
.dtfx-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
@media (min-width: 560px) { .dtfx-stats { grid-template-columns: repeat(4, 1fr); } }
.dtfx-stats[hidden] { display: none; }
.dtfx-stats div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); }
.dtfx-stats dt { font-size: 12px; color: var(--muted); }
.dtfx-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dtfx-stats dd small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtfx-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.dtfx-legend[hidden], .dtfx-legend li[hidden] { display: none; }
.dtfx-legend ul { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.dtfx-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dtfx-bgpick { display: inline-flex; align-items: center; gap: 6px; }
.dtfx-bgpick__btn { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.5); transition: transform 0.1s ease-out; }
.dtfx-bgpick__btn:active { transform: scale(0.92); }
.dtfx-bgpick__btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.5), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.dtfx-bgpick__btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.dtfx-bgpick__btn--cuadros { background: repeating-conic-gradient(#7c7c81 0 25%, #6c6c71 0 50%) 50% / 10px 10px; }
.dtfx-bgpick__btn--oscuro { background: #2c2c2e; }
.dtfx-bgpick__btn--claro { background: #f2f2f4; }
.dtfx-key { width: 14px; height: 10px; border-radius: 3px; border: 2px solid; }
.dtfx-key--art { border-color: rgba(110, 110, 115, 0.6); }
.dtfx-key--label { border-color: #0071e3; }
.dtfx-key--extra { border-color: #1d8348; border-style: dashed; }
.dtfx-empty { margin: 0; padding: 40px 16px; text-align: center; color: var(--muted); border-radius: var(--radius-sm); background: var(--bg); }
.dtfx__preview .dtf-sheet { padding: 0; box-shadow: none; background: none; }
.dtfx__preview.is-busy .dtf-sheets { opacity: 0.55; transition: opacity 0.2s; }
.dtf-sheet__map { position: relative; }
.dtfx-tip { position: absolute; z-index: 2; pointer-events: none; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: rgba(29, 29, 31, 0.92); color: #f5f5f7; font-size: 12.5px; line-height: 1.35; transform: translate(-50%, calc(-100% - 10px)); white-space: normal; }
.dtfx-tip[hidden] { display: none; }
/* IA: calidad (sólo con «Agrandar con IA» prendido) y antes / después. */
.dtfx-ai-model { display: grid; gap: 8px; padding-left: 2px; }
.dtfx-card--fold:has(#dtf-ai:not(:checked)) .dtfx-ai-model { display: none; }
.dtfx-compares { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dtfx-compares[hidden] { display: none; }
.dtfx-compares h3 { font-size: 15px; margin: 0; }
.dtfx-compares__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 4px; }
.dtfx-cmp { margin: 0; display: grid; gap: 8px; }
.dtfx-cmp__stage { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: repeating-conic-gradient(#7c7c81 0 25%, #6c6c71 0 50%) 50% / 16px 16px; }
.dtfx-cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dtfx-cmp__stage::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }
.dtfx-cmp__tag { position: absolute; z-index: 1; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(29, 29, 31, 0.78); color: #f5f5f7; font-size: 11.5px; font-weight: 600; pointer-events: none; }
.dtfx-cmp__tag--a { left: 8px; }
.dtfx-cmp__tag--b { right: 8px; }
.dtfx-cmp input { width: 100%; accent-color: var(--accent); }
.dtfx-cmp figcaption { display: grid; gap: 2px; font-size: 13px; }
.dtfx-cmp figcaption span { color: var(--muted); font-variant-numeric: tabular-nums; }
.dtfx-mini { position: fixed; z-index: 30; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); text-decoration: none; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); white-space: nowrap; }
.dtfx-mini[hidden] { display: none; }
@media (min-width: 980px) { .dtfx-mini { display: none !important; } }
.print-intro { color: var(--ink-2); max-width: 60em; margin: -6px 0 18px; font-size: 15px; }
.print-items { display: grid; gap: 16px; }
.print-item__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.print-item__head h2 { font-size: 19px; }
.print-item__head p { color: var(--muted); font-size: 14px; }
.print-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.print-file { margin: 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
/* Tablero gris: se ve qué es transparente, en claro y en oscuro. */
.print-file__img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); padding: 10px; background: repeating-conic-gradient(var(--bg-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
/* Los PNG miden miles de píxeles: la vista previa se ajusta a la casilla. */
.print-file__img img { width: 100%; height: 100%; object-fit: contain; }
.print-file figcaption { display: grid; gap: 3px; font-size: 13px; }
.print-file figcaption strong { font-size: 15px; }
.print-file__size { color: var(--muted); font-variant-numeric: tabular-nums; }
.print-file__where { color: var(--ink-2); }
.print-file__warn { color: var(--warning); }
.print-file .btn { justify-self: start; margin-top: 4px; }

/* Nombre y número por pieza (editor). */
.roster { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.roster .check small { font-weight: 400; color: var(--muted); }
.roster__body { margin-top: 8px; }
.roster__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.roster__row { display: grid; grid-template-columns: 44px 1fr 64px; gap: 6px; align-items: center; padding: 3px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.roster__row.is-current { border-color: var(--accent); background: var(--accent-soft); }
.roster__row input { min-height: 38px; padding: 6px 10px; }
.roster__size { min-height: 38px; border-radius: 8px; border: 0; background: var(--bg-2); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink); }
.roster-title { display: flex; align-items: center; gap: 6px; margin: 16px 0 6px; font-size: 16px; }
.coupon { margin: 0 0 14px; }
.coupon__field { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.coupon__field input { min-height: 38px; padding: 6px 12px; text-transform: uppercase; }
.coupon__applied { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--success); }
.coupon__applied span { flex: 1; }
.totals__discount dd { color: var(--success); }

.order-head { margin: 8px 0 22px; }
.order-head__folio { font-size: clamp(34px, 6vw, 52px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.order-head__status { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-top: 8px; font-size: 14px; }
.progress { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress li { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.progress li::before { content: ""; display: block; height: 5px; border-radius: 3px; background: var(--line-2); margin-bottom: 8px; }
.progress li.is-done::before { background: var(--success); }
.progress li.is-current::before { background: var(--accent); }
.progress li.is-current { color: var(--ink); }
.pay { margin-bottom: 18px; }
/* Recuperar un pedido sin pagar (2026-10-08). */
.pay__alt { margin-top: 12px; }
.pending-order { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-1); }
.pending-order p { margin: 0; }
.pending-order__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pay__data { margin: 0 0 18px; display: grid; gap: 10px; }
.pay__data > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.pay__data dt { color: var(--muted); font-size: 14px; }
.pay__data dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.proof { display: grid; gap: 10px; margin-bottom: 10px; }
.proof__drop { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2); font-weight: 600; }
.proof__drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.proof__drop:hover { border-color: var(--accent); }
.order-items { display: grid; gap: 14px; margin: 18px 0; }
.order-item { display: grid; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .order-item { grid-template-columns: 240px 1fr; } }
.order-item__media { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.order-item__media img { width: 100%; height: auto; border-radius: var(--radius-sm); background: var(--stage); }
.order-item__body { display: grid; gap: 6px; align-content: start; color: var(--ink-2); font-size: 15px; }
.order-item__body h2 { font-size: 19px; color: var(--ink); }
.order-item__price { margin-top: 6px; }

/* --- Editor 3D ------------------------------------------------------------- */

.is-editor { height: 100dvh; min-height: 0; overflow: hidden; }
.is-editor main { min-height: 0; display: flex; flex-direction: column; }
.editor { flex: 1; min-height: 0; }
.editor__form { height: 100%; display: flex; flex-direction: column; }
.editor__viewport { position: relative; flex: none; height: 52dvh; padding: 10px var(--gutter) 0; }
.stage--editor { height: 100%; border-radius: var(--radius-lg); }
.editor__panel { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 14px var(--gutter) 0; -webkit-overflow-scrolling: touch; }
.editor__hint { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--gutter) - 24px); text-align: center; font-size: 12.5px; color: var(--muted); background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); padding: 6px 12px; border-radius: 999px; pointer-events: none; box-shadow: var(--shadow-1); }
.editor__hint strong { color: var(--ink); }
/* Se cierra como notificación de iPhone: deslizar hacia arriba o la ×. */
.editor__hint { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; pointer-events: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; z-index: 3; }
.editor__hint:active { cursor: grabbing; }
.editor__hint-text { margin: 0; }
.editor__hint-close { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: var(--line); color: var(--muted); cursor: pointer; }
.editor__hint-close .icon { width: 13px; height: 13px; }
.editor__hint.is-leaving { transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease; transform: translate(-50%, -160%) !important; opacity: 0 !important; }
.editor__hint.is-returning { transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease; }
@media (prefers-reduced-motion: reduce) { .editor__hint.is-leaving, .editor__hint.is-returning { transition: opacity 0.2s ease; } }

@media (min-width: 900px) {
  .editor__form { flex-direction: row; }
  .editor__viewport { flex: 1; height: auto; padding: 16px 0 16px 16px; }
  .editor__panel { flex: none; width: 400px; border-left: 1px solid var(--line); padding: 20px 24px 0; background: var(--surface-2); }
  .editor__hint { top: 30px; font-size: 13.5px; }
}

.viewbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--line); max-width: calc(100% - 2 * var(--gutter) - 16px); overflow-x: auto; }
@media (prefers-reduced-transparency: reduce) { .viewbar, .editor__hint { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* "Todo el diseño | Solo esta pieza" (2026-10-08): arriba de las vistas,
   mismo material; la opción activa en azul. */
.grupo-switch { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 4; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--line); white-space: nowrap; }
.grupo-switch[hidden] { display: none; }
.grupo-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; transition: background 0.15s, color 0.15s; }
.grupo-switch button .icon { width: 16px; height: 16px; }
.grupo-switch button.is-on { background: var(--accent); color: #fff; }
.grupo-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-transparency: reduce) { .grupo-switch { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* Herramientas en el celular (versión "G", 2026-10-03): columna de píldoras a
   la derecha, sobre la prenda; el control elegido sale en una cápsula abajo
   a la izquierda y la columna se encoge a iconos para dejarle espacio. */
/* La posición (top) y el tamaño los acomoda fitRail() según la pantalla. */
/* Acceso rápido a la izquierda de la prenda (2026-10-05): deshacer, rehacer
   y "Todo junto"; mismo material que la columna de la derecha. */
.quick { position: absolute; left: calc(var(--gutter) + 8px); top: 84px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.quick__btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-1), inset 0 0 0 0.5px var(--line); color: var(--ink); cursor: pointer; transition: transform 0.1s ease-out, opacity 0.15s; }
.quick__btn .icon { width: 20px; height: 20px; }
.quick__btn:active { transform: scale(0.94); }
.quick__btn:disabled { opacity: 0.4; cursor: default; }
.quick__btn--wide { display: inline-flex; width: auto; gap: 6px; padding: 0 12px 0 10px; border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }
.quick__btn--wide .icon { width: 17px; height: 17px; }
.quick__btn--wide.is-on { background: var(--accent); color: #fff; box-shadow: var(--shadow-1); }
.quick__btn[hidden] { display: none; }
@media (prefers-reduced-transparency: reduce) { .quick__btn { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.rail { position: absolute; right: calc(var(--gutter) + 8px); top: 84px; z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.rail.is-small { gap: 3px; }
.rail.is-small .rail__btn { height: 30px; }
.rail.is-small .rail__btn--icon, .rail.is-small.is-compact .rail__btn { width: 30px; }
/* Medida y precio mientras se pellizca el diseño (encima del letrero). */
.pinch-badge { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); z-index: 5; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; box-shadow: var(--shadow-2); pointer-events: none; font-variant-numeric: tabular-nums; }
/* Con la columna a la vista: Frente/Espalda se esconde (mismo lugar) y, si
   no cabe, el letrero se aparta mientras se edita (no queda cerrado). */
.editor__viewport.has-rail .viewbar { display: none; }
.editor__hint.is-tucked { display: none; }
.rail__btn { display: flex; align-items: center; justify-content: flex-end; gap: 7px; height: 34px; padding: 0 6px 0 12px; border-radius: 999px; border: 0; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-1), inset 0 0 0 0.5px var(--line); color: var(--ink); font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; cursor: pointer; transition: transform 0.1s ease-out, background-color 0.15s, color 0.15s; }
.rail__btn .icon { width: 20px; height: 20px; flex: none; }
.rail__btn:active { transform: scale(0.95); }
.rail__btn.is-active { background: var(--accent); color: #fff; box-shadow: var(--shadow-1); }
.rail.is-compact .rail__btn, .rail__btn--icon { width: 34px; padding: 0; justify-content: center; }
.rail__btn--danger { color: var(--danger); margin-bottom: 6px; }
.rail__btn--danger .icon { width: 18px; height: 18px; }
.rail.is-compact .rail__label { display: none; }
.rail-panel { position: absolute; left: calc(var(--gutter) + 8px); right: calc(var(--gutter) + 8px + 34px + 8px); bottom: 12px; z-index: 4; max-height: calc(100% - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; border-radius: 20px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-2), inset 0 0 0 0.5px var(--line); }
.rail-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.rail-panel__done { border: 0; background: none; padding: 4px 2px; color: var(--accent); font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.rail-panel__body { display: grid; gap: 10px; }
.rail-panel__body .field__label, .rail-panel__body .range__label { font-size: 12.5px; }
/* El título de la cápsula ya dice qué es: fuera el título repetido. */
.rail-panel__body > .field > .field__label, .rail-panel__body > .field--color > .field__label { display: none; }
/* Letra: las letras en una fila que se desliza de lado. */
.rail-panel .font-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.rail-panel .font-grid::-webkit-scrollbar { display: none; }
.rail-panel .font-btn { padding-inline: 12px; }
.rail-panel .text-edit__row { grid-template-columns: 1fr auto; }
.rail-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rail-swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.rail-swatch.is-active { box-shadow: 0 0 0 2px var(--accent); }
.rail-panel textarea { min-height: 0; }
/* Con una herramienta abierta, Frente/Espalda se esconde (es el mismo lugar). */
.editor__viewport.has-tool .viewbar { display: none; }
@media (prefers-reduced-transparency: reduce) { .rail__btn:not(.is-active), .rail-panel { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* En la computadora no hay columna: el panel de la derecha muestra todo. */
@media (min-width: 900px) { .rail, .rail-panel { display: none !important; } }
/* Atajos para empezar sobre la prenda vacía (E1, 2026-10-14). Ocupan el lugar
   de Frente/Espalda, y el letrero de ayuda (que tapaba el pecho) se aparta:
   los atajos ya dicen qué hacer. Sólo celular: en la computadora "Empieza tu
   diseño" se ve completo en el panel de la derecha. */
.quickstart { position: absolute; left: calc(var(--gutter) + 8px); right: calc(var(--gutter) + 8px); bottom: 14px; z-index: 4; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.quickstart::-webkit-scrollbar { display: none; }
.quickstart[hidden] { display: none; }
.quickstart__btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow-1), inset 0 0 0 0.5px var(--line); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.1s ease-out; }
.quickstart__btn:active { transform: scale(0.96); }
.quickstart__btn .icon { width: 18px; height: 18px; }
.quickstart__btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); }
.quickstart__aa { font-size: 15px; font-weight: 700; line-height: 1; }
@media (prefers-reduced-transparency: reduce) { .quickstart__btn:not(.quickstart__btn--primary) { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (min-width: 900px) { .quickstart { display: none !important; } }
@media (max-width: 899px) {
  .editor__viewport.is-empty .viewbar, .editor__viewport.is-empty .editor__hint { display: none; }
}
/* En el celular, "Ajustar" completo sólo se abre con "Más". */
@media (max-width: 899px) { .editor.has-rail [data-layer-edit]:not(.is-open) { display: none; } }
@media (min-width: 900px) { .viewbar { bottom: 30px; left: calc(50% + 8px); } }
.viewbar__btn { border: 0; background: transparent; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.viewbar__btn.is-active { background: var(--ink); color: var(--bg); }
.viewbar__btn--icon { padding: 6px 9px; }
.viewbar__btn:hover:not(.is-active) { color: var(--ink); }
.viewbar__sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; flex: none; }

.panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head__back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.panel-head__title { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.panel-head__sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 0 var(--gutter) 2px; scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
/* Clásica | Premium en el editor (2026-10-25). */
.garment-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.garment-seg__opt { display: grid; gap: 1px; justify-items: center; padding: 9px 8px; border-radius: 11px; color: var(--ink); text-decoration: none; text-align: center; min-height: 48px; }
.garment-seg__opt b { font-size: 15px; font-weight: 600; }
.garment-seg__opt span { font-size: 12px; color: var(--muted); }
.garment-seg__opt.is-active { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.garment-seg__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Diseños listos (2026-10-25): playera compacta + categorías en una fila con foto. */
.designs-head { margin-bottom: 20px; }
.garment-seg--compact { max-width: 460px; margin-bottom: 18px; }
.cattiles { position: relative; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 4px var(--gutter) 8px; scrollbar-width: none; }
.cattiles::-webkit-scrollbar { display: none; }
.cattile { flex: none; width: 84px; display: grid; justify-items: center; gap: 2px; text-align: center; color: var(--ink); text-decoration: none; scroll-snap-align: start; }
.cattile__img { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: #1d1d1f; box-shadow: 0 0 0 1px var(--line); transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.cattile__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.cattile__img--all { background: var(--surface); color: var(--ink); }
.cattile__img--all .icon { width: 28px; height: 28px; }
.cattile__name { margin-top: 4px; font-size: 13px; font-weight: 500; line-height: 1.2; }
.cattile__n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cattile:hover .cattile__img { transform: translateY(-2px); }
.cattile.is-on .cattile__img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cattile.is-on .cattile__name { font-weight: 700; color: var(--accent); }
.cattile:focus-visible { outline: none; }
.cattile:focus-visible .cattile__img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.chips--sub.chips--scroll { position: relative; flex-wrap: nowrap; margin-top: 0; margin-bottom: 10px; }
.chips--sub.chips--scroll .chip { flex: none; }
.designs-count { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.garment-seg__note { margin: 8px 0 16px; font-size: 13px; color: var(--muted); text-align: center; }
@media (min-width: 900px) { .chips--scroll { margin: 0 -24px 16px; padding: 0 24px 2px; } }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.panel-block { padding: 16px 0; border-top: 1px solid var(--line); }

/* "Empieza tu diseño": sólo con la prenda vacía, primero en el panel. */
.start { margin: 2px 0 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.start__title { margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.start__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.start__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; transition: transform 0.1s ease-out, border-color 0.15s, color 0.15s; }
.start__btn:hover { border-color: var(--accent); color: var(--accent); }
.start__btn:active, .idea:active { transform: scale(0.97); }
.start__btn .icon { width: 20px; height: 20px; }
@media (max-width: 359px) { .start__btn { font-size: 14px; gap: 6px; } .start__btn .icon { display: none; } }
.start__btn--primary, .start__btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.start__or { margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
.start__ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.idea { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 10px 4px 9px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; transition: transform 0.1s ease-out, box-shadow 0.15s; }
.idea:hover { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.idea__art { display: grid; place-items: center; width: 44px; height: 30px; }
.idea__art--name { font: 900 21px/1 Archivo, "Archivo Fallback", "Arial Black", sans-serif; }
.idea__art text { font: 700 15px Graduate, Georgia, serif; fill: currentColor; }
.idea__art .icon { width: 28px; height: 28px; }
/* Plantillas: fila que se desliza de lado, cada tarjeta es la prenda en su
   color con el dibujo principal (máscara SVG pintada con --ink). */
.tpls { display: flex; gap: 8px; margin: 0 -16px; padding: 2px 16px 4px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.tpls::-webkit-scrollbar { display: none; }
.tpl { flex: 0 0 84px; display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; color: var(--ink); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; scroll-snap-align: start; transition: transform 0.1s ease-out; }
.tpl:active { transform: scale(0.96); }
.tpl:disabled { opacity: 0.6; }
.tpl__art { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 14px; background: var(--tpl-bg, var(--bg)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); overflow: hidden; }
.tpl:hover .tpl__art { box-shadow: inset 0 0 0 2px var(--accent); }
.tpl__mask { width: 62px; height: 62px; background: var(--ink); -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.tpl__word { font-size: 25px; line-height: 1; -webkit-text-stroke: 1.5px var(--stroke); paint-order: stroke fill; }
.tpl__word--firma { font-family: Yellowtail, cursive; transform: rotate(-6deg); }
.tpl__name { font-size: 12px; }
.art-credit { margin-top: 2px; font-size: 11px; }
.art-credit a { color: inherit; }
.start.is-attention { animation: start-attention 0.9s var(--ease) 1; }
@keyframes start-attention {
  0%, 100% { box-shadow: var(--shadow-1); }
  35% { box-shadow: 0 0 0 3px var(--accent), var(--shadow-1); }
}
@media (prefers-reduced-motion: reduce) { .start.is-attention { animation: none; box-shadow: 0 0 0 3px var(--accent); } }

/* Línea de confianza junto al total: entrega, envío y pago. */
/* Pago más fácil (2026-10-03): opcionales plegados, cliente que regresa,
   paqueterías de 2 en 2 y barra fija con el total en el celular. */
.add-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--accent); font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.add-link .icon { width: 16px; height: 16px; }
.add-link-row { margin: 0 0 16px; }
.rates__more { margin: 8px 14px; }
.rate__tag { color: var(--accent); font-weight: 600; }
.is-remembered { display: none !important; }
.welcome { display: grid; gap: 10px; margin-bottom: 16px; }
.welcome__title { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.welcome__lead { margin: 0; font-size: 14px; color: var(--ink-2); }
.welcome__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); font-size: 14.5px; line-height: 1.4; }
.welcome__row b { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.welcome__row .link { flex: none; white-space: nowrap; }
.welcome__forget { justify-self: start; font-size: 13px; color: var(--muted); }
.checkout-bar { display: none; }
@media (max-width: 939px) {
  .checkout-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--surface-2); border-top: 1px solid var(--line); transition: transform 0.25s var(--ease); }
  .checkout-bar strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .checkout-bar small { display: block; font-size: 11.5px; color: var(--muted); }
  .checkout-bar .btn { flex: 1; max-width: 230px; min-height: 44px; border-radius: 999px; font-size: 15.5px; }
  .checkout-bar.is-away, .checkout-bar.is-typing { transform: translateY(110%); }
  .checkout { padding-bottom: 72px; }
}

/* Logos de pago (2026-10-03): en la opción Tarjeta, junto a Confirmar y en
   el pie. Tarjetita blanca en los dos temas: los logos son de las marcas. */
.pay-marks { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pay-mark { display: inline-grid; place-items: center; width: 38px; height: 25px; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line-2); }
.pay-mark img { display: block; width: 100%; height: 100%; }
/* Apple Pay y Google Pay (simple-icons, viewBox recortado al logo): Apple
   trae su propio borde; Google Pay va en el recuadro como las tarjetas. */
.pay-mark--mono img { object-fit: contain; }
.pay-mark--applepay { box-shadow: none; border-radius: 4px; }
.pay-mark--googlepay { padding: 0 4px; }
.pay-mark--text { width: auto; padding: 0 7px; font-size: 10.5px; font-weight: 700; color: #111; letter-spacing: 0.02em; }
.option__marks { display: block; margin-top: 8px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.secure-note .icon { width: 14px; height: 14px; flex: none; }
.secure-note b { color: var(--ink-2); font-weight: 600; }
.footer__pay { display: grid; justify-items: center; gap: 8px; padding-top: 22px; text-align: center; }
.footer__pay-title { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.footer__pay .secure-note { margin: 0; }

/* --- Pago y envío gratis (2026-10-14) ---------------------------------------
   OXXO y SPEI con su logo dentro de su opción; la ficha de OXXO en la página
   del pedido; la barra "te faltan $X para el envío gratis" en el carrito. */
.option--pay .option__marks { margin-top: 10px; }
.pay__brand { margin-bottom: 12px; }
.pay__brand .pay-mark { width: 60px; height: 38px; border-radius: 7px; }
.pay__ref { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.pay__ref span { width: 100%; font-size: 12.5px; color: var(--muted); }
.pay__ref strong { font-size: 19px; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.free-ship { display: grid; gap: 8px; margin-top: 14px; }
/* En el carrito la barra quedaba pegada a "Hacer pedido" (dueño, 2026-10-25). */
.cart__aside .free-ship { margin-bottom: 20px; }
.free-ship p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ink-2); }
.free-ship .icon { width: 18px; height: 18px; flex: none; color: var(--accent); }
.free-ship__bar { display: block; height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.free-ship__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.5s var(--ease); }
.free-ship.is-done .icon { color: var(--success); }
.free-ship.is-done .free-ship__bar i { background: var(--success); }
.free-ship-line { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.free-ship-line .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--accent); }
.free-ship-line.is-done .icon { color: var(--success); }
/* Logos oficiales de OXXO y SPEI (2026-10-14): no son tarjetas 3:2 como Visa,
   así que conservan su proporción (alto fijo por contexto, ancho por aspecto).
   OXXO ya trae su fondo rojo; SPEI va sobre blanco con aire a los lados. */
.pay-marks .pay-mark.pay-mark--oxxo { width: auto; aspect-ratio: 1.973; background: transparent; box-shadow: none; border-radius: 4px; }
.pay-marks .pay-mark.pay-mark--spei { width: auto; aspect-ratio: 2.4; padding: 0 5px; }
.pay-mark--oxxo img, .pay-mark--spei img { object-fit: contain; }
.checkout-help { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 11px 12px; border-radius: var(--radius-sm); background: var(--bg); color: var(--ink-2); font-size: 13.5px; text-decoration: none; transition: background-color 0.15s; }
.checkout-help:hover { background: var(--bg-2); }
.checkout-help .icon { width: 18px; height: 18px; flex: none; color: var(--whatsapp); }
.checkout-help b { color: var(--ink); font-weight: 600; }

/* Línea de confianza arriba de "Tallas y piezas" (2026-10-03, versión D). */
.assure { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-1); font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.assure .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.assure-pay { margin: -6px 0 14px; }
.assure-pay .pay-mark { width: 34px; height: 22px; }
.panel-block__title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.panel-block__value { font-weight: 600; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.panel-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.swatches--lg { justify-content: flex-start; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch::before { content: ""; display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.15s, transform 0.15s var(--ease); }
.swatch:has(input:checked)::before { box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 3px var(--surface-2), 0 0 0 5px var(--ink); }
.swatch:has(input:focus-visible)::before { outline: 2px solid var(--accent); outline-offset: 5px; }
.swatch:hover::before { transform: scale(1.06); }

.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px; border-radius: var(--radius-sm); border: 1.5px dashed var(--line-2); background: var(--surface); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: border-color 0.15s, color 0.15s, background-color 0.15s; }
.add-btn:hover { border-color: var(--accent); color: var(--accent); }
.add-btn .icon { width: 20px; height: 20px; }
.add-btn--wide { grid-column: 1 / -1; min-height: 46px; }
.add-btn[aria-expanded="true"] { border-style: solid; border-color: var(--accent); color: var(--accent); }

/* Galería de emojis, símbolos y marcos. */
.art-picker { margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.art-picker__tabs { display: flex; width: 100%; margin-bottom: 8px; }
.art-picker__tabs .seg__btn { flex: 1; }
.art-picker__body { max-height: 288px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; margin: 0 -2px; }
.art-picker__group { margin: 10px 2px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.art-picker__group:first-child { margin-top: 2px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
[data-tab="marcos"] .art-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.art-cell { display: grid; place-items: center; aspect-ratio: 1; padding: 7px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; transition: transform 0.1s ease-out, box-shadow 0.15s; }
.art-cell:hover { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.art-cell:active { transform: scale(0.94); }
.art-cell img { width: 100%; height: 100%; object-fit: contain; }
.art-cell__mask { width: 100%; height: 100%; background: currentColor; -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.art-picker .panel-note { margin: 8px 2px 0; }
.field--inline { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.layers { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.layers:empty { display: none; }
.layers__empty { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.layer { display: flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); padding: 4px; transition: border-color 0.15s, box-shadow 0.15s; }
.layer.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.layer__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 2px; cursor: pointer; text-align: left; }
.layer__thumb { width: 44px; height: 44px; border-radius: 8px; background: repeating-conic-gradient(var(--bg-2) 0 25%, var(--surface) 0 50%) 0 0 / 12px 12px; display: grid; place-items: center; flex: none; overflow: hidden; }
.layer__thumb img { width: 100%; height: 100%; object-fit: contain; }
.layer__text { min-width: 0; display: grid; }
.layer__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer__zone { font-size: 12.5px; color: var(--muted); }
.layer__order { display: grid; }
.layer__order button, .layer__del { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 8px; font-size: 10px; line-height: 1.4; border-radius: 6px; }
.layer__del { padding: 8px; }
.layer__order button:hover, .layer__del:hover { color: var(--ink); background: var(--bg-2); }

.layer-edit { display: grid; gap: 14px; }
.layer-edit .panel-block__title { margin-bottom: 0; }
/* "Todo el diseño | Solo esta pieza" dentro de Ajustar (2026-10-19). */
.grupo-panel { display: grid; gap: 6px; }
.grupo-panel[hidden] { display: none; }
.grupo-panel__seg { display: flex; width: 100%; }
.grupo-panel__seg .seg__btn { flex: 1; font-weight: 600; font-size: 13.5px; }
.grupo-panel .panel-note { margin-top: 0; }
.text-edit { display: grid; gap: 12px; }
.text-edit__row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.text-edit textarea { min-height: 64px; }
/* Letras: cada botón escrito con su propio tipo de letra. */
.font-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.font-btn { min-height: 44px; padding: 4px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s ease-out; }
.font-btn:hover { border-color: var(--ink-2); }
.font-btn:active { transform: scale(0.96); }
.font-btn.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg--sm { padding: 3px; }
.seg--sm .seg__btn { padding: 6px 12px; display: grid; place-items: center; }
.seg--sm .seg__btn .icon { width: 18px; height: 18px; }
.seg__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.history { display: inline-flex; gap: 2px; }
.panel-head__main { flex: 1; min-width: 0; }
.share-box { margin: -4px 0 14px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 10px; }
.share-box .panel-note { margin: 0; }
.share-box__actions { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.share-box__actions input { min-height: 34px; padding: 6px 10px; font-size: 13px; }
/* iPhone acerca la página al tocar un campo de menos de 16 px y no la regresa;
   en el editor (overflow: hidden) ya no hay forma de alejarla sin pellizcar. */
@media (max-width: 899px) { .share-box__actions input { font-size: 16px; } }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s, transform 0.1s ease-out; }
.icon-btn:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn .icon { width: 19px; height: 19px; }
[data-bg] { margin-top: 2px; }
.range { display: grid; gap: 6px; }
.range__label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.range__label output { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.tool-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tool { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); line-height: 1.15; text-align: center; }
.tool:hover { border-color: var(--ink-2); color: var(--ink); }
.tool .icon { width: 19px; height: 19px; }
.tool--danger:hover { border-color: var(--danger); color: var(--danger); }
.quality { font-size: 13px; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.quality--ok { background: var(--success-soft); color: var(--success); }
.quality--warn { background: var(--warning-soft); color: var(--warning); }
.quality--bad { background: var(--danger-soft); color: var(--danger); }
.presets summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.presets .chips { margin-top: 10px; }
.presets[hidden] { display: none; }
/* Lugar y tamaño con un toque (maqueta D, 2026-10-19). */
.place { display: grid; gap: 8px; }
.place[hidden] { display: none; }
.place__title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.place .panel-note { margin: 0; }
.place__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.place__btn { display: grid; justify-items: center; gap: 4px; padding: 8px 2px 7px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s ease-out; }
.place__btn svg { width: 40px; height: 44px; }
.place__shirt { fill: var(--bg-2); }
.place__mark { fill: var(--muted); }
.place__btn:active, .place__size:active { transform: scale(0.96); }
.place__btn.is-active, .place__size.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.place__btn.is-active .place__mark { fill: var(--accent); }
.place__sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.place__size { display: grid; gap: 2px; align-content: start; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s ease-out; }
.place__size strong { font-size: 14.5px; font-weight: 600; }
.place__size small { font-size: 12px; line-height: 1.3; color: var(--muted); }
.place__size.is-active strong { color: var(--accent); }
.rail-panel .place__title, .rail-panel .place .panel-note { display: none; }
.rail-panel .place__btn svg { width: 32px; height: 36px; }
/* Deslizadores de ancho y giro: guardados, no son el camino principal. */
.fine { display: grid; gap: 12px; }
.fine summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.fine[open] summary { margin-bottom: 4px; }
.fine .range + .range { margin-top: 12px; }

.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sizes[hidden] { display: none; }
/* Corte: Caballero | Dama (2026-10-08). Control segmentado; el número es
   cuántas piezas lleva ese corte. */
.corte { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 10px; padding: 3px; border-radius: 12px; background: var(--bg-2); }
.corte__tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.corte__tab.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.corte__tab small { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.corte__tab small[hidden] { display: none; }
.corte__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.size { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.size__name { font-weight: 600; font-size: 14px; }
.stepper { display: flex; align-items: center; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-2); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--line-2); }
.stepper .icon { width: 16px; height: 16px; }
.stepper input { width: 40px; min-height: 34px; padding: 0; border: 0; background: transparent; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }

.summary { position: sticky; bottom: 0; margin: 8px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--surface-2); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .summary { margin: 8px -24px 0; padding: 14px 24px 18px; } }
.summary__lines { margin: 0; display: grid; gap: 5px; font-size: 14px; }
.summary__lines > div:last-child:not(:first-child) { padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--line); }
.summary__lines > div { display: flex; justify-content: space-between; gap: 12px; }
.summary__lines dt { color: var(--muted); }
.summary__lines dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.summary__error { font-size: 13.5px; color: var(--danger); background: var(--danger-soft); padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.summary__hint { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-align: center; }
.summary__hint[hidden] { display: none; }
.summary__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary .btn { flex: 1; max-width: 240px; }
/* El total es un botón: abre el desglose en una tarjeta flotante encima de
   la barra, que sale del total (transform-origin abajo a la izquierda). */
.summary__total { appearance: none; display: grid; gap: 1px; background: none; border: 0; padding: 4px 6px 4px 0; margin: -4px 0; text-align: left; color: inherit; font: inherit; cursor: pointer; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.summary__total:active { opacity: 0.6; }
.summary__total:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.summary__label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.summary__amount { display: inline-flex; align-items: center; gap: 4px; }
.summary__amount strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.summary__chev { width: 18px; height: 18px; color: var(--muted); transition: transform 0.25s var(--ease); }
/* Barra de un renglón en el celular (versión D, 2026-10-03): el precio
   arriba con "1 pieza · ver desglose" abajo, y el botón más bajo. */
@media (max-width: 899px) {
  .summary { padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); }
  .summary__bar { gap: 10px; }
  .summary__amount { order: -1; }
  .summary__amount strong { font-size: 22px; }
  .summary__label { font-size: 11.5px; font-weight: 500; }
  .summary .btn { min-height: 44px; padding-block: 0; border-radius: 999px; font-size: 15.5px; }
}
/* Prenda vacía (versión E): el botón en gris; tocarlo lleva a "Empieza tu diseño". */
.summary .btn.is-waiting { background: var(--line-2); color: var(--ink-2); box-shadow: none; }
.summary.is-open .summary__chev { transform: rotate(180deg); }
.summary__breakdown {
  position: absolute; z-index: 5; left: var(--gutter); bottom: calc(100% - 4px);
  width: min(320px, calc(100% - 2 * var(--gutter)));
  padding: 14px 16px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow-2), 0 0 0 1px var(--line);
  transform-origin: bottom left; animation: pop-up 0.22s var(--ease);
}
@media (min-width: 900px) { .summary__breakdown { left: 24px; } }
@keyframes pop-up { from { opacity: 0; transform: translateY(6px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .summary__breakdown { animation: none; } }

/* --- Entrar / instalar ------------------------------------------------------ */

.is-centered { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.centered-main { width: 100%; max-width: 400px; }
.login { background: var(--surface); border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow-2); }
.login__brand { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-size: 19px; }
.login__title { font-size: 28px; font-weight: 600; margin: 4px 0 22px; }
.login__back { text-align: center; margin-top: 18px; font-size: 14px; }
.login__back a { color: var(--muted); }

/* --- Panel ---------------------------------------------------------------- */

.is-admin { background: var(--bg); }
.adminbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.adminbar__inner { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 18px; }
.adminbar__nav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; }
.adminbar__nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.adminbar__nav a.is-active { background: var(--bg-2); color: var(--ink); }
/* Globito con la cantidad en "Recuperar" (2026-10-08). */
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Panel → Por recuperar */
.rec-intro { margin: -6px 0 14px; max-width: 70ch; }
.rec-foot { margin: 18px 0 0; max-width: 70ch; }
.rec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rec { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.rec__thumb { width: 64px; height: 77px; border-radius: 10px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; }
.rec__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec__main { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.rec__main small { color: var(--muted); overflow-wrap: anywhere; }
.rec__main .pill { margin-top: 4px; }
.rec__actions { display: grid; gap: 6px; justify-items: stretch; }
@media (max-width: 640px) { .rec { grid-template-columns: 64px minmax(0, 1fr); } .rec__actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } }
/* "¿Dudas? Mándanos tu diseño por WhatsApp" en el editor */
.wa-help { margin: 0 0 14px; }
.wa-help .panel-note { margin-top: 6px; min-height: 1.2em; }
.adminbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.adminbar__site { display: none; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
@media (min-width: 720px) { .adminbar__site { display: inline-flex; } }
@media (max-width: 560px) { .adminbar .brand__tag { display: none; } }
/* Celular: las secciones del panel pasan a una barra de pestañas abajo, al
   alcance del pulgar, en material translúcido (como la de iOS). */
@media (max-width: 719px) {
  .adminbar__inner { height: 54px; }
  .adminbar__nav {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; margin: 0;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; /* 6 secciones desde 2026-10-08 (Catálogo y Recuperar) */
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--material); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--line); overflow: visible;
  }
  .adminbar__nav a { position: relative; flex-direction: column; gap: 3px; padding: 5px 0; font-size: 10px; font-weight: 600; letter-spacing: 0; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
  .adminbar__nav a .icon { width: 22px; height: 22px; }
  .adminbar__nav .nav-count { position: absolute; top: 1px; left: 50%; margin-left: 4px; }
  .adminbar__nav a.is-active { background: none; color: var(--accent); }
  .adminbar__nav a:active { background: var(--bg-2); }
  .admin-main { padding-top: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .admin-head h1 { font-size: 24px; }
  .admin-head > .btn { margin-left: 0; flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 719px) and (prefers-reduced-transparency: reduce) { .adminbar__nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 22px var(--gutter) 64px; width: 100%; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.admin-head h1 { font-size: 28px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-head .page__back { width: 100%; margin: 0; }
.admin-head > .btn { margin-left: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.tabs__tab { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.tabs__tab span { font-weight: 600; opacity: 0.7; margin-left: 2px; }
.tabs__tab.is-active { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.order-list, .product-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-row, .product-admin__row { display: flex; align-items: center; gap: 14px; background: var(--surface); padding: 10px 14px 10px 10px; border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow-1); transition: box-shadow 0.2s; }
.order-row:hover, .product-admin__row:hover { box-shadow: var(--shadow-2); }
.order-row__img { width: 52px; height: 62px; border-radius: 8px; background: var(--stage); flex: none; overflow: hidden; }
.order-row__img img { width: 100%; height: 100%; object-fit: cover; }
.order-row__main { flex: 1; min-width: 0; }
.order-row__main small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row__side { display: grid; justify-items: end; gap: 3px; font-variant-numeric: tabular-nums; }
.order-row__side small { color: var(--muted); font-size: 12.5px; }
.product-admin__row img { width: 48px; height: auto; border-radius: 8px; background: var(--stage); }
.product-admin__row.is-off { opacity: 0.6; }
.product-admin__main { flex: 1; min-width: 0; }
.product-admin__main small { display: block; color: var(--muted); font-size: 13px; }
.product-admin__price { font-weight: 600; font-variant-numeric: tabular-nums; display: grid; justify-items: end; gap: 2px; }
.product-admin__price small { font-weight: 400; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* Ajustes → Estampado: cuánto cobras, cuánto cuesta y cuánto ganas por tamaño. */
.calc-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.calc-table th { text-align: right; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 0 0 6px 10px; }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; padding-left: 0; }
.calc-table td { text-align: right; padding: 9px 0 9px 10px; border-top: 1px solid var(--line); }
.calc-table td:first-child small { display: block; color: var(--muted); font-size: 12.5px; }
.calc-table td:last-child { font-weight: 600; color: var(--success, inherit); }
/* Celular: la fila del pedido en dos renglones (foto + folio/cliente, y
   debajo estado, total y hora): en una sola fila no caben a 390 px. Va
   después de las reglas base para ganarles. */
@media (max-width: 719px) {
  .order-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 12px; padding: 10px 12px 10px 10px; }
  .order-row__img { width: 44px; height: 53px; grid-row: span 2; }
  .order-row__side { display: flex; align-items: center; gap: 10px; }
  .order-row__side small { margin-left: auto; }
  .tabs { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
}

.admin-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
/* En una columna, lo que se usa en el momento (acciones, envío, cliente)
   va antes que las fichas de diseño. */
@media (max-width: 999px) { .admin-col--side { order: -1; } }
.card__title .pill { margin-left: 6px; vertical-align: 2px; }

/* Panel → Catálogo (2026-10-08): árbol de categorías a la izquierda,
   subcategoría abierta a la derecha. En el celular, uno arriba del otro. */
.cat-intro { margin: -8px 0 6px; }
.cat-status { min-height: 20px; margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.cat-status.is-bad { color: var(--danger); }
.cat-admin { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1000px) { .cat-admin { grid-template-columns: 300px minmax(0, 1fr); } .cat-tree { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; } }
.cat-tree { display: grid; gap: 14px; }
.cat-group + .cat-group { padding-top: 14px; border-top: 1px solid var(--line); }
.cat-group__head { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.cat-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.cat-name { all: unset; cursor: text; border-radius: 8px; padding: 2px 6px; margin-left: -6px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cat-name:hover { background: var(--bg-2); }
.cat-name:focus-visible { outline: 2px solid var(--accent); }
.cat-name--cat { font-size: 16px; }
.cat-name--big { font-size: 22px; letter-spacing: -0.01em; }
.cat-name-input { font: inherit; font-weight: 600; min-width: 0; flex: 1; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--accent); background: var(--surface); color: var(--ink); }
.cat-name-input.cat-name--big { font-size: 22px; }
.cat-icon { all: unset; cursor: pointer; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.cat-icon:hover { background: var(--bg-2); color: var(--ink); }
.cat-icon:focus-visible { outline: 2px solid var(--accent); }
.cat-icon--danger { color: var(--danger); }
.cat-add { color: var(--accent); font-size: 13.5px; }
.cat-cols { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.cat-col { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; }
.cat-col small { color: var(--muted); font-size: 12.5px; }
.cat-col:hover { background: var(--bg-2); }
.cat-col.is-on { background: var(--accent); color: #fff; }
.cat-col.is-on small { color: inherit; opacity: 0.8; }
.cat-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cat-tree__foot { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.cat-main { display: grid; gap: 12px; min-width: 0; }
.cat-head { display: grid; gap: 10px; }
.cat-head__title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cat-head__row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.cat-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.cat-inline select, .cat-bar select { min-height: 34px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; width: auto; max-width: 100%; }
@media (max-width: 899px) { .cat-inline select, .cat-bar select { font-size: 16px; } } /* sin zoom del iPhone */
.cat-drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 18px; border-radius: var(--radius); border: 1.5px dashed var(--line-2); background: var(--surface); cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.cat-drop strong { color: var(--accent); }
.cat-drop span { font-size: 13px; color: var(--muted); }
.cat-drop:hover, .cat-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.cat-progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.cat-progress:empty { display: none; }
.cat-progress .is-ok { color: var(--success); }
.cat-progress .is-bad { color: var(--danger); }
.cat-bar { position: sticky; top: 64px; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
.cat-bar.is-active { box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-1); }
.cat-bar__info { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-right: auto; }
.cat-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cat-grid > .empty { grid-column: 1 / -1; }
.cat-card { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 6px; border-radius: 12px; background: #18181a; overflow: hidden; }
.cat-card img { width: 100%; height: 100%; object-fit: contain; }
.cat-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-card.is-picked { box-shadow: inset 0 0 0 3px var(--accent); }
.cat-card__check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.8); background: rgba(0, 0, 0, 0.25); }
.cat-card.is-picked .cat-card__check { background: var(--accent); border-color: var(--accent); }
.cat-card.is-picked .cat-card__check::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cat-card__tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; font-weight: 600; }
.kv small { color: var(--muted); }
.admin-col { display: grid; gap: 14px; min-width: 0; }
.admin-col .card + .card { margin-top: 0; }
.design-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.design-card__head h2 { font-size: 19px; }
.design-card__head h2 small { font-weight: 500; color: var(--muted); font-size: 14px; }
.design-card__head p { color: var(--ink-2); font-size: 14px; }
.design-card__media { display: flex; gap: 8px; overflow-x: auto; }
.design-card__media img { width: 200px; height: auto; border-radius: var(--radius-sm); background: var(--stage); }
.design-card__sizes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.size-tag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 8px; background: var(--bg-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.size-tag b { font-weight: 600; }
.design-card__price { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { color: var(--muted); }
.table--layers { display: block; overflow-x: auto; }
.layer-thumb { display: inline-block; vertical-align: middle; margin-right: 6px; width: 44px; height: 44px; border-radius: 6px; background: repeating-conic-gradient(var(--bg-2) 0 25%, var(--surface) 0 50%) 0 0 / 10px 10px; overflow: hidden; }
.layer-thumb img { width: 100%; height: 100%; object-fit: contain; }
.actions { display: grid; gap: 8px; }
.actions form .btn { width: 100%; }
.kv { margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.kv > div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { margin-top: 18px; }
.admin-form { max-width: 760px; display: grid; gap: 14px; }
.admin-form .card + .card { margin-top: 0; }
/* Medidas por talla (Prendas): una fila por talla, cinco medidas en cm. */
.measures summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.measures__scroll { overflow-x: auto; margin-top: 6px; }
.measures__table { min-width: 860px; font-variant-numeric: tabular-nums; }
.measures__table th { vertical-align: bottom; }
.measures__group { text-align: center !important; border-bottom-color: var(--line) !important; }
.measures__group + .measures__group, .measures__table td:nth-child(7) { border-left: 1px solid var(--line-2); }
.measures__table th[scope="row"] { white-space: nowrap; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); padding-top: 14px; }
.measures__table th[scope="row"] small { font-weight: 400; color: var(--muted); }
.measures__table td { padding: 6px 4px; }
.measures__table input { width: 100%; min-width: 64px; padding: 8px; text-align: right; }
.measures__scale { font-size: 13px; white-space: nowrap; padding-top: 14px !important; }
/* Guía de dónde medir (2026-10-14): dibujo con las medidas numeradas. */
.mz { margin: 0; display: grid; gap: 12px; }
.mz svg { width: 100%; height: auto; max-height: 300px; }
.mz__shirt { fill: var(--bg-2); stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; }
.mz__rib { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.2; }
.mz__seam { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.mz__m line { stroke: var(--accent); stroke-width: 2; marker-start: url(#mz-arrow); marker-end: url(#mz-arrow); }
.mz__m--alt line { stroke-dasharray: 5 3; }
.mz__tip { fill: var(--accent); }
.mz__badge circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.mz__badge text { fill: var(--accent-ink); font: 700 10px system-ui, sans-serif; text-anchor: middle; }
.mz__cap { fill: var(--ink); font: 600 13px system-ui, sans-serif; text-anchor: middle; }
.mz__note { fill: var(--muted); font: 11px system-ui, sans-serif; text-anchor: middle; }
.mz__m, .mz__legend li { transition: opacity 0.15s; }
.mz.is-focus .mz__m:not(.is-on), .mz.is-focus .mz__legend li:not(.is-on) { opacity: 0.25; }
.mz.is-focus .mz__m.is-on line { stroke-width: 3; }
.mz__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); font-size: 13.5px; line-height: 1.4; }
.mz__legend li { display: flex; gap: 8px; align-items: baseline; }
.mz__num { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.measures__table th .mz__num { width: 16px; height: 16px; font-size: 10px; margin-right: 2px; vertical-align: 1px; }
.measures__scale small { display: block; color: var(--muted); }
.form-actions { display: flex; gap: 10px; }
.color-rows { display: grid; gap: 8px; }
.color-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 8px; align-items: center; }

/* ==========================================================================
   Menos abandono (2026-10-25): envío en el carrito, pasos del pedido y
   cuenta sin contraseña (código al correo)
   ========================================================================== */
.shipcalc { display: grid; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.shipcalc__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.shipcalc__title .icon { width: 18px; height: 18px; color: var(--accent); }
.shipcalc__row { display: grid; gap: 8px; }
.shipcalc__row input, .shipcalc__row select { width: 100%; min-height: 44px; }
.shipcalc__place { margin: 0; font-size: 13px; color: var(--muted); }
.shipcalc__place:empty { display: none; }
.shipcalc .rates__list .rate { padding: 11px 12px; }
.segmented--sm span { padding: 7px 6px; font-size: 13.5px; }

.pasos { list-style: none; display: flex; align-items: center; gap: 6px; margin: -8px 0 20px; padding: 0; }
.pasos__item { flex: none; display: flex; align-items: center; }
.pasos__item button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 2px; border: 0; background: none; font: 600 14px/1 var(--font); color: var(--muted); cursor: pointer; }
.pasos__n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-size: 12px; line-height: 1; color: var(--ink-2); transition: background-color 0.2s var(--ease), color 0.2s; }
.pasos__bar { flex: 1; height: 2px; border-radius: 2px; background: var(--bg-2); transition: background-color 0.2s var(--ease); }
.pasos__bar.is-done { background: var(--success); }
.pasos__item.is-on button { color: var(--ink); }
.pasos__item.is-on .pasos__n { background: var(--accent); color: var(--accent-ink); }
.pasos__item.is-done button { color: var(--ink-2); }
/* La palomita reemplaza al número sin cambiar el tamaño del círculo: el
   número se esconde con color transparente y la ✓ va encima (antes,
   font-size 0 movía la línea base y el círculo verde quedaba más abajo). */
.pasos__item.is-done .pasos__n { position: relative; background: var(--success); color: transparent; }
.pasos__item.is-done .pasos__n::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.pasos__item button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.acct-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--success-soft); cursor: pointer; }
.acct-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--success); }
.acct-check span { display: grid; gap: 2px; }
.acct-check b { font-size: 15px; }
.acct-check small { font-size: 13px; color: var(--ink-2); }
.acct-on { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--success-soft); font-size: 14px; }
.acct-on .icon { width: 18px; height: 18px; flex: none; color: var(--success); margin-top: 1px; }
.acct-login { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.otp-box { display: grid; gap: 8px; margin-top: 10px; padding: 14px; border-radius: var(--radius-sm); border: 1px dashed var(--accent); }
.otp-box__lead { margin: 0; font-size: 14px; color: var(--ink-2); }
.otp-box__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.otp-box__msg { margin: 0; font-size: 13px; color: var(--muted); }
.otp-box__msg:empty { display: none; }
.otp-input { width: 9.5em; min-height: 46px; font: 700 22px var(--mono); letter-spacing: 0.3em; text-align: center; }

.login { display: grid; place-items: start center; }
.login__card { width: 100%; max-width: 420px; display: grid; justify-items: center; gap: 10px; padding: 28px 22px; text-align: center; }
.login__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.login__icon .icon { width: 26px; height: 26px; }
.login__lead { margin: 0; color: var(--ink-2); }
.login__form { width: 100%; display: grid; gap: 12px; margin-top: 6px; text-align: left; }
.login__form .otp-input { width: 100%; }
.login__again { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 14px; color: var(--muted); }
.login__alt { margin: 0; font-size: 14px; color: var(--muted); }
.account__orders { list-style: none; margin: 0; padding: 0; display: grid; }
.account__orders a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.account__orders li:first-child a { border-top: 0; }
.account__orders span { display: grid; gap: 2px; }
.account__orders small { color: var(--muted); }
.account__out { margin-top: 16px; text-align: center; }
/* Varias direcciones (2026-10-26). */
.addr-pick { display: grid; gap: 8px; margin: 12px 0 14px; }
.addr-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.addr-opt input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.addr-opt span { display: grid; gap: 2px; min-width: 0; }
.addr-opt b { font-size: 15px; }
.addr-opt small { font-size: 13px; color: var(--muted); }
.addr-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.account .card + .card { margin-top: 14px; }
.account .muted { color: var(--muted); }
.account .small { font-size: 13px; }
.addr-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; }
.addr-item { padding: 12px 0; border-top: 1px solid var(--line); }
.addr-item:first-child { border-top: 0; padding-top: 0; }
.addr-item__head { display: flex; align-items: center; gap: 8px; }
.addr-item__line { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.addr-item__edit { margin-top: 6px; }
.addr-item__edit summary { display: inline-block; font-size: 14px; cursor: pointer; list-style: none; }
.addr-item__edit summary::-webkit-details-marker { display: none; }
.addr-item__name { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.addr-item__name input { flex: 1; min-width: 140px; }
.addr-item__actions { display: flex; gap: 16px; margin-top: 10px; }

/* ==========================================================================
   Portada C, comparativa de playeras y garantía (2026-10-25, elegidas por el
   dueño entre maquetas)
   ========================================================================== */
.hero--c .hero__inner { gap: clamp(22px, 3vw, 36px); }
.hero--c .hero__title { font-size: clamp(36px, 6vw, 68px); max-width: 13em; margin-bottom: 12px; }
.hero--c .btn--lg { margin-top: 4px; }

.occasions { width: 100%; max-width: 1040px; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .occasions { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.occasion { display: grid; gap: 2px; padding: 8px 8px 14px; background: var(--surface); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.occasion:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08); }
.occasion:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Fondo = el gris de las fotos de plantillas, para que no se vea su recuadro. */
.occasion__media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-width: 100%; margin-bottom: 8px; border-radius: 12px; background: #f0eff2; overflow: hidden; }
.occasion__shirt { position: relative; flex: none; width: 100%; height: 100%; }
.occasion__shirt img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Tres playeras encimadas (empresa): la de en medio, adelante y más grande. */
.occasion__media--trio .occasion__shirt { width: 46%; height: auto; margin: 0 -9%; }
.occasion__media--trio .occasion__shirt:nth-child(2) { width: 56%; z-index: 1; }
.occasion__mark { position: absolute; left: 50%; top: 33%; transform: translateX(-50%); font: 800 clamp(7px, 1vw, 10px) / 1 var(--font); font-style: normal; letter-spacing: 0.08em; color: #fff; background: var(--accent); border-radius: 4px; padding: 3px 4px; white-space: nowrap; }
.occasion__name { padding: 0 6px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.occasion__sub { padding: 0 6px; font-size: 13px; color: var(--muted); line-height: 1.35; }

.compare { display: grid; gap: 12px; max-width: 760px; }
.compare__cards { display: grid; gap: 10px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); align-items: end; padding-top: 12px; }
.compare__card { position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 10px 16px; background: var(--surface); border-radius: var(--radius); color: var(--ink); text-decoration: none; text-align: center; }
.compare__card.is-reco { box-shadow: 0 0 0 2px var(--accent); }
.compare__card img { width: auto; height: clamp(110px, 18vw, 180px); }
.compare__badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.compare__name { margin-top: 6px; font-weight: 600; font-size: 16px; }
.compare__price { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.compare__plus { font-size: 13px; color: var(--muted); }
.compare__table { background: var(--surface); border-radius: var(--radius); padding: 2px 16px; font-size: 14px; }
.compare__row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--cols, 2), minmax(0, 1fr)); gap: 8px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.compare__row:last-child { border-bottom: 0; }
.compare__label { color: var(--muted); }
.compare__cell { text-align: center; font-variant-numeric: tabular-nums; }
.compare__ctas { display: grid; gap: 10px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.compare__ctas .btn { padding-inline: 10px; white-space: normal; height: auto; min-height: 48px; line-height: 1.2; text-align: center; }

.trust { display: grid; gap: 14px; max-width: 760px; }
.trust__main { display: grid; justify-items: center; gap: 10px; text-align: center; padding: clamp(24px, 4vw, 40px) clamp(18px, 4vw, 40px); background: var(--surface); border-radius: var(--radius-lg); }
.trust__main p { color: var(--ink-2); max-width: 34em; margin: 0; }
.trust__main .section__title { max-width: 16em; }
.trust__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.trust__icon .icon { width: 28px; height: 28px; }
.trust__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .trust__list { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.trust__list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border-radius: var(--radius); }
.trust__list p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.trust__ico { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.trust__ico .icon { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
