/* Impresiones3D — sistema de diseño (tienda + base del panel).
   Dirección visual: la luz UV que cura la resina. Papel gris azulado, tinta casi negra, violeta ultravioleta como único
   color de acción y ámbar de resina solo para ofertas. El motivo propio son las "líneas de capa" de la impresión.
   Sin dependencias externas: fuentes locales, sin CDN. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Color */
  --ink: #14131a;
  --ink-2: #3a3846;
  --muted: #666473;
  --paper: #f5f5f8;
  --surface: #ffffff;
  --plinth: #ecebf2;
  --line: #e1e0e9;
  --line-strong: #c9c7d6;
  --uv: #4b2be0;
  --uv-hover: #3b1fc2;
  --uv-soft: #efecff;
  --amber: #c97a0b;
  --amber-soft: #fff1dc;
  --ok: #0f7b4a;
  --ok-soft: #e6f6ee;
  --warn: #8f5500;
  --warn-soft: #fff6e1;
  --err: #b3261e;
  --err-soft: #fdeceb;
  --info-soft: #eef1ff;

  /* Tipografía */
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Espaciado (escala de 4) y forma */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 104px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 19, 26, 0.06);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--uv); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--uv-hover); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 var(--s-3); color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--s-3); }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--uv); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; background: var(--ink); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: var(--s-3); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--s-4); }
.narrow { max-width: 820px; }
.narrow-text { max-width: 62ch; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
.icon { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Motivo propio: líneas de capa (como la vista de un laminador 3D) */
.layered { background-color: var(--plinth); background-image: repeating-linear-gradient(to bottom, rgba(20, 19, 26, 0.05) 0 1px, transparent 1px 7px); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-5); border: 1px solid transparent; border-radius: var(--radius); font: 600 0.9375rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--uv); color: #fff; }
.btn-primary:hover { background: var(--uv-hover); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-sm { min-height: 38px; padding: 0 var(--s-4); font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: 1rem; }
.btn-block { width: 100%; }
.btn-disabled, .btn:disabled { background: var(--plinth); color: var(--muted); border-color: var(--line); cursor: not-allowed; pointer-events: none; }
.grow { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; border-radius: var(--radius); cursor: pointer; }
.icon-btn:hover { background: var(--plinth); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--uv); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-icon { display: inline-flex; align-items: center; gap: var(--s-2); background: none; border: 0; padding: var(--s-2) 0; font: inherit; font-size: 0.9375rem; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.link-icon:hover { color: var(--uv); }
.link-more { display: inline-flex; align-items: center; gap: var(--s-1); font-weight: 600; text-decoration: none; }

/* Formularios */
.field { margin-bottom: var(--s-4); }
.field label, fieldset legend { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: var(--s-2); color: var(--ink); padding: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23666473' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--uv); box-shadow: 0 0 0 3px rgba(75, 43, 224, 0.18); }
input:disabled, select:disabled, textarea:disabled { background: var(--plinth); color: var(--muted); }
.hint { font-size: 0.8125rem; color: var(--muted); margin: var(--s-1) 0 0; }
.field-error { font-size: 0.875rem; color: var(--err); margin: var(--s-1) 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 var(--s-4); }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.form-stack > * + * { margin-top: 0; }
.check { display: flex; align-items: flex-start; gap: var(--s-2); font-size: 0.9375rem; cursor: pointer; margin-bottom: var(--s-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--uv); flex: none; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s-4); min-width: 0; }
.inline-field { display: flex; gap: var(--s-2); }
.inline-field input { flex: 1; min-width: 0; }
.inline-form { display: inline; }

/* Avisos y etiquetas */
.alert { padding: var(--s-3) var(--s-4); border-radius: var(--radius); border: 1px solid; font-size: 0.9375rem; margin: var(--s-4) 0; }
.alert > :last-child { margin-bottom: 0; }
.alert-success { background: var(--ok-soft); border-color: #b8e3cd; color: #0a5a37; }
.alert-error { background: var(--err-soft); border-color: #f2b9b5; color: #8f1d17; }
.alert-info { background: var(--info-soft); border-color: #c9d0f5; color: #2b2f7a; }
.alert-warning { background: var(--warn-soft); border-color: #f0d9a0; color: var(--warn); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.4; background: var(--plinth); color: var(--ink-2); }
.badge-sale { background: var(--amber-soft); color: #8a4f00; }
.badge-new { background: var(--uv-soft); color: var(--uv); }
.badge-demo { background: #fff; color: var(--muted); border: 1px dashed var(--line-strong); }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; background: var(--plinth); color: var(--ink-2); white-space: nowrap; }
.status-pending_payment { background: var(--warn-soft); color: var(--warn); }
.status-paid, .status-delivered { background: var(--ok-soft); color: #0a5a37; }
.status-preparing, .status-in_production, .status-ready, .status-shipped { background: var(--uv-soft); color: var(--uv); }
.status-cancelled { background: var(--err-soft); color: #8f1d17; }
.avail-in { color: var(--ok); } .avail-order { color: var(--uv); } .avail-out { color: var(--err); }
.badge-avail.avail-in { background: var(--ok-soft); } .badge-avail.avail-order { background: var(--uv-soft); } .badge-avail.avail-out { background: var(--err-soft); }

/* Paneles, tablas, estados vacíos */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); margin-bottom: var(--s-4); }
.panel h2 { font-size: 1.15rem; }
.panel-accent { border-color: var(--uv); background: var(--uv-soft); }
.empty { text-align: center; padding: var(--s-8) var(--s-4); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h2 { margin-bottom: var(--s-2); } .empty p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-weight: 600; font-size: 0.8125rem; color: var(--muted); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table tbody tr:hover { background: #faf9fd; }
.page { padding-block: var(--s-5) var(--s-8); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

/* Navegación de ruta, paginación */
.crumbs { margin-bottom: var(--s-4); font-size: 0.875rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong); }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--uv); }
.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-6); }
.page-link { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; }
.page-link:hover { border-color: var(--ink); }
.page-link.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-gap { align-self: center; color: var(--muted); }

/* ===== Tienda: cabecera ===== */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(245, 245, 248, 0.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: var(--s-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: var(--uv); }
.search { position: relative; flex: 1; max-width: 520px; margin-inline: auto; }
.search input { padding-right: 48px; border-radius: 999px; background: var(--surface); }
.search button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--plinth); }
.header-actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.icon-link { position: relative; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.icon-link:hover { background: var(--plinth); color: var(--ink); }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--uv); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.nav-toggle { display: none; }
.main-nav { border-top: 1px solid var(--line); background: var(--surface); }
.main-nav ul { list-style: none; display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; }
.main-nav a { display: block; padding: var(--s-3) var(--s-3); color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--uv); border-bottom-color: var(--uv); }
.nav-extra { display: none; }
@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; padding-block: var(--s-2); min-height: 0; gap: var(--s-2); }
  .nav-toggle { display: inline-grid; order: 0; }
  .brand { order: 1; margin-right: auto; }
  .header-actions { order: 2; margin-left: 0; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .icon-link span:not(.cart-count) { display: none; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; overflow: visible; padding-block: var(--s-2); }
  .main-nav a { padding: var(--s-3) var(--s-2); border-bottom: 0; }
  .nav-extra { display: list-item; }
}

/* ===== Inicio ===== */
.hero { padding-block: var(--s-7) var(--s-8); border-bottom: 1px solid var(--line); background: var(--surface); }
.hero-grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--s-8); } }
.hero-copy h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); max-width: 14ch; text-wrap: balance; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-5) 0; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); color: var(--ink-2); font-size: 0.9375rem; }
.hero-points li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-points .icon { color: var(--uv); }
.hero-visual { display: grid; place-items: center; min-height: 280px; background: var(--plinth); background-image: repeating-linear-gradient(to bottom, rgba(20, 19, 26, 0.045) 0 1px, transparent 1px 7px); border-radius: 20px; padding: var(--s-5); }
.hero-visual img { border-radius: 14px; max-height: 520px; width: auto; }
.layers { width: min(100%, 360px); height: auto; overflow: visible; }
.layer-line { stroke: var(--uv); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: print-layer 520ms var(--ease) forwards; animation-delay: calc(var(--i) * 38ms + 150ms); }
.layers-base { fill: none; stroke: var(--ink); stroke-opacity: 0.25; stroke-width: 1.6; }
@keyframes print-layer { to { stroke-dashoffset: 0; } }
.section { padding-block: var(--s-7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.cat-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-4); }
.cat-tile { display: block; text-decoration: none; color: var(--ink); }
.cat-media { display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform 200ms var(--ease), border-color 200ms var(--ease); }
.cat-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile:hover .cat-media { transform: translateY(-2px); border-color: var(--uv); }
.cat-name { display: block; font-weight: 600; margin-top: var(--s-2); }
.cat-count { display: block; font-size: 0.8125rem; color: var(--muted); }
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li { counter-increment: step; position: relative; padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--uv-soft); color: var(--uv); font-weight: 700; margin-bottom: var(--s-3); }
.steps p { color: var(--muted); margin: 0; }
.process { background: var(--surface); border-block: 1px solid var(--line); }
.process .steps li { background: var(--paper); }
.benefits { list-style: none; display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.benefits .icon { width: 28px; height: 28px; color: var(--uv); margin-bottom: var(--s-3); }
.benefits p { color: var(--muted); margin: 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s-2); }
.faq summary { cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--uv); }
.faq details[open] summary::after { content: "−"; }
.faq .prose { padding: 0 var(--s-5) var(--s-4); color: var(--ink-2); }
.prose p { max-width: 68ch; }
.prose { color: var(--ink-2); }

/* ===== Tarjeta de producto ===== */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-media { position: relative; display: block; aspect-ratio: 1; background: var(--plinth) repeating-linear-gradient(to bottom, rgba(20, 19, 26, 0.05) 0 1px, transparent 1px 7px); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card.is-soldout .card-media img { opacity: 0.55; }
.card-badges { position: absolute; left: var(--s-2); top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-1); }
.card-demo { position: absolute; left: var(--s-2); bottom: var(--s-2); font-size: 0.6875rem; padding: 1px 8px; }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3) var(--s-4) var(--s-4); flex: 1; }
.card-cat { font-size: 0.8125rem; color: var(--muted); margin: 0; }
.card-cat a { color: inherit; }
.card-title { font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--uv); }
.price { margin: var(--s-2) 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-1) var(--s-2); font-variant-numeric: tabular-nums; }
.price-now { font-weight: 700; font-size: 1.05rem; }
.price-from { font-weight: 400; font-size: 0.8125rem; color: var(--muted); }
.price-old { color: var(--muted); font-size: 0.875rem; }
.price-lg .price-now { font-size: 1.9rem; font-family: var(--font-display); letter-spacing: -0.02em; }
.price-lg .price-old { font-size: 1.05rem; }
.card-avail { font-size: 0.8125rem; font-weight: 600; margin: 0; }
.card-actions { display: flex; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); flex-wrap: wrap; }
.card-actions .btn, .card-actions form { flex: 1 1 auto; }
.card-actions form .btn { width: 100%; }
@media (max-width: 520px) { .card-actions .btn-ghost { display: none; } .card-actions { padding-top: var(--s-2); } }

/* ===== Catálogo ===== */
.catalog { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
@media (min-width: 900px) { .catalog { grid-template-columns: 250px 1fr; gap: var(--s-6); align-items: start; } .filters { position: sticky; top: calc(var(--header-h) + 60px); } }
.filters-toggle { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-weight: 600; padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); list-style: none; }
.filters-toggle::-webkit-details-marker { display: none; }
.filters-form { margin-top: var(--s-4); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 900px) { .filters-box > summary { display: none; } .filters-form { margin-top: 0; } }
.filters-form legend { font-family: var(--font-display); font-size: 1rem; }
.filter-tree { list-style: none; } .filter-tree.is-nested { margin: var(--s-1) 0 var(--s-2) var(--s-4); }
.filter-tree a, .filter-all a { display: flex; justify-content: space-between; gap: var(--s-2); padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.filter-tree a:hover, .filter-all a:hover { color: var(--uv); }
.filter-tree a.is-current, .filter-all a.is-current { font-weight: 700; color: var(--ink); }
.filter-all { margin: 0; }
.range-row { display: flex; align-items: center; gap: var(--s-2); } .range-row input { min-width: 0; padding-inline: var(--s-3); }
.filters-actions { display: flex; gap: var(--s-2); }
.sortbar { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); margin-bottom: var(--s-4); }
.sortbar label { font-size: 0.9375rem; color: var(--muted); } .sortbar select { width: auto; min-width: 210px; }

/* ===== Ficha de producto ===== */
.pdp { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-8); align-items: start; } .gallery { position: sticky; top: calc(var(--header-h) + 70px); } }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-demo { position: absolute; left: var(--s-3); top: var(--s-3); }
.gallery-thumbs { list-style: none; display: flex; gap: var(--s-2); margin-top: var(--s-3); overflow-x: auto; padding-bottom: var(--s-1); }
.thumb { padding: 0; width: 76px; height: 76px; border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--plinth); cursor: pointer; flex: none; transition: border-color 160ms var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--uv); }
.buy h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: var(--s-3); }
.buy-badges { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.buy-form { margin-top: var(--s-5); }
.buy-row { display: flex; gap: var(--s-3); align-items: stretch; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.qty button { width: 42px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); border-radius: var(--radius); }
.qty button:hover { background: var(--plinth); }
.qty input { width: 52px; min-height: 44px; border: 0; text-align: center; padding: 0; font-weight: 600; box-shadow: none; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.variant-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.variant { position: relative; }
.variant input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.variant span { display: inline-block; padding: 10px var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-weight: 500; font-size: 0.9375rem; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.variant input:checked + span { border-color: var(--uv); background: var(--uv-soft); color: var(--uv); box-shadow: inset 0 0 0 1px var(--uv); }
.variant input:focus-visible + span { outline: 3px solid var(--uv); outline-offset: 2px; }
.variant.is-out span { color: var(--muted); text-decoration: line-through; background: var(--plinth); border-style: dashed; }
.buy-meta { list-style: none; margin: var(--s-5) 0 var(--s-2); display: grid; gap: var(--s-2); color: var(--ink-2); font-size: 0.9375rem; }
.buy-meta li { display: flex; align-items: center; gap: var(--s-2); } .buy-meta .icon { color: var(--uv); }
.buy-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); border-top: 1px solid var(--line); padding-top: var(--s-3); }
.pdp-info { margin-top: var(--s-7); display: grid; gap: var(--s-5); max-width: 860px; }
.info-block h2 { border-bottom: 1px solid var(--line); padding-bottom: var(--s-2); }
.specs { margin: 0; } .specs > div { display: grid; grid-template-columns: minmax(130px, 35%) 1fr; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 500; }
.related { margin-top: var(--s-7); }

/* ===== Carrito y checkout ===== */
.cart-layout, .checkout-layout, .order-layout { display: grid; gap: var(--s-5); }
@media (min-width: 960px) { .cart-layout, .checkout-layout, .order-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-6); align-items: start; } .summary { position: sticky; top: calc(var(--header-h) + 70px); } }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: var(--s-3) var(--s-4); align-items: center; padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s-3); position: relative; }
.cart-line.has-problem { border-color: var(--err); }
.cart-img { grid-row: span 2; } .cart-img img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--plinth); }
.cart-info p { margin: 2px 0 0; font-size: 0.875rem; } .cart-name { font-size: 1rem; font-family: var(--font-body); letter-spacing: 0; margin: 0; } .cart-name a { color: var(--ink); text-decoration: none; }
.cart-note { background: var(--plinth); padding: var(--s-1) var(--s-2); border-radius: var(--radius-sm); display: inline-block; }
.cart-total { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cart-remove { position: absolute; top: 2px; right: 2px; } .cart-remove .icon-btn { width: 36px; height: 36px; }
.cart-qty { grid-column: 2; }
@media (min-width: 640px) { .cart-line { grid-template-columns: 96px 1fr auto 120px; } .cart-img { grid-row: auto; } .cart-img img { width: 96px; height: 96px; } .cart-qty { grid-column: auto; } .cart-remove { position: static; } }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-5); }
.summary h2 { font-size: 1.2rem; } .summary h3 { font-size: 0.95rem; margin: var(--s-4) 0 var(--s-1); font-family: var(--font-body); letter-spacing: 0; color: var(--muted); }
.totals { margin: 0 0 var(--s-4); } .totals > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--ink-2); } .totals dd { margin: 0; text-align: right; }
.totals .is-discount dd { color: var(--ok); font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-3); font-size: 1.2rem; font-weight: 700; } .totals .grand dt { color: var(--ink); }
.coupon { margin-bottom: var(--s-4); } .coupon label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: var(--s-2); }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--radius); background: var(--ok-soft); color: #0a5a37; margin-bottom: var(--s-4); font-size: 0.9375rem; }
.coupon-applied span { display: inline-flex; gap: var(--s-2); align-items: center; }
.options { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.option { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.option:hover { border-color: var(--ink); }
.option:has(input:checked) { border-color: var(--uv); background: var(--uv-soft); box-shadow: inset 0 0 0 1px var(--uv); }
.option input { accent-color: var(--uv); width: 18px; height: 18px; flex: none; }
.option-body { display: grid; flex: 1; gap: 2px; font-size: 0.9375rem; } .option-body .muted { font-size: 0.8125rem; }
.option-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.accept { padding: var(--s-2) 0; }
.mini-lines { list-style: none; display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.mini-lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s-3); align-items: center; font-size: 0.9rem; }
.mini-lines img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--plinth); }
.confirm { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-5); background: var(--ok-soft); border: 1px solid #b8e3cd; border-radius: var(--radius); margin-bottom: var(--s-5); }
.confirm h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: var(--s-1); } .confirm .lead { margin: 0; }
.confirm-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff; flex: none; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.stepper li { flex: 1 1 110px; padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); background: var(--plinth); color: var(--muted); font-size: 0.8125rem; font-weight: 600; border-top: 3px solid var(--line-strong); }
.stepper li.is-done { color: var(--ink-2); border-top-color: var(--uv); } .stepper li.is-current { background: var(--uv); color: #fff; border-top-color: var(--uv); }
.order-items { list-style: none; } .order-items li { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); align-items: start; } .order-items li:last-child { border-bottom: 0; }
.order-items img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--plinth); }
.timeline { list-style: none; border-left: 2px solid var(--line); margin-left: 6px; } .timeline li { position: relative; padding: 0 0 var(--s-4) var(--s-4); } .timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--uv); border: 2px solid var(--surface); }
.timeline p { margin: 0; color: var(--ink-2); }

/* ===== Cuenta ===== */
.auth-page { display: grid; place-items: start center; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s-6); }
.auth-card h1 { font-size: 1.9rem; }
.auth-links { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; margin-top: var(--s-4); font-size: 0.9375rem; } .auth-links span { color: var(--line-strong); }
.account-layout { display: grid; gap: var(--s-5); margin-top: var(--s-4); }
@media (min-width: 860px) { .account-layout { grid-template-columns: 220px 1fr; align-items: start; } }
.account-nav { display: flex; flex-wrap: wrap; gap: var(--s-1); }
@media (min-width: 860px) { .account-nav { flex-direction: column; flex-wrap: nowrap; position: sticky; top: calc(var(--header-h) + 70px); } }
.account-nav a, .account-nav .link-btn { display: block; padding: 10px var(--s-4); border-radius: var(--radius); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.account-nav a:hover { background: var(--plinth); }
.account-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.account-nav .link-btn { text-align: left; color: var(--muted); text-decoration: none; }
.address-list { list-style: none; } .address-list .panel { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.address-list p { margin: var(--s-1) 0 0; font-size: 0.9375rem; }
.row-actions { display: flex; gap: var(--s-2); align-items: flex-start; flex-wrap: wrap; }
@media (max-width: 640px) {
  .table-wrap .table thead { display: none; }
  .table-wrap .table, .table-wrap .table tbody, .table-wrap .table tr, .table-wrap .table td { display: block; width: 100%; }
  .table-wrap .table tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
  .table-wrap .table td { display: flex; justify-content: space-between; gap: var(--s-3); border: 0; padding: 2px 0; text-align: right; }
  .table-wrap .table td::before { content: attr(data-label); color: var(--muted); font-size: 0.8125rem; text-align: left; }
}

/* ===== Pie, avisos emergentes, error ===== */
.site-footer { background: var(--ink); color: #c9c7d6; margin-top: var(--s-8); padding-top: var(--s-7); }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); padding-bottom: var(--s-6); }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; margin-bottom: var(--s-2); }
.footer-text { font-size: 0.9375rem; margin-bottom: var(--s-2); }
.footer-h { font-size: 0.95rem; color: #fff; font-family: var(--font-body); letter-spacing: 0; margin-bottom: var(--s-3); }
.footer-list { list-style: none; display: grid; gap: var(--s-2); font-size: 0.9375rem; }
.site-footer a { color: #c9c7d6; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #8d8ba0; }
.footer-bottom { border-top: 1px solid #2c2a38; padding-block: var(--s-4); font-size: 0.8125rem; color: #8d8ba0; } .footer-bottom p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: var(--s-3) var(--s-5); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(20, 19, 26, 0.28); display: flex; gap: var(--s-4); align-items: center; max-width: calc(100vw - 32px); animation: toast-in 220ms var(--ease); }
.toast a { color: #cfc6ff; font-weight: 600; } .toast.is-error { background: var(--err); } .toast.is-error a { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.error-page { text-align: center; padding-block: var(--s-9); } .error-code { font-family: var(--font-display); font-size: 5rem; font-weight: 700; color: var(--uv); margin: 0; line-height: 1; }
