/* ==========================================================================
   Tokens
   Colores tomados del logo de Stock Obra: negro y naranja #FC660D sobre gris claro.
   Superficies planas, líneas finas, radios chicos; el naranja solo para acentos
   (sobre naranja va texto negro, como en el logo) y la mono para datos.
   ========================================================================== */
:root {
  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --surface-2: #EBEBE8;
  --surface-3: #E0E0DC;
  --ink: #111111;
  --ink-2: #4F4F4B;
  --ink-3: #6A6A65;
  --line: #DCDCD7;
  --line-strong: #111111;
  --accent: #FC660D;
  --accent-hover: #E95A04;
  --accent-ink: #111111;
  --accent-soft: #FFE8D9;
  --accent-text: #B84300;
  --brand-dark: #111111;
  --brand-on-dark: #F4F4F2;
  --wa: #157A42;
  --wa-hover: #106536;
  --wa-ink: #FFFFFF;
  --wa-soft: #E2F1E7;
  --media: #FFFFFF;
  --fav-idle: #6A6A65;
  --danger: #C62D1F;
  --shadow-lg: 0 0 0 1px rgb(20 18 10 / .08), 0 16px 40px -12px rgb(20 18 10 / .28);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --gutter: 16px;
  --max: 1240px;
  --tabbar-h: calc(58px + env(safe-area-inset-bottom));
  --row1: 52px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F0E; --surface: #191918; --surface-2: #222220; --surface-3: #2C2C29;
    --ink: #F2F2EF; --ink-2: #B0B0AA; --ink-3: #96968F; --line: #2E2E2B; --line-strong: #F2F2EF;
    --accent: #FF7426; --accent-hover: #FF8A47; --accent-ink: #111111; --accent-soft: #3A1C0B; --accent-text: #FF9A5E;
    --brand-dark: #050505;
    --wa: #22B85F; --wa-hover: #28C96A; --wa-ink: #0E1A12; --wa-soft: #10301D;
    --media: #FFFFFF;
    --shadow-lg: 0 0 0 1px #2E2C26, 0 16px 40px -12px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0F0E; --surface: #191918; --surface-2: #222220; --surface-3: #2C2C29;
  --ink: #F2F2EF; --ink-2: #B0B0AA; --ink-3: #96968F; --line: #2E2E2B; --line-strong: #F2F2EF;
  --accent: #FF7426; --accent-hover: #FF8A47; --accent-ink: #111111; --accent-soft: #3A1C0B; --accent-text: #FF9A5E;
  --brand-dark: #050505;
  --wa: #22B85F; --wa-hover: #28C96A; --wa-ink: #0E1A12; --wa-soft: #10301D;
  --media: #FFFFFF;
  --shadow-lg: 0 0 0 1px #2E2C26, 0 16px 40px -12px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; scrollbar-gutter: stable; }
html:has(body.is-locked) { overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: var(--tabbar-h);
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a, button, label, summary, select { touch-action: manipulation; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#view:focus, .sheet:focus { outline: none; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--radius-sm); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.i {
  width: 20px; height: 20px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.75;
  stroke-linecap: square; stroke-linejoin: miter; stroke-miterlimit: 8;
}

/* ==========================================================================
   Header
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: transform .3s var(--ease), border-color .2s;
  padding-top: env(safe-area-inset-top);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "logo actions" "search search";
  align-items: center;
  column-gap: 8px;
  padding-bottom: 10px;
}
.logo { grid-area: logo; display: flex; align-items: center; height: var(--row1); min-width: 0; }
.logo-svg { display: block; height: 28px; width: auto; color: var(--ink); }

.top-actions { grid-area: actions; display: flex; align-items: center; gap: 2px; }
.loc {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  height: 40px; padding: 0 10px; margin-right: 2px; border-radius: var(--radius-sm); text-align: left; line-height: 1.15;
  transition: background .15s;
}
.loc small { font-size: 11px; color: var(--ink-2); }
.loc b { font-size: 13px; font-weight: 650; white-space: nowrap; }
.loc:hover { background: var(--surface-2); }
.top-link { display: none; font-weight: 550; font-size: 14px; height: 40px; align-items: center; padding: 0 12px; border-radius: var(--radius-sm); transition: background .15s; }
.top-link:hover { background: var(--surface-2); }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--radius-sm); transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { background: var(--surface-3); }
#top-wa { color: var(--wa); }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font: 600 11px/18px var(--mono); font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* Search */
.search { grid-area: search; position: relative; display: flex; align-items: center; }
.search input {
  width: 100%; height: 44px; padding: 0 84px 0 40px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:placeholder-shown { padding-right: 44px; text-overflow: ellipsis; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-ico { position: absolute; left: 11px; color: var(--ink-3); display: flex; pointer-events: none; }
.search-kbd { display: none; position: absolute; right: 12px; font: 500 12px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; pointer-events: none; }
.search-clear, .search-mic {
  position: absolute; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--radius-sm); color: var(--ink-2);
}
.search-clear { right: 42px; }
.search-mic { right: 2px; }
.search-clear:hover, .search-mic:hover { background: var(--surface-2); }
.search-mic.is-on { color: var(--accent-text); background: var(--accent-soft); }
.search-clear svg { width: 18px; height: 18px; }

.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 4px 0 8px;
  max-height: calc(100dvh - var(--top-h, 110px) - 8px); overflow: auto; overscroll-behavior: contain;
}
.sg-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sg-head button { color: var(--accent-text); font-weight: 600; padding: 4px 0; }
.sg-list > * + * { border-top: 1px solid var(--line); }
.sg-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; text-align: left; font-weight: 400; }
.sg-row b { font-weight: 650; }
.sg-row svg { width: 18px; height: 18px; color: var(--ink-3); }
.sg-row:hover, .sg-row[aria-selected="true"] { background: var(--surface-2); }
.sg-scope { color: var(--accent-text); font-weight: 600; }
.sg-prod img { width: 40px; height: 40px; flex: none; object-fit: contain; background: var(--media); border: 1px solid var(--line); border-radius: 4px; padding: 3px; }
.sg-prod span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-prod em { font: 500 11px/1 var(--mono); font-style: normal; color: var(--ink-3); text-transform: uppercase; }
.sg-all { color: var(--accent-text); font-weight: 600; }
.sg-wa { color: var(--wa); font-weight: 600; }
.sg-recent { display: flex; }
.sg-recent .sg-row { flex: 1; min-width: 0; }
.sg-del { width: 48px; flex: none; display: grid; place-items: center; color: var(--ink-3); }
.sg-del svg { width: 16px; height: 16px; }
.sg-chips { flex-wrap: wrap; padding: 6px 16px 4px; }

/* ==========================================================================
   Buttons & chips
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in oklab, var(--ink) 86%, var(--bg)); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-inv { background: transparent; color: var(--brand-on-dark); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); }
.btn-inv:hover { background: rgb(255 255 255 / .08); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: var(--wa-hover); }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-line { border: 1px solid var(--ink); background: var(--surface); }
.btn-line:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 16px; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn-icon { width: 48px; padding: 0; }
.btn-lg.btn-icon { width: 52px; flex: none; }
.link { color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { color: var(--accent-text); }

.chips { display: flex; gap: 6px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip:active { background: var(--surface-2); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip small { color: var(--ink-3); font: 400 11.5px/1 var(--mono); }
.chip.is-on small, .chip[aria-pressed="true"] small { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.chip svg { width: 16px; height: 16px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-top: 28px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 1.5px solid var(--line-strong); padding-top: 10px; margin-bottom: 12px;
}
.section-head h2 { font-size: 19px; letter-spacing: -.025em; }
.section-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.section-tools { display: flex; gap: 14px; align-items: center; flex: none; }
.eyebrow { font: 500 11px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

/* Banner de marca (inicio): fondo negro y naranja como el logo; en escritorio suma la casa del logo y productos */
.hero { padding-top: 8px; }
.hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 18px; padding: 22px 18px 0;
  border-radius: var(--radius-lg); background: var(--brand-dark); color: var(--brand-on-dark);
  box-shadow: 0 0 0 1px var(--line); border-bottom: 4px solid var(--accent);
}
.hero-kicker { margin: 0; font: 500 11.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #B5B5AE; }
.hero h1 { margin-top: 10px; font-size: clamp(30px, 8.6vw, 54px); letter-spacing: -.04em; line-height: 1.02; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { margin: 12px 0 0; color: #C9C9C3; font-size: 15px; max-width: 46ch; }
.hero-ctas { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero-ctas .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
.hero-art { display: none; }
.hero-steps {
  list-style: none; margin: 0 -18px; padding: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgb(255 255 255 / .12);
}
.hero-steps li { counter-increment: s; padding: 12px 12px 14px; font-size: 12px; line-height: 1.3; color: #B5B5AE; }
.hero-steps li + li { border-left: 1px solid rgb(255 255 255 / .12); }
.hero-steps li::before { content: counter(s, decimal-leading-zero); display: block; margin-bottom: 4px; font: 500 11px/1 var(--mono); color: var(--accent); }
.hero-steps b { color: var(--brand-on-dark); font-weight: 600; }
.hero-house { position: absolute; right: 4%; bottom: 8%; height: 84%; width: auto; overflow: visible; }
.hero-house path { fill: var(--brand-on-dark); }
.hero-house path.o { fill: var(--accent); }
.hero-tile {
  position: absolute; width: 34%; aspect-ratio: 1; border-radius: var(--radius); background: #fff; overflow: hidden;
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .7); transition: transform .25s var(--ease);
}
.hero-tile img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.hero-tile:hover { transform: translateY(-3px); }
.hero-tile.t0 { left: 0; top: 10%; }
.hero-tile.t1 { left: 26%; bottom: 6%; width: 30%; }
.hero-tile.t2 { right: 34%; top: 0; width: 26%; }

/* Condiciones de compra: tabla de 4 datos al final del inicio */
.trust {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 36px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.trust > * { display: grid; gap: 3px; align-content: start; padding: 14px; text-align: left; background: var(--surface); }
.trust span { font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.trust b { font-size: 15px; font-weight: 600; }
.trust small { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.trust button:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* Cinta de marcas: misma sección (título con línea) y misma ficha (blanca, borde fino, radio 8) que el resto del sitio.
   Se desplaza sola, se frena al pasar el mouse o tocarla; con movimiento reducido queda quieta y se desliza a mano. */
.brands .marquee {
  overflow: hidden; margin-inline: calc(var(--gutter) * -1); padding: 1px 0 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; will-change: transform; }
.marquee-set { display: flex; gap: 8px; padding-right: 8px; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee:active .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.brand-tile {
  flex: none; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; gap: 6px;
  width: 140px; height: 92px; padding: 12px 10px 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.brand-tile:hover, .brand-tile:focus-visible { border-color: var(--ink); }
.brand-tile small { font: 400 10.5px/1 var(--mono); color: var(--ink-3); }
.brand-logo {
  display: block; width: var(--w); height: var(--h); background: var(--ink-2); transition: background .15s;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.brand-tile:hover .brand-logo { background: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .brands .marquee { overflow-x: auto; scrollbar-width: none; }
  .marquee-track { animation: none; padding-inline: var(--gutter); }
  .marquee-set[aria-hidden] { display: none; }
}

/* Accesos a categorías con foto real */
.shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 6px; padding-top: 18px; }
.shortcuts a { display: grid; justify-items: center; gap: 6px; font-size: 11.5px; line-height: 1.15; font-weight: 500; text-align: center; }
.shortcuts span { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: var(--radius); background: var(--media); border: 1px solid var(--line); overflow: hidden; transition: border-color .15s; }
.shortcuts img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.shortcuts a:hover span { border-color: var(--ink); }
.shortcuts a:active span { transform: scale(.96); }

.hot { align-items: center; padding-top: 16px; }
.hot > span { flex: none; font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.hot .chip { height: 34px; font-size: 13.5px; }

.seen-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.seen-row::-webkit-scrollbar { display: none; }
.seen-row a { flex: none; width: 68px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; background: var(--media); border: 1px solid var(--line); }
.seen-row img, .project-pics img, .cpane-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 8%; background: var(--media); }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.project { display: grid; gap: 10px; align-content: space-between; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.project:hover { border-color: var(--ink); }
.project b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.project small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.project-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.project-pics img { border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* Rails */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(44% - 4px); gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding: 1px var(--gutter) 4px; scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-nav { display: none; gap: 4px; }
.rail-nav button { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface); transition: border-color .15s; }
.rail-nav button:hover { border-color: var(--ink); }
.rail-nav svg { width: 18px; height: 18px; }

/* Marcas: índice de texto, sin logos inventados */
.brand-rail { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; grid-template-rows: repeat(2, auto); gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.brand-rail::-webkit-scrollbar { display: none; }
.brand-pill { display: flex; align-items: baseline; gap: 8px; height: 44px; align-items: center; padding: 0 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.brand-pill:hover { border-color: var(--ink); }
.brand-pill b { font-size: 15px; font-weight: 650; letter-spacing: -.03em; }
.brand-pill small { font: 400 11px/1 var(--mono); color: var(--ink-3); }

.quote-row {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 28px; padding: 14px; text-align: left;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
}
.quote-row:hover { border-color: var(--ink); border-left-color: var(--accent); }
.quote-row svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.quote-row span { flex: 1; min-width: 0; }
.quote-row b { display: block; font-size: 15px; font-weight: 600; }
.quote-row small { font-size: 12.5px; color: var(--ink-2); }

/* FAQ: lista con líneas, sin tarjetas */
.faq { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 550; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex: none; transition: transform .2s var(--ease); color: var(--ink-3); }
.faq details[open] summary svg { transform: rotate(45deg); color: var(--ink); }
.faq details p { margin: 0; padding: 0 28px 16px 0; color: var(--ink-2); max-width: 64ch; }

/* ==========================================================================
   Product card
   ========================================================================== */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s;
}
@media (hover: hover) { .card:hover { border-color: var(--ink-3); } }
.card-media { position: relative; display: block; aspect-ratio: 1; background: var(--media); overflow: hidden; border-bottom: 1px solid var(--line); }
/* Mientras carga la foto: tono plano; si tarda, un pulso suave (sin barrido animado en cada tarjeta). */
.card-media::before, .pd-slide::before, .ci-thumb::before {
  content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--media), #111111 5%);
  opacity: 0; animation: ph .9s ease-in-out .35s infinite alternate;
}
@keyframes ph { to { opacity: 1; } }
.card-media img, .pd-slide img, .ci-thumb img {
  position: relative; width: 100%; height: 100%; object-fit: contain; padding: 8%;
  background: var(--media); opacity: 0; transition: opacity .25s, transform .4s var(--ease);
}
.card-media img.in, .pd-slide img.in, .ci-thumb img.in { opacity: 1; }
.card-media:has(img.in)::before, .pd-slide:has(img.in)::before, .ci-thumb:has(img.in)::before { animation: none; opacity: 0; }
.fav-btn {
  position: absolute; top: 2px; right: 2px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--fav-idle); border-radius: var(--radius-sm);
}
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] { color: var(--accent); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px; flex: 1; }
.card-meta { display: flex; gap: 6px; align-items: baseline; min-height: 1.3em; overflow: hidden; white-space: nowrap; font-size: 11px; line-height: 1.3; color: var(--ink-3); }
.card-meta b { font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.card-meta code { font: 400 10.5px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; }
.card-title {
  font-size: 14px; font-weight: 400; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.card-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.price { font-size: 20px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.price-ask { font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-top: 2px; }

/* Control de pedido: "Agregar" se convierte en − n + del mismo tamaño (no mueve la tarjeta). */
.add {
  flex: none; display: flex; align-items: center; height: 40px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); overflow: hidden;
  -webkit-user-select: none; user-select: none; transform-origin: center;
}
.add button { width: 44px; height: 100%; display: grid; place-items: center; flex: none; transition: background .12s; }
.add button:active { background: rgb(0 0 0 / .14); }
.add button svg { width: 18px; height: 18px; stroke-width: 2; }
.add output { flex: 1; min-width: 26px; text-align: center; font: 500 15px/1 var(--mono); font-variant-numeric: tabular-nums; }
.add:not(.is-on) { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.add button.add-cta { width: 100%; font-weight: 600; font-size: 14px; }
.add:not(.is-on):hover { background: var(--surface-2); }
.card .add { margin-top: auto; width: 100%; justify-content: space-between; }
.card .price, .card .price-ask { margin-bottom: 6px; }
.add.lg { height: 52px; }
.add.lg output { min-width: 30px; font-size: 16px; }

/* ==========================================================================
   Catalog
   ========================================================================== */
.cat-head { padding-top: 12px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs svg { width: 13px; height: 13px; }
.cat-head h1 { font-size: clamp(26px, 7vw, 40px); letter-spacing: -.04em; line-height: 1.05; }
.cat-head .count { color: var(--ink-2); margin: 4px 0 0; font: 400 13px/1.4 var(--mono); }
.toolbar {
  position: sticky; top: calc(var(--top-h, 110px) - var(--top-shift, 0px)); z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding-block: 8px; margin-top: 10px;
}
.toolbar .chips { align-items: center; }
.chip-filter { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-filter:hover { border-color: var(--ink); }
.chip-filter i { font: 600 11px/20px var(--mono); font-style: normal; background: var(--accent); color: var(--accent-ink); border-radius: 10px; min-width: 20px; height: 20px; text-align: center; padding: 0 5px; }
.chip-sort { position: relative; padding-right: 10px; color: var(--ink-2); }
.chip-sort select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); padding: 0; cursor: pointer; outline: none; }
.chip-sort:focus-within { border-color: var(--ink); }
.chip-x svg { width: 14px; height: 14px; margin-right: -4px; }
.sep { flex: none; width: 1px; height: 22px; background: var(--line); }
.catalog-layout { display: grid; gap: 24px; padding-top: 10px; }
.catalog-side { display: none; }
.more-sentinel { height: 1px; }
.loadmore { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 20px 0 4px; color: var(--ink-3); font: 400 13px/1 var(--mono); }
.loadmore:empty { display: none; }
.empty {
  text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.empty h3 { font-size: 20px; }
.empty p { margin: 0; color: var(--ink-2); max-width: 40ch; }
.cta-strip {
  margin-top: 20px; display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.cta-strip p { margin: 0; flex: 1; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.cta-strip p b { display: block; font-size: 15px; color: var(--ink); }

/* Categorías: dos paneles (rubros a la izquierda, tipos con foto a la derecha) */
.cpanes { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 14px; }
.cpanes-nav { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cpanes-nav button { display: grid; justify-items: center; gap: 4px; padding: 11px 4px; font-size: 11.5px; line-height: 1.15; text-align: center; color: var(--ink-2); border-left: 3px solid transparent; }
.cpanes-nav button + button { border-top: 1px solid var(--line); }
.cpanes-nav svg { width: 20px; height: 20px; }
.cpanes-nav [aria-selected="true"] { background: var(--bg); color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.cpane-all { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 0 10px; border-bottom: 1.5px solid var(--line-strong); margin-bottom: 12px; }
.cpane-all b { font-size: 16px; font-weight: 600; }
.cpane-all small { font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cpane-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.cpane-grid a { display: grid; gap: 4px; font-size: 12px; line-height: 1.2; font-weight: 500; text-align: center; }
.cpane-grid img { border-radius: var(--radius-sm); border: 1px solid var(--line); transition: border-color .15s; }
.cpane-grid a:hover img { border-color: var(--ink); }
.cpane-grid small { font: 400 10.5px/1 var(--mono); color: var(--ink-3); }

/* ==========================================================================
   Sheet (hoja desde abajo en el celular, panel/modal en escritorio)
   ========================================================================== */
.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgb(10 9 6 / .5);
  opacity: 0; transition: opacity .3s; touch-action: none;
}
.scrim.is-open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 94dvh; height: auto; display: flex; flex-direction: column;
  background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .38s var(--ease);
  overscroll-behavior: contain; will-change: transform;
}
.sheet.is-open { transform: translateY(var(--drag, 0px)); }
.sheet.is-dragging { transition: none; }
.sheet[data-kind="product"] { height: 94dvh; }
.sheet-grab { position: absolute; top: 0; left: 0; right: 0; height: 24px; z-index: 3; cursor: grab; touch-action: none; }
.sheet-grab::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--ink-3); opacity: .5; }
.sheet-x {
  position: absolute; top: 10px; right: 10px; z-index: 4; width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line);
  transition: background .15s;
}
.sheet-x:hover { background: var(--surface-2); }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-pad { padding: 22px var(--gutter) 18px; }
.sheet-title { font-size: 24px; letter-spacing: -.035em; padding-right: 48px; }
.sheet-sub { color: var(--ink-2); margin: 4px 0 0; font-size: 14px; }
.sheet-foot {
  flex: none; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); display: grid; gap: 8px;
}
.sheet-foot .row { display: flex; gap: 8px; }
.sheet-foot .row > .btn:not(.btn-icon):not(.btn-wa-text) { flex: 1; min-width: 0; padding-inline: 12px; }
.sheet-foot .row > .btn-wa-text { flex: none; padding-inline: 16px; }
.foot-note { margin: 0; text-align: center; font-size: 12px; color: var(--ink-3); }

/* Ficha de producto */
.pd-gallery { position: relative; background: var(--media); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.pd-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pd-track::-webkit-scrollbar { display: none; }
.pd-slide { position: relative; flex: 0 0 100%; aspect-ratio: 1 / .84; scroll-snap-align: center; overflow: hidden; }
.pd-slide img { padding: 8% 9% 10%; }
@media (hover: hover) and (pointer: fine) { .pd-slide img { cursor: zoom-in; } .pd-slide.is-zoom img { cursor: zoom-out; } }
.pd-slide.is-zoom img { transform: scale(2); }
.pd-tools { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 2px; }
.pd-tools .fav-btn { position: static; color: #111111; }
.pd-tools .fav-btn[aria-pressed="true"] { color: #CF4510; }
.pd-count { position: absolute; bottom: 10px; right: 12px; font: 500 12px/1 var(--mono); padding: 5px 7px; border-radius: 4px; background: rgb(0 0 0 / .06); color: #111111; }
.pd-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.pd-dots button { width: 6px; height: 6px; border-radius: 1px; background: rgb(0 0 0 / .2); transition: background .2s; }
.pd-dots button.is-on { background: #111111; }
.pd-thumbs { display: none; }
.pd-info { padding: 16px var(--gutter) 12px; display: grid; gap: 16px; }
.pd-info .crumbs { margin: 0; }
.pd-title { display: grid; gap: 6px; }
.pd-brand { justify-self: start; font-size: 13.5px; font-weight: 500; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.pd-info h2 { font-size: clamp(22px, 6vw, 30px); letter-spacing: -.035em; line-height: 1.12; }
.pd-code { margin: 0; font: 400 12.5px/1.2 var(--mono); color: var(--ink-3); }
.pd-code span { color: var(--ink-2); }
.buybox { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.bb-price { font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bb-price.is-ask { font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.bb-sub { margin: 0; font-size: 13px; color: var(--ink-2); }
.bb-ship { margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.bb-ship b { color: var(--ink); font-weight: 600; }
.bb-rows, .zone-rows { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.bb-rows div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.bb-rows dt, .zone-rows dt { color: var(--ink-3); }
.bb-rows dd, .zone-rows dd { margin: 0; color: var(--ink-2); }
.pd-sec h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 8px; }
.pd-desc, .pd-list { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; color: var(--ink-2); }
.pd-desc li::marker, .pd-list li::marker { color: var(--ink-3); }
.specs { margin: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 500; }
.pd-related h3 { font-size: 15px; font-weight: 650; padding-top: 10px; margin-bottom: 10px; border-top: 1.5px solid var(--line-strong); }
.pd-related .rail { grid-auto-columns: 44%; }

/* Zona de entrega */
.zone-rows { margin-top: 16px; gap: 0; font-size: 14.5px; border-top: 1px solid var(--line); }
.zone-rows div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.zone-rows b { color: var(--ink); }
.zone-rows small { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* Pedido */
.cart-items { display: grid; gap: 6px; margin-top: 16px; }
.ci { position: relative; border-radius: var(--radius); overflow: hidden; }
.ci-del { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 20px; color: #fff; font-weight: 600; gap: 6px; font-size: 14px; background: var(--danger); border-radius: var(--radius); opacity: 0; transition: opacity .15s; }
.ci.is-dragging .ci-del, .ci.is-out .ci-del { opacity: 1; }
.ci-del svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.ci.is-armed .ci-del svg { transform: scale(1.25); }
.ci-inner {
  position: relative; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 8px 8px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  touch-action: pan-y; transition: transform .28s var(--ease);
}
.ci.is-dragging .ci-inner { transition: none; }
.ci.is-leaving { animation: leave .2s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(-24px); } }
.ci-thumb { position: relative; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--media); }
.ci-thumb img { padding: 6%; }
.ci-name { font-size: 14px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ci-sub b { color: var(--ink); font-weight: 600; }
.ci .add { height: 40px; }
.ci .add button { width: 40px; }
.ci .add output { min-width: 24px; }
.form { display: grid; gap: 20px; margin-top: 22px; }
.field { display: grid; gap: 8px; }
.field > span, .field legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input {
  width: 100%; height: 48px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 11px 12px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 28%, transparent); }
.input.is-error { border-color: var(--danger); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 6px 8px; font-size: 14px; font-weight: 550; line-height: 1.2;
  transition: background .15s, color .15s;
}
.seg span small { font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:checked + span small { color: color-mix(in oklab, var(--bg) 72%, transparent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.reveal-box { display: grid; gap: 8px; }
.ship-promise { margin: 0; font-size: 13px; color: var(--ink-2); }
.ship-zone { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.ship-zone summary { cursor: pointer; color: var(--ink-2); font-weight: 550; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.summary { margin-top: 22px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; }
.summary div span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.summary .total { font-weight: 600; font-size: 16px; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); }
.summary small { color: var(--ink-3); }
.cart-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-right: 48px; }
.cart-head .sheet-sub { font-family: var(--mono); font-size: 13px; }
.clear-btn { font-size: 13px; color: var(--ink-2); font-weight: 500; min-height: 44px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }
.clear-btn:hover { color: var(--danger); }
.swipe-hint { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; display: flex; align-items: center; gap: 6px; }
.swipe-hint svg { width: 14px; height: 14px; }
.done { display: grid; gap: 12px; padding: 30px 0 10px; }
.done h3 { font-size: 26px; letter-spacing: -.035em; }
.done p { color: var(--ink-2); margin: 0; max-width: 40ch; }
.done code { white-space: nowrap; font: 500 13px/1 var(--mono); border: 1px solid var(--line); background: var(--surface); padding: 4px 7px; border-radius: 4px; color: var(--ink); }
.done-steps { margin: 4px 0; padding: 0; list-style: none; counter-reset: s; border-top: 1px solid var(--line); }
.done-steps li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.done-steps li::before { content: counter(s, decimal-leading-zero); font: 500 12px/1.6 var(--mono); color: var(--accent-text); }
.done .link { justify-self: start; }

/* Filtros */
.filters { display: grid; gap: 22px; }
.filters h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.filters .chips { flex-wrap: wrap; }
.check-list { display: grid; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; }
.check:hover { background: var(--surface-2); }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 3px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; margin: 0; transition: background .12s, border-color .12s; flex: none; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.check span { flex: 1; }
.check small { color: var(--ink-3); font: 400 12px/1 var(--mono); }
.more-btn { margin-top: 6px; font-weight: 500; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 0 4px; }

/* ==========================================================================
   Barra del pedido, tab bar, toast, footer
   ========================================================================== */
.cartbar {
  position: fixed; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: calc(var(--tabbar-h) + 8px); z-index: 35;
  display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 14px;
  border-radius: var(--radius); background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  text-align: left; animation: rise .3s var(--ease);
  transition: translate .3s var(--ease), opacity .2s;
  -webkit-user-select: none; user-select: none;
}
@keyframes rise { from { translate: 0 calc(100% + 16px); } }
.topbar.is-hidden ~ .cartbar { translate: 0 calc(100% + 16px); opacity: 0; pointer-events: none; }
body.sheet-open .cartbar { visibility: hidden; }
.cartbar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cartbar-text b { font-size: 14px; font-weight: 600; }
.cartbar-text small { font-size: 12.5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar-cta { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.cartbar-cta svg { width: 18px; height: 18px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: var(--tabbar-h); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg); border-top: 1px solid var(--line);
  -webkit-user-select: none; user-select: none;
}
.tabbar > * {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--ink-3); transition: color .15s;
}
.tabbar > * > span { display: grid; place-items: center; height: 24px; }
.tabbar > *:active > span { transform: scale(.92); }
.tabbar > .is-active { color: var(--ink); font-weight: 600; }
.tabbar > .is-active::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--ink); }
.tabbar > .is-active svg { stroke-width: 2.1; }
.tabbar .badge { top: 5px; right: calc(50% - 22px); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 76px); z-index: 80;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; min-height: 48px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast button { min-height: 36px; padding: 0 10px; border-radius: var(--radius-sm); font-weight: 650; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.toast button:hover { background: color-mix(in oklab, var(--bg) 12%, transparent); }
body.sheet-open .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

.footer { margin-top: 48px; padding: 32px 0 110px; background: var(--brand-dark); color: #C9C9C3; border-top: 4px solid var(--accent); font-size: 14px; }
.footer-grid { display: grid; gap: 26px; }
.footer .logo { display: inline-flex; height: auto; margin-bottom: 14px; }
.footer .logo-svg { height: 34px; color: var(--brand-on-dark); }
.footer-about { color: #A9A9A2; margin: 0 0 12px; max-width: 42ch; }
.footer h4 { margin: 0 0 6px; font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: #8F8F88; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; }
.footer li > a, .footer li > button, .footer li > span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #C9C9C3; text-align: left; }
.footer li > a:hover, .footer li > button:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer li svg { width: 18px; height: 18px; color: #8F8F88; }
.footer .icon-btn { color: #C9C9C3; }
.footer .icon-btn:hover { background: rgb(255 255 255 / .08); }
.footer-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .12); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: #8F8F88; font-size: 12.5px; }
.theme-toggle { display: inline-flex; border: 1px solid rgb(255 255 255 / .2); border-radius: var(--radius-sm); overflow: hidden; }
.theme-toggle button { height: 36px; padding: 0 12px; font-size: 12.5px; font-weight: 500; color: #C9C9C3; }
.theme-toggle button + button { border-left: 1px solid rgb(255 255 255 / .2); }
.theme-toggle button[aria-pressed="true"] { background: var(--brand-on-dark); color: #111111; }

/* Bloque legal del pie: botón de arrepentimiento, link a Defensa del Consumidor, titular y Data Fiscal */
.footer-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .12); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13px; }
.footer-legal a, .footer-legal span { color: #C9C9C3; }
.footer-legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.btn-regret { height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--accent); color: var(--brand-on-dark); font-weight: 600; font-size: 13.5px; }
.btn-regret:hover { background: var(--accent); color: #111; }
.data-fiscal img { display: block; background: #fff; border-radius: 4px; }

/* Páginas legales */
.legal { max-width: 760px; padding-top: 14px; }
.legal h1 { font-size: clamp(26px, 7vw, 40px); letter-spacing: -.04em; }
.legal .count { margin: 6px 0 22px; color: var(--ink-3); font: 400 13px/1.4 var(--mono); }
.legal h2 { font-size: 17px; letter-spacing: -.02em; margin: 26px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--ink-2); max-width: 68ch; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.legal .link { font-size: inherit; }
.legal button.link { padding: 0; }
.legal-note { font-size: 13px; color: var(--ink-3) !important; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

/* Páginas generadas para buscadores: producto (.pp) y listados (.lp) */
.js .seo-pre { display: none; }
.seo-pre { padding-block: 20px; }
.seo-pre h1 { font-size: 28px; }
.seo-pre h2 { font-size: 17px; margin: 22px 0 8px; }
.seo-pre ul { margin: 0; padding-left: 18px; columns: 2; }
.pp { padding-top: 12px; }
.pp .crumbs span[aria-hidden] { color: var(--ink-3); }
.pp-grid { display: grid; gap: 18px; margin-top: 4px; }
.pp-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.pp-gallery::-webkit-scrollbar { display: none; }
.pp-gallery img { flex: 0 0 86%; width: 86%; height: auto; aspect-ratio: 1; object-fit: contain; padding: 6%; background: var(--media); border: 1px solid var(--line); border-radius: var(--radius); scroll-snap-align: start; }
.pp-gallery img:only-child { flex-basis: 100%; width: 100%; }
.pp-info { display: grid; gap: 16px; align-content: start; }
.pp-info h1 { font-size: clamp(24px, 6.4vw, 34px); letter-spacing: -.035em; line-height: 1.1; }
.pp-actions { display: flex; gap: 8px; margin-top: 10px; }
.pp-actions .add { flex: 1; justify-content: space-between; }
.pp-actions .btn-wa { flex: none; }
.pd-sec h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 8px; }
.pp .section { padding-top: 32px; }
.lp { padding-top: 12px; }
.lp h1 { font-size: clamp(28px, 7.5vw, 44px); letter-spacing: -.04em; line-height: 1.05; }
.lp-intro { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
.lp .count { margin: 8px 0 14px; color: var(--ink-3); font: 400 13px/1.4 var(--mono); }
.lp-chips { flex-wrap: wrap; margin-bottom: 16px; }
.lp .cta-strip { margin-top: 24px; }

/* Contenido SEO: textos de compra, preguntas frecuentes y guías */
.lp-intro p { margin: 10px 0 0; color: var(--ink-2); max-width: 72ch; }
.seo-block { margin-top: 32px; padding-top: 12px; border-top: 1.5px solid var(--line-strong); max-width: 760px; }
.seo-block h2, .seo-faq h2, .gp h2 { font-size: 19px; letter-spacing: -.025em; margin: 0 0 10px; }
.seo-block ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.seo-aka { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.seo-faq { margin-top: 32px; padding-top: 12px; border-top: 1.5px solid var(--line-strong); max-width: 760px; }
.seo-faq details { border-bottom: 1px solid var(--line); }
.seo-faq summary { cursor: pointer; padding: 13px 0; font-weight: 550; list-style: none; }
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after { content: "+"; float: right; color: var(--ink-3); font: 400 18px/1 var(--mono); }
.seo-faq details[open] summary::after { content: "−"; }
.seo-faq p { margin: 0 0 14px; color: var(--ink-2); }
.guide-link { display: grid; gap: 2px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.guide-link small { font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.guide-link b { font-weight: 600; }
.guide-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.guide-cards { display: grid; gap: 8px; }
.guide-card { display: grid; gap: 4px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.guide-card:hover { border-color: var(--ink); }
.guide-card b { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
.guide-card small { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.type-chips { flex-wrap: wrap; }
.pd-full { justify-self: start; font-size: 13px; }
.all-cats { display: grid; gap: 22px; margin-top: 18px; }
.all-cats h2 { font-size: 19px; padding-top: 10px; border-top: 1.5px solid var(--line-strong); margin: 0 0 8px; }
.all-cats h2 small, .all-cats li small { font: 400 12px/1 var(--mono); color: var(--ink-3); }
.all-cats ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.all-cats a:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.table-wrap th, .table-wrap td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { font-weight: 600; background: var(--surface-2); }
.table-wrap tbody th { font-weight: 550; color: var(--ink); }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.gp { padding-top: 12px; }
.gp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.gp article { max-width: 720px; min-width: 0; }
.gp-kicker { margin: 0; font: 500 11.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.gp-head { margin-top: 14px; padding-bottom: 18px; border-bottom: 1.5px solid var(--line-strong); }
.gp h1 { margin: 8px 0 0; font-size: clamp(28px, 7.5vw, 42px); letter-spacing: -.04em; line-height: 1.08; text-wrap: balance; }
.gp-lede { margin: 20px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.gp-lede b { font-weight: 650; }
.gp-meta { margin: 14px 0 0; color: var(--ink-3); font: 400 12.5px/1.5 var(--mono); }
.gp-toc { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gp-toc summary { cursor: pointer; padding: 12px 14px; font-weight: 550; font-size: 14.5px; list-style: none; }
.gp-toc summary::-webkit-details-marker { display: none; }
.gp-toc summary::after { content: "+"; float: right; color: var(--ink-3); font: 400 18px/1 var(--mono); }
.gp-toc[open] summary::after { content: "−"; }
.gp-toc ol, .gp-side ol { margin: 0; padding: 0; list-style: none; display: grid; }
.gp-toc ol { padding: 0 14px 10px; }
.gp-toc a, .gp-side a { display: block; padding: 6px 0; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.gp-toc a:hover, .gp-side a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.gp-side { display: none; }
.gp article section { margin-top: 32px; }
.gp article p, .gp article li { color: var(--ink-2); line-height: 1.6; }
.gp article p { margin: 0 0 12px; }
.gp article ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.gp article section > p a, .gp-see a, .gp-sign a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.gp-example { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: start; margin: 18px 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gp-example-media { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--media); overflow: hidden; }
.gp-example-media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.gp article .gp-example p { margin: 0; }
.gp article .gp-example .gp-example-name { margin: 4px 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; color: var(--ink); }
.gp-example-name span { font-weight: 450; color: var(--ink-3); }
.gp-example-link { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 550; color: var(--accent-text); }
.gp-example-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gp-quote { margin: 18px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--accent); }
.gp-quote blockquote { margin: 0; }
.gp article .gp-quote p { margin: 0; font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.gp-quote figcaption { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.gp-quote figcaption a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.gp-warn { margin: 18px 0; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius); }
.gp article .gp-warn p { margin: 0; color: var(--ink); }
.gp article .gp-warn .gp-warn-t { margin-bottom: 4px; font-weight: 650; color: var(--accent-text); }
.gp article .gp-see { font-size: 14px; color: var(--ink-3); }
.gp-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); }
.gp-foot h2 { font-size: 15px; margin: 0 0 8px; }
.gp-foot ol { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.gp-foot ol a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.gp-foot small { color: var(--ink-3); }
.gp article .gp-sign { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.gp-cta { margin-top: 40px; padding: 24px 20px; background: var(--brand-dark); color: var(--brand-on-dark); border-radius: var(--radius-lg); }
.gp-cta h2 { margin: 0; font-size: clamp(22px, 5.5vw, 28px); letter-spacing: -.03em; line-height: 1.15; color: inherit; }
.gp-cta p { margin: 8px 0 16px; max-width: 560px; line-height: 1.5; color: rgb(244 244 242 / .72); }
.gp-cta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gp-cta-chips a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid rgb(244 244 242 / .28); border-radius: 999px; font-size: 13px; color: inherit; }
.gp-cta-chips a:hover { border-color: var(--brand-on-dark); }
.gp-more { margin-top: 36px; padding-top: 12px; border-top: 1.5px solid var(--line-strong); }
.gp-more h2 { font-size: 19px; margin: 0 0 12px; }
@media (min-width: 1024px) {
  .gp-layout { grid-template-columns: minmax(0, 720px) 240px; justify-content: space-between; }
  .gp-toc { display: none; }
  .gp-side { display: block; position: sticky; top: calc(var(--top-h, 110px) + 16px); align-self: start; max-height: calc(100dvh - var(--top-h, 110px) - 32px); overflow-y: auto; padding-left: 16px; border-left: 1px solid var(--line); }
  .gp-side ol { margin-top: 8px; }
  .gp-cta { padding: 32px; }
}

/* Escritorio: barra de datos y rubros (ocultas en el celular) */
.utility, .catnav { display: none; }

/* Fotos en tira (modo photoStrips): cada cuadro ya trae su margen blanco */
img.strip { object-fit: cover !important; padding: 0 !important; }
.pd-slide { container-type: size; }
.pd-slide img.strip { position: absolute; inset: 0; margin: auto; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); }

/* Foto que vuela al pedido (solo al agregar por primera vez) */
.fly { position: fixed; z-index: 90; pointer-events: none; border-radius: var(--radius-sm); background: var(--media); box-shadow: var(--shadow-lg); object-fit: contain; padding: 5px; }

/* Transición entre vistas */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .14s ease both; }
  ::view-transition-new(root) { animation: vt-in .2s var(--ease) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .rail { grid-auto-columns: calc(30% - 6px); gap: 12px; }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .hero-card { padding: 30px 28px 0; }
  .hero-steps { margin-inline: -28px; }
  .hero-steps li { padding-inline: 16px; }
  .hero-ctas .btn { flex: 0 0 auto; }
  .shortcuts { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .projects { grid-template-columns: repeat(4, 1fr); }
  .cpanes { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  .cpanes-nav button { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; padding: 11px 12px; font-size: 14px; text-align: left; }
  .cpane-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cartbar { left: 0; right: 0; margin-inline: auto; width: 440px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-cards { grid-template-columns: repeat(2, 1fr); }
  .pd-related .rail { grid-auto-columns: calc(30% - 6px); }
}

/* ==========================================================================
   ≥ 960px (escritorio)
   ========================================================================== */
@media (min-width: 960px) {
  body { padding-bottom: 0; font-size: 15.5px; }
  .tabbar { display: none; }
  .topbar-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo search actions"; column-gap: 24px; padding-block: 10px; }
  .logo { height: 44px; }
  .logo-svg { height: 34px; }
  .loc { display: none; }
  .utility { display: block; background: var(--brand-dark); color: #C9C9C3; font-size: 12.5px; border-bottom: 1px solid rgb(255 255 255 / .06); }
  .utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 34px; }
  .utility button, .utility a { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
  .utility button:hover, .utility a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .utility svg { width: 15px; height: 15px; color: var(--accent); }
  .catnav { display: block; border-top: 1px solid var(--line); }
  .catnav .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .catnav a { display: inline-flex; align-items: center; gap: 6px; height: 42px; flex: none; font-size: 14px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .catnav a:first-child { color: var(--ink); font-weight: 600; }
  .catnav a svg { width: 16px; height: 16px; }
  .catnav a:hover { color: var(--ink); }
  .catnav a.is-on { color: var(--ink); border-bottom-color: var(--accent); }
  .hero { padding-top: 16px; }
  .hero-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "copy art" "steps steps"; column-gap: 32px; row-gap: 0; padding: 44px 44px 0; }
  .hero-copy { grid-area: copy; align-self: center; padding-bottom: 40px; }
  .hero h1 { font-size: 54px; }
  .hero-lead { font-size: 17px; }
  .hero-art { grid-area: art; display: block; position: relative; min-height: 340px; margin-block: -8px 24px; }
  .hero-steps { grid-area: steps; margin-inline: -44px; }
  .hero-steps li { padding: 14px 44px 16px; font-size: 13px; }
  .search { max-width: 620px; }
  .search input:placeholder-shown:not(:focus) ~ .search-kbd { display: block; }
  .search input:placeholder-shown:not(:focus) ~ .search-mic { right: 34px; }
  .top-link { display: inline-flex; }
  .topbar.is-hidden { transform: none !important; }
  .cartbar { left: auto; right: 24px; bottom: 24px; margin: 0; width: 360px; }
  .topbar.is-hidden ~ .cartbar { translate: none; opacity: 1; pointer-events: auto; }
  .toast { bottom: 100px; }

  .section { padding-top: 40px; }
  .section-head h2 { font-size: 24px; }
  .rail-nav { display: flex; }
  .rail { grid-auto-columns: calc(20% - 10px); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .shortcuts { gap: 14px; padding-top: 24px; }
  .shortcuts span { max-width: 84px; }
  .shortcuts a { font-size: 13px; }
  .brand-tile { width: 168px; height: 104px; }
  .brand-logo { width: calc(var(--w) * 1.15); height: calc(var(--h) * 1.15); }
  .marquee-set { gap: 12px; padding-right: 12px; }
  .pp-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: start; }
  .pp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; position: sticky; top: calc(var(--top-h, 110px) + 16px); }
  .pp-gallery img { width: 100%; }
  .pp-gallery img:first-child { grid-column: 1 / -1; }
  .seo-pre ul { columns: 4; }
  .cpanes-nav { position: sticky; top: calc(var(--top-h, 110px) + 16px); }
  .cpane-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .catalog-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .catalog-side { display: block; position: sticky; top: calc(var(--top-h, 110px) + 76px); align-self: start; max-height: calc(100vh - var(--top-h, 110px) - 96px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
  .toolbar .chip-filter, .toolbar .chip-sort { display: none; }
  .toolbar .sep:first-of-type { display: none; }
  .toolbar { top: var(--top-h, 110px); }

  /* Hojas: panel lateral y modal de producto */
  .sheet { left: auto; top: 0; bottom: 0; width: 440px; max-height: none; height: 100dvh; border-radius: var(--radius-lg) 0 0 var(--radius-lg); transform: translateX(100%); }
  .sheet.is-open { transform: none; }
  .sheet-grab { display: none; }
  .sheet[data-kind="product"] {
    top: 50%; left: 50%; right: auto; bottom: auto; width: min(1080px, 94vw); height: min(720px, 90dvh);
    border-radius: var(--radius-lg); transform: translate(-50%, -48%); opacity: 0;
    transition: transform .3s var(--ease), opacity .2s;
  }
  .sheet[data-kind="product"].is-open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet[data-kind="product"] .sheet-body { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .sheet[data-kind="product"] .pd-scroll { display: contents; }
  .sheet[data-kind="product"] .pd-left { grid-column: 1; grid-row: 1 / 3; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .sheet[data-kind="product"] .pd-gallery { border-radius: var(--radius); border: 1px solid var(--line); flex: 1; min-height: 0; display: flex; }
  .sheet[data-kind="product"] .pd-track { flex: 1; }
  .sheet[data-kind="product"] .pd-slide { aspect-ratio: auto; height: 100%; }
  .sheet[data-kind="product"] .pd-dots { display: none; }
  .sheet[data-kind="product"] .pd-info { grid-column: 2; grid-row: 1; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 28px 28px 14px; }
  .sheet[data-kind="product"] .sheet-foot { grid-column: 2; grid-row: 2; padding-inline: 28px; }
  .pd-thumbs { display: flex; gap: 8px; }
  .pd-thumbs button { width: 60px; height: 60px; border-radius: var(--radius-sm); background: var(--media); border: 1px solid var(--line); overflow: hidden; transition: border-color .15s; }
  .pd-thumbs button.is-on { border: 2px solid var(--ink); }
  .pd-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
  .pd-related .rail { grid-auto-columns: calc(40% - 6px); }
  .footer { padding-bottom: 40px; }
  .footer-grid { grid-template-columns: 1.5fr; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 28px; }
  .guide-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .catalog-layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail { grid-auto-columns: calc(16.666% - 10px); }
}

/* Celular: el encabezado se esconde al bajar; mientras escribís, las barras de abajo se apartan del teclado. */
@media (max-width: 959px) {
  .topbar.is-hidden { transform: translateY(calc(var(--row1) * -1)); }
  .hide-sm { display: none; }
  .suggest { left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1); border-inline: 0; border-radius: 0; }
  body:has(.topbar input:focus) :is(.tabbar, .cartbar) { display: none; }
  .sheet-pad, .sheet-foot { padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
}
@media (max-width: 380px) {
  .loc small { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .swipe-hint { display: none; }
}
