/* ==========================================================================
   ALDABA · Estilos de la tienda y del panel de inventario
   Paleta industrial: grafito + amarillo de seguridad + rojo de oferta.
   Para cambiar la marca de un cliente basta con editar los tokens de :root.
   ========================================================================== */

:root {
  color-scheme: light;
  --ink: #16191d;
  --ink-2: #252a31;
  --ink-3: #343b44;
  --muted: #5b6570;
  --soft: #8a939c;
  --line: #dde1e3;
  --line-2: #eceeee;
  --bg: #f2f3f0;
  --surface: #ffffff;
  --yellow: #ffc21a;
  --yellow-deep: #e8a900;
  --yellow-soft: #fff4d1;
  --red: #d8391d;
  --red-soft: #fde6e0;
  --green: #1d7d48;
  --green-soft: #e0f2e7;
  --amber: #a86400;
  --amber-soft: #fff0d6;
  --blue: #1d5ea8;
  --wa: #1fa855;

  --f-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --f-body: 'Barlow', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 25, 29, .06), 0 8px 24px rgba(22, 25, 29, .08);
  --shadow-lg: 0 24px 60px rgba(22, 25, 29, .22);
  --max: 1280px;
  --gutter: 16px;
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--ink) 12px 24px);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Iconos (sprite de Lucide incrustado en index.html) */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 28px; height: 28px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .1s, border-color .15s;
}
.btn:hover { background: var(--yellow-deep); }
.btn:active { transform: translateY(1px); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--ink-3); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: #178a45; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: inherit; position: relative;
}
.icon-btn:hover { background: var(--line-2); }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--ink); color: #d9dde1; font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.topbar b { color: var(--yellow); font-weight: 600; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a, .topbar nav button { color: #d9dde1; text-decoration: none; background: none; border: 0; padding: 0; font-size: 13px; }
.topbar nav a:hover, .topbar nav button:hover { color: #fff; }
.topbar .promo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .topbar nav { display: none; } }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.header .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; }
.logo-mark { width: 40px; height: 40px; border-radius: 8px; background: var(--yellow); display: grid; place-items: center; }
.logo-mark svg { width: 26px; height: 26px; }
.logo-text { display: grid; line-height: 1; text-align: left; }
.logo-text strong { font-family: var(--f-display); font-weight: 800; font-size: 28px; letter-spacing: .04em; }
.logo-text small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 2px; }

.search { position: relative; }
.search form { display: flex; border: 2px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; height: 44px; font-size: 15px; background: transparent; }
.search input:focus { outline: none; }
.search form:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.search button { border: 0; background: var(--yellow); width: 52px; display: grid; place-items: center; }
.search button:hover { background: var(--yellow-deep); }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden;
}
.suggest h6 { margin: 0; padding: 10px 14px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.suggest button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px; border: 0; background: none; text-align: left; }
.suggest button:hover, .suggest button.on { background: var(--yellow-soft); }
.suggest .s-ico { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.suggest .s-name { flex: 1; font-size: 14px; }
.suggest .s-price { font-family: var(--f-display); font-weight: 700; font-size: 17px; }
.suggest .s-empty { padding: 14px; color: var(--muted); font-size: 14px; }

.h-actions { display: flex; align-items: center; gap: 6px; }
.loc-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: var(--r-sm);
}
.loc-btn:hover { background: var(--line-2); }
.loc-btn span { display: grid; line-height: 1.2; }
.loc-btn small { font-size: 12px; color: var(--muted); }
.loc-btn b { font-size: 14px; font-weight: 600; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-count {
  position: absolute; top: 0; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--yellow); color: var(--ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.cart-btn { background: var(--ink); color: #fff; }
.cart-btn:hover { background: var(--ink-3); }

@media (max-width: 960px) {
  .header .wrap { grid-template-columns: auto 1fr; gap: 10px 12px; }
  .search { grid-column: 1 / -1; order: 3; }
  .h-actions { justify-content: flex-end; }
  .loc-btn span { display: none; }
}
@media (max-width: 420px) {
  .logo-text small { display: none; }
  .logo-text strong { font-size: 24px; }
}

/* Barra de categorías */
.catbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; min-height: 46px; }
.catbar .wrap::-webkit-scrollbar { display: none; }
.catbar button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 8px 12px;
  font-size: 14px; font-weight: 600; border-radius: 999px; color: var(--ink-3);
}
.catbar button:hover { background: var(--line-2); color: var(--ink); }
.catbar button.on { background: var(--ink); color: #fff; }
.catbar .hot { color: var(--red); }
.catbar .sep { width: 1px; height: 22px; background: var(--line); flex: none; margin-inline: 6px; }

/* ---------- Secciones ---------- */
main { min-height: 60vh; }
.section { padding-block: 40px 8px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 36px); text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.sec-head p { color: var(--muted); margin-top: 6px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Hero */
.hero { padding-block: 20px 0; }
.hero-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 16px; }
.slides { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); color: #fff; min-height: 360px; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; padding: 36px 40px; gap: 16px; opacity: 0; visibility: hidden; transition: opacity .5s; }
.slide.on { opacity: 1; visibility: visible; position: relative; }
.slide .tag { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; }
.slide .ttl { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(38px, 5.4vw, 64px); line-height: .92; margin: 16px 0 12px; letter-spacing: .005em; }
.slide .ttl em { font-style: normal; color: var(--yellow); }
.slide p { color: #c9ced3; max-width: 40ch; font-size: 16px; }
.slide .cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.slide .btn.ghost { color: #fff; border-color: #4a525c; }
.slide .btn.ghost:hover { background: var(--ink-3); border-color: #fff; }
.slide-art { position: relative; aspect-ratio: 1; max-width: 300px; justify-self: center; width: 100%; }
.slide-art .disc { position: absolute; inset: 6%; border-radius: 50%; background: var(--ink-3); }
.slide-art .disc::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; border: 2px dashed #56606b; }
.slide-art svg.ic { position: absolute; inset: 22%; width: 56%; height: 56%; color: var(--yellow); stroke-width: 1.25; }
.slide-art .price-chip {
  position: absolute; right: 0; bottom: 8%; background: var(--red); color: #fff; font-family: var(--f-display);
  font-weight: 800; font-size: 26px; line-height: 1; padding: 10px 14px; border-radius: 8px; transform: rotate(-4deg);
}
.slide-art .price-chip small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.hazard-corner { position: absolute; top: 0; right: 0; width: 140px; height: 14px; background: var(--hazard); }
.dots { position: absolute; left: 40px; bottom: 18px; display: flex; gap: 8px; z-index: 2; }
.dots button { width: 26px; height: 5px; border-radius: 3px; border: 0; background: #4a525c; padding: 0; }
.dots button.on { background: var(--yellow); }
.hero-side { display: grid; gap: 16px; }
.promo-card { border-radius: var(--r-lg); padding: 22px 24px; display: grid; gap: 6px; align-content: center; position: relative; overflow: hidden; border: 0; text-align: left; }
.promo-card h3 { font-family: var(--f-display); font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1; }
.promo-card p { font-size: 14.5px; max-width: 30ch; }
.promo-card .more { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 14px; }
.promo-card > .ic.bg { position: absolute; right: -14px; bottom: -14px; width: 120px; height: 120px; opacity: .16; stroke-width: 1.5; }
.promo-card.y { background: var(--yellow); color: var(--ink); }
.promo-card.y .eyebrow { color: var(--ink-3); }
.promo-card.w { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .slide { grid-template-columns: 1fr; padding: 28px 22px 48px; }
  .slide-art { display: none; }
  .dots { left: 22px; }
  .hero-side { grid-template-columns: 1fr; }
  .slides { min-height: 0; }
}

/* Franja de servicios */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 16px; }
.perk { background: var(--surface); display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.perk .ic { color: var(--ink); width: 26px; height: 26px; stroke-width: 1.6; }
.perk b { display: block; font-size: 14.5px; }
.perk small { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .perks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .perks { grid-template-columns: 1fr; } }

/* Categorías */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cat-tile {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; text-align: left;
  display: grid; gap: 12px; transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.cat-tile .ci { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; }
.cat-tile .ci .ic { width: 30px; height: 30px; stroke-width: 1.6; }
.cat-tile b { font-size: 15px; line-height: 1.25; }
.cat-tile small { color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Ofertas relámpago */
.flash { background: var(--ink); color: #fff; border-radius: var(--r-lg); overflow: hidden; }
.flash-top { height: 12px; background: var(--hazard); }
.flash-in { padding: 22px 24px 26px; }
.flash .sec-head h2 { color: var(--yellow); display: flex; align-items: center; gap: 10px; }
.flash .sec-head p { color: #b8bec5; }
.countdown { display: flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 700; }
.countdown span.u { background: var(--surface); color: var(--ink); min-width: 46px; text-align: center; font-size: 26px; padding: 4px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.countdown small { color: #b8bec5; font-family: var(--f-body); font-size: 13px; margin-right: 6px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: #4a525c; border-radius: 4px; }

/* ---------- Tarjeta de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.card {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s, border-color .15s; position: relative;
}
.card:hover { box-shadow: var(--shadow); border-color: #c9ced2; }
.card .visual { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 0; padding: 0; width: 100%; }
.card .visual > .ic { width: 42%; height: 42%; stroke-width: 1.15; color: var(--ink); }
.card .visual img { width: 100%; height: 100%; object-fit: cover; }
.card .brandmark { position: absolute; left: 10px; bottom: 8px; font-family: var(--f-mono); font-size: 10.5px; color: rgba(22, 25, 29, .55); letter-spacing: .04em; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; line-height: 1.3; letter-spacing: .02em; }
.badge.off { background: var(--red); color: #fff; }
.badge.new { background: var(--ink); color: #fff; }
.badge.flash-b { background: var(--yellow); color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.fav { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .9); }
.fav.on { color: var(--red); }
.fav.on .ic { fill: var(--red); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .brand { font-family: var(--f-mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.card .name {
  font-size: 14.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em; background: none; border: 0; padding: 0; text-align: left; color: var(--ink);
}
.card .name:hover { text-decoration: underline; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.stars .row { display: inline-flex; gap: 1px; color: var(--yellow-deep); }
.stars .row .ic { width: 13px; height: 13px; fill: currentColor; stroke-width: 1.5; }
.stars .row .ic.hollow { fill: none; color: #c3c8cc; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now { font-family: var(--f-display); font-weight: 700; font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.price .now.sale { color: var(--red); }
.price .was { color: var(--soft); text-decoration: line-through; font-size: 13.5px; }
.price .unit { font-size: 12.5px; color: var(--muted); }
.tier { font-size: 12.5px; color: var(--blue); font-weight: 600; min-height: 1.3em; }
.stock { font-size: 12.5px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; min-height: 2.7em; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 4px; background: currentColor; }
.stock.ok { color: var(--green); }
.stock.low { color: var(--amber); }
.stock.far { color: var(--muted); }
.stock.out { color: var(--red); }
.card .actions { margin-top: auto; padding-top: 6px; }
.flash .card { border-color: transparent; }

/* ---------- Catálogo con filtros ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); padding-block: 18px 6px; }
.crumbs button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.crumbs button:hover { color: var(--ink); }
.cat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; padding-bottom: 40px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 130px); max-height: calc(100vh - 150px); overflow: auto; }
.filters .f-head { display: none; }
.fgroup { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.fgroup label { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.fgroup label small { margin-left: auto; color: var(--soft); font-variant-numeric: tabular-nums; }
.fgroup input[type=checkbox], .fgroup input[type=radio] { width: 17px; height: 17px; accent-color: var(--ink); margin: 0; }
.price-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.price-inputs input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 8px; font-size: 14px; }
.cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-top h1 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 40px); line-height: 1; }
.cat-top .count { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select, .field select, .field input, .field textarea {
  height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface); font-size: 14.5px; min-width: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 5px 10px 5px 12px; font-size: 13px; }
.chip .ic { width: 14px; height: 14px; }
.filter-toggle { display: none; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 40px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty .ic { width: 40px; height: 40px; color: var(--soft); }
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(340px, 88vw); max-height: none; border-radius: 0; z-index: 90; transform: translateX(-102%); transition: transform .25s; top: 0; padding-top: env(safe-area-inset-top, 0px); }
  .filters.open { transform: none; box-shadow: var(--shadow-lg); }
  .filters .f-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
}

/* ---------- Ficha de producto ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; padding-bottom: 20px; align-items: start; }
.pdp-visual { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 130px); border-radius: var(--r-lg); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pdp-visual > .ic { width: 46%; height: 46%; stroke-width: 1; }
.pdp-visual .badges { top: 16px; left: 16px; }
.pdp-visual .brandmark { position: absolute; left: 16px; bottom: 14px; font-family: var(--f-mono); font-size: 12px; color: rgba(22, 25, 29, .55); }
.pdp-info { display: grid; gap: 16px; }
.pdp-info .brand { font-family: var(--f-mono); font-size: 12.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.pdp-info h1 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 700; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13.5px; color: var(--muted); }
.sku { font-family: var(--f-mono); font-size: 12.5px; background: var(--line-2); padding: 2px 7px; border-radius: 4px; color: var(--ink-3); }
.pdp .price .now { font-size: 42px; }
.save { background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 4px; }
.cuotas { font-size: 14px; color: var(--muted); }
.cuotas b { color: var(--ink); }
.tiers { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tiers h4 { font-size: 13px; padding: 8px 12px; background: var(--line-2); display: flex; align-items: center; gap: 6px; }
.tiers table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tiers td { padding: 8px 12px; border-top: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.tiers td:last-child { text-align: right; font-weight: 700; }
.tiers tr.on td { background: var(--yellow-soft); }

.fulfil { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-opt { border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); text-align: left; display: grid; gap: 4px; }
.f-opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.f-opt .t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.f-opt .d { font-size: 13px; color: var(--muted); line-height: 1.35; }
.f-opt .s { font-size: 13px; font-weight: 600; }
.f-opt .s.ok { color: var(--green); }
.f-opt .s.low { color: var(--amber); }
.f-opt .s.out { color: var(--red); }
.f-opt .change { font-size: 12.5px; }
@media (max-width: 480px) { .fulfil { grid-template-columns: 1fr; } }

.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); height: 42px; background: var(--surface); }
.qty button { width: 38px; height: 100%; border: 0; background: none; display: grid; place-items: center; }
.qty button:hover { background: var(--line-2); }
.qty input { width: 52px; height: 100%; border: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1; min-width: 150px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trust div { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; }
.trust .ic { width: 18px; height: 18px; color: var(--ink); }
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; } }

.pdp-sections { display: grid; gap: 16px; padding-bottom: 20px; }
.panel-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-box > h3 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 24px; margin-bottom: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .pdp, .two-col { grid-template-columns: 1fr; } .pdp-visual { position: relative; top: 0; max-width: 520px; } }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.mine td { background: var(--yellow-soft); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.low { background: var(--amber-soft); color: var(--amber); }
.pill.out { background: var(--red-soft); color: var(--red); }
.pill.info { background: #e3edf8; color: var(--blue); }
.pill.neutral { background: var(--line-2); color: var(--ink-3); }
.aisle { font-family: var(--f-mono); font-size: 12.5px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th { text-align: left; width: 40%; color: var(--muted); font-weight: 500; padding: 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.specs td { padding: 9px 0; border-bottom: 1px solid var(--line-2); font-weight: 600; }

.bundle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b-item { display: grid; grid-template-columns: auto 64px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; flex: 1 1 220px; }
.b-item .v { width: 64px; height: 64px; border-radius: 8px; display: grid; place-items: center; }
.b-item .v .ic { width: 32px; height: 32px; stroke-width: 1.4; }
.b-item b { font-size: 13.5px; font-weight: 600; line-height: 1.25; display: block; }
.b-item span { font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.b-item input { width: 18px; height: 18px; accent-color: var(--ink); }
.b-plus { color: var(--soft); }
.b-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.b-total strong { font-family: var(--f-display); font-size: 28px; }

.review-sum { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 16px; }
.review-sum .big { font-family: var(--f-display); font-weight: 800; font-size: 56px; line-height: 1; }
.bars { display: grid; gap: 4px; font-size: 12.5px; }
.bars div { display: grid; grid-template-columns: 30px 1fr 40px; gap: 8px; align-items: center; }
.bars i { display: block; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bars i b { display: block; height: 100%; background: var(--yellow-deep); }
.bars span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.review { border-top: 1px solid var(--line-2); padding-block: 14px; display: grid; gap: 6px; }
.review .who { font-size: 13px; color: var(--muted); }
.review .who b { color: var(--ink); }
.verified { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }

/* ---------- Zona Pro y calculadoras ---------- */
.pro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pro { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 28px; display: grid; gap: 16px; align-content: start; position: relative; overflow: hidden; }
.pro .hz { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--hazard); }
.pro h2 { font-family: var(--f-display); font-weight: 800; font-size: 38px; text-transform: uppercase; line-height: .95; }
.pro h2 em { color: var(--yellow); font-style: normal; }
.pro p { color: #c9ced3; }
.pro ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pro li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.pro li .ic { color: var(--yellow); margin-top: 1px; }
.pro textarea { width: 100%; min-height: 96px; border-radius: var(--r-sm); border: 1px solid #4a525c; background: var(--ink-2); color: #fff; padding: 10px 12px; resize: vertical; font-size: 14px; }
.pro textarea::placeholder { color: #8d959d; }
.pro label { font-size: 13px; color: #c9ced3; font-weight: 600; }
.pro input { width: 100%; height: 42px; border-radius: var(--r-sm); border: 1px solid #4a525c; background: var(--ink-2); color: #fff; padding: 0 12px; font-size: 14px; }
.pro input::placeholder { color: #8d959d; }
.pro .btn { justify-self: start; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 14px; align-content: start; }
.calc h3 { font-family: var(--f-display); font-weight: 800; font-size: 28px; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 8px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.calc-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.field input, .field select { width: 100%; height: 42px; }
.field textarea { width: 100%; min-height: 80px; padding: 8px 10px; height: auto; }
.field .hint { font-size: 12px; color: var(--muted); }
.field.err input, .field.err select { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.field .msg { font-size: 12.5px; color: var(--red); display: none; }
.field.err .msg { display: block; }
.calc-out { background: var(--yellow-soft); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; }
.calc-out .res { display: flex; gap: 22px; flex-wrap: wrap; }
.calc-out .res div { display: grid; }
.calc-out .res strong { font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-out .res small { font-size: 12.5px; color: var(--muted); }
.calc-out p { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .pro-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .calc-fields { grid-template-columns: 1fr; } }

/* Servicios */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.svc .ic { width: 30px; height: 30px; stroke-width: 1.6; }
.svc b { font-size: 16px; }
.svc p { font-size: 14px; color: var(--muted); }
.svc .link { font-size: 14px; justify-self: start; margin-top: 4px; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .svc-grid { grid-template-columns: 1fr; } }

/* Tiendas */
.stores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.store { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.store.mine { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.store h3 { font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store p { font-size: 13.5px; color: var(--muted); }
.store p .ic { vertical-align: -3px; margin-right: 2px; }
.store .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 1000px) { .stores { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .stores { grid-template-columns: 1fr; } }

/* Tarjeta de contacto (cuando hay una sola sede) */
.bizcard { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.bizcard-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; flex-wrap: wrap; }
.bizcard-logo { width: min(360px, 100%); height: auto; }
.bizcard-actions { display: grid; gap: 10px; justify-items: end; }
.bizcard-actions .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bizcard-bottom { list-style: none; margin: 0; padding: 20px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: var(--ink); color: #fff; }
.bizcard-bottom li { display: flex; gap: 12px; align-items: flex-start; }
.bizcard-bottom .bi { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; flex: none; }
.bizcard-bottom small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #b8bec5; font-weight: 600; }
.bizcard-bottom a, .bizcard-bottom b { color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.bizcard-bottom a:hover { color: var(--yellow); }
.bizcard-bottom i { font-style: normal; color: #8d959d; margin-inline: 6px; }
@media (max-width: 1000px) { .bizcard-bottom { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bizcard-bottom { grid-template-columns: 1fr; } .bizcard-actions { justify-items: start; } .bizcard-actions .row { justify-content: flex-start; } }
.topbar .ic { vertical-align: -3px; }
.topbar .dot { margin-inline: 6px; opacity: .6; }
.promo-card.k { background: var(--ink); color: #fff; }
.promo-card.k .eyebrow { color: var(--yellow); }

/* Marcas */
.brands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.brands button { background: var(--surface); border: 0; height: 72px; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.brands button:hover { background: var(--yellow-soft); color: var(--ink); }
@media (max-width: 760px) { .brands { grid-template-columns: repeat(3, 1fr); } }

/* Club */
.club { margin-top: 40px; background: var(--yellow); }
.club .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding-block: 28px; }
.club h2 { font-family: var(--f-display); font-weight: 800; font-size: 34px; text-transform: uppercase; line-height: 1; }
.club p { margin-top: 6px; }
.club form { display: flex; gap: 8px; flex-wrap: wrap; }
.club input { flex: 1 1 220px; height: 46px; border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 0 14px; background: var(--surface); min-width: 0; }
.club small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
@media (max-width: 760px) { .club .wrap { grid-template-columns: 1fr; } }

/* Pie de página */
.footer { background: var(--ink); color: #b8bec5; font-size: 14px; padding-block: 40px 24px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer a, .footer button { color: #b8bec5; text-decoration: none; background: none; border: 0; padding: 0; font-size: 14px; text-align: left; }
.footer a:hover, .footer button:hover { color: var(--yellow); }
.footer .logo-text strong { color: #fff; }
.footer .logo-text small { color: #8d959d; }
.footer .pay { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.footer .pay span { border: 1px solid #3b434c; border-radius: 4px; padding: 3px 8px; font-size: 12px; color: #d9dde1; }
.footer .legal { border-top: 1px solid #2f363e; margin-top: 30px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12.5px; color: #8d959d; }
@media (max-width: 860px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer .cols { grid-template-columns: 1fr; } }

/* ---------- Carrito (panel lateral) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(22, 25, 29, .5); z-index: 80; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: var(--surface); z-index: 90;
  display: grid; grid-template-rows: auto auto 1fr auto; box-shadow: var(--shadow-lg);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-family: var(--f-display); font-weight: 800; font-size: 26px; text-transform: uppercase; }
.ship-meter { padding: 12px 18px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; display: grid; gap: 8px; }
.meter { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.meter b { display: block; height: 100%; background: var(--hazard); border-radius: 5px; transition: width .3s; }
.meter.full b { background: var(--green); }
.cart-list { overflow-y: auto; padding: 6px 18px; }
.c-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line-2); align-items: start; }
.c-item .v { width: 64px; height: 64px; border-radius: 8px; display: grid; place-items: center; }
.c-item .v .ic { width: 32px; height: 32px; stroke-width: 1.4; }
.c-item b { font-size: 14px; font-weight: 600; line-height: 1.3; display: block; }
.c-item .sub { font-size: 12.5px; color: var(--muted); }
.c-item .qty { height: 34px; margin-top: 8px; }
.c-item .qty button { width: 32px; }
.c-item .qty input { width: 40px; }
.c-item .right { display: grid; justify-items: end; gap: 6px; }
.c-item .right strong { font-family: var(--f-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.c-item .warn { font-size: 12px; color: var(--amber); font-weight: 600; margin-top: 4px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 18px; display: grid; gap: 10px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; text-transform: uppercase; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; font-variant-numeric: tabular-nums; }
.sum-row.total { font-size: 16px; font-weight: 700; align-items: baseline; }
.sum-row.total strong { font-family: var(--f-display); font-size: 30px; }
.sum-row.disc { color: var(--green); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; }
.modal .scrim { z-index: 0; }
.modal .box { background: var(--surface); border-radius: var(--r-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); position: relative; }
.modal .box-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal .box-head h3 { font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; }
.modal .box-body { padding: 18px 20px 22px; display: grid; gap: 14px; }
.store-pick { display: grid; gap: 8px; }
.store-pick label { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; }
.store-pick label:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.store-pick input { accent-color: var(--ink); width: 17px; height: 17px; }
.store-pick b { font-size: 14.5px; display: block; }
.store-pick small { color: var(--muted); font-size: 12.5px; }

/* ---------- Pago ---------- */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; padding-bottom: 40px; }
.co-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; }
.co-step + .co-step { margin-top: 14px; }
.co-step h2 { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; }
.co-step h2 .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: grid; gap: 2px; border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 14px; font-weight: 600; cursor: pointer; height: 100%; }
.opt span small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.opt input:checked + span { border-color: var(--ink); background: var(--yellow-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.opt input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 130px); display: grid; gap: 10px; }
.summary h3 { font-family: var(--f-display); font-weight: 800; font-size: 22px; text-transform: uppercase; }
.s-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 13.5px; padding-block: 6px; border-bottom: 1px solid var(--line-2); }
.s-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.check-row input { width: 17px; height: 17px; accent-color: var(--ink); margin-top: 2px; flex: none; }
@media (max-width: 960px) { .checkout { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 560px) { .form-grid, .opt-grid { grid-template-columns: 1fr; } .opt-grid { grid-template-columns: 1fr 1fr; } }

.confirm { max-width: 720px; margin: 30px auto 50px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.confirm .top { background: var(--ink); color: #fff; padding: 26px; display: grid; gap: 8px; }
.confirm .top .ic { width: 44px; height: 44px; color: var(--yellow); }
.confirm .top h1 { font-family: var(--f-display); font-weight: 800; font-size: 38px; text-transform: uppercase; line-height: 1; }
.confirm .top p { color: #c9ced3; }
.confirm .inner { padding: 22px 26px 26px; display: grid; gap: 16px; }
.order-no { font-family: var(--f-mono); font-size: 15px; background: var(--yellow); color: var(--ink); padding: 3px 9px; border-radius: 4px; justify-self: start; }

/* ---------- Panel de inventario ---------- */
.admin-top { background: var(--ink); color: #fff; }
.admin-top .wrap { padding-block: 22px 0; display: grid; gap: 14px; }
.admin-top h1 { font-family: var(--f-display); font-weight: 800; font-size: 38px; text-transform: uppercase; line-height: 1; }
.admin-top p { color: #b8bec5; font-size: 14px; }
.admin-tabs { display: flex; gap: 2px; overflow-x: auto; }
.admin-tabs button { border: 0; background: none; color: #b8bec5; padding: 12px 16px; font-weight: 600; font-size: 14.5px; border-bottom: 3px solid transparent; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.admin-tabs button:hover { color: #fff; }
.admin-tabs button.on { color: #fff; border-bottom-color: var(--yellow); }
.admin-id { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.admin-head-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.demo-note { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; background: var(--ink-3); color: #e3e6e9; padding: 6px 10px; border-radius: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; }
.kpi small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi strong { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.alert { border-color: var(--amber); background: var(--amber-soft); }
.kpi.alert strong { color: var(--amber); }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.hbar .track { height: 14px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.hbar .track b { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; }
.hbar.mine .track b { background: var(--yellow-deep); }
.hbar span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 480px) { .hbar { grid-template-columns: 90px 1fr 56px; } }
.inv-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.inv-tools .grow { flex: 1 1 220px; }
.inv-tools input[type=search] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; }
.inv-table td input[type=number] { width: 74px; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; text-align: right; font-variant-numeric: tabular-nums; background: var(--surface); }
.inv-table td input.price-in { width: 104px; }
.inv-table td input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 2px var(--yellow); }
.inv-table td input.zero { color: var(--red); border-color: #f1b6aa; }
.inv-table td input.lowv { color: var(--amber); border-color: #eccb91; }
.inv-table .pn { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.inv-table .pn .v { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.inv-table .pn .v .ic { width: 20px; height: 20px; stroke-width: 1.6; }
.inv-table .pn b { font-weight: 600; font-size: 13.5px; line-height: 1.25; display: block; }
.inv-table .pn small { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.confirm-inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.order-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; background: var(--surface); }
.order-card + .order-card { margin-top: 10px; }
.order-card .oh { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.order-card .oh b { font-family: var(--f-mono); }
.order-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-3); }
.order-card select { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--surface); }

/* ---------- Toast y WhatsApp flotante ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); z-index: 120; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; border-radius: var(--r); padding: 12px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); font-size: 14px; animation: toastIn .25s ease-out; }
.toast .ic { color: var(--yellow); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--yellow); font-weight: 700; text-decoration: underline; padding: 0; }
@media (max-width: 600px) { .toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); } }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }
.wa-float {
  position: fixed; right: 18px; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: 70; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31, 168, 85, .45); text-decoration: none;
}
.wa-float .ic { width: 28px; height: 28px; }
.wa-float:hover { background: #178a45; }

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