/* ============================================================
   CROSTEX — estilos
   Paleta CROSTEX: blanco, celeste y negro (claro por defecto, con modo oscuro); títulos en Lilita One, texto en Nunito, datos en
   IBM Plex Mono; tarjetas blancas con borde grueso; modo claro/oscuro.
   ============================================================ */

:root {
  --sky: #4DC0F4;          /* celeste principal (rellenos) */
  --sky-text: #4DC0F4;     /* celeste para texto sobre fondo */
  --sky-deep: #1F9FDB;     /* celeste intenso (hover, insignias) */
  --sky-soft: #A9E1F8;     /* celeste suave */
  --t0: #4DC0F4; --t1: #BFE9FB; --t2: #1F9FDB; --t3: #E6F5FD; --t4: #8FD3F2; --t5: #D3DBE0;

  /* Fijos: siempre negro y blanco, sin importar el tema (tarjetas y chips). */
  --ink: #000000;
  --paper: #FFFFFF;

  /* Tema oscuro (negro + celeste) */
  --bg: #000000;
  --text: #FFFFFF;
  --surface: #0d0d0d;
  --surface-2: #161616;
  --inset: #000000;
  --ash: #9aa5ad;
  --line: color-mix(in srgb, var(--text) 15%, transparent);
  --line-soft: color-mix(in srgb, var(--text) 12%, transparent);
  --err: #FF7A8A;
  --radius: 16px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Arial Black', Impact, 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
/* Tema claro (blanco + celeste + negro): es el que se ve por defecto. */
[data-theme="light"] {
  --sky-text: #0A74A8;
  --sky-soft: #0A74A8;
  --bg: #FFFFFF;
  --text: #0A0A0A;
  --surface: #FFFFFF;
  --surface-2: #EAF6FD;
  --inset: #EAF6FD;
  --ash: #55616a;
  --err: #C4203A;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 600 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.h2 { font-size: 1.6rem; }
.h3 { font-size: 1.2rem; }
.h4 { font-size: 1.05rem; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sky-soft); outline-offset: 2px; }
.muted { color: var(--ash); }
.sm { font-size: .85rem; }
.fine { font-size: .85rem; color: var(--ash); }
.mt { margin-top: 2rem; }
.num { text-align: right; }
.inline { display: inline; margin: 0; }
code { background: var(--inset); color: var(--sky-soft); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: .88em; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 560px; padding-block: 40px 56px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sky); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 200; font-weight: 800; }
.skip:focus { left: 8px; }

/* ---------- Colores por rubro ---------- */
.tone-bg-0 { background: var(--t0); } .tone-bg-1 { background: var(--t1); } .tone-bg-2 { background: var(--t2); }
.tone-bg-3 { background: var(--t3); } .tone-bg-4 { background: var(--t4); } .tone-bg-5 { background: var(--t5); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--sky); color: var(--ink); border: 3px solid var(--ink);
  padding: .6rem 1.05rem; border-radius: 12px; font: 400 1rem/1.2 var(--display); letter-spacing: .02em;
  text-decoration: none; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--sky-deep); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: none; color: var(--text); border: 2px solid color-mix(in srgb, var(--text) 30%, transparent); border-radius: 10px; font: 800 .95rem/1.2 var(--sans); letter-spacing: 0; }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); border-color: var(--sky); }
.btn-sm { padding: .42rem .8rem; font-size: .9rem; border-width: 2px; border-radius: 10px; }
.btn-ghost.btn-sm { font-size: .85rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.1rem; }
.btn-ghost.btn-lg { font-size: .98rem; }
.btn-danger { background: none; color: var(--err); border: 2px solid var(--err); font: 800 .85rem/1.2 var(--sans); }
.btn-danger:hover { background: var(--err); color: var(--ink); border-color: var(--err); }
.linklike { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 800; color: inherit; text-decoration: underline; cursor: pointer; text-underline-offset: 3px; }
.linklike:hover { color: var(--sky-text); }
.linklike.danger { color: var(--err); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block: 1rem; }

/* ---------- Avisos ---------- */
.flash { margin: 1rem 0; padding: .8rem 1rem; border: 2px dashed var(--sky-soft); background: color-mix(in srgb, var(--sky-soft) 10%, transparent); border-radius: 10px; font-weight: 700; }
.flash ul { margin: 0; padding-left: 1.1rem; }
.flash-ok { border-color: var(--sky-soft); }
.flash-warn { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 12%, transparent); }
.flash-err { border-color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); }
.announce { background: var(--sky); color: var(--ink); text-align: center; padding: 8px 16px; font-weight: 800; font-size: .92rem; }
.notice-bar { background: color-mix(in srgb, var(--sky) 14%, var(--bg)); border-bottom: 2px dashed var(--sky); text-align: center; padding: 9px 16px; font-size: .9rem; font-weight: 700; }

/* ---------- Cinta métrica (la firma de CROSTEX) ---------- */
.tape {
  display: flex; height: 30px; overflow: hidden; background-color: var(--sky);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.9) 0 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(0,0,0,.7) 0 1px, transparent 1px);
  background-size: 80px 14px, 8px 7px; background-position: 0 100%, 0 100%; background-repeat: repeat-x;
}
.tape span { flex: 0 0 80px; padding: 4px 0 0 6px; font: 600 11px/1 var(--mono); color: var(--ink); }
.tape-thin { height: 10px; background-size: 80px 8px, 8px 4px; }

/* ---------- Muestra de tela ---------- */
.sw {
  display: block; width: 44px; height: 44px; border-radius: 6px; flex: none; overflow: hidden;
  background-color: var(--c, #cfc6b4);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.2) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
}
.sw-sm { width: 34px; height: 34px; }
.sw-img { background: var(--surface-2); background-image: none; }
.sw-img img { width: 100%; height: 100%; object-fit: cover; }
.sw-xl { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--sky);
}
.icon-btn {
  position: relative; background: none; border: 2px solid var(--text); color: var(--text); width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.icon-btn:hover { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 14%, transparent); transform: translateY(-1px); }
.icon-btn[aria-current="page"] { border-color: var(--sky); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: block; flex: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-logo.on-dark { display: block; } .brand-logo.on-light { display: none; }
[data-theme="light"] .brand-logo.on-dark { display: none; } [data-theme="light"] .brand-logo.on-light { display: block; }
.brand-name { font: 400 1.25rem/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.brand-name span { color: var(--sky-text); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--sky-deep); color: var(--ink); font: 400 .72rem/1 var(--display);
  border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Menú lateral ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.side-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 85vw; background: var(--surface); z-index: 50;
  box-shadow: 2px 0 30px rgba(0,0,0,.5); transform: translateX(-105%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s;
  display: flex; flex-direction: column; border-right: 3px solid var(--sky);
}
.side-menu.open { transform: translateX(0); visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.side-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 12px; border-bottom: 2px dashed var(--line); }
.side-menu-header h2 { margin: 0; font: 800 .95rem var(--sans); letter-spacing: .06em; color: var(--ash); text-transform: uppercase; }
.menu-list { list-style: none; margin: 0; padding: 8px 0; overflow-y: auto; flex: 1; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 13px 18px; font: 400 1.05rem var(--display); text-decoration: none; border-left: 4px solid transparent; }
.menu-list a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.menu-list a.active { border-left-color: var(--sky); background: color-mix(in srgb, var(--sky) 12%, transparent); color: var(--sky-text); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.side-menu-footer { padding: 16px 18px; border-top: 2px dashed var(--line); display: flex; flex-direction: column; gap: 10px; font-size: .9rem; font-weight: 800; }
.side-menu-footer a, .side-menu-footer .linklike { text-decoration: none; }
.side-menu-footer a:hover, .side-menu-footer .linklike:hover { color: var(--sky-text); }
.side-menu-footer form { margin: 0; }

/* ---------- Inicio ---------- */
.hero {
  padding: 72px 20px 52px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 20% 0%, rgba(77,192,244,.28), transparent 55%), radial-gradient(ellipse at 80% 10%, rgba(77,192,244,.14), transparent 55%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 600 .75rem var(--mono); letter-spacing: .12em; color: var(--ink);
  text-transform: uppercase; margin-bottom: 22px; background: var(--sky); padding: 7px 16px; border-radius: 20px;
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.02; max-width: 860px; margin: 0 auto 20px; }
.hero h1 .accent { color: var(--sky-text); }
.hero h1 .accent2 { color: var(--text); background: linear-gradient(transparent 68%, var(--sky) 68% 92%, transparent 92%); }
.hero p { color: var(--ash); max-width: 540px; margin: 0 auto 32px; font-size: 1.06rem; line-height: 1.55; font-weight: 700; }
.hero-stats { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-bottom: 38px; }
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font: 400 1.9rem var(--display); color: var(--sky-text); }
.hero-stats span { font-size: .75rem; color: var(--ash); text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.hero-section-label { font: 800 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ash); margin-bottom: 16px; }
.hero-chips { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: 760px; margin: 0 auto; }
.chip {
  font: 400 1rem var(--display); padding: 12px 22px; border-radius: 40px; color: var(--ink); border: 3px solid var(--ink);
  display: flex; align-items: center; gap: 8px; text-decoration: none; transition: transform .15s;
}
.chip:hover { transform: translateY(-3px) scale(1.03); color: var(--ink); }
.chip small { font: 700 .62rem var(--sans); opacity: .65; }
.social-row { display: flex; gap: 14px; justify-content: center; margin: 30px auto 0; }
.social-btn {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface);
  border: 2px solid var(--line); color: var(--text); transition: transform .15s, border-color .15s, color .15s;
}
.social-btn svg { width: 22px; height: 22px; }
.social-btn:hover { transform: translateY(-3px); }
.social-ig:hover { border-color: #E1306C; color: #E1306C; }
.social-fb:hover { border-color: #1877F2; color: #1877F2; }
.social-wa:hover { border-color: #25D366; color: #25D366; }

.info-section, .contact-section { max-width: 1180px; margin: 0 auto; padding: 54px 20px; border-top: 2px dashed var(--line-soft); }
.hero + .tape + .info-section { border-top: 0; }
.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }
.info-grid h2 { font-size: 1.9rem; margin-bottom: 16px; }
.info-grid h2 .accent { color: var(--sky-text); }
.info-grid p { color: var(--ash); line-height: 1.65; font-size: .96rem; font-weight: 700; max-width: 62ch; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; font-weight: 800; }
.facts li > span:not(.fico) { display: block; }
.facts li b { color: var(--sky-text); }
.fico { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--sky-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem; border: 2px solid var(--sky-deep); }
.contact-card { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 2px solid var(--sky-soft); }
.contact-card h3 { font-size: 1.25rem; margin-bottom: 16px; }
.contact-row { display: flex; gap: 10px; align-items: center; margin-bottom: 13px; font-size: .94rem; color: var(--ash); font-weight: 700; }
.contact-row a { text-decoration: none; }
.contact-row a:hover { color: var(--sky-text); }

/* Muestra de la lista de precios en el inicio */
.price-card { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 2px var(--line-soft); }
.price-card ul { list-style: none; margin: 0; padding: 4px 18px 6px; }
.price-card li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "sw name price" "sw art price"; column-gap: 12px; align-items: center; padding: 11px 0; border-bottom: 2px dashed rgba(0,0,0,.16); }
.price-card li:last-child { border-bottom: 0; }
.price-card li .sw { grid-area: sw; }
.price-card li a { grid-area: name; font-weight: 800; text-decoration: none; color: var(--ink); }
.price-card li a:hover { text-decoration: underline; }
.hl-art { grid-area: art; font-size: .78rem; color: #5b5b5b; font-weight: 700; }
.hl-price { grid-area: price; font: 400 1.15rem var(--display); color: var(--ink); text-align: right; }
.hl-price i { display: block; font: 700 .72rem var(--sans); font-style: normal; color: #5b5b5b; }
.price-card-foot { display: block; padding: 13px 18px; background: var(--t0); color: var(--ink); font: 400 1rem var(--display); text-decoration: none; text-align: center; border-top: 3px solid var(--ink); }
.price-card-foot:hover { background: var(--t1); color: var(--ink); }
.steps { list-style: none; counter-reset: paso; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: paso; display: flex; gap: 14px; align-items: flex-start; font-weight: 800; font-size: .94rem; }
.steps li::before { content: counter(paso); flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 400 1.05rem var(--display); }
.steps li span { display: block; color: var(--ash); font-weight: 700; font-size: .88rem; }

footer.foot { text-align: center; padding: 28px 20px 32px; font-size: .78rem; color: var(--ash); border-top: 2px dashed var(--line-soft); font-weight: 800; margin-top: 24px; }
.foot-main { margin: 0 0 8px; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin: 0 0 8px; }
.foot-contact a { text-decoration: none; color: var(--text); }
.foot-contact a:hover { color: var(--sky-text); }
.footer-disclaimer { margin: 10px auto 0; font-size: .72rem; opacity: .8; font-weight: 600; max-width: 600px; }

/* ---------- Catálogo ---------- */
.page-head { padding-block: 34px 8px; }
.page-head h1 { margin-bottom: .15em; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 14px 0 16px; }
.f-search { flex: 1 1 260px; }
.f-sort label { display: block; font: 800 .72rem var(--sans); color: var(--ash); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
input, select, textarea { font: inherit; font-weight: 600; color: var(--text); }
.filters input, .filters select, .field input, .field select, .field textarea, .table-edit input, .table-edit select, .tier-row input, .cart-side textarea, .form textarea {
  width: 100%; padding: .62rem .8rem; background: var(--inset); border: 2px solid color-mix(in srgb, var(--text) 20%, transparent); border-radius: 8px;
}
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus, .table-edit input:focus, .table-edit select:focus, .tier-row input:focus, .cart-side textarea:focus, .form textarea:focus {
  outline: 3px solid var(--sky-soft); border-color: transparent;
}
input::placeholder, textarea::placeholder { color: var(--ash); }
select option { background: var(--surface); color: var(--text); }
.f-view { margin-left: auto; display: inline-flex; gap: 8px; }
.f-view a { padding: 9px 20px; border-radius: 30px; border: 3px solid var(--text); font: 400 .9rem var(--display); text-decoration: none; transition: all .15s; }
.f-view a[aria-current="true"] { background: var(--paper); color: var(--ink); }
.f-view a:hover { border-color: var(--sky); }
.filters .btn-sm { padding-block: .62rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chips a { display: inline-flex; gap: 8px; align-items: baseline; padding: 9px 20px; border-radius: 30px; border: 3px solid var(--text); background: transparent; color: var(--text); font: 400 .9rem var(--display); text-decoration: none; transition: all .15s; }
.chips a b { font: 400 .8rem var(--display); color: var(--sky-text); }
.chips a:hover { border-color: var(--sky); }
.chips a[aria-current="true"] { background: var(--paper); color: var(--ink); }
.chips a[aria-current="true"] b { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; margin-bottom: 44px; }
.card { background: var(--paper); color: var(--ink); border-radius: var(--radius); position: relative; overflow: hidden; display: flex; flex-direction: column; border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--line-soft); transition: transform .15s; }
.card:hover { transform: translateY(-4px) rotate(-.4deg); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-link:focus-visible { outline-offset: -4px; }
.card-season-tag { font: 400 .72rem var(--display); letter-spacing: .02em; text-transform: uppercase; padding: 8px 14px; color: var(--ink); }
.card-media { position: relative; aspect-ratio: 7 / 6; background: #eee; }
.card-media .sw { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.card-art { position: absolute; left: 10px; bottom: 10px; background: var(--paper); color: var(--ink); padding: 3px 10px; border-radius: 4px; font: 600 .72rem var(--mono); box-shadow: 0 1px 3px rgba(0,0,0,.3); border: 2px solid var(--ink); }
.card-unavailable .card-media .sw { filter: grayscale(.6) brightness(.65); }
.card-unavailable-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(0,0,0,.35); color: #fff; font: 400 1.25rem var(--display); text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.card-promo-badge { position: absolute; top: 10px; left: 10px; background: var(--t0); color: var(--ink); font: 400 .7rem var(--display); text-transform: uppercase; padding: 6px 12px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.card-name { font: 800 1rem var(--sans); color: var(--ink); padding: 12px 14px 0; line-height: 1.3; margin: 0; min-height: 2.2rem; letter-spacing: 0; }
.card-tag { margin: 10px 14px 0; padding-top: 10px; border-top: 2px dashed rgba(0,0,0,.18); }
.card-buy { padding: 10px 14px 14px; }
.card .price b { color: var(--ink); font-size: 1.25rem; }
.card .price i, .card .price-sub { color: #5b5b5b; }
.card .price-lock { color: #8a3a00; }
.card .out-note { color: #5b5b5b; }
.card .qty-box { border-color: var(--ink); background: #fff; }
.card .qty { color: var(--ink); }
.card .qty-unit { background: #f0eee9; color: #444; border-left: 2px solid var(--ink); }
.card .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card .btn:hover { background: var(--sky); color: var(--ink); }
.card .badge { color: #7a2a00; }

/* Lista de precios (vista "Lista") */
.pl { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 40px; }
.pl-head, .pl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 96px 170px 230px; gap: 0 16px; align-items: center; padding: 11px 18px; }
.pl-head { background: var(--surface-2); font: 800 .72rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ash); padding-block: 10px; }
.pl-group { margin: 0; padding: 10px 18px; font: 400 1rem var(--display); background: var(--surface-2); border-top: 2px dashed var(--line); border-left: 6px solid var(--sky); }
.pl-head + .pl-group { border-top: 0; }
.pl-row { border-top: 1px solid var(--line-soft); }
.pl-group + .pl-row { border-top: 0; }
.pl-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.pl-name a { font-weight: 800; text-decoration: none; }
.pl-name a:hover { color: var(--sky-text); }
.pl-art { display: block; font: 600 .74rem var(--mono); color: var(--ash); }
.pl-unit { color: var(--ash); font-size: .9rem; font-weight: 700; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font: 400 1.2rem var(--display); color: var(--sky-text); }
.price i { font-style: normal; font-size: .8rem; color: var(--ash); font-weight: 700; }
.price-sub { display: block; font-size: .76rem; color: var(--ash); font-weight: 700; }
.price-lock { font-size: .88rem; font-weight: 800; color: var(--sky-text); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 800 .68rem var(--sans); vertical-align: 1px; font-family: var(--sans); }
.badge-out { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); border: 1px solid var(--err); }
.badge-ask { background: color-mix(in srgb, var(--sky) 18%, transparent); color: var(--sky-text); border: 1px solid var(--sky); }
.out-note { color: var(--ash); font-size: .9rem; font-weight: 700; }
.qty-form { display: flex; gap: 8px; align-items: center; }
.qty-box { display: inline-flex; align-items: stretch; border: 2px solid color-mix(in srgb, var(--text) 25%, transparent); border-radius: 10px; background: var(--inset); overflow: hidden; }
.qty-box:focus-within { outline: 3px solid var(--sky-soft); border-color: transparent; }
.qty { width: 84px; border: 0; padding: .45rem .55rem; background: transparent; text-align: right; font: 700 1rem var(--sans); color: var(--text); }
.qty:focus { outline: none; }
.qty-unit { display: grid; place-items: center; min-width: 36px; padding: 0 8px; background: var(--surface-2); color: var(--ash); font: 600 .78rem var(--mono); border-left: 2px solid color-mix(in srgb, var(--text) 18%, transparent); }
.empty { border: 3px dashed var(--line); border-radius: var(--radius); padding: 44px 24px; text-align: center; margin-block: 24px; color: var(--ash); }
.empty h2, .empty h3 { color: var(--text); font-size: 1.3rem; margin-bottom: .3em; }
.empty p { margin: 0; }
.empty a { color: var(--sky-text); }

/* ---------- Ficha de producto ---------- */
.crumbs { padding-block: 22px 0; font-size: .9rem; color: var(--ash); display: flex; gap: 8px; font-weight: 700; }
.crumbs a:hover { color: var(--sky-text); }
.prod { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; padding-block: 18px 40px; align-items: start; }
.prod-media { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--line-soft); }
.prod-media .card-art { font-size: .85rem; left: 14px; bottom: 14px; padding: 4px 12px; }
.prod-info h1 { margin-bottom: .15em; }
.prod-price { margin: 14px 0 18px; }
.prod-price .price b { font-size: 2.2rem; }
.prod-price .price i { font-size: 1rem; }
.prod-price .price-sub { font-size: .9rem; }
.tiers { border-collapse: collapse; margin: 0 0 20px; width: 100%; max-width: 400px; background: var(--surface); border: 2px solid var(--line); }
.tiers caption { text-align: left; font: 400 1.05rem var(--display); color: var(--sky-text); padding-bottom: 8px; }
.tiers th, .tiers td { padding: 9px 12px; text-align: left; border-top: 1px solid var(--line-soft); font-size: .92rem; font-weight: 700; }
.tiers thead th { background: var(--surface-2); color: var(--ash); font: 800 .72rem var(--sans); letter-spacing: .05em; text-transform: uppercase; border-top: 0; }
.prod-buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 20px; }
.prod-buy .qty { width: 110px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 22px 0; padding-top: 18px; border-top: 2px dashed var(--line); }
.specs dt { color: var(--ash); font-weight: 700; }
.specs dd { margin: 0; font-weight: 800; }
.prod-desc { max-width: 60ch; color: var(--ash); }
.related { padding-bottom: 20px; }

/* ---------- Pedido / carrito ---------- */
.cl { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.cl-head, .cl-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 160px 110px 70px; gap: 0 16px; align-items: center; padding: 12px 18px; }
.cl-head { background: var(--surface-2); font: 800 .72rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ash); padding-block: 10px; }
.cl-row { border-top: 1px solid var(--line-soft); }
.cl-name { display: flex; gap: 12px; align-items: center; }
.cl-name a { font-weight: 800; text-decoration: none; }
.cl-name a:hover { color: var(--sky-text); }
.cl-price i { font-style: normal; color: var(--ash); font-size: .8rem; }
.cl-total { text-align: right; font: 400 1.1rem var(--display); }
.cl-rm { text-align: right; }
.cl-sum { display: flex; justify-content: flex-end; gap: 28px; align-items: baseline; padding: 16px 18px; border-top: 2px dashed var(--line); font-weight: 800; }
.cl-sum b { font: 400 1.9rem var(--display); color: var(--sky-text); }
.cart-side { max-width: 640px; margin-top: 24px; }
.cart-side label { font: 800 .72rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ash); display: block; margin-bottom: 6px; }
.cart-side .danger { margin-top: 6px; }

/* ---------- Formularios ---------- */
.form { max-width: 520px; }
.form-wide { max-width: 900px; }
.field { margin-bottom: 16px; }
.field label { display: block; font: 800 .74rem var(--sans); color: var(--ash); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .04em; }
.opt { font-weight: 700; color: var(--ash); font-size: .95em; text-transform: none; letter-spacing: 0; }
.field textarea, .form textarea { resize: vertical; min-height: 70px; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 800; margin: 8px 0; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--sky); }
fieldset { border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 20px 6px; margin: 0 0 20px; min-width: 0; }
legend { font: 400 1.1rem var(--display); color: var(--sky-text); padding: 0 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
input[type="color"] { width: 64px; height: 42px; padding: 3px; border: 2px solid var(--line); border-radius: 8px; background: var(--inset); cursor: pointer; }
input[type="file"] { padding: .5rem; }
.tier-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; max-width: 520px; }
.tiers-edit { margin-bottom: 14px; }
.img-current { margin-top: 10px; display: flex; gap: 14px; align-items: center; }
.img-current img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); }
.account-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; padding-bottom: 56px; }
.danger-zone { margin-top: 36px; padding: 16px 18px; border: 2px dashed var(--err); border-radius: var(--radius); max-width: 900px; }
.danger-zone p { margin: 0 0 10px; color: var(--ash); }

/* ---------- Tablas ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 2px solid var(--line); }
.table th { text-align: left; font: 800 .72rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ash); padding: 11px 14px; background: var(--surface-2); border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td, .table tfoot th { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; font-weight: 700; }
.table td a { font-weight: 800; }
.table td a:hover { color: var(--sky-text); }
.table th.num, .table td.num { text-align: right; }
.table tfoot th { background: var(--surface); color: var(--text); font: 400 1.05rem var(--display); text-transform: none; letter-spacing: 0; text-align: right; border-top: 2px dashed var(--line); }
.table tfoot td strong { font: 400 1.4rem var(--display); color: var(--sky-text); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); margin-bottom: 20px; }
.table-wrap .table { border: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { margin-left: 4px; }
.is-off { opacity: .55; }
.table-edit td { padding: 8px 12px; }
.in-num { max-width: 120px; text-align: right; }
.row-new td { background: var(--surface-2); }
.status { display: inline-block; padding: 3px 11px; border-radius: 999px; font: 800 .74rem var(--sans); white-space: nowrap; background: var(--surface-2); color: var(--text); border: 2px solid var(--line); }
.s-nuevo, .u-pending { border-color: var(--sky); color: var(--sky-text); background: color-mix(in srgb, var(--sky) 12%, transparent); }
.s-confirmado { border-color: var(--sky-soft); color: var(--sky-soft); background: color-mix(in srgb, var(--sky-soft) 12%, transparent); }
.s-preparando { border-color: var(--t5); color: var(--t5); background: color-mix(in srgb, var(--t5) 14%, transparent); }
.s-listo { border-color: var(--t4); color: var(--t4); background: color-mix(in srgb, var(--t4) 14%, transparent); }
.s-entregado, .u-active { border-color: var(--t4); color: var(--t4); background: color-mix(in srgb, var(--t4) 14%, transparent); }
.s-cancelado, .u-disabled { border-color: var(--line); color: var(--ash); }
[data-theme="light"] .s-preparando { color: #5b3fc4; border-color: #8c74e6; }
[data-theme="light"] .s-listo, [data-theme="light"] .s-entregado, [data-theme="light"] .u-active { color: #1f7a4d; border-color: #3da872; }

/* ---------- Panel de administración ---------- */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; border-right: 3px solid var(--sky); }
.side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 8px 20px; }
.side-brand .brand-name { font-size: 1.15rem; }
.side-brand small { display: block; font: 700 .72rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--ash); margin-top: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; padding: 10px 12px; border-radius: 8px; font: 400 1.02rem var(--display); border-left: 4px solid transparent; }
.side-nav a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.side-nav a[aria-current="page"] { background: color-mix(in srgb, var(--sky) 12%, transparent); border-left-color: var(--sky); color: var(--sky-text); }
.side-n { background: var(--sky-deep); color: var(--ink); border-radius: 10px; padding: 1px 8px; font: 400 .78rem var(--display); }
.side-out { margin-top: 14px; font: 800 .88rem var(--sans) !important; color: var(--ash); }
.side-tools { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; margin-top: auto; border-top: 2px dashed var(--line); }
.side-user { display: flex; justify-content: space-between; flex: 1; gap: 8px; font-size: .88rem; font-weight: 800; align-items: center; }
.side-user form { margin: 0; }
.nav-toggle { display: none; background: none; border: 2px solid var(--text); color: var(--text); border-radius: 10px; padding: 7px 14px; font: 400 .95rem var(--display); cursor: pointer; }
.side-toggle { margin: 0 4px 8px; }
.main { padding: 28px 32px 56px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.main-head h1 { margin: 0; font-size: 2rem; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--sky); transform: translateY(-2px); }
.stat b { display: block; font: 400 2.5rem/1 var(--display); color: var(--sky-text); }
.stat span { color: var(--ash); font-size: .9rem; font-weight: 800; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-tight { gap: 24px; align-items: end; }
.two-order { grid-template-columns: 3fr 2fr; }
.admin-filters { margin-top: 0; }
.adjust { justify-content: flex-start; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding-block: 12px; border-top: 2px dashed var(--line); margin-top: 0; }
.main .empty { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .info-grid { grid-template-columns: 1fr; gap: 28px; }
  .prod { grid-template-columns: 1fr; gap: 24px; }
  .prod-media { max-width: 420px; }
  .account-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two, .two-order { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 14px; border-right: 0; border-bottom: 3px solid var(--sky); }
  .side-nav { display: none; }
  .side-nav.open { display: flex; }
  .nav-toggle { display: inline-block; align-self: flex-start; }
  .main { padding: 20px 16px 48px; }
}
@media (max-width: 760px) {
  .hero { padding-top: 48px; }
  .pl-head, .cl-head { display: none; }
  .pl-row { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "sw name" "sw price" "add add"; gap: 4px 12px; padding: 14px 16px; }
  .pl-row .pl-sw { grid-area: sw; align-self: start; }
  .pl-row .pl-name { grid-area: name; }
  .pl-row .pl-unit { display: none; }
  .pl-row .pl-price { grid-area: price; }
  .pl-row .pl-add { grid-area: add; margin-top: 8px; }
  .qty-form { flex-wrap: wrap; }
  .cl-row { grid-template-columns: 1fr auto; grid-template-areas: "name name" "qty total" "price rm"; gap: 8px 12px; padding: 14px 16px; }
  .cl-row .cl-name { grid-area: name; }
  .cl-row .cl-qty { grid-area: qty; }
  .cl-row .cl-price { grid-area: price; font-size: .88rem; }
  .cl-row .cl-total { grid-area: total; }
  .cl-row .cl-rm { grid-area: rm; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .f-view { margin-left: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-name { font-size: .92rem; padding-inline: 10px; }
  .card-tag, .card-buy { margin-inline: 10px; padding-inline: 0; }
  .card-buy { padding-bottom: 12px; }
  .card .qty-form { flex-wrap: wrap; }
  .card .qty { width: 64px; }
  .cl-sum { justify-content: space-between; }
  .topbar { padding: 10px 14px; }
  .brand-name { font-size: 1.05rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-logo { height: 34px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card:hover, .chip:hover, .icon-btn:hover { transform: none; }
}
@media print {
  .topbar, .announce, .notice-bar, footer.foot, .side, .no-print, .head-actions, .nav-toggle, .skip, .overlay, .side-menu { display: none !important; }
  body, body.admin { background: #fff; color: #000; }
  .shell { display: block; }
  .main { padding: 0; }
  .table { border-color: #999; background: #fff; color: #000; }
  .table th, .table td { color: #000; background: #fff; }
}

/* ---------- Registro con ARCA / datos fiscales ---------- */
.arca-status { min-height: 1.4em; margin: 6px 0 0; font-size: .9rem; font-weight: 700; color: var(--ash); }
.arca-status.ok { color: var(--sky-text); }
.arca-status.err { color: var(--err); }
.arca-status.busy::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border: 2px solid var(--sky); border-right-color: transparent; border-radius: 50%; animation: arcaspin .7s linear infinite; }
@keyframes arcaspin { to { transform: rotate(360deg); } }
input.locked, input[readonly].locked { background: var(--surface-2); color: var(--text); border-style: dashed; cursor: not-allowed; }
.form-sep { border: 0; border-top: 2px dashed var(--line); margin: 18px 0; }
.fiscal { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 10px; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; }
.fiscal dt { color: var(--ash); font-weight: 700; font-size: .88rem; }
.fiscal dd { margin: 0; font-weight: 700; word-break: break-word; }

/* Venta por rollo: calculadora y detalle en el pedido */
.calc { margin: 0 0 18px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 460px; }
.calc-title { margin: 0 0 4px; font: 400 1.1rem var(--display); color: var(--sky-text); }
.calc-help { margin: 0 0 10px; font-size: .9rem; color: var(--ash); }
.calc-row { display: flex; align-items: center; gap: 10px; }
.calc-row label { font-weight: 800; }
.calc-out { margin: 10px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.calc-out:empty { display: none; }
.calc-out strong { font-size: 1.02rem; }
.calc-out span { color: var(--ash); font-weight: 600; }
.calc [data-calc-use] { margin-top: 10px; }
.qty-sub { display: block; margin-top: 4px; font-size: .78rem; color: var(--ash); font-weight: 700; }
