/* ==========================================================================
   NOVA — sistema de la tienda
   Un solo acento (naranja), tinta fría, lienzo gris cálido.
   Dos cortes: 1024px (tablet) y 720px (móvil). Nada de reglas por dispositivo.
   ========================================================================== */

:root {
  --accent: #C46E29;
  --accent-hover: #A45A20;
  --accent-tint: #FBF2E9;
  --accent-tint-border: #EBD6BF;

  --primary: #14181F;
  --primary-light: #0F1218;
  --bg-main: #F0EEE9;
  --bg-card: #FFFFFF;
  --bg-soft: #EAE7E1;
  --bg-panel: #F5F3EF;
  --border: #D5D1CA;
  --border-soft: #DDD9D2;
  --border-strong: #C6C1B8;
  --line: #E8E5DF;
  --text-main: #3F4650;
  --text-light: #6B7280;
  --text-mute: #8A8F98;
  --ok: #4E7D5E;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  --max: 1280px;
  --gutter: 64px;
  --header-h: 92px;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20,24,31,.05);
  --shadow-md: 0 4px 14px rgba(20,24,31,.07);
  --shadow-lg: 0 12px 32px rgba(20,24,31,.14);
  --shadow-xl: 0 24px 60px rgba(20,24,31,.28);
  --t: .22s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-main); color: var(--text-main);
  font: 400 15px/1.5 var(--font-main); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.4px; margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-sb { scrollbar-width: none; -ms-overflow-style: none; }
.no-sb::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 44px 0 0; }
.section:last-child { padding-bottom: 56px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grow { flex: 1; min-width: 0; }

.title { font: 700 34px var(--font-display); color: var(--primary); letter-spacing: -.6px; }
.title-bar { width: 64px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 8px; }
.title-sm { font: 600 22px var(--font-display); color: var(--primary); letter-spacing: -.4px; }
.eyebrow { font: 600 10.5px var(--font-main); letter-spacing: .1em; color: var(--text-mute); text-transform: uppercase; }
.muted { color: var(--text-mute); font-size: 12.5px; }
.link-all { font: 500 13px var(--font-main); color: var(--accent); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h); background: #fff;
  border-bottom: 1px solid var(--border);
  transition: background-color .25s ease, border-color .25s ease;
}
.header-in {
  max-width: var(--max); margin: 0 auto; height: 100%;
  padding: 0 56px; display: flex; align-items: center; gap: 28px;
}
/* ---------- logo ----------
   El header lleva las dos versiones apiladas y las cruza al pasar del banner
   al fondo blanco. El texto «NOVA» queda de reserva si falta algún archivo. */
.logo { position: relative; display: block; line-height: 0; flex: 0 0 auto; }
.logo img { height: 46px; width: auto; display: block; transition: opacity .25s ease; }
.logo img + img { position: absolute; top: 0; left: 0; }
.logo .logo-oscuro { opacity: 0; }
body.has-hero:not(.past-hero) .logo .logo-claro { opacity: 0; }
body.has-hero:not(.past-hero) .logo .logo-oscuro { opacity: 1; }

/* si falta un archivo, ese logo cae al texto sin arrastrar a los demás */
.logo-txt { display: none; }
.logo.sin-img img { display: none; }
.logo.sin-img .logo-txt {
  display: block; font: 700 34px/1 var(--font-display); color: var(--accent); letter-spacing: 2px;
}
.nav {
  margin-left: auto; display: flex; align-items: center; gap: 34px;
  font: 500 15px var(--font-main); color: var(--text-main);
}
.nav a { color: inherit; position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.nav a::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  width: 26px; height: 3px; border-radius: 2px; background: var(--accent);
  /* se estira con transform, no con width: no dispara cálculo de layout */
  transform: translateX(-50%) scaleX(0); transform-origin: center;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--accent); }
.nav a:hover::after { transform: translateX(-50%) scaleX(.62); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after { transform: translateX(-50%) scaleX(1); }
.hdr-div { width: 1px; height: 28px; background: var(--border); flex: 0 0 auto; }
.hdr-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-main);
  display: grid; place-items: center; color: var(--primary); font-size: 15px;
  position: relative; transition: background-color var(--t), color var(--t);
}
.icon-btn:hover { background: var(--bg-soft); color: var(--accent); }
.icon-btn.dark { background: var(--primary); color: #fff; }
.icon-btn.dark:hover { background: #000; color: #fff; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font: 600 10px/18px var(--font-main); text-align: center; padding: 0 4px;
  border: 2px solid #fff;
}
.burger, .m-only { display: none; }

/* header transparente sobre el banner de la portada */
body.has-hero .header {
  position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent;
}
body.has-hero .nav, body.has-hero .logo-wrap { color: #fff; }
body.has-hero .nav a { color: #fff; }
body.has-hero .nav a[aria-current="page"] { color: var(--accent); }
body.has-hero .hdr-div { background: rgba(255,255,255,.22); }
body.has-hero .icon-btn { background: rgba(255,255,255,.12); color: #fff; }
body.has-hero .icon-btn.dark { background: #fff; color: var(--primary); }
body.has-hero .burger { color: #fff; }
body.has-hero.past-hero .header {
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--border);
}
body.has-hero.past-hero .nav a { color: var(--text-main); }
body.has-hero.past-hero .nav a:hover,
body.has-hero.past-hero .nav a[aria-current="page"] { color: var(--accent); }
body.has-hero.past-hero .hdr-div { background: var(--border); }
body.has-hero.past-hero .icon-btn { background: var(--bg-main); color: var(--primary); }
body.has-hero.past-hero .icon-btn.dark { background: var(--primary); color: #fff; }
body.has-hero.past-hero .burger { color: var(--primary); }

/* header sólido y sin menú para el cierre de compra */
.header-checkout { background: var(--primary); border-bottom: none; height: 66px; }
.header-checkout .header-in { justify-content: space-between; }
.header-checkout .logo { font-size: 21px; color: #fff; letter-spacing: -.5px; }
.header-checkout .logo img { height: 30px; }
.header-checkout .secure { display: flex; align-items: center; gap: 9px; font: 500 11px var(--font-main); color: var(--text-mute); letter-spacing: .04em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--accent);
  color: #fff; display: grid; place-items: center; font: 700 15px var(--font-display);
}

/* ==========================================================================
   HERO / CARRUSEL
   ========================================================================== */
.hero {
  position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #0B0B0C;
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background: repeating-linear-gradient(45deg,#1A1A1C,#1A1A1C 10px,#232326 10px,#232326 20px);
  background-size: cover; background-position: center;
}
.hero-slide.on { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,.15) 0%, rgba(0,0,0,.72) 100%);
}
.hero-body {
  position: absolute; left: 0; right: 0; top: 52%; transform: translateY(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 0 120px; text-align: center;
}
.hero-eyebrow { font: 600 12px var(--font-main); letter-spacing: .14em; color: #E8A76A; }
.hero h1 { font: 700 58px/1.05 var(--font-display); color: #fff; letter-spacing: -1.5px; text-wrap: balance; }
.hero p { font: 400 17px var(--font-main); color: #D8D8DA; margin: 0; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 56px; height: 56px; border-radius: 50%; background: transparent;
  border: 1px solid rgba(255,255,255,.45); color: #fff; font-size: 17px;
  display: grid; place-items: center; transition: background-color var(--t);
}
.hero-arrow:hover { background: rgba(255,255,255,.14); }
.hero-arrow.prev { left: 32px; }
.hero-arrow.next { right: 32px; }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3;
  display: flex; justify-content: center; gap: 12px;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.45);
  transition: background-color var(--t);
}
.hero-dots button[aria-current="true"] { background: var(--accent); }
.hero-hint { position: absolute; left: 0; right: 0; bottom: 44px; text-align: center; font: 400 10px var(--mono); color: rgba(255,255,255,.5); z-index: 3; }

/* ==========================================================================
   BOTONES / CAMPOS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 26px; border-radius: var(--radius);
  font: 600 14px var(--font-main); border: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t), color var(--t);
  cursor: pointer; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { border-color: var(--border-strong); color: var(--primary); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font: 600 10.5px var(--font-main); letter-spacing: .09em; color: var(--text-mute); text-transform: uppercase; }
.field .hint { font: 400 10.5px var(--font-main); color: var(--text-mute); }
.input, .select, .textarea {
  width: 100%; height: 52px; padding: 0 14px; background: #fff;
  border: 1px solid var(--border); border-radius: 11px;
  font: 400 14px var(--font-main); color: var(--primary); outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.textarea { height: auto; min-height: 120px; padding: 14px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,110,41,.14);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A8F98' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 11px; padding-right: 36px;
}
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.switch {
  width: 40px; height: 24px; border-radius: 12px; background: var(--border-strong);
  position: relative; flex: 0 0 auto; cursor: pointer; transition: background-color var(--t); border: none;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform var(--t);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* ==========================================================================
   TARJETAS
   ========================================================================== */
.ph { /* marcador de foto: damero cálido */
  background: repeating-linear-gradient(45deg,#DFDCD5,#DFDCD5 8px,#E9E6E0 8px,#E9E6E0 16px);
  display: grid; place-items: center; font: 9.5px var(--mono); color: #9AA0A8; text-align: center;
}

/* categorías 132×132 — hasta 6 por fila, como el wireframe */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, 132px); gap: 22px;
  justify-content: center; max-width: min(100%, 902px); margin-inline: auto;
}
.cat-card {
  width: 132px; min-height: 132px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--primary); position: relative; transition: border-color var(--t), box-shadow var(--t);
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); color: var(--primary); }
.cat-card i { color: var(--accent); font-size: 30px; }
.cat-card span { font: 600 14px var(--font-display); color: var(--primary); }
.cat-card .n {
  position: absolute; top: 10px; right: 10px; font: 500 9.5px var(--font-main);
  color: var(--text-mute); background: var(--bg-main); border-radius: 5px; padding: 2px 6px;
}
.cat-card.on { border: 1.5px solid var(--accent); }
.cat-card.on .n { color: var(--accent); background: var(--accent-tint); }
.cat-card.more { background: var(--bg-main); border-style: dashed; border-color: var(--border-strong); color: var(--text-mute); }
.cat-card.more i, .cat-card.more span { color: var(--text-mute); font-size: 22px; }
.cat-card.more span { font: 500 13px var(--font-main); }

/* marcas */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.brand-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  min-height: 100px; display: grid; place-items: center; padding: 18px; text-align: center;
  font: 700 15px var(--font-display); color: var(--primary);
  transition: border-color var(--t), box-shadow var(--t);
}
.brand-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); color: var(--primary); }
.brand-pill {
  height: 56px; padding: 0 22px; border-radius: var(--radius); border: 1px solid var(--border);
  background: #fff; display: flex; align-items: center; flex: 0 0 auto;
  font: 700 13px var(--font-display); color: var(--primary);
}
.brand-pill:hover { border-color: var(--accent); color: var(--primary); }

/* productos */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prod-grid.dense { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; }
.prod-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 11px; color: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.prod-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); color: inherit; }
.prod-card .img { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative; }
.prod-card .badge {
  position: absolute; top: 8px; left: 8px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--accent); color: #fff; font: 600 10.5px/22px var(--font-main);
}
.prod-card .brandline { font: 500 10px var(--font-main); letter-spacing: .08em; color: var(--text-mute); text-transform: uppercase; }
.prod-card .name { font: 400 13px/1.4 var(--font-main); color: var(--text-main); min-height: 36px; text-wrap: pretty; }
.prod-card .price { font: 700 19px var(--font-display); color: var(--primary); }
.prod-card .price s { font: 400 12px var(--font-main); color: var(--text-mute); margin-left: 7px; }
.prod-card .stock { font: 500 11px var(--font-main); color: var(--ok); }
.prod-card .stock.off { color: var(--text-mute); }
.prod-card .btn { height: 44px; border-radius: 11px; font-size: 13px; margin-top: auto; }

/* migas */
.crumbs { display: flex; align-items: center; gap: 9px; font: 400 12.5px var(--font-main); color: var(--text-mute); flex-wrap: wrap; }
.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-size: 9px; color: var(--border-strong); }
.crumbs .now { color: var(--primary); }

/* cabecera oscura de sección (herramientas / descargas) */
.dark-head { background: var(--primary); padding: 34px 0 30px; }
.dark-head .crumbs, .dark-head .crumbs a { color: #7E838B; }
.dark-head h1 { font: 600 30px var(--font-display); color: #fff; letter-spacing: -.7px; margin: 13px 0 0; }
.dark-head p { font: 400 13.5px/1.6 var(--font-main); color: #A9AEB5; max-width: 620px; margin: 13px 0 0; }
.back-dark {
  width: 32px; height: 32px; border-radius: var(--radius-sm); background: #1E232B;
  border: 1px solid #2B313C; display: grid; place-items: center; color: #fff; font-size: 12px; flex: 0 0 auto;
}

/* chips */
.chips { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 18px; background: #fff;
  border: 1px solid var(--border); color: var(--text-main);
  font: 500 12px/34px var(--font-main); cursor: pointer; transition: all var(--t);
}
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-filter {
  height: 32px; padding: 0 12px; border-radius: 16px; background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border); color: var(--accent-hover);
  font: 500 12px/30px var(--font-main); display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.chip-filter i { font-size: 11px; }

/* buscador embebido */
.searchbox {
  height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: var(--bg-main); border: 1px solid var(--border); border-radius: var(--radius);
}
.searchbox i { color: var(--text-mute); font-size: 13px; }
.searchbox input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: 400 13.5px var(--font-main); color: var(--primary); }
.searchbox input::placeholder { color: var(--text-mute); }
.searchbox.white { background: #fff; }

/* estado vacío */
.empty {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 40px 24px; text-align: center; color: var(--text-mute);
  font: 400 13.5px/1.7 var(--font-main); grid-column: 1 / -1;
}
.empty i { font-size: 24px; color: var(--border-strong); display: block; margin-bottom: 12px; }

/* ==========================================================================
   BÚSQUEDA — panel a ancho completo (escritorio) / pantalla completa (móvil)
   ========================================================================== */
.search-scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(20,24,31,.45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideDown { from { transform: translateY(-14px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes drawerIn { from { transform: translateX(-100%) } to { transform: translateX(0) } }
@keyframes sheetIn { from { transform: translateY(100%) } to { transform: translateY(0) } }

.search-panel {
  position: fixed; top: 0; left: 0; right: 0; z-index: 95; background: #fff;
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  max-height: 100vh; overflow-y: auto; animation: slideDown .2s ease;
}
.search-panel .bar {
  height: 92px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border);
}
.search-panel .bar input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font: 400 22px var(--font-display); color: var(--primary); letter-spacing: -.3px;
}
.search-panel .bar input::placeholder { color: var(--text-mute); }
.search-cols { display: grid; grid-template-columns: 320px 1fr; gap: 0; }
.search-left { padding: 26px 0 34px; border-right: 1px solid var(--border); padding-right: 32px; }
.search-right { padding: 26px 0 34px 32px; min-width: 0; }
.search-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.search-tag {
  height: 34px; padding: 0 13px; border-radius: 17px; background: var(--bg-main);
  border: 1px solid var(--border); font: 400 13px/32px var(--font-main); color: var(--text-main);
}
.search-tag:hover { border-color: var(--accent); color: var(--accent); }
.search-quick { display: grid; gap: 9px; margin-top: 22px; }
.search-quick a {
  height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 11px; color: var(--primary);
  font: 500 13px var(--font-main); background: #fff;
}
.search-quick a i { color: var(--accent); font-size: 13px; width: 16px; }
.search-quick a:hover { border-color: var(--accent); }
.sugg-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px;
  color: var(--primary); font: 400 13.5px var(--font-main);
}
.sugg-row:hover { background: var(--bg-main); color: var(--primary); }
.sugg-row i { color: var(--text-mute); font-size: 12px; }
.sugg-row b { color: var(--primary); font-weight: 600; }
.sugg-row .count { margin-left: auto; font: 400 11.5px var(--font-main); color: var(--text-mute); }
.search-hit {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: inherit;
}
.search-hit:hover { background: var(--bg-main); color: inherit; }
.search-hit .thumb { flex: 0 0 44px; aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--border); overflow: hidden; }
.search-hit .t { flex: 1; min-width: 0; font: 400 13px/1.35 var(--font-main); color: var(--primary); }
.search-hit .t small { display: block; font: 400 11px var(--font-main); color: var(--text-mute); margin-top: 2px; }
.search-hit .p { font: 600 13.5px var(--font-display); color: var(--primary); flex: 0 0 auto; }

/* ==========================================================================
   MENÚ LATERAL (móvil) + BARRA DE PESTAÑAS
   ========================================================================== */
.drawer-scrim { position: fixed; inset: 0; z-index: 98; background: rgba(20,24,31,.5); animation: fade .2s ease; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 99; width: 84vw; max-width: 330px;
  background: #fff; display: flex; flex-direction: column; animation: drawerIn .24s ease;
  overflow-y: auto;
}
.drawer .head {
  height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.drawer .head .logo { font-size: 26px; letter-spacing: 1.5px; }
.drawer .head .logo img { height: 34px; }
.drawer nav { padding: 8px 0 16px; }
.drawer nav a, .drawer nav button {
  width: 100%; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  font: 500 15px var(--font-main); color: var(--primary); text-align: left;
}
.drawer nav a:hover { background: var(--bg-main); color: var(--primary); }
.drawer nav a i { color: var(--text-mute); font-size: 15px; width: 20px; }
.drawer nav .sub { padding-left: 52px; height: 46px; font-weight: 400; font-size: 14px; color: var(--text-main); }
.drawer .grouptitle { padding: 16px 18px 6px; font: 600 10.5px var(--font-main); letter-spacing: .1em; color: var(--text-mute); text-transform: uppercase; }
.drawer .sep { height: 1px; background: var(--line); margin: 8px 18px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none;
  height: calc(70px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
  align-items: center; background: #fff; border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1; height: 58px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; color: var(--text-mute); position: relative;
}
.tabbar a i { font-size: 17px; }
.tabbar a span { font: 500 10.5px var(--font-main); }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"] span { font-weight: 600; }
.tabbar .badge {
  position: absolute; top: 0; right: 22%; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 600 9.5px/17px var(--font-main); text-align: center; padding: 0 4px;
}

/* ==========================================================================
   LISTADO CON FILTROS
   ========================================================================== */
.list-layout { display: grid; grid-template-columns: 264px 1fr; gap: 0; align-items: start; }
.filters {
  border-right: 1px solid var(--border); background: #fff; padding: 24px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: calc(var(--header-h) + 1px); align-self: start; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.filters-body { display: contents; }
.fgroup { display: flex; flex-direction: column; gap: 11px; }
.fopt { display: flex; align-items: center; gap: 10px; font: 400 13px var(--font-main); color: var(--text-main); cursor: pointer; }
.fopt .count { color: #9AA0A8; }
.range { height: 4px; border-radius: 2px; background: var(--border); position: relative; }
.range span { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; }
.list-main { padding: 22px 0 34px 28px; display: flex; flex-direction: column; gap: 18px; }
.filters-toggle { display: none; }
.sheet-scrim { position: fixed; inset: 0; z-index: 96; background: rgba(20,24,31,.5); animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 97; background: #fff;
  border-radius: 20px 20px 0 0; max-height: 86vh; display: flex; flex-direction: column;
  animation: sheetIn .26s cubic-bezier(.22,.9,.3,1);
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 10px auto 0; flex: 0 0 auto; }
.sheet .head { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.sheet .body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.sheet .foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: 0 0 auto; }

/* ==========================================================================
   FICHA DE PRODUCTO
   ========================================================================== */
.pdp { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 44px; align-items: start; }
/* sin esto un hijo con contenido ancho (pestañas, tablas) estira la columna
   y saca la página de cuadro en móvil */
.pdp > *, .cart-layout > *, .two-col > *, .two-eq > *, .list-layout > * { min-width: 0; }
.gallery { display: flex; gap: 16px; }
.gallery .thumbs { display: flex; flex-direction: column; gap: 10px; flex: 0 0 76px; }
.gallery .thumbs button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; padding: 0; }
.gallery .thumbs button[aria-current="true"] { border: 2px solid var(--primary); }
.gallery .main { flex: 1; aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--border); overflow: hidden; }
.buy-price { display: flex; align-items: baseline; gap: 12px; }
.buy-price b { font: 700 34px var(--font-display); color: var(--primary); letter-spacing: -1px; }
.buy-price s { font: 400 15px var(--font-main); color: var(--text-mute); }
.buy-price span { font: 400 12.5px var(--font-main); color: var(--text-light); }
.qty { display: flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; flex: 0 0 auto; }
.qty button { width: 46px; height: 50px; display: grid; place-items: center; font-size: 12px; color: var(--text-main); }
.qty button:hover { background: var(--bg-main); }
.qty input { width: 46px; height: 50px; text-align: center; border: none; outline: none; font: 600 14.5px var(--font-main); color: var(--primary); background: transparent; }
.perks { border-radius: 14px; background: var(--bg-panel); border: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 11px; }
.perks div { display: flex; gap: 11px; align-items: center; font: 400 12.5px var(--font-main); color: var(--text-main); }
.perks i { color: var(--text-mute); font-size: 13px; width: 16px; }
.rowlink {
  display: flex; align-items: center; justify-content: space-between; height: 52px;
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  font: 500 13.5px var(--font-main); color: var(--primary);
}
.rowlink i { font-size: 11px; color: var(--accent); }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); }
.tabs button { padding-bottom: 12px; font: 500 13.5px var(--font-main); color: var(--text-mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.spec-grid div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font: 400 12.5px var(--font-main); }
.spec-grid dt, .spec-grid span:first-child { color: var(--text-light); }
.spec-grid dd, .spec-grid span:last-child { color: var(--primary); margin: 0; text-align: right; }
.combo { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.combo .item { display: flex; gap: 12px; align-items: center; }
.combo .item .th { flex: 0 0 60px; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.combo .item .t { flex: 1; min-width: 0; font: 400 12.5px/1.35 var(--font-main); color: var(--text-main); }
.combo .item b { display: block; font: 600 14px var(--font-display); color: var(--primary); margin-top: 3px; }
.buy-bar { display: none; }

/* ==========================================================================
   CARRITO Y CHECKOUT
   ========================================================================== */
.cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 44px; align-items: start; }
.cart-line { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.cart-line .th { flex: 0 0 92px; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.cart-line .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.cart-line .t a { font: 400 14px/1.4 var(--font-main); color: var(--primary); text-wrap: pretty; }
.cart-line .lineprice { font: 700 17px var(--font-display); color: var(--primary); }
.qty-sm { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; width: fit-content; }
.qty-sm button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 11px; color: var(--text-main); }
.qty-sm input { width: 40px; height: 34px; text-align: center; border: none; outline: none; background: transparent; font: 600 13px var(--font-main); }
.summary {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.summary .line { display: flex; justify-content: space-between; font: 400 12.5px var(--font-main); color: var(--text-light); }
.summary .line b { color: var(--primary); font-weight: 400; }
.summary .line.ok b { color: var(--ok); }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; font: 600 14px var(--font-main); color: var(--primary); }
.summary .total b { font: 700 24px var(--font-display); letter-spacing: -.5px; }
.coupon-row {
  height: 46px; border: 1px dashed var(--border-strong); border-radius: 11px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 13px;
  font: 500 12.5px var(--font-main); color: var(--text-light); width: 100%;
}
.mini-line { display: flex; gap: 12px; align-items: center; }
.mini-line .th { flex: 0 0 56px; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.mini-line .t { flex: 1; min-width: 0; font: 400 12.5px/1.35 var(--font-main); color: var(--text-main); }
.mini-line b { display: block; font: 600 13.5px var(--font-display); color: var(--primary); margin-top: 3px; }

.step { display: flex; flex-direction: column; gap: 14px; }
.step > .eyebrow { margin-bottom: 0; }
.opt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 5px; text-align: left; cursor: pointer;
  transition: border-color var(--t), background-color var(--t);
}
.opt-card b { font: 600 13px var(--font-main); color: var(--primary); }
.opt-card span { font: 400 11.5px var(--font-main); color: var(--text-light); }
.opt-card[aria-checked="true"] { border: 2px solid var(--accent); background: var(--accent-tint); padding: 13px; }
.opt-card[aria-checked="true"] span { color: #7A4A1C; }
.pay-row {
  height: 52px; background: #fff; border: 1px solid var(--border); border-radius: 11px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  font: 500 13.5px var(--font-main); color: var(--primary); cursor: pointer; width: 100%; text-align: left;
}
.pay-row .dot { width: 20px; height: 20px; border-radius: 10px; border: 1px solid var(--border-strong); flex: 0 0 auto; }
.pay-row[aria-checked="true"] { border: 2px solid var(--accent); background: #FDFAF7; padding: 0 13px; }
.pay-row[aria-checked="true"] .dot { border: 6px solid var(--accent); }
.card-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }

/* ==========================================================================
   TABLA (descargas)
   ========================================================================== */
.table { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table .th, .table .tr { display: grid; grid-template-columns: 1fr 160px 110px 160px; gap: 20px; padding: 15px 20px; align-items: center; }
.table .th { background: var(--bg-soft); border-bottom: 1px solid var(--border); font: 600 10.5px var(--font-main); letter-spacing: .09em; color: var(--text-light); text-transform: uppercase; }
.table .tr { border-bottom: 1px solid var(--border-soft); font: 400 13px var(--font-main); color: var(--text-main); }
.table .tr:last-child { border-bottom: none; }
.table .tr:hover { background: #FCFBF9; }
.table .file { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .file i { color: var(--accent); font-size: 14px; flex: 0 0 auto; }
.table .file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .dim { color: var(--text-light); }
.table .dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table .dl i { color: var(--accent); font-size: 12px; }
.dl-card { display: none; }

/* ==========================================================================
   HERRAMIENTAS
   ========================================================================== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  display: flex; gap: 13px; align-items: flex-start; color: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); color: inherit; }
.tool-card > i { color: var(--accent); font-size: 15px; margin-top: 2px; flex: 0 0 auto; }
.tool-card b { display: block; font: 600 13.5px var(--font-main); color: var(--primary); }
.tool-card span { display: block; font: 400 11.5px/1.45 var(--font-main); color: var(--text-light); margin-top: 3px; }
.tool-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}

/* ==========================================================================
   CONTACTO / NOSOTROS
   ========================================================================== */
/* El encabezado ocupa su propia fila en la columna izquierda. Así el primer
   campo del formulario y la primera tarjeta arrancan a la misma altura, con la
   misma separación entre elementos, sin depender de cuánto ocupe el texto. */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 44px; align-items: start; }
.two-col > .intro { grid-column: 1; grid-row: 1; }
.two-col > form   { grid-column: 1; grid-row: 2; }
.two-col > aside  { grid-column: 2; grid-row: 2; }
.two-col [data-msg]:empty { display: none; }   /* sin hueco fantasma bajo el botón */
.two-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.info-card {
  display: flex; gap: 14px; align-items: center; border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; background: #fff;
}
.info-card .ic { width: 44px; height: 44px; border-radius: 50%; background: #FBF3EC; display: grid; place-items: center; color: var(--accent); font-size: 16px; flex: 0 0 auto; }
.info-card b { font: 600 15px var(--font-display); color: var(--primary); }
.info-card span { display: block; font: 400 12.5px var(--font-main); color: var(--text-mute); margin-top: 3px; }
.service { display: flex; gap: 16px; align-items: flex-start; }
.service .ic { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-size: 17px; flex: 0 0 auto; }
.service p { font: 600 15px/1.6 var(--font-main); color: var(--primary); margin: 9px 0 0; }
.prose { display: flex; flex-direction: column; gap: 16px; font: 400 15px/1.7 var(--font-main); color: var(--text-main); }
.prose .lead { font-weight: 600; color: var(--primary); }

/* ==========================================================================
   PIE
   ========================================================================== */
.footer { background: var(--primary); color: #C9CBCF; margin-top: 56px; }
.footer-grid {
  max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 40px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 24px;
}
.footer .logo { color: #fff; font-size: 26px; letter-spacing: 2px; }
.footer .logo img { height: 31px; }
.footer h4 { font: 600 10.5px var(--font-main); letter-spacing: .11em; color: #7E838B; text-transform: uppercase; margin-bottom: 16px; }
.footer .contact { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.footer .contact div { display: flex; gap: 12px; align-items: flex-start; font: 400 13.5px/1.5 var(--font-main); color: #C9CBCF; }
.footer .contact i { color: #8A8F98; font-size: 14px; margin-top: 2px; width: 16px; flex: 0 0 auto; }
.footer .contact strong { color: #fff; font-weight: 600; }
.footer nav { display: flex; flex-direction: column; gap: 16px; }
.footer nav a { display: flex; align-items: center; gap: 9px; font: 400 14px var(--font-main); color: #C9CBCF; }
.footer nav a i { color: #8A8F98; font-size: 10px; }
.footer nav a:hover { color: #fff; }
.footer-side { border-left: 1px solid rgba(255,255,255,.14); padding-left: 32px; display: flex; flex-direction: column; gap: 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 16px; }
.footer-legal {
  position: relative; background: var(--primary-light); padding: 20px var(--gutter) 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-legal .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font: 400 12.5px var(--font-main); color: #8A8F98; }
.footer-legal .links a { color: #8A8F98; }
.footer-legal .links a:hover { color: #fff; }
.footer-legal .copy { font: 400 12px var(--font-main); color: var(--text-light); }
.to-top {
  position: absolute; right: var(--gutter); bottom: 20px; width: 44px; height: 44px;
  border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--primary); font-size: 15px;
}
.to-top:hover { background: var(--accent); color: #fff; }

/* aviso flotante */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  z-index: 200; background: var(--primary); color: #fff; padding: 13px 20px; border-radius: 12px;
  font: 500 13.5px var(--font-main); box-shadow: var(--shadow-lg); opacity: 0;
  transition: opacity .2s ease, transform .2s ease; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--accent); margin-right: 8px; }

/* ==========================================================================
   TABLET ≤1024
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --gutter: 28px; }
  .header-in { padding: 0 28px; gap: 20px; }
  .nav { gap: 20px; font-size: 14px; }
  .logo { font-size: 28px; }
  .logo img { height: 42px; }
  .hero { height: 100vh; height: 100svh; }
  .hero h1 { font-size: 42px; }
  .hero-body { padding: 0 48px; }
  .hero-arrow { display: none; }
  .pdp, .cart-layout { grid-template-columns: 1fr; gap: 32px; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .two-col > .intro, .two-col > form, .two-col > aside { grid-column: 1; grid-row: auto; }
  .summary { position: static; }
  .two-eq { grid-template-columns: 1fr; gap: 40px; }
  .list-layout { grid-template-columns: 220px 1fr; }
  .list-main { padding-left: 22px; }
  .search-cols { grid-template-columns: 260px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-side { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 24px; }
}

/* ==========================================================================
   MÓVIL ≤720
   ========================================================================== */
@media (max-width: 720px) {
  :root { --gutter: 18px; --header-h: 60px; }

  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.no-tabbar { padding-bottom: 0; }

  .header-in { padding: 0 14px; gap: 8px; }
  .logo { font-size: 26px; letter-spacing: 1.5px; }
  .logo img { height: 34px; }
  .nav, .hdr-div { display: none; }
  .burger {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
    color: var(--primary); font-size: 18px; flex: 0 0 auto;
  }
  .hdr-actions { gap: 2px; }
  .icon-btn { background: transparent !important; width: 44px; height: 44px; border-radius: 11px; font-size: 17px; color: var(--primary); }
  .icon-btn.dark { background: transparent !important; color: var(--primary); }
  body.has-hero .icon-btn, body.has-hero .icon-btn.dark { color: #fff; }
  body.has-hero.past-hero .icon-btn, body.has-hero.past-hero .icon-btn.dark { color: var(--primary); }
  .icon-btn .cart-badge { top: 4px; right: 3px; border-color: transparent; }
  .hide-m { display: none !important; }
  .m-only { display: block; }
  .tabbar { display: flex; }
  body.no-tabbar .tabbar { display: none; }

  .hero { height: 100vh; height: 100svh; }
  .hero h1 { font-size: 34px; line-height: 1.08; letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .hero-body { padding: 0 24px; gap: 16px; }
  .hero-dots { bottom: 20px; gap: 9px; }
  .hero-dots button { width: 8px; height: 8px; }
  .hero-dots button[aria-current="true"] { width: 22px; }

  .title { font-size: 26px; letter-spacing: -.5px; }
  .title-bar { width: 56px; }
  .title-sm { font-size: 20px; }
  .section { padding-top: 30px; }
  .section:last-child { padding-bottom: 34px; }

  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; justify-content: stretch; }
  .cat-card { width: auto; min-height: 124px; padding: 18px 12px; gap: 10px; }
  .cat-card i { font-size: 28px; }
  .cat-card span { font-size: 13px; }

  /* carruseles horizontales: marcas y destacados */
  .scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
  .scroller > * { flex: 0 0 auto; scroll-snap-align: start; }
  .scroller .prod-card { width: 196px; }
  .scroller .brand-card { width: 132px; min-height: 76px; }
  .brand-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .prod-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod-grid.dense { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod-card { padding: 12px; gap: 10px; }
  .prod-card .name { font-size: 13px; min-height: 38px; }
  .prod-card .price { font-size: 18px; }
  .prod-card .btn { height: 46px; }

  /* filtros como hoja inferior */
  .list-layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .list-main { padding: 0; }
  .filters-toggle {
    display: flex; gap: 10px; position: sticky; top: var(--header-h); z-index: 20;
    background: var(--bg-main); padding: 12px 0; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter);
  }
  .filters-toggle .btn { flex: 1; height: 44px; font-size: 13px; }

  /* búsqueda a pantalla completa */
  .search-panel { top: 0; bottom: 0; height: 100dvh; border-radius: 0; }
  .search-panel .bar { height: 60px; }
  .search-panel .bar input { font-size: 17px; }
  .search-cols { grid-template-columns: 1fr; }
  .search-left { border-right: none; padding-right: 0; padding-bottom: 8px; }
  .search-right { padding: 8px 0 24px; }
  .search-right .prod-grid { grid-template-columns: 1fr 1fr; }

  /* ficha */
  .gallery { flex-direction: column-reverse; gap: 12px; margin: 0 calc(var(--gutter) * -1); }
  .gallery .main { border-radius: 0; border-left: none; border-right: none; }
  .gallery .thumbs { flex-direction: row; overflow-x: auto; padding: 0 var(--gutter); }
  .gallery .thumbs button { flex: 0 0 62px; }
  .spec-grid { grid-template-columns: 1fr; gap: 0; }
  .tabs { gap: 20px; overflow-x: auto; }
  .tabs button { white-space: nowrap; font-size: 13px; }
  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 50;
    display: flex; gap: 11px; align-items: center; background: #fff;
    border-top: 1px solid var(--border); padding: 11px var(--gutter) 12px;
  }
  .buy-bar .btn { flex: 1; }
  .buy-bar .price { font: 700 18px var(--font-display); color: var(--primary); flex: 0 0 auto; }
  body.has-buybar { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
  .pdp-buy-desktop { display: none; }

  /* carrito */
  .cart-line .th { flex: 0 0 76px; }
  .opt-cards { grid-template-columns: 1fr; }
  .card-fields { grid-template-columns: 1fr 1fr; }
  .card-fields > :first-child { grid-column: 1 / -1; }

  /* descargas: la tabla pasa a tarjetas */
  .table { display: none; }
  .dl-card {
    display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; padding: 14px; color: inherit;
  }
  .dl-card > i { color: var(--accent); font-size: 18px; flex: 0 0 auto; }
  .dl-card .t { flex: 1; min-width: 0; }
  .dl-card .t b { display: block; font: 500 13.5px/1.4 var(--font-main); color: var(--primary); }
  .dl-card .t span { display: block; font: 400 11.5px var(--font-main); color: var(--text-mute); margin-top: 4px; }
  .dl-card .go { width: 44px; height: 44px; border-radius: 11px; background: var(--bg-main); display: grid; place-items: center; color: var(--accent); flex: 0 0 auto; }

  /* herramientas */
  .tool-grid { grid-template-columns: 1fr; }
  .tool-cta { flex-direction: column; align-items: stretch; gap: 14px; }

  /* pie */
  .footer-grid { grid-template-columns: 1fr; padding: 32px var(--gutter) 26px; gap: 26px; }
  .footer nav { border-top: 1px solid rgba(255,255,255,.14); }
  .footer nav a { height: 48px; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
  .footer nav a i { order: 2; font-size: 11px; }
  .footer h4 { margin-bottom: 0; padding-top: 8px; }
  .footer-social a { width: 44px; height: 44px; font-size: 17px; }
  .footer-legal { padding: 18px var(--gutter); }
  .to-top { display: none; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

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

/* ==========================================================================
   CALCULADORAS — un solo formato para las 45 herramientas
   ========================================================================== */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: start; }
.calc > * { min-width: 0; }

.calc-ayuda {
  margin: 0 0 20px; padding: 13px 15px; border-radius: 12px;
  background: var(--accent-tint); border: 1px solid var(--accent-tint-border);
  font: 400 12.5px/1.6 var(--font-main); color: #7A4A1C;
}
.calc-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-f { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.calc-f.calc-wide { grid-column: 1 / -1; }
.calc-f > label {
  font: 600 10.5px var(--font-main); letter-spacing: .09em;
  color: var(--text-mute); text-transform: uppercase;
}
.calc-hint { font: 400 11px/1.5 var(--font-main); color: var(--text-mute); }
.calc-in { display: flex; align-items: stretch; gap: 0; }
.calc-in .input { border-radius: 11px 0 0 11px; border-right: none; }
.calc-in .input:only-child { border-radius: 11px; border-right: 1px solid var(--border); }
.calc-in .input:focus { z-index: 1; }
.calc-u, .calc-esc {
  flex: 0 0 auto; min-width: 62px; height: 52px; padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 0 11px 11px 0;
  font: 500 12.5px var(--font-main); color: var(--text-main);
  display: grid; place-items: center; text-align: center;
}
.calc-esc { cursor: pointer; appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238A8F98' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 10px; }
.calc-esc:hover { border-color: var(--border-strong); }
.calc-mono { font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }

.calc-check {
  display: flex; align-items: center; gap: 11px; text-align: left;
  font: 400 13px var(--font-main); color: var(--text-main); min-height: 52px;
  padding: 0 14px; background: #fff; border: 1px solid var(--border); border-radius: 11px; width: 100%;
}
.calc-check .bx {
  width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border-strong);
  display: grid; place-items: center; flex: 0 0 auto;
}
.calc-check .bx i { font-size: 9px; color: #fff; opacity: 0; }
.calc-check[aria-checked="true"] .bx { background: var(--accent); border-color: var(--accent); }
.calc-check[aria-checked="true"] .bx i { opacity: 1; }

.calc-lista { display: flex; flex-direction: column; gap: 8px; }
.calc-litem { display: flex; align-items: stretch; gap: 8px; }
.calc-litem .calc-n {
  width: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px;
  background: var(--bg-soft); font: 600 11.5px var(--mono); color: var(--text-mute);
}
.calc-litem .input { border-radius: 11px 0 0 11px; border-right: none; }
.calc-litem .calc-u, .calc-litem .calc-esc { border-radius: 0 11px 11px 0; }
.calc-x {
  width: 38px; flex: 0 0 auto; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; color: var(--text-mute); font-size: 12px;
}
.calc-x:hover { border-color: #C0483A; color: #C0483A; }
.calc-add {
  height: 44px; border: 1px dashed var(--border-strong); border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font: 500 12.5px var(--font-main); color: var(--primary); width: 100%;
}
.calc-add:hover { border-color: var(--accent); }
.calc-add i { font-size: 11px; color: var(--accent); }

.calc-acciones { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- panel de resultado ---------- */
.calc-res {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.calc-res.calc-err {
  flex-direction: row; align-items: flex-start; gap: 12px;
  background: var(--accent-tint); border-color: var(--accent-tint-border);
  font: 400 13px/1.6 var(--font-main); color: #7A4A1C;
}
.calc-res.calc-err i { color: var(--accent); font-size: 15px; margin-top: 1px; flex: 0 0 auto; }

.calc-big { display: flex; flex-direction: column; gap: 4px; }
.calc-big-l { font: 600 10.5px var(--font-main); letter-spacing: .09em; color: var(--text-mute); text-transform: uppercase; }
.calc-big b {
  font: 700 clamp(30px, 4.4vw, 40px)/1.05 var(--font-display);
  color: var(--primary); letter-spacing: -1.4px; word-break: break-word;
}
.calc-big b small { font: 600 17px var(--font-display); color: var(--accent); margin-left: 7px; letter-spacing: 0; }
.calc-big-n { font: 400 12.5px var(--font-main); color: var(--text-light); margin-top: 2px; }

.calc-filas { margin: 0; display: flex; flex-direction: column; }
.calc-filas > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.calc-filas > div:first-child { border-top: none; padding-top: 0; }
.calc-filas dt { font: 400 12.5px/1.4 var(--font-main); color: var(--text-light); min-width: 0; }
.calc-filas dt span { display: block; font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.calc-filas dd { margin: 0; font: 500 13.5px var(--font-main); color: var(--primary); text-align: right; flex: 0 0 auto; }
.calc-filas dd i { font-style: normal; color: var(--text-mute); font-weight: 400; font-size: 12px; }
.calc-filas > div.hot dd { font: 700 16px var(--font-display); color: var(--primary); }
.calc-filas > div.on { background: var(--accent-tint); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; border-top-color: transparent; }
.calc-filas > div.on dt { color: var(--accent-hover); }

.calc-tabla-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.calc-tabla { width: 100%; border-collapse: collapse; font: 400 12.5px var(--font-main); }
.calc-tabla th {
  text-align: left; padding: 9px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--border);
  font: 600 10px var(--font-main); letter-spacing: .09em; color: var(--text-light); text-transform: uppercase; white-space: nowrap;
}
.calc-tabla td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--text-main); white-space: nowrap; }
.calc-tabla tr:last-child td { border-bottom: none; }
.calc-tabla tr.on td { background: var(--accent-tint); color: var(--accent-hover); font-weight: 500; }

.calc-barras { display: flex; flex-direction: column; gap: 9px; }
.calc-barra { display: grid; grid-template-columns: 92px 1fr 64px; gap: 10px; align-items: center; }
.calc-barra .l { font: 400 11.5px var(--font-main); color: var(--text-light); }
.calc-barra .t { height: 8px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.calc-barra .t i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.calc-barra .v { font: 600 12px var(--font-main); color: var(--primary); text-align: right; }

.calc-aviso {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 11px;
  font: 400 12.5px/1.6 var(--font-main);
}
.calc-aviso i { font-size: 13px; margin-top: 2px; flex: 0 0 auto; }
.calc-aviso.info { background: var(--bg-main); color: var(--text-main); }
.calc-aviso.info i { color: var(--text-mute); }
.calc-aviso.bien { background: #EDF3EE; color: #3B6349; }
.calc-aviso.bien i { color: var(--ok); }
.calc-aviso.mal { background: #FBEDEB; color: #8C3227; }
.calc-aviso.mal i { color: #C0483A; }

.calc-formula {
  font: 400 11.5px/1.7 var(--mono); color: var(--text-light);
  background: var(--bg-main); border-radius: 9px; padding: 10px 12px; overflow-x: auto;
}
.calc-nota { margin: 0; font: 400 11.5px/1.7 var(--font-main); color: var(--text-mute); }

/* dibujo de la resistencia con sus bandas */
.calc-resistor { display: flex; justify-content: center; padding: 6px 0 2px; }
.calc-resistor .cuerpo {
  display: flex; align-items: center; gap: 7px; height: 54px; padding: 0 20px;
  background: linear-gradient(#F2E4C9, #E4D2B0); border-radius: 26px / 14px;
  border: 1px solid #D6C29C; box-shadow: inset 0 -4px 8px rgba(0,0,0,.07);
  position: relative;
}
.calc-resistor .cuerpo::before, .calc-resistor .cuerpo::after {
  content: ''; position: absolute; top: 50%; width: 22px; height: 3px;
  background: #B8BCC2; border-radius: 2px; transform: translateY(-50%);
}
.calc-resistor .cuerpo::before { left: -22px; }
.calc-resistor .cuerpo::after { right: -22px; }
.calc-resistor i { display: block; width: 7px; height: 54px; }

/* índice de herramientas */
.calc-idx-grupo { scroll-margin-top: calc(var(--header-h) + 16px); }
.calc-nav { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .calc { grid-template-columns: 1fr; gap: 24px; }
  .calc-res { position: static; }
}
@media (max-width: 720px) {
  .calc-campos { grid-template-columns: 1fr; gap: 14px; }
  .calc-res { padding: 18px; }
  .calc-big b { letter-spacing: -1px; }
  .calc-barra { grid-template-columns: 76px 1fr 56px; }
  .calc-acciones .btn { flex: 1; }
}

/* ==========================================================================
   DESPLEGABLE — el mismo de gpanel, en tienda, calculadoras y panel.
   Va al final a propósito: pisa el aspecto nativo de .select, .gp-sel y .calc-esc.
   ========================================================================== */
.nv-sel {
  position: relative; display: inline-flex; align-items: stretch; overflow: visible;
  padding: 0 !important; background-image: none !important; cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}
.nv-sel > select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; appearance: none; border: none; padding: 0;
}
.nv-sel-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 14px; background: none; border: none; border-radius: inherit;
  color: inherit; font: inherit; text-align: inherit; cursor: pointer;
}
.nv-sel-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-sel-btn > i { color: var(--text-mute); font-size: 10px; flex: 0 0 auto; transition: transform .18s ease; }
.nv-sel-btn:disabled { cursor: default; opacity: .55; }
.nv-sel[data-abierto] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,110,41,.14); }
.nv-sel[data-abierto] > .nv-sel-btn > i { transform: rotate(180deg); }

/* el panel: mismos valores que .gp-drop-menu, y sin barra de desplazamiento */
.nv-sel-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: max(100%, 168px); background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: 260px; overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  animation: nvSelIn .13s ease;
}
.nv-sel-menu::-webkit-scrollbar { width: 0; height: 0; display: none; }
@keyframes nvSelIn { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
.nv-sel-menu.arriba { top: auto; bottom: calc(100% + 6px); }
.nv-sel-menu.derecha { left: auto; right: 0; }
.nv-sel-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: none; border: none; cursor: pointer;
  font: 400 13px var(--font-main); color: var(--primary); text-align: left;
}
.nv-sel-menu button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-sel-menu button > i { color: var(--accent); font-size: 10px; flex: 0 0 auto; }
.nv-sel-menu button:hover { background: var(--bg-main); }
.nv-sel-menu button:focus-visible { background: var(--bg-main); outline: none; box-shadow: inset 2px 0 0 var(--accent); }
.nv-sel-menu button[aria-selected="true"] { font-weight: 500; }
.nv-sel-menu button:disabled { opacity: .45; cursor: default; }

/* los destacados del buscador van siempre en una sola fila */
.search-right .prod-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .search-right .prod-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- pantallas de login (cuenta de cliente y gpanel) ----------
   Dos paneles a todo el ancho: marca + partículas a la izquierda, formulario a
   la derecha. Se usa igual en la página «Mi cuenta» y en el acceso de gpanel. */
.auth-split {
  display: flex; min-height: 100vh; width: 100vw; margin-left: calc(50% - 50vw);
}
.auth-left {
  width: 42%; min-width: 320px; flex-shrink: 0; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 40px; background: linear-gradient(135deg, var(--accent) 0%, #e8944a 30%, #14181F 70%, #1b1f27 100%);
}
.auth-split.dark .auth-left { background: #0b0d11; }
.auth-left canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.auth-left img { position: relative; z-index: 2; max-height: 60px; pointer-events: none; }
.auth-foot {
  position: absolute; bottom: 24px; left: 0; right: 0; z-index: 2;
  text-align: center; color: rgba(255,255,255,.4); font-size: 12px; line-height: 1.6;
}
.auth-right {
  flex: 1; background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 60px 48px; box-sizing: border-box; overflow-y: auto;
}
.auth-card { width: 100%; max-width: 380px; animation: nvSelIn .3s ease; }
.auth-view { display: none; }
.auth-view.on { display: block; }
.auth-eye {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-mute); cursor: pointer; font-size: 14px;
}
.auth-eye:hover { color: var(--accent); }
.auth-div { position: relative; margin: 20px 0; border-top: 1px solid var(--line); text-align: center; }
.auth-div span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #fff; padding: 0 10px; color: var(--text-mute); font-size: 12px; }
@media (max-width: 900px) {
  .auth-split { flex-direction: column; min-height: 0; }
  .auth-left { width: 100%; min-width: 0; min-height: 200px; padding: 40px 24px; }
  .auth-right { padding: 40px 24px; }
}
