/* ==========================================================================
   Base y tokens
   ========================================================================== */
:root {
  --bg: #f6f5f2;
  --bg-alt: #efede8;
  --surface: #ffffff;
  --text: #141414;
  --muted: #6b6963;
  --border: #e3e0d9;
  --accent: #ff5b2e;
  --accent-strong: #e8471b;
  --accent-soft: #ffe7df;
  --on-accent: #ffffff;
  --tile: #ecebe6;
  --dark: #141414;
  --on-dark: #f6f5f2;
  --success: #2e9d62;
  --danger: #d23b2f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --bg-alt: #151515;
    --surface: #1a1a1a;
    --text: #f2f1ee;
    --muted: #a09d96;
    --border: #2a2a2a;
    --accent: #ff6a3d;
    --accent-strong: #ff7f57;
    --accent-soft: #3a1f16;
    --on-accent: #ffffff;
    --tile: #232321;
    --dark: #1d1d1d;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.accent-text { color: var(--accent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .9em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 60ch; }

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: .98rem; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); }
.btn-primary:hover { --btn-bg: var(--accent-strong); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }
.btn-light { --btn-bg: var(--on-dark); --btn-fg: #141414; }
.btn-outline-light { --btn-bg: transparent; --btn-fg: var(--on-dark); border-color: rgb(255 255 255 / .3); }
.btn-outline-light:hover { border-color: var(--on-dark); }
.btn-sm { min-height: 38px; padding: 0 1.05em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.link-arrow { display: inline-flex; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow span { transition: transform .2s ease; }
.link-arrow:hover span, .service-card:hover .link-arrow span { transform: translateX(4px); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; text-decoration: none; }
.brand:hover { color: inherit; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: .94rem; font-weight: 500; text-decoration: none; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-link { position: relative; }
.cart-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }
.menu-toggle { display: none; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .nav {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 4px; border-radius: 0; font-size: 1.05rem; color: var(--text); border-bottom: 1px solid var(--border); }
  .nav a:hover, .nav a[aria-current="page"] { background: transparent; color: var(--accent); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-visual {
  position: relative; aspect-ratio: 4 / 3.3; border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow);
}
.printer { width: 100%; height: 100%; }
.printer .layers rect { fill: var(--accent); transform-box: fill-box; transform-origin: left center; transform: scaleX(0); animation: layer .32s ease-out forwards; animation-delay: calc(var(--i) * .16s + .3s); }
.printer .layers rect:nth-child(even) { fill: color-mix(in srgb, var(--accent) 86%, #000); }
.printer .bed { fill: var(--text); opacity: .9; }
.printer .nozzle { fill: var(--text); }
.printer .nozzle-tip { fill: var(--accent); }
.nozzle-rise { animation: rise calc(18 * .16s) linear .3s forwards; }
.nozzle-sweep { animation: sweep .32s ease-in-out .3s 9 alternate; }
@keyframes layer { to { transform: scaleX(1); } }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-204px); } }
@keyframes sweep { from { transform: translateX(-66px); } to { transform: translateX(66px); } }
.hero-tag {
  position: absolute; left: 20px; bottom: 20px; display: flex; flex-direction: column; padding: 10px 14px;
  border-radius: 14px; background: var(--bg); border: 1px solid var(--border); line-height: 1.2; font-size: .8rem; color: var(--muted);
}
.hero-tag strong { font-size: 1.05rem; color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; width: 100%; }
}

/* ==========================================================================
   Secciones
   ========================================================================== */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding-top: clamp(16px, 3vw, 32px); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; }
.section-head h2 { margin-bottom: 0; }
.section-head .muted { margin-top: 1em; }
.page-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; }
.page-hero.center h1, .page-hero .center h1 { margin-inline: auto; }
.page-hero .center .lead { margin-inline: auto; }
.page-hero-sm { padding-bottom: 8px; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card {
  position: relative; display: flex; flex-direction: column; padding: 32px 28px 28px; min-height: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.service-card:hover { color: inherit; transform: translateY(-4px); border-color: var(--text); box-shadow: var(--shadow); }
.service-card p { color: var(--muted); flex: 1; }
.service-num { position: absolute; top: 28px; right: 28px; font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.service-icon { width: 44px; height: 44px; margin-bottom: 28px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } .service-card { min-height: 0; } }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { padding: 28px 24px; border-top: 2px solid var(--text); }
.steps p { color: var(--muted); margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .92rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 22px 0; } }

/* Materiales */
.materials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.material { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.material h3 { font-size: 1.5rem; letter-spacing: -0.03em; }
.material p { color: var(--muted); font-size: .94rem; }
.meter { margin-top: 20px; font-size: .78rem; color: var(--muted); }
.meter::after { content: ""; display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) calc(var(--v) * 100%), var(--border) 0); }
@media (max-width: 960px) { .materials { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .materials { grid-template-columns: 1fr; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 6vw, 80px); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 1.04rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 12px; max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* CTA */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: clamp(32px, 5vw, 56px); border-radius: 28px; background: var(--dark); color: var(--on-dark);
  background-image: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 40%, transparent), transparent 45%);
}
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { margin: 0; opacity: .72; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Productos
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 400px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease; }
.product-card:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border)); box-shadow: var(--shadow); }
.product-card[hidden] { display: none; }
.product-media { position: relative; display: block; padding: 0; border: 0; background: var(--tile); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.product-card:hover .product-media img { transform: scale(1.05); }
.badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: .72rem; font-weight: 600; }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 18px; }
.product-body .eyebrow { margin-bottom: .4em; font-size: .7rem; }
.product-title { margin-bottom: .3em; font-size: 1.04rem; }
.product-short { flex: 1; font-size: .88rem; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .product-body { padding: 14px; }
  .product-short { display: none; }
  .product-foot { flex-direction: column; align-items: stretch; }
}

/* Tienda */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; font-size: .9rem; font-weight: 500; cursor: pointer; transition: all .2s ease; }
.chip:hover { border-color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; width: 180px; color: var(--text); }
.empty-state { padding: 48px 0; text-align: center; color: var(--muted); }
.shop-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding: 32px; border-radius: var(--radius); border: 1px dashed var(--border); }
.shop-note h2 { font-size: 1.4rem; margin-bottom: .3em; }
.shop-note p { margin: 0; }
.shop-note-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Modal de producto */
.modal { width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 40px 80px -20px rgb(0 0 0 / .45); }
.modal::backdrop { background: rgb(10 10 10 / .5); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-media { background: var(--tile); min-height: 100%; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.modal-body { padding: 32px; display: flex; flex-direction: column; gap: 4px; }
.modal-body h2 { font-size: 1.7rem; margin-bottom: .2em; }
.modal-body .price { font-size: 1.4rem; margin-bottom: 12px; }
.modal-close { position: absolute; top: 12px; right: 12px; background: var(--surface); }
.spec { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 4px 0 12px; }
.option-group { margin: 10px 0; border: 0; padding: 0; }
.option-group legend { font-size: .82rem; font-weight: 600; margin-bottom: 8px; padding: 0; }
.option-group legend span { font-weight: 400; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg .pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: .88rem; font-weight: 500; transition: all .15s ease; }
.seg input:checked + .pill { border-color: var(--text); background: var(--text); color: var(--bg); }
.seg input:focus-visible + .pill { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .15); box-shadow: inset 0 0 0 3px var(--surface); display: block; transition: transform .15s ease; }
.seg input:checked + .swatch { outline: 2px solid var(--text); outline-offset: 2px; }
.seg input:focus-visible + .swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-actions { display: flex; gap: 12px; margin-top: auto; padding-top: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty button { width: 40px; height: 46px; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; border-radius: 999px; }
.qty input { width: 36px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.modal-actions .btn { flex: 1; }
@media (max-width: 720px) {
  .modal { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-media img { aspect-ratio: 16 / 9; }
  .modal-body { padding: 24px var(--gutter) 28px; }
}

/* ==========================================================================
   Formularios
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); margin: 0 0 16px; min-width: 0; }
fieldset.panel { display: block; }
.panel-title { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; padding: 0; margin-bottom: 20px; float: left; width: 100%; }
.panel-title + * { clear: both; }
.panel-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: .88rem; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; }
.field small { font-weight: 400; font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); font-size: 1rem; font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 20px; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check.has-error { color: var(--danger); }
.form-subtitle { font-size: 1.15rem; margin: 12px 0 16px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-error { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-size: .9rem; }
.progress { height: 4px; margin-top: 12px; border-radius: 4px; background: var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }

/* Zona de subida */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 24px; text-align: center;
  border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.dropzone svg { color: var(--accent); margin-bottom: 4px; }
.dropzone .muted { font-size: .85rem; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { border-color: var(--accent); }
.dropzone-sm { padding: 24px; margin-bottom: 8px; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.file-list:empty { display: none; }
.file-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }
.file-item.is-active { border-color: var(--accent); }
.file-item button.file-name { all: unset; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item button.file-name:focus-visible { outline: 2px solid var(--accent); }
.file-meta { color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.file-meta .warn { color: var(--accent-strong); }
.file-remove { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--muted); font-size: 1.1rem; }
.file-remove:hover { background: var(--bg-alt); color: var(--text); }
.viewer { position: relative; margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: var(--tile); aspect-ratio: 16 / 10; }
.viewer canvas { width: 100%; height: 100%; cursor: grab; touch-action: none; }
.viewer canvas:active { cursor: grabbing; }
.viewer-hint { position: absolute; left: 14px; bottom: 10px; margin: 0; font-size: .75rem; pointer-events: none; }

/* Presupuesto / resumen */
.quote-layout, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.quote-summary { position: sticky; top: 88px; }
.summary-card { margin: 0; }
.summary-title { font-size: 1rem; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-bottom: 4px; }
.summary-price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; margin: 0; font-variant-numeric: tabular-nums; line-height: 1.15; }
.summary-sub { font-size: .88rem; }
.summary-list { margin: 16px 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: .9rem; }
.summary-list:empty { display: none; }
.summary-list div { display: flex; justify-content: space-between; gap: 12px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--border); font-weight: 600; }
.summary-total strong { font-size: 1.8rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.summary-note { font-size: .82rem; color: var(--muted); padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); margin: 16px 0; }
@media (max-width: 920px) {
  .quote-layout, .checkout { grid-template-columns: 1fr; }
  .quote-summary { position: static; }
}

/* Diseño */
.design-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.design-layout .success { grid-column: 1 / -1; }
.mini-steps { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: m; }
.mini-steps li { counter-increment: m; position: relative; display: flex; flex-direction: column; padding: 0 0 22px 48px; }
.mini-steps li::before { content: counter(m); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.mini-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 36px; bottom: 6px; width: 1px; background: var(--border); }
.mini-steps span { color: var(--muted); font-size: .92rem; }
.price-hint ul { list-style: none; padding: 0; margin: 0 0 12px; }
.price-hint li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.price-hint li strong { white-space: nowrap; }
.design-form { margin: 0; }
@media (max-width: 920px) { .design-layout { grid-template-columns: 1fr; } }

/* Carrito */
.cart-items { list-style: none; padding: 0; margin: 0; clear: both; }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.cart-item:first-child { border-top: 0; padding-top: 0; }
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-sm); background: var(--tile); }
.cart-item h3 { font-size: 1rem; margin-bottom: 2px; }
.cart-item .muted { font-size: .84rem; margin: 0 0 8px; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item .qty button { width: 32px; height: 34px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font-size: .82rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--danger); }
.empty-cart { padding: 32px 0 64px; }

/* Éxito */
.success { max-width: 560px; margin: 24px auto 40px; text-align: center; padding: 48px 24px; }
.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); font-size: 1.8rem; font-weight: 700; }
.success p { color: var(--muted); }

/* Textos legales */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.prose ul { padding-left: 1.2em; }

/* ==========================================================================
   Pie
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { max-width: 34ch; margin-top: 14px; font-size: .9rem; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.footer-list a { text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; max-width: calc(100% - 32px);
  border-radius: 999px; background: var(--text); color: var(--bg); font-size: .92rem; box-shadow: 0 20px 40px -12px rgb(0 0 0 / .4);
  animation: toast-in .3s cubic-bezier(.2, .8, .2, 1);
}
.toast a { color: var(--accent); font-weight: 600; white-space: nowrap; text-decoration: none; padding: 6px 10px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin { padding: 32px 0 64px; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 2rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; }
.tab { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; cursor: pointer; font-weight: 500; }
.tab.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count:not(:empty) { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .72rem; }
.admin-body { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: start; }
.admin-list { padding: 8px; max-height: calc(100dvh - 220px); overflow: auto; margin: 0; }
.admin-detail { margin: 0; position: sticky; top: 88px; max-height: calc(100dvh - 110px); overflow: auto; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; padding: 12px; border: 0; border-radius: var(--radius-sm); background: transparent; text-align: left; cursor: pointer; font-size: .9rem; }
.row:hover { background: var(--bg-alt); }
.row.is-active { background: var(--accent-soft); }
.row small { color: var(--muted); }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--bg-alt); white-space: nowrap; }
.status-nuevo { background: var(--accent); color: var(--on-accent); }
.status-completado, .status-enviado { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.status-cancelado { opacity: .6; text-decoration: line-through; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 0 0 20px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.admin-detail h2 { font-size: 1.4rem; }
.admin-detail h3 { font-size: 1rem; margin-top: 20px; }
.admin-files { display: grid; gap: 6px; padding: 0; list-style: none; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table td, .admin-table th { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--tile); }
@media (max-width: 860px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-detail { position: static; max-height: none; }
  .admin-list { max-height: 50vh; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}
