/* ==========================================================================
   ImpoHogar Market — catalogo mayorista mixto
   (belleza · cuidado personal · tecnologia · hogar)

   Identidad: el azul de Grupo ImpoHogar como color de accion, blanco
   y grises neutros de tienda grande, y un tono propio por departamento
   (belleza rosa empolvado, cuidado personal verde salvia, tecnologia
   azul electrico, hogar ambar). Tipografia Plus Jakarta Sans (titulos)
   + Inter (interfaz).

   Indice
   01 Tokens · 02 Base · 03 Controles · 04 Bienvenida · 05 Clave
   06 Vitrina · 07 Encabezado · 08 Secciones · 09 Inicio · 10 Listados
   11 Tarjeta · 12 Cargar mas · 13 Ficha · 14 Pie · 15 Barra del pedido
   16 Modales · 17 Opinion · 18 Tonos · 19 Responsive · 20 Movimiento
   ========================================================================== */

/* ---------- 01 Tokens ---------- */
:root {
  --font-display: 'Plus Jakarta Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-ui: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --surface-3: #E7E9ED;
  --ink: #14161B;
  --ink-2: #3D414B;
  --muted: #6B7080;
  --faint: #A3A7B2;
  --line: #E6E8EC;
  --line-strong: #D2D5DC;

  --brand: #19438E;
  --brand-hover: #12346F;
  --brand-deep: #0F2A5C;
  --brand-soft: #EAF0FA;
  --sky: #019DDC;

  --primary: var(--brand);
  --primary-ink: #FFFFFF;
  --primary-hover: var(--brand-hover);
  --accent: #E8590C;
  --accent-strong: #C2410C;
  --accent-soft: #FFF1E6;

  --ok: #0F8A5F;
  --new: #0A7C55;
  --low: #C2410C;
  --low-soft: #FFF0E5;
  --deal: #E5484D;
  --warn: #C2410C;
  --warn-soft: #FFF0E5;
  --danger: #D92D20;

  --sh-1: 0 1px 2px rgba(16,24,40,.06), 0 1px 1px rgba(16,24,40,.03);
  --sh-2: 0 14px 34px -16px rgba(16,24,40,.24), 0 2px 6px -2px rgba(16,24,40,.06);
  --sh-3: 0 30px 70px -20px rgba(16,24,40,.36);
  --overlay: rgba(16,24,40,.5);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --container: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --util-h: 34px;
  --hdr-h: 128px;
  --ease: cubic-bezier(.22,.8,.24,1);
  --t-fast: .16s;
  --t-med: .3s;

  /* tono por defecto (se cambia con .tone-*) */
  --tone: var(--brand);
  --tone-soft: var(--brand-soft);
  --tone-band: #F6F8FB;
  --stage: #F5F6F8;

  /* Compatibilidad con estilos en linea que inyectan algunos JS */
  --text: var(--ink);
  --border: var(--line);
  --input-bg: var(--surface-2);
}

body.dark {
  --bg: #0D0F14;
  --surface: #161921;
  --surface-2: #1E222C;
  --surface-3: #2A2F3B;
  --ink: #F2F4F8;
  --ink-2: #C7CCD6;
  --muted: #8F96A5;
  --faint: #5F6676;
  --line: #262B36;
  --line-strong: #363C4A;
  --brand: #6E9BFF;
  --brand-hover: #8DB0FF;
  --brand-deep: #10224A;
  --brand-soft: rgba(110,155,255,.13);
  --primary-ink: #0D0F14;
  --accent-soft: rgba(232,89,12,.16);
  --low: #FF8A4C;
  --low-soft: rgba(255,138,76,.14);
  --new: #3DD39A;
  --ok: #3DD39A;
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 16px 36px -16px rgba(0,0,0,.7);
  --sh-3: 0 30px 80px -20px rgba(0,0,0,.8);
  --overlay: rgba(4,5,8,.66);
  --tone-band: #12151C;
  --stage: #F1F2F4;
}
/* ---------- 02 Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  transition: background-color var(--t-med), color var(--t-med);
}
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; }
::selection { background: var(--accent-soft); color: var(--ink); }
svg[viewBox="0 0 24 24"] { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#mainContent { padding-bottom: 110px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 03 Controles compartidos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn svg { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-lg { height: 52px; padding: 0 24px; border-radius: 14px; font-size: 15px; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #FFFFFF; color: #0D0E12; }
.btn-light:hover { background: #F0F1F4; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 4px 0;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  transition: text-decoration-color var(--t-fast);
}
.link-btn:hover { text-decoration-color: var(--ink); }
.link-btn svg { width: 16px; height: 16px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px; border: none;
  font-size: 12px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
.chip-accent { background: var(--accent-soft); color: var(--accent-strong); }
.chip-glass { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip-soft {
  height: 34px; padding: 0 13px 0 10px; background: var(--cat-soft, var(--surface-2)); color: var(--ink);
  font-size: 13px; transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.chip-soft svg { color: var(--cat, var(--ink)); }
.chip-soft b { font-weight: 600; color: var(--muted); }
.chip-soft:hover { box-shadow: inset 0 0 0 1.5px var(--cat, var(--ink)); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); display: inline-block; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }

.field {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 6px 0 14px;
  background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line);
}
.field-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.field select {
  appearance: none; -webkit-appearance: none;
  height: 100%; border: none; background: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  padding: 0 26px 0 2px; max-width: 190px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371747F' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 16px;
}
.field select:focus { outline: none; }
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
body.dark .field select option { background: var(--surface); }

.switch {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 14px 0 10px;
  background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3); transition: background-color var(--t-fast); }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--t-med) var(--ease); }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
body.dark .switch input:checked + .switch-ui::after { background: #0B0C10; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.section-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 520px; }
/* ---------- 04 Bienvenida ---------- */
.welcome-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: #FFFFFF; color: #0D0E12;
}
#welcomeLogo { width: 190px; max-width: 60vw; opacity: 0; animation: fadeUp .6s var(--ease) forwards; }
#welcomeText { margin-top: 26px; opacity: 0; animation: fadeUp .6s var(--ease) .3s forwards; display: flex; flex-direction: column; align-items: center; }
.welcome-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.welcome-sub { margin-top: 4px; font-size: 13px; color: #71747F; }
.welcome-bar { margin-top: 20px; width: 150px; height: 3px; border-radius: 3px; background: #ECEDF1; overflow: hidden; }
.welcome-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #19438E, #019DDC); border-radius: 3px; animation: welcomeBar 1.9s var(--ease) .35s forwards; }
#welcomeScreen.fade-out { animation: fadeOut .5s ease-out forwards; }
@keyframes welcomeBar { to { width: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* ---------- 05 Clave ---------- */
.gate { position: fixed; inset: 0; z-index: 998; background: var(--bg); overflow-y: auto; }
.gate-shell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); }
.gate-visual { position: relative; overflow: hidden; background: #0E1015; padding: 28px; }
.gate-mosaic { position: absolute; inset: 28px 28px 150px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 12px; }
.gm-cell {
  position: relative; border-radius: 20px; overflow: hidden; background: var(--cat-stage, #F4F4F6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: gmIn .8s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + .2s);
}
.gm-cell img { width: 100%; height: 100%; object-fit: contain; padding: 12%; mix-blend-mode: multiply; animation: gmFloat 7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.8s); }
@keyframes gmIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes gmFloat { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
.gate-visual-copy { position: absolute; left: 28px; right: 28px; bottom: 32px; color: #fff; }
.gate-visual-copy p { margin: 14px 0 0; font-size: 16px; line-height: 1.5; max-width: 440px; color: rgba(255,255,255,.78); }
.gate-card { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 32px; }
.gate-logo { width: 150px; margin-bottom: 40px; }
.gate-title { margin: 8px 0 26px; font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.gate-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
#gatePass {
  width: 100%; height: 54px; padding: 0 18px; border: none; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 16px; letter-spacing: .06em; transition: box-shadow var(--t-fast);
}
#gatePass::placeholder { letter-spacing: 0; color: var(--faint); }
#gatePass:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
#gateBtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 54px; margin-top: 12px; border: none; border-radius: 14px;
  background: var(--primary); color: var(--primary-ink); font-size: 15.5px; font-weight: 600;
  transition: background-color var(--t-fast), transform var(--t-fast);
}
#gateBtn svg { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
#gateBtn:hover { background: var(--primary-hover); }
#gateBtn:hover svg { transform: translateX(3px); }
#gateBtn:active { transform: scale(.99); }
#gateError { min-height: 20px; margin-top: 12px; font-size: 13.5px; font-weight: 500; color: var(--danger); }
.gate-help { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.gate-help a { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ---------- 06 Vitrina (antes de la clave) ---------- */
.vitrina {
  position: fixed; inset: 0; z-index: 999;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  background: var(--bg); color: var(--ink);
}
.vitrina.vt-saliendo { animation: vtOut .45s var(--ease) forwards; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-12px); } }
.vt-topbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.vt-logo { height: 28px; width: auto; }
body.dark .vt-logo, body.dark .gate-logo { filter: brightness(0) invert(1); }
.vt-skip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border: none; border-radius: 999px; background: var(--primary); color: var(--primary-ink);
  font-size: 13.5px; font-weight: 600;
}
.vt-skip svg { width: 16px; height: 16px; }
.vt-hero {
  max-width: var(--container); margin: 0 auto; padding: 36px var(--gutter) 28px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 40px; align-items: end;
}
.vt-title { margin: 16px 0 16px; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5vw, 64px); line-height: 1.02; letter-spacing: -.04em; }
.vt-title span { color: var(--muted); }
.vt-lead { margin: 0 0 26px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 560px; }
.vt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vt-stats div { background: var(--surface); border-radius: var(--r-lg); padding: 18px 16px; box-shadow: var(--sh-1); }
.vt-stats b { display: block; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.03em; }
.vt-stats span { font-size: 12.5px; color: var(--muted); }
.vt-cats {
  max-width: var(--container); margin: 0 auto; padding: 4px var(--gutter) 8px;
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
}
.vt-cats::-webkit-scrollbar { display: none; }
.vt-cat { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; background: var(--surface); border-radius: 999px; box-shadow: var(--sh-1); }
.vt-cat-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--cat-soft); color: var(--cat); }
.vt-cat-icon svg { width: 18px; height: 18px; }
.vt-cat-name { font-size: 13.5px; font-weight: 600; }
.vt-cat-count { font-size: 12.5px; color: var(--muted); }
.vt-rows { padding: 8px 0 12px; }
.vt-row { margin: 26px 0 0; }
.vt-row-head { max-width: var(--container); margin: 0 auto 14px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 14px; }
.vt-row-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.vt-row-rule { flex: 1; height: 1px; background: var(--line); }
.vt-row .vt-row-count { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--cat-soft, var(--surface-2)); color: var(--cat, var(--ink)); }
.vt-row-nav { display: flex; gap: 6px; }
.vt-arrow { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); display: flex; align-items: center; justify-content: center; transition: background-color var(--t-fast); }
.vt-arrow:hover { background: var(--surface-2); }
.vt-arrow svg { width: 18px; height: 18px; }
.vt-viewport { overflow: hidden; cursor: grab; touch-action: pan-y; }
.vt-viewport.is-drag { cursor: grabbing; }
.vt-row--estatico .vt-viewport { overflow-x: auto; }
.vt-track { display: flex; gap: 14px; padding: 4px var(--gutter) 12px; width: max-content; will-change: transform; }
.vt-card { flex: 0 0 auto; width: 196px; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); user-select: none; transition: box-shadow var(--t-med), transform var(--t-med) var(--ease); }
.vt-card:hover, .vt-card.is-open { box-shadow: var(--sh-2); transform: translateY(-2px); }
.vt-plate { aspect-ratio: 1; background: var(--cat-stage, #F4F4F6); }
.vt-plate img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; pointer-events: none; }
.vt-text { padding: 11px 13px 14px; }
.vt-row .vt-brand, .vt-brand { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--cat, var(--accent-strong)); }
.vt-name { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.vt-notes { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.vt-foot { text-align: center; padding: 48px var(--gutter) 64px; }
.vt-foot-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
/* ---------- 07 Encabezado ---------- */
.site-header {
  position: sticky; top: calc(-1 * var(--util-h)); z-index: 100;
  background: var(--surface); transition: box-shadow var(--t-med);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(16,24,40,.28); }
.hdr-util { height: var(--util-h); background: var(--brand-deep); color: #DCE5F7; font-size: 12.5px; }
.hdr-util-in { max-width: var(--container); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 22px; }
.hu-claim { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.hu-claim svg { width: 15px; height: 15px; }
.hu-claim + .hu-claim { color: #9FB2DA; }
.hu-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hu-link { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: none; border-radius: 6px; background: transparent; color: #DCE5F7; font-size: 12.5px; font-weight: 500; text-decoration: none; }
.hu-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.hu-theme svg { width: 16px; height: 16px; }

.hdr-main { max-width: var(--container); margin: 0 auto; padding: 14px var(--gutter); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 32px; }
.hdr-menu { display: none; }
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo img { height: 36px; width: auto; display: block; }
.brand-logo-dark { display: none !important; }
body.dark .brand-logo { display: none !important; }
body.dark .brand-logo-dark { display: block !important; }
.logo-tag { font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); }

.search { position: relative; display: flex; align-items: center; height: 50px; max-width: 760px; width: 100%; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow var(--t-fast), background-color var(--t-fast); }
.search:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand), 0 6px 20px -10px rgba(25,67,142,.35); }
.search-icon { width: 20px; height: 20px; margin-left: 16px; color: var(--muted); }
#search { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: none; background: transparent; font-size: 15px; color: var(--ink); }
#search:focus { outline: none; }
#search::placeholder { color: var(--faint); }
#search::-webkit-search-cancel-button { display: none; }
.search-clear { display: none; width: 34px; height: 34px; border: none; border-radius: 50%; background: transparent; color: var(--muted); align-items: center; justify-content: center; }
.search.has-value .search-clear { display: inline-flex; }
.search-clear svg { width: 17px; height: 17px; }
.search-go { height: 40px; margin-right: 5px; padding: 0 20px; border: none; border-radius: 9px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
.search-go:hover { background: var(--brand-hover); }
.search-back { display: none; }

.search-results {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 130;
  max-height: min(72vh, 620px); overflow-y: auto; padding: 8px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--sh-3), 0 0 0 1px var(--line);
}
.search-results.open { display: block; animation: fadeIn .15s ease; }
.sr-label { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sr-clear { border: none; background: none; font-size: 12px; font-weight: 600; color: var(--brand); text-transform: none; letter-spacing: 0; }
.sr-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 4px; }
.sr-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: none; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; font-weight: 500; color: var(--ink); }
.sr-chip svg { width: 15px; height: 15px; color: var(--muted); }
.sr-chip:hover { background: var(--brand-soft); color: var(--brand); }
.sr-depts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0 8px; }
.sr-dept { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--tone-soft); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.sr-dept svg { width: 18px; height: 18px; color: var(--tone); }
.sr-tip { margin: 10px 10px 4px; font-size: 12.5px; color: var(--muted); }
.sr-group { display: flex; flex-direction: column; }
.sr-sugg, .sr-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: none; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; }
.sr-sugg svg { width: 17px; height: 17px; color: var(--muted); }
.sr-sugg span { flex: 1; font-size: 14px; }
.sr-sugg em { font-style: normal; color: var(--muted); }
.sr-sugg small, .sr-stock { font-size: 12px; color: var(--muted); }
.sr-sugg:hover, .sr-item:hover, .sr-sugg.is-active, .sr-item.is-active, .sr-all.is-active { background: var(--surface-2); }
.sr-item img { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 3px; }
.sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-brand { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sr-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-code { font: 11.5px var(--font-mono); color: var(--faint); }
.sr-name mark, .sr-code mark { background: #FFF3BF; color: inherit; border-radius: 2px; }
.sr-stock.is-ok { color: var(--ok); } .sr-stock.is-low { color: var(--low); }
.sr-empty { padding: 18px 12px; font-size: 14px; color: var(--muted); }
.sr-all { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 46px; margin-top: 6px; border: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 14px; font-weight: 700; }
.sr-all svg { width: 17px; height: 17px; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px 0 16px; border: none; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: 14.5px; font-weight: 600; }
.cart-btn svg { width: 21px; height: 21px; }
.cart-btn:hover { background: var(--brand); color: #fff; }
.cart-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--deal); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }

.nav-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dept-nav { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.dept-nav::-webkit-scrollbar { display: none; }
.dn-all { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px; margin-right: 8px; border: none; border-radius: 9px; background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.dn-all svg { width: 19px; height: 19px; }
.dn-all:hover, body.mega-open .dn-all { background: var(--ink); color: var(--surface); }
.dn-link { position: relative; display: inline-flex; align-items: center; height: 48px; padding: 0 12px; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dn-link::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transition: transform var(--t-fast); }
.dn-link:hover::after, .dn-link.active::after { transform: scaleX(1); }
.dn-link.active { color: var(--brand); }
.dn-sep { width: 1px; height: 22px; margin: 0 6px; background: var(--line-strong); }
.dn-col { font-weight: 600; color: var(--ink-2); }
.dn-ultimas { color: var(--low); }
.dn-nuevos { color: var(--new); }
.dn-mas-vendidos { color: var(--brand); }

.mega-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 120; background: var(--surface); box-shadow: 0 30px 60px -30px rgba(16,24,40,.4); border-top: 1px solid var(--line); }
body.mega-open .mega-menu { display: block; animation: megaIn .18s var(--ease); }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega-backdrop { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(16,24,40,.28); }
body.mega-open .mega-backdrop { display: block; }
.mm-inner { max-width: var(--container); margin: 0 auto; padding: 24px var(--gutter) 20px; max-height: calc(100vh - 170px); overflow-y: auto; }
.mm-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.mm-col { padding: 4px 0; border-radius: 14px; transition: opacity var(--t-fast); }
.mm-col.is-focus .mm-dept { box-shadow: inset 0 0 0 1.5px var(--tone); }
.mm-dept { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--tone-soft); color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.mm-dept svg { width: 20px; height: 20px; color: var(--tone); }
.mm-dept small { margin-left: auto; font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--muted); }
.mm-cat { padding: 6px 12px 8px; }
.mm-cat-link { display: block; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 3px; }
.mm-cat-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.mm-cat ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
.mm-cat li a { font-size: 13px; color: var(--muted); text-decoration: none; }
.mm-cat li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mm-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.mm-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.mm-pill svg { width: 16px; height: 16px; color: var(--muted); }
.mm-pill small { color: var(--muted); font-weight: 600; }
.mm-pill:hover { background: var(--brand-soft); color: var(--brand); }
.mm-all { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--brand); text-decoration: none; }
.mm-all svg { width: 17px; height: 17px; }

/* Navegacion movil (barra inferior + menu lateral) */
.tabbar { display: none; }
.mobile-menu { display: none; }

/* ---------- 08 Secciones compartidas ---------- */
main { min-height: 60vh; }
.home, .listing, .brands-page, .product-page { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.home-sec { margin-top: 56px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tone, var(--brand)); }
.sec-eyebrow svg { width: 15px; height: 15px; }
.sec-title { font-family: var(--font-display); font-size: clamp(22px, 2.1vw, 28px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.sec-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); max-width: 620px; }
.sec-actions { display: flex; align-items: center; gap: 14px; }
.sec-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--brand); text-decoration: none; white-space: nowrap; }
.sec-more svg { width: 17px; height: 17px; transition: transform var(--t-fast); }
.sec-more:hover svg { transform: translateX(3px); }
.sec-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Insignias */
.pc-badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.badge-new { background: var(--new); color: #fff; }
.badge-best { background: var(--brand); color: #fff; }
.badge-low { background: var(--low-soft); color: var(--low); }
.badge-out { background: var(--surface-3); color: var(--muted); }
.badge-vol { background: var(--surface-3); color: var(--ink-2); }

/* ---------- 09 Inicio ---------- */
.hero { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(260px, 1fr); gap: 16px; }
.hero-main {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 20px;
  min-height: 380px; padding: 40px 40px 40px 48px; border-radius: 22px; background: var(--brand-deep); color: #fff; text-decoration: none;
}
.hero-main::before { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.05); }
.hero-copy { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); display: inline-block; }
.hero-title { margin: 16px 0 12px; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.hero-text { margin: 0 0 24px; font-size: 16px; line-height: 1.55; color: #C9D5EE; max-width: 460px; }
.hero-cta { pointer-events: none; }
.hero-main:hover .hero-cta svg { transform: translateX(3px); }
.hero-pics { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-pic { aspect-ratio: 1; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 18px 30px -18px rgba(0,0,0,.6); transition: transform var(--t-med) var(--ease); }
.hero-pic img { width: 86%; height: 86%; object-fit: contain; }
.hp-1, .hp-3 { transform: translateY(14px); }
.hero-main:hover .hero-pic { transform: translateY(-3px); }
.hero-main:hover .hp-1, .hero-main:hover .hp-3 { transform: translateY(11px); }
.hero-side { display: grid; grid-auto-rows: 1fr; gap: 16px; min-width: 0; }
.hero-promo { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 0 16px; border-radius: 22px; color: var(--ink); overflow: hidden; }
.pm-head { display: flex; flex-direction: column; gap: 2px; padding: 0 20px; text-decoration: none; color: inherit; }
.hp-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.hp-k svg { width: 17px; height: 17px; }
.pm-head b { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.hp-d { font-size: 13px; color: var(--ink-2); }
.pm-viewport { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.pm-track { display: flex; gap: 10px; width: max-content; padding: 2px 10px 2px 20px; animation: pmScroll var(--pm-dur, 40s) linear infinite; }
.pm-dup { display: contents; }
.hero-promo:hover .pm-track, .pm-track:focus-within { animation-play-state: paused; }
@keyframes pmScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pm-item { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.pm-pic { width: 96px; height: 96px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 6px 16px -10px rgba(16,24,40,.35); transition: transform var(--t-fast) var(--ease); }
.pm-pic img { width: 84%; height: 84%; object-fit: contain; }
.pm-item:hover .pm-pic { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--pm-c, var(--brand)); }
.pm-name { margin-top: 4px; font-size: 11.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-stock { font-size: 11px; font-weight: 700; color: var(--ok); }
.pm-stock.is-low { color: var(--low); }
.hp-go { display: inline-flex; align-items: center; gap: 4px; padding: 0 20px; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.hp-go svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.hp-go:hover svg { transform: translateX(3px); }
.promo-low { background: var(--low-soft); --pm-c: var(--low); }
.promo-low .hp-k, .promo-low .hp-go { color: var(--low); }
.promo-alt { background: var(--brand-soft); --pm-c: var(--brand); }
.promo-alt .hp-k, .promo-alt .hp-go { color: var(--brand); }
body.dark .pm-item { color: var(--ink); }
@media (hover: none) {
  .pm-viewport { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  .pm-viewport::-webkit-scrollbar { display: none; }
  .pm-track { animation: none; }
  .pm-dup { display: none; }
  .pm-item { scroll-snap-align: start; }
}

.trust-bar { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.tb-item { display: flex; align-items: center; gap: 12px; padding: 4px 8px; }
.tb-item svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.tb-item span { display: flex; flex-direction: column; }
.tb-item b { font-size: 14px; font-weight: 700; }
.tb-item small { font-size: 12.5px; color: var(--muted); }

.dept-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dept-card { display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.dc-top { position: relative; display: block; height: 196px; background: var(--tone-soft); text-decoration: none; color: var(--ink); overflow: hidden; }
.dc-pics { position: absolute; inset: 18px 18px 64px; display: flex; align-items: center; justify-content: center; }
.dc-pics img { width: 40%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 12px 24px -16px rgba(16,24,40,.45); transition: transform var(--t-med) var(--ease); }
.dc-pics img:nth-child(1) { transform: rotate(-6deg) translateX(14px); }
.dc-pics img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-8px); width: 44%; }
.dc-pics img:nth-child(3) { transform: rotate(6deg) translateX(-14px); }
.dc-top:hover .dc-pics img:nth-child(2) { transform: translateY(-12px); }
.dc-name { position: absolute; left: 18px; bottom: 14px; display: flex; flex-direction: column; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.dc-name small { font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.dc-cats { list-style: none; margin: 0; padding: 14px 14px 6px; flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.dc-cats a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.dc-cats a small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.dc-cats a:hover { background: var(--tone-soft); box-shadow: inset 0 0 0 1.5px var(--tone); }
.dc-all { display: flex; align-items: center; gap: 6px; padding: 12px 18px 16px; font-size: 13.5px; font-weight: 700; color: var(--tone); text-decoration: none; }
.dc-all svg { width: 16px; height: 16px; }

.cat-circles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.cc { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.cc-pic { width: 104px; height: 104px; border-radius: 50%; background: var(--tone-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.cc-pic img { width: 74%; height: 74%; object-fit: contain; mix-blend-mode: multiply; }
.cc-pic svg { width: 34px; height: 34px; color: var(--tone); }
.cc:hover .cc-pic { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--tone); }
.cc-name { font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.25; }

/* Carriles */
.rail { margin-top: 56px; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 212px; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail-arrows { display: flex; gap: 6px; }
.rail-arrow { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.rail-arrow:hover { background: var(--ink); color: var(--surface); }
.rail-arrow svg { width: 18px; height: 18px; }
.rail-low .sec-eyebrow { color: var(--low); }
.rail-new .sec-eyebrow { color: var(--new); }

.rc { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--t-med), transform var(--t-med) var(--ease); }
.rc:hover { box-shadow: 0 0 0 1px var(--line), var(--sh-2); transform: translateY(-2px); }
.rc-media { position: relative; display: block; aspect-ratio: 1; background: var(--stage); }
.rc-media img { width: 100%; height: 100%; object-fit: contain; padding: 9%; mix-blend-mode: multiply; }
.rc-body { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px 14px; text-decoration: none; color: var(--ink); flex: 1; }
.rc-brand { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tone); }
.rc-name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rc-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rc-stock i, .pc-stock i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.rc-stock.is-low, .pc-stock.is-low { color: var(--low); } .rc-stock.is-low i, .pc-stock.is-low i { background: var(--low); }
.rc-stock.is-out, .pc-stock.is-out { color: var(--muted); } .rc-stock.is-out i, .pc-stock.is-out i { background: var(--faint); }
.rc-add { position: absolute; right: 10px; top: calc(min(212px, 100%) - 50px); z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 40px; height: 40px; padding: 0 10px; border: none; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px -4px rgba(16,24,40,.35), 0 0 0 1px var(--line); transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.rc-add svg { width: 19px; height: 19px; stroke-width: 2.2; }
.rc-add b { font-size: 13px; }
.rc-add b:empty { display: none; }
.rc-add:hover { background: var(--brand); color: #fff; }
.rc.has-qty .rc-add { background: var(--brand); color: #fff; }
.rc-add:active { transform: scale(.94); }

/* Bloques por departamento */
.dept-block { margin: 56px calc(-1 * var(--gutter)) 0; padding: 40px var(--gutter) 34px; background: var(--tone-band); }
.db-inner { max-width: var(--container); margin: 0 auto; }
.db-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.db-tile { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); text-decoration: none; color: var(--ink); box-shadow: 0 0 0 1px var(--line); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.db-tile:hover { box-shadow: 0 0 0 1.5px var(--tone); transform: translateY(-1px); }
.db-tile-pic { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 12px; background: var(--stage); display: flex; align-items: center; justify-content: center; }
.db-tile-pic img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.db-tile-pic svg { width: 26px; height: 26px; color: var(--tone); }
.db-tile-name { align-self: end; font-size: 14.5px; font-weight: 700; }
.db-tile-types { align-self: start; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-inblock { margin-top: 30px; }
.rail-inblock .sec-title { font-size: 18px; }

/* Marcas */
.brand-tiles, .brand-dir { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.brand-dir { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 24px; }
.brand-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 14px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: box-shadow var(--t-fast), transform var(--t-med) var(--ease); }
.brand-tile:hover { box-shadow: 0 0 0 1.5px var(--tone), var(--sh-2); transform: translateY(-2px); }
.bt-word { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; line-height: 1.1; min-height: 2.2em; display: flex; align-items: center; }
.bt-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bt-thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: var(--stage); padding: 6px; mix-blend-mode: multiply; }
.bt-meta { font-size: 12px; color: var(--muted); }

/* ---------- 10 Listados ---------- */
.home-back { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px 0 18px; margin-bottom: 14px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px -12px rgba(25,67,142,.6); transition: background-color var(--t-fast), transform var(--t-fast); }
.home-back svg { width: 21px; height: 21px; }
.home-back:hover { background: var(--brand-hover); transform: translateY(-1px); }
.home-back.is-outline { background: var(--surface); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); margin: 0; }
.home-back.is-outline:hover { background: var(--brand); color: #fff; }
body.dark .home-back:not(.is-outline) { color: #0D0F14; }
.home-back-end { display: flex; justify-content: center; padding: 28px 0 8px; }
.pdp-top .home-back { margin-bottom: 0; }
.page-head { padding: 22px 0 6px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs svg { width: 14px; height: 14px; color: var(--faint); }
.crumbs span { color: var(--ink); font-weight: 600; }
.page-eyebrow { display: block; margin-top: 18px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tone, var(--brand)); }
.page-title { margin-top: 14px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.page-eyebrow + .page-title { margin-top: 4px; }
.page-sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); max-width: 720px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fchip { height: 38px; padding: 0 16px; border: none; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--ink); }
.fchip.on { background: var(--ink); color: var(--surface); }

.quicknav { display: flex; gap: 10px; margin-top: 20px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.qn { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: box-shadow var(--t-fast); }
.qn:hover { box-shadow: 0 0 0 1.5px var(--tone, var(--brand)); }
.qn.on { box-shadow: 0 0 0 2px var(--tone, var(--brand)); background: var(--tone-soft, var(--brand-soft)); }
.qn-pic { width: 44px; height: 44px; border-radius: 50%; background: var(--stage, var(--surface-2)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qn-pic img { width: 80%; height: 80%; object-fit: contain; mix-blend-mode: multiply; }
.qn-pic svg { width: 20px; height: 20px; color: var(--tone, var(--brand)); }
.qn-label { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.qn-label small { font-size: 12px; font-weight: 500; color: var(--muted); }

.plp { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 32px; margin-top: 22px; align-items: start; }
.facets { position: sticky; top: calc(var(--hdr-h) + 12px); max-height: calc(100vh - var(--hdr-h) - 24px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.facets-head, .facets-sort, .facets-apply { display: none; }
.facet { border-bottom: 1px solid var(--line); padding: 12px 0; }
.facet summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: 14.5px; font-weight: 700; padding: 2px 0; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; }
.facet summary svg { width: 17px; height: 17px; margin-left: auto; color: var(--muted); transition: transform var(--t-fast); }
.facet[open] summary svg { transform: rotate(180deg); }
.facet-opts { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.fopt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.fopt:hover { background: var(--surface-2); }
.fopt input { position: absolute; opacity: 0; pointer-events: none; }
.fbox { width: 18px; height: 18px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); transition: background-color var(--t-fast), box-shadow var(--t-fast); }
.fopt input:checked + .fbox { background: var(--brand) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center / 13px no-repeat; box-shadow: none; }
.fopt input:focus-visible + .fbox { outline: 2px solid var(--brand); outline-offset: 2px; }
.ftxt { flex: 1; min-width: 0; color: var(--ink-2); }
.fopt small { font-size: 12px; color: var(--faint); }
.facet-opts.is-long .extra { display: none; }
.facet-opts.is-long.show-all .extra { display: flex; }
.facet-more { align-self: flex-start; margin-top: 4px; border: none; background: none; padding: 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.fm-less, .show-all .fm-more { display: none; }
.show-all .fm-less { display: inline; }
.sheet-backdrop { display: none; }

.plp-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.plp-count { font-size: 14px; color: var(--ink-2); margin-right: auto; }
.plp-count b { font-size: 15px; color: var(--ink); }
.plp-count span { color: var(--muted); }
.plp-filter-btn { display: none; }
.plp-sort { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; color: var(--muted); }
.plp-sort select, .facets-sort select {
  appearance: none; -webkit-appearance: none; border: none; background: transparent; height: 100%; padding: 0 26px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7080' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 16px;
}
.plp-sort select:focus { outline: none; }
body.dark .plp-sort select option, body.dark .facets-sort select option { background: var(--surface); }
.view-toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.view-toggle button { width: 34px; height: 34px; border: none; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.view-toggle button svg { width: 18px; height: 18px; }
.view-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.active-chips:not(:empty) { padding-top: 12px; }
.achip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border: none; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; }
.achip svg { width: 14px; height: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 22px 16px; margin-top: 18px; }
.grid-brand { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; margin-top: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.grid-brand:first-child { margin-top: 0; }
.grid-brand a { font-family: var(--font-display); font-size: clamp(19px, 1.8vw, 24px); font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.grid-brand a:hover { color: var(--brand); }
.grid-brand span { color: var(--muted); font-size: 13px; }
.grid-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 2px 0 -8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.grid-group i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.grid-group em { font-style: normal; font-weight: 600; color: var(--faint); letter-spacing: .04em; }
.grid-group span { color: var(--faint); font-weight: 600; }
.grid-group::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- 11 Tarjeta de producto ---------- */
.pc { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: var(--surface); transition: box-shadow var(--t-med), transform var(--t-med) var(--ease); }
.pc:hover { box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.pc-media { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; background: var(--stage); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; padding: 9%; mix-blend-mode: multiply; transition: transform .5s var(--ease); }
.pc:hover .pc-media img { transform: scale(1.04); }
.pc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 6px 8px; flex: 1; }
.pc-brand { align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--tone); text-decoration: none; }
.pc-brand:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-name { font-size: 14.5px; font-weight: 600; line-height: 1.32; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.64em; }
.pc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; }
.pc-type { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.pc-spec { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--tone-soft); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.tone-tech .pc-spec, .tone-home .pc-spec { font-family: var(--font-mono); font-size: 11px; border-radius: 5px; }
.tone-beauty .pc-spec { border-radius: 999px; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pc-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pc-code { font: 11px var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-action { margin-top: 10px; }
.pc-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 42px; border: none; border-radius: 10px; background: var(--surface); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); font-size: 14px; font-weight: 700; transition: background-color var(--t-fast), color var(--t-fast); }
.pc-add svg { width: 18px; height: 18px; stroke-width: 2.2; }
.pc-add:hover { background: var(--brand); color: #fff; }
.pc-stepper { display: none; grid-template-columns: 42px minmax(0, 1fr) 42px; height: 42px; border-radius: 10px; background: var(--brand); color: #fff; overflow: hidden; }
.pc-stepper button { border: none; background: transparent; color: inherit; font-size: 20px; font-weight: 500; }
.pc-stepper button:hover { background: rgba(255,255,255,.14); }
.pc-stepper input, .pdp-stepper input, .oi-qty input { width: 100%; min-width: 0; border: none; background: transparent; color: inherit; font-size: 15px; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.pc-stepper input::-webkit-outer-spin-button, .pc-stepper input::-webkit-inner-spin-button, .pdp-stepper input::-webkit-inner-spin-button, .oi-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc-stepper input:focus, .pdp-stepper input:focus { outline: none; background: rgba(255,255,255,.12); }
.has-qty .pc-add { display: none; }
.has-qty .pc-stepper { display: grid; }
.pc.has-qty .pc-media { box-shadow: inset 0 0 0 2px var(--brand); }
.pc-soldout { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.is-out .pc-media img, .is-out .rc-media img { opacity: .5; filter: grayscale(.6); }
.just-added .pc-media, .just-added.rc { animation: pop .4s var(--ease); }
@keyframes pop { 40% { transform: scale(.98); } }

/* Vista lista (pedido rapido) */
.grid.is-list { grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
.pr { display: grid; grid-template-columns: 64px minmax(0, 1fr) 140px 130px 178px; align-items: center; gap: 16px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.pr:hover { background: var(--surface-2); }
.pr-media { width: 64px; height: 64px; border-radius: 12px; background: var(--stage); display: block; }
.pr-media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.pr-main { min-width: 0; display: flex; flex-direction: column; }
.pr-brand { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tone); text-decoration: none; }
.pr-name { font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-type { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-code { font: 12.5px var(--font-mono); color: var(--ink-2); }
.pr .pc-action { margin: 0; }
.pr.has-qty { background: var(--brand-soft); }

/* Relacionados (boton dentro de la tarjeta) */
.dupe-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; height: 30px; padding: 0 10px; border: none; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dupe-btn svg { width: 15px; height: 15px; }
.dupe-count { color: var(--muted); }
.dupe-panel { display: none; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.dupe-panel.open { display: flex; }
.dupe-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dupe-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.dupe-item img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #fff; cursor: pointer; }
.dupe-item-brand { font-size: 10.5px; color: var(--muted); }
.dupe-item-name { font-size: 12.5px; font-weight: 600; }
.dupe-item-qty { display: grid; grid-template-columns: 24px 34px 24px; height: 28px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.dupe-item-qty button { border: none; background: transparent; }
.dupe-item-qty input { width: 100%; border: none; background: transparent; text-align: center; font-size: 12.5px; -moz-appearance: textfield; }
.dupe-highlight { box-shadow: 0 0 0 3px var(--brand) !important; }

/* ---------- 12 Cargar mas / vacio ---------- */
.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 0 12px; }
.load-more-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.lm-bar { width: 180px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lm-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.load-more-btn { min-width: 240px; }
#loadSentinel { height: 1px; width: 100%; }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 64px 16px; text-align: center; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.empty-state-text { max-width: 420px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }

/* ---------- 13 Ficha del producto ---------- */
.pdp-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 18px 0 4px; }
.pdp-back { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 6px; border: none; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pdp-back svg { width: 18px; height: 18px; }
.pdp-back:hover { background: var(--surface-3); }
.pdp-top .crumbs span { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 48px; margin-top: 16px; align-items: start; }
.pdp-gallery { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
.pdp-thumbs { display: flex; flex-direction: column; gap: 8px; }
.pdp-thumb { width: 72px; height: 72px; padding: 0; border: none; border-radius: 12px; background: var(--stage); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.pdp-thumb.on { box-shadow: inset 0 0 0 2px var(--ink); }
.pdp-thumb-bc { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; color: var(--ink-2); }
.pdp-thumb-bc svg { width: 22px; height: 22px; }
.pdp-thumb-bc small { font-size: 10.5px; font-weight: 600; }
.pdp-stage { position: relative; aspect-ratio: 1; border-radius: 22px; background: var(--stage); overflow: hidden; display: flex; align-items: center; justify-content: center; }
#lightboxImg { width: 100%; height: 100%; object-fit: contain; padding: 7%; mix-blend-mode: multiply; cursor: zoom-in; transition: transform .3s var(--ease); }
#lightboxImg.is-barcode { padding: 20%; background: #fff; mix-blend-mode: normal; }
#lightboxImg.zoomed { cursor: zoom-out; }
.pdp-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.95); color: #14161B; box-shadow: var(--sh-1); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--t-fast); }
.pdp-stage:hover .pdp-nav { opacity: 1; }
.pdp-nav svg { width: 20px; height: 20px; }
.pdp-nav.prev { left: 14px; } .pdp-nav.next { right: 14px; }
.pdp-hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--faint); pointer-events: none; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.pdp-brand { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); text-decoration: none; }
.pdp-brand small { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.pdp-brand small svg { width: 14px; height: 14px; }
.pdp-brand:hover small { color: var(--brand); }
.pdp-name { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin-top: -6px; }
.pdp-raw { margin-top: -8px; font: 12px var(--font-mono); color: var(--faint); }
.pdp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pdp-code { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.pdp-code b { font: 600 14px var(--font-mono); color: var(--ink); letter-spacing: .02em; }
.pdp-copy { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: none; border-radius: 7px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; box-shadow: var(--sh-1); }
.pdp-copy svg { width: 15px; height: 15px; }
.pdp-copy.ok { color: var(--ok); }
.pdp-avail { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.pdp-avail i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.pdp-avail.is-low { color: var(--low); } .pdp-avail.is-low i { background: var(--low); box-shadow: 0 0 0 4px var(--low-soft); }
.pdp-avail.is-out { color: var(--muted); } .pdp-avail.is-out i { background: var(--faint); box-shadow: none; }
.pdp-buy { display: flex; gap: 10px; }
.pdp-stepper { display: grid; grid-template-columns: 48px 64px 48px; height: 54px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); overflow: hidden; color: var(--ink); }
.pdp-stepper button { border: none; background: transparent; font-size: 22px; color: var(--ink); }
.pdp-stepper button:hover { background: var(--surface-3); }
.pdp-add { flex: 1; height: 54px; border-radius: 12px; font-size: 15.5px; }
.pdp-incart { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); margin-top: -4px; }
.pdp-incart svg { width: 17px; height: 17px; color: var(--ok); }
.pdp-incart .link-btn { font-size: 13px; padding: 0; }
.pdp-soldout { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--muted); }
.pdp-note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.pdp-note svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 1px; }
.pdp-block { margin-top: 6px; }
.pdp-h { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.pdp-facts { margin: 0; border-top: 1px solid var(--line); }
.pdp-facts div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pdp-facts dt { color: var(--muted); }
.pdp-facts dd { margin: 0; font-weight: 600; }
.pdp-facts dd.mono { font-family: var(--font-mono); font-size: 13px; }
.pdp-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.pdp-notes span { padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.pdp-rails .rail { margin-top: 48px; }

/* Aviso "agregado" */
.add-toast { position: fixed; z-index: 2200; right: 20px; bottom: 96px; display: flex; align-items: center; gap: 12px; width: min(380px, calc(100% - 24px)); padding: 10px 10px 10px 10px; border-radius: 16px; background: var(--ink); color: var(--surface); box-shadow: var(--sh-3); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.add-toast.show { opacity: 1; transform: none; pointer-events: auto; }
.add-toast img { width: 46px; height: 46px; border-radius: 10px; background: #fff; object-fit: contain; padding: 3px; flex: none; }
.at-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; }
.at-text b { font-size: 13.5px; }
.at-text span { opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-btn { height: 36px; padding: 0 12px; border: none; border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ---------- 14 Pie: navegacion extra ---------- */
.footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.5fr) !important; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer-nav div { display: flex; flex-direction: column; gap: 8px; }
.footer-nav b { font-size: 13px; color: #F3F4F7; margin-bottom: 4px; }
.footer-nav a { font-size: 13.5px; color: #9EA2AE; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
/* ---------- 13 Pie ---------- */
.site-footer { margin-top: 72px; background: #0D0E12; color: #C5C8D1; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 48px var(--gutter) 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; }
.footer-logo { height: 30px; width: auto; }
.footer-brand p { margin: 14px 0 20px; font-size: 14px; color: #8E919C; max-width: 320px; }
.footer-brand .btn svg { width: 18px; height: 18px; }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.footer-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: inherit; transition: background-color var(--t-fast); }
.footer-links a:hover { background: rgba(255,255,255,.06); }
.fl-tx { display: flex; flex-direction: column; min-width: 0; }
.footer-links b { font-size: 13.5px; font-weight: 600; color: #F3F4F7; }
.fl-tx span { font-size: 12.5px; color: #8E919C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Iconos de redes: cada uno con el color de su marca */
.fl-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; transition: transform var(--t-fast); }
.footer-links a:hover .fl-ic { transform: scale(1.06); }
.fl-ic svg { width: 20px; height: 20px; fill: currentColor; }
.fl-ic svg.ic-line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fl-ic .ic-dot { fill: currentColor; stroke: none; }
.fl-web .fl-ic { background: #1A4590; }
.fl-fb .fl-ic { background: #1877F2; }
.fl-ig .fl-ic { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.fl-tt .fl-ic { background: #000; box-shadow: inset 0 0 0 1px #2A2C35; }
.fl-tt .fl-ic svg { filter: drop-shadow(-1.2px -1px 0 #25F4EE) drop-shadow(1.2px 1px 0 #FE2C55); }
.fl-yt .fl-ic { background: #FF0000; }
.fl-yt .fl-ic svg { transform: scale(1.15); }
.footer-legal { max-width: var(--container); margin: 0 auto; padding: 18px var(--gutter) 120px; border-top: 1px solid #1F2129; font-size: 12px; color: #6E7280; }/* ---------- 14 Barra del pedido ---------- */
.order-bar {
  position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(620px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px;
  background: rgba(13,14,18,.94); color: #F3F4F7; border-radius: 18px;
  box-shadow: 0 20px 50px -18px rgba(13,14,18,.55), 0 0 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform var(--t-med) var(--ease);
}
.order-bar:not(.has-items) { transform: translate(-50%, 170%); opacity: 0; pointer-events: none; }
.order-bar { transition: transform var(--t-med) var(--ease), opacity var(--t-med); }
body.dark .order-bar { background: rgba(28,30,37,.96); box-shadow: 0 20px 50px -18px rgba(0,0,0,.8), 0 0 0 1px #363947; }
.ob-summary { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: transparent; color: inherit; text-align: left; padding: 0 4px; }
.ob-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); flex-shrink: 0; }
.ob-icon svg { width: 19px; height: 19px; }
.ob-text { font-size: 13.5px; color: #B9BCC6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-text b { color: #fff; font-weight: 700; }
.order-bar.has-items .ob-icon { background: var(--accent); }
#genBtn { height: 44px; padding: 0 20px; border-radius: 12px; background: #FFFFFF; color: #0D0E12; }
#genBtn:hover:not(:disabled) { background: var(--accent); color: #fff; }
#genBtn:disabled { opacity: .35; }
#status { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); padding: 9px 14px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); font-size: 13px; font-weight: 500; text-align: center; animation: fadeUp .25s var(--ease); }
#status:empty { display: none; }
#status.error { background: #FFECEB; color: #B42318; }/* ---------- 16 Modales ---------- */
.order-modal { position: fixed; inset: 0; z-index: 2050; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.order-modal.open { display: flex; animation: fadeIn .2s ease; }
.order-card { width: min(540px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden; animation: dialogIn .28s var(--ease); }
.order-card-narrow { width: min(440px, 100%); }
.order-modal:has(.drawer) { justify-content: flex-end; padding: 0; }
.order-card.drawer { width: min(460px, 100%); height: 100%; max-height: none; border-radius: 0; animation: drawerIn .32s var(--ease); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.order-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.order-header h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.order-list { flex: 1; overflow-y: auto; padding: 6px 22px; }
.order-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; font-size: 14px; color: var(--muted); }
.order-empty b { font-size: 16px; color: var(--ink); }
.order-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order-item img { grid-row: 1 / 3; width: 58px; height: 58px; border-radius: 12px; object-fit: contain; background: #FFFFFF; padding: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.oi-info { grid-row: 1 / 3; min-width: 0; }
.oi-brand { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.oi-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.oi-code { font: 11px var(--font-mono); color: var(--faint); margin-top: 2px; }
.oi-qty { display: grid; grid-template-columns: 30px 40px 30px; height: 32px; border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.oi-qty button { border: none; background: transparent; font-size: 16px; color: var(--ink); }
.oi-qty input { font-size: 13.5px; }
.oi-remove { justify-self: end; border: none; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.oi-remove:hover { color: var(--danger); }
.order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.order-footer-end { justify-content: flex-end; }
.of-total { font-size: 13.5px; color: var(--muted); }
.of-total b { color: var(--ink); }
.of-actions { display: flex; gap: 8px; }
.form-body { padding: 18px 22px 8px; display: flex; flex-direction: column; }
.form-intro { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.form-body .field-label { display: block; }
.field-input { width: 100%; height: 48px; padding: 0 14px; margin-bottom: 14px; border: none; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; color: var(--ink); transition: box-shadow var(--t-fast), background-color var(--t-fast); }
.field-input:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.field-error { min-height: 18px; font-size: 13px; color: var(--danger); }

.calc-card { width: min(340px, 100%); padding: 16px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); animation: dialogIn .28s var(--ease); }
.calc-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px 6px; }
.calc-header h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.calc-display { margin-bottom: 12px; padding: 18px 16px; border-radius: 16px; background: var(--surface-2); font-family: var(--font-display); font-size: 34px; font-weight: 600; text-align: right; letter-spacing: -.02em; overflow-x: auto; white-space: nowrap; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-grid button { height: 58px; border: none; border-radius: 14px; background: var(--surface-2); font-size: 19px; font-weight: 600; color: var(--ink); transition: background-color var(--t-fast), transform var(--t-fast); }
.calc-grid button:hover { background: var(--surface-3); }
.calc-grid button:active { transform: scale(.96); }
.calc-grid .calc-op { background: var(--accent-soft); color: var(--accent-strong); }
.calc-grid .calc-clear { color: var(--danger); }
.calc-grid .calc-equals { background: var(--primary); color: var(--primary-ink); }
.calc-grid .calc-zero { grid-column: span 2; }

.history-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-name { font-size: 14.5px; font-weight: 600; }
.history-meta { font-size: 12.5px; color: var(--muted); }
.history-repeat { flex-shrink: 0; height: 34px; padding: 0 12px; border: none; border-radius: 10px; background: var(--primary); color: var(--primary-ink); font-size: 12.5px; font-weight: 600; }
.history-count { margin: 6px 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.history-lines { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.history-line { display: flex; gap: 6px; }
.history-line b { color: var(--ink); min-width: 32px; }

.thanks-modal { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.thanks-modal.open { display: flex; animation: fadeIn .2s ease; }
.thanks-card { width: min(420px, 100%); padding: 30px 26px 24px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); text-align: center; animation: dialogIn .3s var(--ease); }
.thanks-icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-strong); }
.thanks-icon svg { width: 27px; height: 27px; stroke-width: 2; }
.thanks-text { margin: 0 0 20px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.thanks-text-tight { margin-bottom: 6px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.thanks-note { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.thanks-btn { width: 100%; height: 50px; border: none; border-radius: 14px; background: var(--primary); color: var(--primary-ink); font-size: 15px; font-weight: 600; }
.thanks-btn:hover { background: var(--primary-hover); }
.thanks-btn-ghost { margin-top: 8px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.thanks-btn-ghost:hover { background: var(--surface-2); }
.seller-card { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.seller-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.seller-option { display: flex; flex-direction: column; padding: 0; border: none; border-radius: 16px; overflow: hidden; background: #1B3F8B; color: #fff; text-decoration: none; cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.seller-option:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #25D366, var(--sh-2); }
.seller-option.is-mine { position: relative; box-shadow: 0 0 0 2px #25D366; }
.seller-mine { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 4px 9px; border-radius: 999px; background: #25D366; color: #06210F; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.seller-option:focus-visible { outline: 3px solid #25D366; outline-offset: 2px; }
.seller-option img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.seller-phone { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; background: #25D366; color: #fff; font-size: 13px; font-weight: 600; }
.seller-phone svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.footer-sellers { max-width: var(--container); margin: 0 auto; padding: 40px var(--gutter) 8px; }
.footer-sellers h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: #F3F4F7; }
.footer-sellers p { margin: 4px 0 16px; font-size: 13.5px; color: #8E919C; }
.footer-sellers .seller-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .footer-sellers .seller-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .seller-list, .footer-sellers .seller-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }/* ---------- 17 Formulario de opinion (sobre el estilo que inyecta feedback.js) ---------- */
.fb-modal { background: var(--overlay) !important; backdrop-filter: blur(4px); }
.fb-box { border-radius: var(--r-xl) !important; background: var(--surface) !important; color: var(--ink) !important; box-shadow: var(--sh-3) !important; overflow: hidden; }
.fb-head { padding: 20px 22px 14px !important; border-color: var(--line) !important; }
.fb-head h3 { font-family: var(--font-display); font-size: 19px !important; letter-spacing: -.02em; }
.fb-body { padding: 16px 22px !important; }
.fb-body label { color: var(--ink-2); font-weight: 600 !important; }
.fb-body select, .fb-body input[type="text"], .fb-body textarea { border: none !important; border-radius: 12px !important; background: var(--surface-2) !important; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink) !important; padding: 11px 12px !important; }
.fb-body select:focus, .fb-body input[type="text"]:focus, .fb-body textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.fb-addfoto { border-radius: 12px !important; border-color: var(--line-strong) !important; }
.fb-foot { padding: 14px 22px 18px !important; border-color: var(--line) !important; }
.fb-foot button { height: 42px; border-radius: 12px !important; font-weight: 600 !important; border-color: var(--line-strong) !important; background: transparent; color: var(--ink); }
.fb-foot .fb-send { background: var(--primary) !important; border-color: var(--primary) !important; color: var(--primary-ink) !important; }/* ---------- 18 Tonos por departamento ---------- */
.tone-beauty { --tone: #B03A5B; --tone-soft: #FBEEF2; --tone-band: #FBF6F7; --stage: #F9F4F5; }
.tone-care   { --tone: #2F7A5C; --tone-soft: #E8F3EE; --tone-band: #F5F9F7; --stage: #F3F7F5; }
.tone-tech   { --tone: #2554C7; --tone-soft: #E9EFFC; --tone-band: #F4F7FC; --stage: #F2F5F9; }
.tone-home   { --tone: #A35F0E; --tone-soft: #FAF0E2; --tone-band: #FBF8F3; --stage: #F8F5F0; }
body.dark .tone-beauty { --tone: #FF7FA2; --tone-soft: rgba(255,127,162,.13); --tone-band: #17131A; }
body.dark .tone-care   { --tone: #5FD3A5; --tone-soft: rgba(95,211,165,.12); --tone-band: #111816; }
body.dark .tone-tech   { --tone: #7FA4FF; --tone-soft: rgba(127,164,255,.13); --tone-band: #11151F; }
body.dark .tone-home   { --tone: #F2B35C; --tone-soft: rgba(242,179,92,.13); --tone-band: #181510; }
body.dark .pc-media, body.dark .rc-media, body.dark .pdp-stage, body.dark .pdp-thumb, body.dark .pr-media,
body.dark .db-tile-pic, body.dark .bt-thumbs img, body.dark .cc-pic, body.dark .qn-pic, body.dark .dc-top { background: #EEF0F3; }
body.dark .dc-name { color: #14161B; }
body.dark .dc-name small { color: #5C6170; }
body.dark .pc-spec { color: var(--ink); }
body.dark .hero-pic { background: #F4F5F7; }

/* Tonos de las categorias de origen (vitrina de entrada) */
.cat-maquillaje         { --cat: #B03A5B; --cat-soft: #FBEEF2; --cat-stage: #F9F4F5; }
.cat-cuidado-facial     { --cat: #2F7A5C; --cat-soft: #E8F3EE; --cat-stage: #F3F7F5; }
.cat-cuidado-corporal   { --cat: #2F7A5C; --cat-soft: #E8F3EE; --cat-stage: #F3F7F5; }
.cat-cabello-y-barberia { --cat: #2F7A5C; --cat-soft: #E8F3EE; --cat-stage: #F3F7F5; }
.cat-tecnologia         { --cat: #2554C7; --cat-soft: #E9EFFC; --cat-stage: #F2F5F9; }
.cat-electrodomesticos  { --cat: #A35F0E; --cat-soft: #FAF0E2; --cat-stage: #F8F5F0; }
.cat-otros              { --cat: #6B7080; --cat-soft: #EEEFF2; --cat-stage: #F4F4F6; }

/* ---------- 19 Responsive ---------- */
@media (max-width: 1279px) {
  .brand-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand-tiles .brand-tile:nth-child(n+9) { display: none; }
  .hero-main { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 32px; }
  .plp { grid-template-columns: 228px minmax(0, 1fr); gap: 24px; }
  .pr { grid-template-columns: 56px minmax(0, 1fr) 128px 110px 170px; gap: 12px; }
  .mm-cols { gap: 18px; }
}
@media (max-width: 1100px) {
  .hu-hide-sm { display: none; }
  .dept-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr !important; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Tablet y celular: navegacion propia (barra inferior + menu lateral) */
@media (max-width: 1023px) {
  :root { --util-h: 0px; --hdr-h: 118px; }
  .hdr-util, .nav-bar, .mega-menu, .mega-backdrop { display: none !important; }
  .site-header { top: 0; }
  .hdr-main { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "menu logo . actions" "search search search search"; row-gap: 10px; column-gap: 6px; padding: 10px 14px 10px; }
  .hdr-menu { grid-area: menu; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -6px; border: none; border-radius: 10px; background: transparent; color: var(--ink); }
  .hdr-menu svg { width: 24px; height: 24px; }
  .header-logo { grid-area: logo; }
  .header-logo img { height: 28px; }
  .header-actions { grid-area: actions; }
  .search { grid-area: search; max-width: none; height: 46px; }
  .search-go { display: none; }
  #search { font-size: 16px; }
  .cart-btn { height: 42px; padding: 0 12px; border-radius: 11px; }
  .cart-btn-label { display: none; }

  body.search-open { overflow: hidden; }
  body.search-open .search { position: fixed; z-index: 2600; top: 0; left: 0; right: 0; height: 62px; border-radius: 0; background: var(--surface); box-shadow: 0 1px 0 var(--line); padding: 0 6px; }
  body.search-open .search-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; background: transparent; color: var(--ink); }
  body.search-open .search-back svg { width: 22px; height: 22px; }
  body.search-open .search-icon { display: none; }
  body.search-open .search-results { position: fixed; top: 62px; left: 0; right: 0; bottom: 0; max-height: none; border-radius: 0; box-shadow: none; padding: 6px 10px calc(90px + env(safe-area-inset-bottom)); }
  .sr-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; z-index: 1900; left: 0; right: 0; bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -1px 0 var(--line);
  }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 600; text-decoration: none; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .active { color: var(--brand); }
  .tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--deal); color: #fff; font-size: 10.5px; line-height: 18px; }
  #mainContent { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

  .mobile-menu { display: block; position: fixed; inset: 0; z-index: 2400; pointer-events: none; }
  .mm-backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity var(--t-med); }
  .mm-sheet { position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: min(420px, 90vw); display: flex; flex-direction: column; background: var(--surface); transform: translateX(-102%); transition: transform .32s var(--ease); }
  body.menu-open .mobile-menu { pointer-events: auto; }
  body.menu-open .mm-backdrop { opacity: 1; }
  body.menu-open .mm-sheet { transform: none; }
  body.menu-open { overflow: hidden; }
  .mm-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 12px 18px; border-bottom: 1px solid var(--line); }
  .mm-logo { height: 26px; width: auto; }
  .mm-body { flex: 1; overflow-y: auto; padding: 12px 12px calc(30px + env(safe-area-inset-bottom)); }
  .mmb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .mmb-col { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; }
  .mmb-col svg { width: 20px; height: 20px; color: var(--brand); }
  .mmb-col small { font-size: 12px; font-weight: 500; color: var(--muted); }
  .mmb-dept { border-bottom: 1px solid var(--line); }
  .mmb-dept summary { display: flex; align-items: center; gap: 12px; padding: 14px 6px; list-style: none; cursor: pointer; font-family: var(--font-display); font-size: 16.5px; font-weight: 800; }
  .mmb-dept summary::-webkit-details-marker { display: none; }
  .mmb-dept summary > svg:first-child { width: 22px; height: 22px; color: var(--tone); }
  .mmb-dept summary small { margin-left: auto; font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; color: var(--muted); }
  .mmb-dept summary > svg:last-child { width: 18px; height: 18px; color: var(--muted); transition: transform var(--t-fast); }
  .mmb-dept[open] summary > svg:last-child { transform: rotate(180deg); }
  .mmb-seeall { display: block; margin: 0 6px 8px; padding: 10px 12px; border-radius: 10px; background: var(--tone-soft); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
  .mmb-cat { padding: 4px 6px 12px; }
  .mmb-cat-link { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 6px 0; }
  .mmb-cat-link small { color: var(--muted); font-weight: 500; }
  .mmb-types { display: flex; flex-wrap: wrap; gap: 6px; }
  .mmb-types a { padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; text-decoration: none; }
  .mmb-row { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; }
  .mmb-row svg { width: 20px; height: 20px; color: var(--muted); }
  .mmb-row small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12.5px; }
  .mmb-tools { display: flex; flex-direction: column; margin-top: 12px; }
  .mmb-tools button { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border: none; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-align: left; }
  .mmb-tools svg { width: 20px; height: 20px; color: var(--muted); }

  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trust-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-tiles .brand-tile:nth-child(n+7) { display: none; }

  .plp { grid-template-columns: 1fr; margin-top: 16px; }
  .plp-filter-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: none; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 600; }
  .plp-filter-btn svg { width: 18px; height: 18px; }
  .plp-filter-btn b:not(:empty) { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--deal); color: #fff; font-size: 11.5px; line-height: 20px; }
  .plp-sort { display: none; }
  .plp-count { order: 3; flex: 1 1 100%; margin: 0; }
  .plp-bar { flex-wrap: wrap; }
  .facets {
    position: fixed; z-index: 2500; top: auto; left: 0; right: 0; bottom: 0; max-height: 86vh;
    display: flex; flex-direction: column; padding: 0; overflow: hidden;
    background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--sh-3);
    transform: translateY(105%); transition: transform .34s var(--ease);
  }
  body.sheet-open .facets { transform: none; }
  body.sheet-open { overflow: hidden; }
  .facets-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 20px; font-family: var(--font-display); font-size: 18px; border-bottom: 1px solid var(--line); }
  .facets-sort { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 700; }
  .facets-sort select { height: 38px; }
  #facetGroups { flex: 1; overflow-y: auto; padding: 0 20px; }
  .facets-apply { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .facets-apply .btn { height: 50px; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 2490; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
  body.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }

  .pdp-grid { grid-template-columns: 1fr; gap: 22px; }
  .pdp-gallery { position: static; grid-template-columns: 1fr; }
  .pdp-thumbs { order: 2; flex-direction: row; overflow-x: auto; }
  .pdp-thumb { flex: none; width: 64px; height: 64px; }
  .pdp-nav { opacity: 1; }
  .pr { grid-template-columns: 56px minmax(0, 1fr) 160px; grid-template-areas: "img main act" "img meta act"; row-gap: 2px; }
  .pr-media { grid-area: img; } .pr-main { grid-area: main; }
  .pr-code { grid-area: meta; font-size: 11px; }
  .pr .pc-stock { display: none; }
  .pr-action { grid-area: act; }

  .order-bar { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  .add-toast { right: 12px; left: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-order .add-toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .home-sec, .rail { margin-top: 40px; }
  .hero { margin-top: 12px; }
  .hero-main { grid-template-columns: 1fr; min-height: 0; padding: 26px 22px 22px; border-radius: 20px; }
  .hero-title { font-size: 29px; }
  .hero-text { font-size: 14.5px; margin-bottom: 18px; }
  .hero-pics { grid-template-columns: repeat(4, 1fr); gap: 8px; order: -1; }
  .hp-1, .hp-3 { transform: none; }
  .hero-pic { border-radius: 12px; }
  .hero-promo { border-radius: 18px; padding: 16px 0 14px; }
  .pm-head, .hp-go { padding: 0 16px; }
  .pm-track { padding-left: 16px; }
  .pm-head b { font-size: 19px; }
  .trust-bar { padding: 10px; gap: 4px; }
  .tb-item { gap: 8px; padding: 6px 4px; }
  .tb-item svg { width: 22px; height: 22px; }
  .tb-item b { font-size: 13px; }
  .tb-item small { font-size: 11.5px; }
  .dept-cards { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .dept-card { scroll-snap-align: start; }
  .dc-top { height: 170px; }
  .cat-circles { grid-auto-columns: 88px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; }
  .cc-pic { width: 80px; height: 80px; }
  .cc-name { font-size: 12.5px; }
  .rail-track { grid-auto-columns: 158px; gap: 10px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .rail-arrows { display: none; }
  .rc-add { top: calc(158px - 46px); width: 38px; height: 38px; min-width: 38px; }
  .rc-name { font-size: 13px; }
  .dept-block { padding: 30px var(--gutter) 26px; margin-top: 40px; }
  .db-tiles { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; }
  .brand-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .brand-tiles .brand-tile:nth-child(n+7) { display: none; }
  .brand-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .brand-tile { padding: 14px 12px 12px; }
  .bt-word { font-size: 15.5px; }

  .page-head { padding-top: 14px; }
  .page-title { font-size: 26px; }
  .page-sub { font-size: 14px; }
  .quicknav { margin: 16px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 8px; }
  .qn { padding: 4px 12px 4px 4px; }
  .qn-pic { width: 38px; height: 38px; }
  .qn-label { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .pc-body { padding: 10px 2px 4px; gap: 3px; }
  .pc-name { font-size: 13.5px; }
  .pc-brand { font-size: 10.5px; }
  .pc-type { font-size: 11.5px; }
  .pc-spec:nth-of-type(n+3) { display: none; }   /* el 1.º span es el tipo: queda 1 dato */
  .pc-foot { flex-direction: column; align-items: flex-start; gap: 0; }
  .pc-stock { font-size: 11.5px; }
  .pc-code { font-size: 10px; }
  .pc-add, .pc-stepper, .pc-soldout { height: 40px; font-size: 13px; }
  .pc-stepper { grid-template-columns: 38px minmax(0, 1fr) 38px; }
  .pc-add span { display: inline; }
  .badge { height: 20px; font-size: 10px; padding: 0 6px; }
  .pc-badges { top: 8px; left: 8px; }
  .grid-group em { display: none; }
  .view-toggle { margin-left: auto; }
  .pr { grid-template-columns: 52px minmax(0, 1fr) 128px; column-gap: 10px; }
  .pr-media { width: 52px; height: 52px; }
  .pr-name { font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .pr-type { display: none; }
  .pr .pc-add span { display: none; }
  .pr .pc-add, .pr .pc-stepper { height: 38px; }

  .pdp-top { padding-top: 12px; }
  .home-back { width: 100%; justify-content: center; height: 52px; }
  .home-back-end .home-back { width: 100%; }
  .hero-side { grid-template-columns: 1fr !important; }
  .pdp-top .crumbs { display: none; }
  .pdp-stage { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; aspect-ratio: auto; height: min(52vh, 360px); }
  .pdp-hint { display: none; }
  .pdp-name { font-size: 24px; }
  .pdp-facts div { grid-template-columns: 130px minmax(0, 1fr); font-size: 13.5px; }
  .pdp-stepper { grid-template-columns: 42px 52px 42px; }

  .order-bar { width: calc(100% - 16px); }
  .footer-inner { grid-template-columns: 1fr !important; }
}
@media (max-width: 380px) {
  .grid { gap: 14px 8px; }
  .trust-bar { grid-template-columns: 1fr 1fr; }
  .tb-item small { display: none; }
}

/* ---------- 20 Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .gm-cell { opacity: 1; }
}

/* ==========================================================================
   21 Experiencia mayorista
   Inicio "¿Que quieres comprar hoy?", menu principal, disponibilidad,
   etiquetas, tarjetas, marcas, pedido, confirmacion, historial y ficha.
   (Va al final: reemplaza reglas anteriores con la misma especificidad.)
   ========================================================================== */
:root {
  --avail-ok: #0F8A5F;  --avail-ok-soft: #E7F5EE;
  --avail-low: #A15C00; --avail-low-dot: #F2A900; --avail-low-soft: #FFF6DB;
  --avail-out: #C0362C; --avail-out-soft: #FDECEA;
  --opp: #C2410C; --opp-soft: #FFF0E6;
  --wa: #1FAF54;
}
body.dark {
  --avail-ok: #3DD39A; --avail-ok-soft: rgba(61,211,154,.12);
  --avail-low: #FFC94D; --avail-low-dot: #FFC94D; --avail-low-soft: rgba(255,201,77,.12);
  --avail-out: #FF7A6E; --avail-out-soft: rgba(255,122,110,.12);
  --opp: #FF8A4C; --opp-soft: rgba(255,138,76,.14);
}
.tone-beauty  { --tone: #A8385A; --tone-soft: #FAEEF2; --tone-band: #FBF7F8; --stage: #F8F4F5; }
.tone-battery { --tone: #0F766E; --tone-soft: #E3F4F1; --tone-band: #F4FAF9; --stage: #F1F6F5; }
body.dark .tone-battery { --tone: #4FD1C1; --tone-soft: rgba(79,209,193,.13); --tone-band: #0F1817; }
.btn svg.ic-fill, svg.ic-fill { fill: currentColor; stroke: none; }

/* ---------- Menu principal ---------- */
.dept-nav { overflow: visible; gap: 2px; }
.dn-link { gap: 7px; padding: 0 11px; }
.dn-link svg { width: 17px; height: 17px; color: var(--muted); }
.dn-link.active svg, .dn-link:hover svg { color: inherit; }
.dn-nuevos svg { color: var(--new); }
.dn-opp svg { color: var(--opp); }
.dn-vol svg { color: var(--brand); }
.dn-short { display: none; }
.dn-spacer { flex: 1; }
.dn-tool { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: none; border-radius: 9px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.dn-tool svg { width: 18px; height: 18px; }
.dn-tool:hover { background: var(--surface-2); }
.dn-calc { background: var(--brand-soft); color: var(--brand); }
.dn-calc:hover { background: var(--brand); color: #fff; }
.dn-more { position: relative; }
.dn-more .dn-tool > svg:last-child { width: 15px; height: 15px; color: var(--muted); }
.more-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 140; width: 300px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-3), 0 0 0 1px var(--line); }
body.more-open .more-menu { display: block; animation: fadeIn .15s ease; }
.more-menu button, .mmb-tools button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: none; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; font-size: 14px; font-weight: 600; }
.more-menu button:hover { background: var(--surface-2); }
.more-menu svg, .mmb-tools svg { width: 20px; height: 20px; color: var(--muted); }
.more-menu small, .mmb-tools small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
@media (max-width: 1279px) {
  .dn-link { padding: 0 9px; font-size: 14px; }
  .dn-link svg { display: none; }
}
@media (max-width: 1150px) {
  .dn-long { display: none; } .dn-short { display: inline; }
  .dn-all span { display: none; }
  .dn-all { padding: 0 9px; margin-right: 4px; }
}

/* ---------- Inicio: ¿Que quieres comprar hoy? ---------- */
.welcome-hero { margin-top: 22px; padding: 36px 36px 30px; border-radius: 24px; background: var(--brand-deep); color: #fff; }
.wh-head { max-width: 860px; }
.wh-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9FB5E3; }
.wh-title { margin: 10px 0 8px; font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.wh-text { margin: 0 0 22px; font-size: 16px; line-height: 1.5; color: #C9D5EE; max-width: 680px; }
.big-search { position: relative; display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 6px 0 18px; border-radius: 14px; background: #fff; color: #14161B; box-shadow: 0 16px 36px -18px rgba(0,0,0,.45); }
.big-search > svg { width: 22px; height: 22px; color: #6B7080; }
.big-search input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: none; background: transparent; font-size: 16.5px; color: #14161B; }
.big-search input::placeholder { color: #8A8F9C; }
.big-search input:focus { outline: none; }
.big-search input::-webkit-search-cancel-button { display: none; }
.big-search .btn { height: 48px; padding: 0 26px; border-radius: 10px; }
.big-search .btn-primary { background: #19438E; color: #fff; }
.big-search .search-results { color: var(--ink); text-align: left; }
.big-search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 16px 36px -18px rgba(0,0,0,.45); }
.wh-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: #9FB5E3; }
.wh-pop span { margin-right: 4px; }
.wh-pop button { height: 30px; padding: 0 12px; border: none; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 13px; font-weight: 500; }
.wh-pop button:hover { background: rgba(255,255,255,.2); }

.dept-access { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.da-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 16px; border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 0 -4px 0 var(--tone); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.da-card:hover { transform: translateY(-3px); box-shadow: inset 0 -4px 0 var(--tone), 0 18px 34px -18px rgba(0,0,0,.55); }
.da-top { display: flex; align-items: center; justify-content: space-between; }
.da-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--tone-soft); color: var(--tone); }
.da-icon svg { width: 22px; height: 22px; }
.da-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.da-name { margin-top: 12px; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.da-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.da-pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.da-pics span { aspect-ratio: 1; border-radius: 12px; background: var(--stage); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.da-pics img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.da-brands { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; min-height: 24px; }
.da-brands i { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.da-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--tone); }
.da-go svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.da-card:hover .da-go svg { transform: translateX(3px); }
body.dark .da-pics span { background: #EEF0F3; }

/* ¿Que estas buscando? (necesidades) */
.needs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.need { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: box-shadow var(--t-fast), transform var(--t-fast); }
.need:hover { box-shadow: 0 0 0 1.5px var(--brand); transform: translateY(-1px); }
.need-pic { position: relative; width: 100%; aspect-ratio: 16 / 10; margin-bottom: 8px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.need-pic img { width: 70%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.need-pic i { position: absolute; left: 8px; top: 8px; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--brand); box-shadow: var(--sh-1); }
.need-pic i svg { width: 17px; height: 17px; }
.need-name { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.need small { font-size: 12px; color: var(--muted); }
body.dark .need-pic { background: #EEF0F3; }

/* Compra por volumen */
.vol-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.vol-chip { display: inline-flex; align-items: baseline; gap: 5px; height: 46px; padding: 0 16px; border: none; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); text-decoration: none; font-size: 13px; line-height: 46px; }
.vol-chip b { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.vol-chip span { color: var(--ink-2); font-weight: 600; }
.vol-chip small { margin-left: 4px; font-size: 12px; color: var(--muted); }
.vol-chip:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.vol-chip.on { background: var(--brand); color: #fff; box-shadow: none; }
.vol-chip.on span, .vol-chip.on small { color: rgba(255,255,255,.85); }
.vl-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 14px; font-weight: 700; }
.vl-label svg { width: 18px; height: 18px; color: var(--brand); }
.vol-levels-page { margin: 18px 0 0; }
.vol-promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.promo-low { background: var(--avail-low-soft); --pm-c: var(--avail-low); }
.promo-low .hp-k, .promo-low .hp-go { color: var(--avail-low); }
.pm-stock.is-low { color: var(--avail-low); }


/* ---------- Disponibilidad y etiquetas ---------- */
.pc-stock, .rc-stock { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font-size: 12.5px; color: var(--ink-2); white-space: normal; }
.pc-stock b, .rc-stock b { font-weight: 700; }
.pc-stock span, .rc-stock span { color: var(--muted); font-weight: 500; }
.pc-stock i, .rc-stock i { width: 8px; height: 8px; border-radius: 50%; background: var(--avail-ok); flex: none; }
.pc-stock.is-ok b, .rc-stock.is-ok b { color: var(--avail-ok); }
.pc-stock.is-low b, .rc-stock.is-low b { color: var(--avail-low); }
.pc-stock.is-low i, .rc-stock.is-low i { background: var(--avail-low-dot); }
.pc-stock.is-out b, .rc-stock.is-out b { color: var(--avail-out); }
.pc-stock.is-out i, .rc-stock.is-out i { background: var(--avail-out); }
.pc-stock.is-low, .rc-stock.is-low, .pc-stock.is-out, .rc-stock.is-out { color: var(--ink-2); }

.badge { gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.badge svg { width: 12px; height: 12px; stroke-width: 2.2; }
.badge-new { background: var(--new); color: #fff; }
.badge-opp { background: var(--opp); color: #fff; }
.badge-low { background: var(--avail-low-soft); color: var(--avail-low); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--avail-low-dot) 45%, transparent); }
.badge-vol { background: var(--brand); color: #fff; }
.badge-out { background: var(--avail-out-soft); color: var(--avail-out); }
.badge-best { background: var(--ink); color: var(--surface); }

/* ---------- Tarjeta de producto ---------- */
.pc { box-shadow: 0 0 0 1px var(--line); }
.pc:hover { box-shadow: 0 0 0 1px var(--line-strong), var(--sh-2); }
.pc-media { border-radius: 16px 16px 0 0; }
.pc-body { padding: 12px 12px 12px; gap: 5px; }
.pc-code { font: 11.5px var(--font-ui); color: var(--muted); }
.pc-code b { font: 600 11.5px var(--font-mono); color: var(--ink-2); letter-spacing: .01em; }
.pc-vol { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--brand); }
.pc-vol svg { width: 14px; height: 14px; }
.pc-action { margin-top: auto; padding-top: 8px; }
.pc-add { background: var(--brand); color: #fff; box-shadow: none; }
.pc-add:hover { background: var(--brand-hover); }
body.dark .pc-add { color: #0D0F14; }
.pc.has-qty .pc-media { box-shadow: none; }
.pc.has-qty { box-shadow: 0 0 0 2px var(--brand); }
.tone-battery .pc-spec { font-family: var(--font-mono); font-size: 11px; border-radius: 5px; }
/* Cuidado personal: mas visual (imagen protagonista, nombre primero) */
.tone-beauty .pc-media img { padding: 7%; }
/* Tecnologia y baterias: datos tecnicos visibles */
.tone-tech .pc-meta, .tone-battery .pc-meta { min-height: 22px; }
.rc-media { border-radius: 0; }
.rc-stock { margin-top: 4px; font-size: 12px; }
.rc-stock span { display: none; }
.pr .pc-stock span { display: none; }

/* ---------- Buscador: resultados con boton de agregar ---------- */
.sr-item { padding: 0; gap: 6px; }
.sr-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sr-link:hover, .sr-link.is-active { background: var(--surface-2); }
.sr-item:hover { background: transparent; }
.sr-stock { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 600; }
.sr-stock i { width: 7px; height: 7px; border-radius: 50%; background: var(--avail-ok); }
.sr-stock.is-ok { color: var(--avail-ok); }
.sr-stock.is-low { color: var(--avail-low); } .sr-stock.is-low i { background: var(--avail-low-dot); }
.sr-stock.is-out { color: var(--avail-out); } .sr-stock.is-out i { background: var(--avail-out); }
.sr-add { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 40px; height: 40px; margin-right: 4px; padding: 0 9px; border: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.sr-add svg { width: 18px; height: 18px; stroke-width: 2.2; }
.sr-add b { font-size: 12.5px; }
.sr-add b:empty { display: none; }
.sr-add:hover, .sr-item.has-qty .sr-add { background: var(--brand); color: #fff; }

/* ---------- Catalogo general ---------- */
.ch-depts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ch-dept { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 4px 0 0 var(--tone); transition: transform var(--t-fast); }
.ch-dept:hover { transform: translateY(-2px); }
.ch-pic { width: 52px; height: 52px; flex: none; border-radius: 10px; background: var(--stage); display: flex; align-items: center; justify-content: center; }
.ch-pic img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.ch-name { display: flex; flex-direction: column; font-size: 15px; font-weight: 800; line-height: 1.2; }
.ch-name svg { display: none; }
.ch-name small { font-size: 12px; font-weight: 500; color: var(--muted); }
body.dark .ch-pic { background: #EEF0F3; }

.dept-hero { display: flex; gap: 18px; align-items: flex-start; margin-top: 16px; padding: 22px 24px; border-radius: 20px; background: var(--tone-soft); }
.dh-icon { width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--surface); color: var(--tone); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-1); }
.dh-icon svg { width: 28px; height: 28px; }
.dept-hero .page-eyebrow { margin-top: 0; }
.dh-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dh-brands a { padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.dh-brands a:hover { box-shadow: inset 0 0 0 1.5px var(--tone); }

.page-title-row.has-icon { display: flex; gap: 16px; align-items: flex-start; }
.col-icon { width: 52px; height: 52px; flex: none; margin-top: 18px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.col-icon svg { width: 26px; height: 26px; }
.col-nuevos { background: color-mix(in srgb, var(--new) 12%, transparent); color: var(--new); }
.col-oportunidades { background: var(--opp-soft); color: var(--opp); }
.col-ultimas { background: var(--avail-low-soft); color: var(--avail-low); }
.page-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Pagina de marca */
.brand-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 16px; padding: 26px 28px; border-radius: 22px; background: var(--tone-soft); }
.bh-mark { display: block; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; line-height: 1; }
.bh-mark.has-logo img { max-height: 64px; width: auto; }
.bh-copy p { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); max-width: 560px; }
.bh-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.bh-stats b { color: var(--ink); font-size: 16px; }
.bh-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bh-cats a { padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.bh-cats a:hover { box-shadow: inset 0 0 0 1.5px var(--tone); }
.bh-pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bh-pics span { aspect-ratio: 1; border-radius: 14px; background: var(--surface); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-1); }
.bh-pics img { width: 84%; height: 84%; object-fit: contain; }
.brand-chips { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.brand-chips .fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.fchip small { font-size: 12px; font-weight: 500; opacity: .7; }
.fchip svg { width: 15px; height: 15px; }
.fchip-new:not(.on) svg { color: var(--new); }
.fchip-opp:not(.on) svg { color: var(--opp); }

/* Directorio de marcas */
.brand-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.brand-tools .chips-row { margin-top: 0; }
.brand-search { display: flex; align-items: center; gap: 8px; height: 46px; width: min(360px, 100%); padding: 0 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.brand-search:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); }
.brand-search svg { width: 19px; height: 19px; color: var(--muted); }
.brand-search input { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; font-size: 15px; color: var(--ink); }
.brand-search input:focus { outline: none; }
.bt-word.has-logo img { max-height: 40px; width: auto; }
.bt-cats { font-size: 12px; color: var(--muted); margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.bt-go { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.bt-go svg { width: 14px; height: 14px; }
.brand-tile[hidden] { display: none !important; }

/* Filtros */
.fdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--avail-ok); }
.fdot.is-low { background: var(--avail-low-dot); }
.fdot.is-out { background: var(--avail-out); }
.plp-min select { max-width: 170px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- Mi pedido ---------- */
.oh-sum { margin-top: 2px; font-size: 13px; color: var(--muted); }
.order-alert { display: flex; gap: 10px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--avail-low-soft); color: var(--ink); font-size: 13px; line-height: 1.45; }
.order-alert > svg { width: 20px; height: 20px; flex: none; color: var(--avail-low); }
.oi-group { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 6px 0; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.oi-group span { font-weight: 600; color: var(--muted); }
.order-item { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-rows: auto; align-items: start; row-gap: 8px; }
.order-item.is-short { background: linear-gradient(90deg, var(--avail-low-soft), transparent 70%); margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.oi-img { grid-row: 1; display: block; }
.oi-img img, .order-item img { grid-row: auto; width: 60px; height: 60px; }
.oi-info { grid-row: 1; }
.oi-name { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
.oi-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.oi-avail { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--avail-ok); }
.oi-avail i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.oi-avail.is-low { color: var(--avail-low); } .oi-avail.is-low i { background: var(--avail-low-dot); }
.oi-avail.is-out { color: var(--avail-out); }
.oi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.oi-qty { grid-template-columns: 34px 46px 34px; height: 36px; }
.oi-remove { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.oi-remove svg { width: 14px; height: 14px; }
.oi-warn { grid-column: 1 / -1; display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--avail-low-dot) 55%, transparent); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.oi-warn > svg { width: 17px; height: 17px; flex: none; color: var(--avail-low); }
.oi-warn .link-btn { font-size: 12.5px; padding: 0; }
.order-empty > svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 4px; }
.oe-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.order-footer-stack { flex-direction: column; align-items: stretch; }
.of-totals { display: flex; align-items: flex-end; gap: 22px; }
.of-totals div { display: flex; flex-direction: column; line-height: 1.1; }
.of-totals b { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.of-totals span { font-size: 12.5px; color: var(--muted); }
.of-clear { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.order-footer-stack .of-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.order-footer-stack .of-actions .btn { height: 50px; }

/* ¿Todo listo? / Repetir pedido */
.confirm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.confirm-stats div { display: flex; flex-direction: column; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.confirm-stats b { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.confirm-stats span { font-size: 12.5px; color: var(--muted); }
.form-body .order-alert { margin: 0 0 14px; }
.repeat-note { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.repeat-na { margin: 6px 0 0; padding-left: 18px; }
.repeat-na em { font-style: normal; color: var(--muted); }
#repeatTitle { font-size: 17px; line-height: 1.25; }

/* Pedido generado */
.thanks-icon.is-ok { background: var(--avail-ok-soft); color: var(--avail-ok); }
.done-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.done-summary { display: flex; justify-content: center; gap: 18px; margin: 8px 0 10px; font-size: 14px; color: var(--muted); }
.done-summary b { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin-right: 2px; }
.done-actions { display: flex; flex-direction: column; gap: 8px; }
.done-actions .thanks-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.done-actions svg { width: 19px; height: 19px; }
.done-actions .thanks-btn:disabled { opacity: .55; cursor: progress; }
.btn-wa, .thanks-btn.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover, .thanks-btn.btn-wa:hover { background: #179447; }
.thanks-btn-text { background: transparent; color: var(--ink-2); height: 44px; }
.thanks-btn-text:hover { background: var(--surface-2); }

/* Historial */
.history-item { padding: 16px 0; }
.history-top { align-items: center; justify-content: flex-start; }
.history-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.history-ic svg { width: 20px; height: 20px; }
.history-date { font-size: 15px; font-weight: 700; }
.history-stats { display: flex; gap: 18px; margin: 10px 0 12px; font-size: 13px; color: var(--muted); }
.history-stats b { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.history-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.history-actions .btn { height: 42px; font-size: 13.5px; }
.history-actions svg { width: 17px; height: 17px; }
.history-repeat { height: 42px; border-radius: 12px; font-size: 13.5px; }
.history-lines { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); max-height: 260px; overflow-y: auto; }
.history-line { align-items: baseline; }
.history-line.is-na span { text-decoration: line-through; }
.history-line em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--avail-out); white-space: nowrap; }

/* Ayuda */
.help-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.help-steps b { color: var(--ink); }
.help-tip { margin: 16px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13.5px; }
.help-body { overflow-y: auto; }

/* ---------- Ficha del producto ---------- */
.pdp-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.pdp-path > span { margin-right: 6px; color: var(--muted); }
.pdp-path a { color: var(--ink); font-weight: 600; text-decoration: none; }
.pdp-path a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.pdp-path svg { width: 13px; height: 13px; color: var(--faint); }
.pdp-avail { flex-wrap: wrap; gap: 4px 8px; color: var(--avail-ok); }
.pdp-avail i { background: var(--avail-ok); box-shadow: 0 0 0 4px var(--avail-ok-soft); }
.pdp-avail small { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.pdp-avail.is-low { color: var(--avail-low); } .pdp-avail.is-low i { background: var(--avail-low-dot); box-shadow: 0 0 0 4px var(--avail-low-soft); }
.pdp-avail.is-out { color: var(--avail-out); } .pdp-avail.is-out i { background: var(--avail-out); box-shadow: 0 0 0 4px var(--avail-out-soft); }
.pdp-badges .badge { height: 26px; font-size: 11px; padding: 0 9px; }
.pdp-buybox { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pdp-qty-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pdp-stepper { background: var(--surface); }
.pdp-stepper input { color: var(--ink); font-size: 17px; }
.pdp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pdp-quick button { height: 32px; min-width: 44px; padding: 0 10px; border: none; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--ink); }
.pdp-quick button:hover { background: var(--brand-soft); color: var(--brand); }
.pdp-quick span { margin-left: 4px; font-size: 12px; color: var(--muted); }
.pdp-qty-hint { display: flex; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--avail-low-soft); font-size: 12.5px; color: var(--ink-2); }
.pdp-qty-hint svg { width: 16px; height: 16px; flex: none; color: var(--avail-low); }
.pdp-incart { flex-wrap: wrap; margin-top: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.pdp-mini-stepper { display: inline-grid; grid-template-columns: 30px 48px 30px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; overflow: hidden; }
.pdp-mini-stepper button { border: none; background: transparent; color: inherit; font-size: 16px; }
.pdp-mini-stepper input { width: 100%; border: none; background: transparent; color: inherit; text-align: center; font-size: 14px; font-weight: 700; -moz-appearance: textfield; }
.pdp-mini-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-mini-stepper input:focus { outline: none; background: rgba(255,255,255,.14); }
body.dark .pdp-mini-stepper { color: #0D0F14; }
.pdp-soldout { display: flex; gap: 10px; background: var(--avail-out-soft); color: var(--ink-2); }
.pdp-soldout svg { width: 18px; height: 18px; flex: none; color: var(--avail-out); }
.pdp-help { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.pdp-help > span { display: inline-flex; align-items: center; gap: 8px; }
.pdp-help > span svg { width: 19px; height: 19px; color: var(--brand); }
.pdp-help .btn { height: 42px; }
.pdp-help .btn svg { width: 18px; height: 18px; }
.pdp-dl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; grid-column: 2; height: 38px; margin-top: 2px; border: none; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.pdp-dl svg { width: 17px; height: 17px; }
.pdp-dl:hover { background: var(--surface-3); color: var(--ink); }
.pdp-dl.is-busy { opacity: .6; pointer-events: none; }
.rail-sugg .sec-title::before { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 10px 4px 0; border-radius: 50%; background: var(--tone); vertical-align: middle; }

/* Aviso breve */
.at-only { padding: 6px 8px; }
.at-only.is-error b { color: #FFB4AB; }

/* ---------- Tablet y celular ---------- */
@media (max-width: 1100px) {
  .dept-access { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .needs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ch-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-hero { grid-template-columns: 1fr; }
  .bh-pics { max-width: 480px; }
}
@media (max-width: 1023px) {
  .more-menu { display: none !important; }
  .tabbar a, .tabbar button { font-size: 10px; }
  .mmb-main { display: flex; flex-direction: column; margin-bottom: 12px; }
  .mmb-row { width: 100%; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; font-family: inherit; }
  .mmb-label { margin: 18px 6px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .mmb-col { gap: 2px; }
  .mmb-nuevos svg { color: var(--new); } .mmb-oportunidades svg { color: var(--opp); } .mmb-ultimas svg { color: var(--avail-low); }
  .mmb-tools button { padding: 10px 6px; }
  .vol-promos { grid-template-columns: 1fr; }
  .welcome-hero { padding: 26px 22px 22px; }
  .pdp-dl { grid-column: 1; }
  .order-item.is-short { margin: 0 -22px; }
}
@media (max-width: 640px) {
  .welcome-hero { margin: 12px calc(-1 * var(--gutter)) 0; border-radius: 0; padding: 24px var(--gutter) 22px; }
  .wh-title { font-size: 30px; }
  .wh-text { font-size: 14.5px; margin-bottom: 16px; }
  .big-search { height: 54px; padding-left: 14px; }
  .big-search .btn { display: none; }
  .wh-pop { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scrollbar-width: none; }
  .wh-pop button { flex: none; }
  .dept-access { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
  .da-card { padding: 14px 12px 12px; border-radius: 16px; }
  .da-icon { width: 36px; height: 36px; border-radius: 10px; }
  .da-icon svg { width: 19px; height: 19px; }
  .da-count { font-size: 11px; }
  .da-name { font-size: 18px; margin-top: 10px; }
  .da-sub { font-size: 11.5px; }
  .da-pics { gap: 5px; margin-top: 10px; }
  .da-pics span { border-radius: 8px; }
  .da-brands { display: none; }
  .da-go { font-size: 12.5px; padding-top: 10px; }
  .needs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-snap-type: x proximity; }
  .need { scroll-snap-align: start; }
  .vol-levels { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scrollbar-width: none; }
  .vol-chip { flex: none; height: 42px; line-height: 42px; padding: 0 12px; }
  .vol-chip b { font-size: 16px; }
  .vl-label { flex: none; }
  .ch-depts { gap: 8px; }
  .ch-dept { padding: 6px 10px 6px 6px; gap: 8px; }
  .ch-pic { width: 42px; height: 42px; }
  .ch-name { font-size: 13.5px; }
  .ch-name small { font-size: 11px; }
  .dept-hero { padding: 16px; gap: 12px; }
  .dh-icon { width: 44px; height: 44px; border-radius: 12px; }
  .dh-icon svg { width: 22px; height: 22px; }
  .brand-hero { padding: 18px 16px; }
  .bh-pics { gap: 6px; }
  .col-icon { width: 44px; height: 44px; margin-top: 14px; }
  .brand-search { width: 100%; }
  .pc-body { padding: 10px 8px 10px; }
  .pc-code, .pc-code b { font-size: 10.5px; }
  .pc-stock { font-size: 11.5px; }
  .pc-stock span { flex-basis: 100%; }
  .pc-vol { font-size: 11px; }
  .badge { font-size: 9.5px; height: 20px; padding: 0 6px; }
  .badge svg { width: 11px; height: 11px; }
  .sr-add { min-width: 44px; height: 44px; }
  .order-footer-stack .of-actions { grid-template-columns: 1fr 1.3fr; }
  .of-totals b { font-size: 22px; }
  .confirm-stats b { font-size: 24px; }
  .history-actions { grid-template-columns: 1fr 1fr; }
  .pdp-buybox { padding: 14px; }
  .pdp-buy { flex-wrap: wrap; }
  .pdp-help .btn { width: 100%; }
}
/* Con "Mi pedido" abierto no se tapa el pie del pedido con el aviso de "agregado" */
body:has(.order-modal.open) .add-toast:not(:has(.at-only)) { display: none; }

/* ==========================================================================
   22 Segunda ronda: jerarquia comercial, escaparates, marcas y movil
   ========================================================================== */
.tone-care { --tone: #2F7A5C; --tone-soft: #E8F3EE; --tone-band: #F5F9F7; --stage: #F3F7F5; }

/* Inicio: buscador primero, compacto */
.welcome-hero { padding: 30px 36px 26px; }
.welcome-hero .wh-head { max-width: 900px; }
.wh-title { font-size: clamp(28px, 3.2vw, 42px); }
.wh-text { margin-bottom: 18px; }
.home-depts-sec { margin-top: 34px; }

/* Compra por departamento: 5 accesos */
.dept-access { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 0; }
.da-card { padding: 14px 14px 14px; box-shadow: 0 0 0 1px var(--line), inset 0 -3px 0 var(--tone); }
.da-card:hover { box-shadow: 0 0 0 1px var(--tone), inset 0 -3px 0 var(--tone), var(--sh-2); }
.da-top { justify-content: flex-start; gap: 10px; }
.da-txt { display: flex; flex-direction: column; min-width: 0; }
.da-name { margin: 0; font-size: 18px; }
.da-count { font-size: 12px; font-weight: 600; }
.da-pics { margin-top: 12px; gap: 6px; }
.da-sub { margin-top: 10px; min-height: 0; font-size: 12px; -webkit-line-clamp: 2; }
.da-brands { margin-top: 8px; min-height: 0; }
.da-go { padding-top: 12px; font-size: 13px; }

/* Mega menu con 5 departamentos */
.mm-cols { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.dn-low svg { color: var(--avail-low-dot); }

/* ---------- Escaparates comerciales ---------- */
.showcases { display: flex; flex-direction: column; gap: 18px; margin-top: 40px; }
.showcase { --sc: var(--brand); --sc-soft: var(--brand-soft); padding: 20px 22px 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-top: 4px solid var(--sc); }
.sc-nuevos { --sc: var(--new); --sc-soft: color-mix(in srgb, var(--new) 10%, transparent); }
.sc-oportunidades { --sc: var(--opp); --sc-soft: var(--opp-soft); }
.sc-ultimas { --sc: var(--avail-low-dot); --sc-soft: var(--avail-low-soft); }
.sc-volumen { --sc: var(--brand); --sc-soft: var(--brand-soft); }
.sc-mas-vendidos { --sc: var(--ink); --sc-soft: var(--surface-2); }
.sc-head { display: flex; align-items: flex-start; gap: 14px; }
.sc-icon { width: 46px; height: 46px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--sc-soft); color: var(--sc); }
.sc-ultimas .sc-icon { color: var(--avail-low); }
.sc-icon svg { width: 24px; height: 24px; }
.sc-copy { flex: 1; min-width: 0; }
.sc-claim { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sc); }
.sc-ultimas .sc-claim { color: var(--avail-low); }
.sc-title { font-family: var(--font-display); font-size: clamp(21px, 2vw, 26px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.sc-sub { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.sc-more { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--sc-soft); color: var(--ink); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sc-more svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.sc-more:hover { box-shadow: inset 0 0 0 1.5px var(--sc); }
.sc-more:hover svg { transform: translateX(3px); }
.sc-bar { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.sc-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: none; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.sc-tab small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sc-tab b { font-family: var(--font-display); font-size: 14.5px; color: var(--ink); }
.sc-tab:hover { box-shadow: inset 0 0 0 1.5px var(--sc); }
.sc-tab.on { background: var(--ink); color: var(--surface); }
.sc-tab.on small, .sc-tab.on b { color: inherit; opacity: .8; }
.sc-track { display: grid; grid-auto-flow: column; grid-auto-columns: 204px; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sc-track .pc { scroll-snap-align: start; }

/* ---------- Tarjetas: estado comercial con una sola marca sutil ---------- */
.pc.f-new .pc-media { box-shadow: inset 0 3px 0 var(--new); }
.pc.f-opp .pc-media { box-shadow: inset 0 3px 0 var(--opp); }
.pc.f-low .pc-media { box-shadow: inset 0 3px 0 var(--avail-low-dot); }
.pc.f-vol .pc-media { box-shadow: inset 0 3px 0 var(--brand); }
.pc-note { display: flex; align-items: flex-start; gap: 5px; padding: 6px 8px; border-radius: 8px; background: var(--opp-soft); font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.pc-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--opp); }
.pc.f-low .pc-stock b { font-weight: 800; }
.grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 16px 14px; }

/* ---------- Filtros rapidos ---------- */
.quick-filters { display: flex; gap: 6px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: none; }
.quick-filters:empty { display: none; }
.quick-filters::-webkit-scrollbar { display: none; }
.qf { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border: none; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.qf svg { width: 15px; height: 15px; }
.qf small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.qf:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.qf.on { background: var(--ink); color: var(--surface); box-shadow: none; }
.qf.on small { color: inherit; opacity: .75; }
.qf-new:not(.on) svg { color: var(--new); }
.qf-opp:not(.on) svg { color: var(--opp); }
.qf-vol:not(.on) svg { color: var(--brand); }
.qf-low:not(.on) svg { color: var(--avail-low-dot); }
.facet .fopt { min-height: 36px; }

/* ---------- Marcas ---------- */
.brand-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.brand-tile { gap: 8px; padding: 0 0 14px; overflow: hidden; }
.bt-mark { display: flex; align-items: center; min-height: 70px; padding: 14px 16px; background: var(--tone-soft); }
.bt-mark .bt-word { min-height: 0; }
.brand-tile .bt-cats, .brand-tile .bt-thumbs, .brand-tile .bt-stats, .brand-tile .bt-go { margin-left: 14px; margin-right: 14px; }
.bt-cats { margin-top: 2px; }
.bt-stats { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); }
.bt-stats b { color: var(--ink); font-weight: 700; }
.bt-stats .bt-new b { color: var(--new); }
.bt-stats .bt-vol b { color: var(--brand); }
.bt-go { margin-top: auto; }
.brand-dir { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.brand-hero .page-eyebrow { margin: 0 0 8px; }
.bh-cats a { display: inline-flex; align-items: center; gap: 6px; }
.bh-cats small { font-size: 11.5px; color: var(--muted); }
.bh-stats { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0 0; padding: 2px; scrollbar-width: none; }
.bh-stats::-webkit-scrollbar { display: none; }
.bh-stat { flex: none; display: flex; flex-direction: column; align-items: flex-start; min-width: 128px; padding: 10px 14px; border: none; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); text-align: left; }
.bh-stat b { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.bh-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bh-stat:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.bh-stat.on { background: var(--ink); color: var(--surface); box-shadow: none; }
.bh-stat.on span { color: inherit; opacity: .75; }
.bh-stat.is-ok:not(.on) b { color: var(--avail-ok); }
.bh-stat.is-new:not(.on) b { color: var(--new); }
.bh-stat.is-opp:not(.on) b { color: var(--opp); }
.bh-stat.is-vol:not(.on) b { color: var(--brand); }
.bh-stat.is-low:not(.on) b { color: var(--avail-low); }
.plp-title { margin-top: 26px; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- Ficha ---------- */
.pdp-keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.pdp-keyfacts div { display: flex; flex-direction: column; padding: 9px 12px; background: var(--surface); min-width: 0; }
.pdp-keyfacts span { font-size: 11.5px; color: var(--muted); }
.pdp-keyfacts b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-sticky { display: none; }

/* ---------- Historial y pedido generado ---------- */
.history-stats { flex-wrap: wrap; align-items: center; }
.history-state { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.history-state svg { width: 14px; height: 14px; }
.history-state.is-ok { background: var(--avail-ok-soft); color: var(--avail-ok); }
.history-state.is-warn { background: var(--avail-low-soft); color: var(--avail-low); }
.done-ok { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: var(--avail-ok); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .dept-access { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .da-brands { display: none; }
  .brand-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dept-access { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mm-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .showcase { padding: 16px 16px 10px; }
  .sc-bar .rail-arrows { display: none; }
  /* Filtros: pantalla completa, comodos para el dedo */
  .facets { top: 0; max-height: none; height: 100%; height: 100dvh; border-radius: 0; }
  .facets-head { padding: 14px 10px 12px 20px; }
  .fopt { min-height: 46px; font-size: 15px; }
  .fbox { width: 22px; height: 22px; }
  .facet summary { font-size: 16px; padding: 6px 0; }
  .facets-apply { position: sticky; bottom: 0; background: var(--surface); }
  /* Ficha: barra fija para agregar sin buscar el boton */
  body[data-view="product"] .order-bar { display: none; }
  .pdp-sticky { display: flex; align-items: center; gap: 8px; position: fixed; z-index: 1950; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); padding: 8px 12px; background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -10px 24px -18px rgba(16,24,40,.4); }
  .pdp-sticky-info { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; }
  .pdp-sticky-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
  .pdp-sticky-info .is-ok { color: var(--avail-ok); } .pdp-sticky-info .is-low { color: var(--avail-low); }
  .pdp-stepper-sm { grid-template-columns: 38px 46px 38px; height: 46px; }
  .pdp-sticky .btn { height: 46px; padding: 0 14px; }
  .pdp-sticky .btn svg { width: 18px; height: 18px; }
  body[data-view="product"] .add-toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
  body[data-view="product"] #mainContent { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  /* Mi pedido: botones mas grandes para el dedo */
  .oi-qty { grid-template-columns: 42px 50px 42px; height: 42px; }
  .oi-qty button { font-size: 20px; }
  .order-card.drawer { width: 100%; }
}
@media (max-width: 640px) {
  .welcome-hero { padding: 20px var(--gutter) 18px; }
  .wh-title { font-size: 27px; margin: 6px 0 4px; }
  .wh-text { font-size: 13.5px; margin-bottom: 14px; }
  .home-depts-sec { margin-top: 24px; }
  /* Departamentos en lista: comodo y sin cortes */
  .dept-access { grid-template-columns: 1fr; gap: 8px; }
  .da-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), inset 3px 0 0 var(--tone); }
  .da-card:hover { transform: none; }
  .da-top { grid-column: 1; }
  .da-icon { width: 38px; height: 38px; }
  .da-name { font-size: 16px; margin: 0; }
  .da-count { font-size: 11.5px; }
  .da-pics { grid-column: 2; grid-row: 1; display: flex; gap: 4px; margin: 0; }
  .da-pics span { width: 44px; height: 44px; aspect-ratio: auto; }
  .da-sub, .da-brands, .da-go { display: none; }
  .showcases { margin-top: 28px; gap: 14px; }
  .showcase { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; padding: 16px var(--gutter) 8px; box-shadow: none; border-top-width: 3px; background: var(--surface); }
  .sc-head { gap: 10px; flex-wrap: wrap; }
  .sc-icon { width: 38px; height: 38px; border-radius: 11px; }
  .sc-icon svg { width: 20px; height: 20px; }
  .sc-title { font-size: 20px; }
  .sc-sub { font-size: 13px; }
  .sc-more { width: 100%; justify-content: center; height: 40px; order: 3; }
  .sc-bar { margin: 12px calc(-1 * var(--gutter)) 8px 0; }
  .sc-tabs { padding-right: var(--gutter); }
  .sc-track { grid-auto-columns: 158px; gap: 10px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .brand-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-mark { min-height: 56px; padding: 10px 12px; }
  .brand-tile .bt-cats, .brand-tile .bt-thumbs, .brand-tile .bt-stats, .brand-tile .bt-go { margin-left: 10px; margin-right: 10px; }
  .bh-stat { min-width: 112px; padding: 8px 12px; }
  .bh-stat b { font-size: 19px; }
  .pdp-keyfacts b { font-size: 13px; }
  .qf { height: 38px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plp-main { min-width: 0; }
@media (max-width: 1023px) { .plp { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  /* En celular la etiqueta VOLUMEN ya lo dice: tarjetas mas cortas */
  .pc-vol { display: none; }
  .sc-track .pc-meta .pc-spec { display: none; }
}

/* ==========================================================================
   23 Tercera pasada: pulido profesional
   Jerarquia (una sola accion primaria por zona), etiquetas discretas,
   estados vacios utiles, pasos del pedido, accesibilidad y movimiento
   sutil. Solo afina lo existente: no cambia la estructura.
   ========================================================================== */

/* Enlaces con forma de boton: nunca subrayados */
a.btn, a.btn:hover { text-decoration: none; }

/* "Volver a la pagina principal": sigue grande y visible, pero en tono
   suave para no competir con "Agregar" ni con los titulos. */
.home-back { height: 46px; margin-bottom: 12px; background: var(--brand-soft); color: var(--brand); box-shadow: none; font-size: 14.5px; }
.home-back:hover { background: var(--brand); color: #fff; transform: none; }
body.dark .home-back:not(.is-outline) { color: var(--brand); }
body.dark .home-back:not(.is-outline):hover { color: #0D0F14; }

/* Etiquetas: una por tarjeta, en tono suave (no una coleccion de colores) */
.badge { height: 21px; padding: 0 7px; border-radius: 6px; font-size: 10px; letter-spacing: .05em; box-shadow: none; }
.badge-new { background: #E3F4EC; color: #0A6B4A; }
.badge-opp { background: var(--opp-soft); color: var(--opp); }
.badge-low { background: var(--avail-low-soft); color: var(--avail-low); box-shadow: none; }
.badge-vol { background: var(--brand-soft); color: var(--brand); }
.badge-out { background: var(--avail-out-soft); color: var(--avail-out); }
body.dark .badge-new { background: rgba(61,211,154,.14); color: #3DD39A; }
body.dark .badge-vol { background: rgba(122,162,255,.14); color: #9DB8FF; }
.pc-badges .badge { box-shadow: 0 1px 2px rgba(16,24,40,.06); }

/* Tarjeta: la disponibilidad se lee en una linea */
.pc-stock b, .rc-stock b { white-space: nowrap; }
.pc-body { gap: 4px; }
.pc-name { font-size: 14px; }

/* Catalogo general: los 5 departamentos en una fila */
.ch-depts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ch-dept { min-height: 68px; }

/* Coleccion o busqueda sin productos: no se muestran herramientas vacias */
.listing.is-empty-scope .facets,
.listing.is-empty-scope .plp-bar,
.listing.is-empty-scope .quick-filters,
.listing.is-empty-scope .active-chips,
.listing.is-empty-scope .load-more-wrap { display: none; }
.listing.is-empty-scope .plp { grid-template-columns: minmax(0, 1fr); }

/* Estados vacios */
.empty-state { padding: 48px 16px 56px; }
.empty-state .empty-state-text { text-wrap: balance; }
.empty-search { max-width: 760px; margin: 0 auto; gap: 10px; }
.empty-search .empty-state-title { font-size: 22px; overflow-wrap: anywhere; }
.empty-tips { margin: 0 0 6px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.empty-tips li { margin: 2px 0; }
.empty-block { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: 10px; }
.empty-block > span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.empty-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty-chips .fchip, a.fchip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background-color var(--t-fast), color var(--t-fast); }
.empty-chips .fchip:hover { background: var(--ink); color: var(--surface); }
.empty-chips .fchip svg { width: 16px; height: 16px; color: var(--tone, var(--brand)); }
.empty-chips .fchip:hover svg { color: inherit; }
.fchip-more { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.empty-search .empty-actions { margin-top: 16px; }

/* Buscador: correccion y "sin coincidencias" */
.sr-fix { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); font-size: 14px; color: var(--ink-2); }
.sr-fix svg { width: 16px; height: 16px; color: var(--brand); }
.sr-fix button { border: none; background: none; padding: 0; font-weight: 800; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.sr-empty { display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.sr-empty b { color: var(--ink); }
.sr-empty a { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 700; color: var(--brand); text-decoration: none; }
.sr-empty a svg { width: 15px; height: 15px; }

/* Mi pedido: la marca ya esta en el encabezado del grupo */
.oi-name { margin-top: 0; }
.oi-remove { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }

/* Pedido generado: pasos claros */
.done-steps { margin: 14px 0 18px; padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.done-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.done-steps li.is-next { background: color-mix(in srgb, var(--wa) 10%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--wa) 45%, transparent); }
.ds-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.is-done .ds-n { background: var(--avail-ok-soft); color: var(--avail-ok); }
.is-done .ds-n svg { width: 16px; height: 16px; stroke-width: 2.4; }
.is-next .ds-n { background: var(--wa); color: #fff; }
.ds-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.ds-tx small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ds-link { flex: none; border: none; background: none; padding: 4px 0; font-size: 12.5px; font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.done-card .done-summary { display: none; }
.done-card .done-wa { height: 54px; font-size: 16px; font-weight: 700; }
.done-card .done-actions .thanks-btn-ghost { height: 46px; }

/* Repetir pedido: se ve lo que se va a agregar */
.repeat-list { max-height: min(300px, 40vh); overflow-y: auto; margin: 0 0 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.repeat-line { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.repeat-line:last-child { border-bottom: none; }
.repeat-line img { width: 38px; height: 38px; flex: none; border-radius: 8px; object-fit: contain; background: #fff; padding: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.repeat-line span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.repeat-line span b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repeat-line small { font-size: 11.5px; color: var(--muted); }
.repeat-line em { flex: none; font-style: normal; font-size: 13px; font-weight: 800; }

/* Error de carga */
.load-error { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 32px auto; max-width: 460px; padding: 28px 22px; border-radius: 18px; background: var(--surface-2); text-align: center; font-size: 14px; color: var(--ink-2); }
.load-error b { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.load-error div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }

/* Movimiento sutil al cambiar de seccion */
/* Solo opacidad: un transform moveria la barra fija de la ficha */
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
#homeView:not([hidden]), #catalogo:not([hidden]), #brandsView:not([hidden]), #productView:not([hidden]) { animation: viewIn .22s var(--ease); }
.add-toast .at-btn { transition: background-color var(--t-fast); }
.add-toast .at-btn:hover { background: var(--surface-2); }

/* Foco visible y consistente */
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }
body.dark :focus-visible { outline-color: #9DB8FF; }

@media (max-width: 1023px) {
  /* El buscador del encabezado ya esta arriba: el catalogo no repite otro */
  .ch-depts { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(168px, 1fr); overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scroll-snap-type: x mandatory; }
  .ch-depts::-webkit-scrollbar { display: none; }
  .ch-dept { scroll-snap-align: start; min-height: 58px; }
  .tabbar a, .tabbar button { font-size: 11px; }
  .home-back { height: 46px; }
}
@media (max-width: 640px) {
  .empty-search .empty-state-title { font-size: 19px; }
  .done-steps li { padding: 9px 10px; }
  .ds-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #homeView, #catalogo, #brandsView, #productView { animation: none !important; }
}
.page-sub.is-fix { display: inline-block; margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--ink-2); }
/* En modo oscuro la foto sigue sobre fondo claro: la etiqueta usa sus colores claros */
body.dark .pc-badges .badge-new { background: #E3F4EC; color: #0A6B4A; }
body.dark .pc-badges .badge-opp { background: #FFF0E6; color: #C2410C; }
body.dark .pc-badges .badge-low { background: #FFF6DB; color: #A15C00; }
body.dark .pc-badges .badge-vol { background: #EAF0FA; color: #19438E; }
body.dark .pc-badges .badge-out { background: #FDECEA; color: #C0362C; }

/* ---------- Logos de marca ----------
   Cada logo va sobre una placa blanca (en modo claro y oscuro), a la
   misma altura, para que todas las marcas se vean parejas. */
.bt-mark.has-logo { justify-content: center; height: 84px; min-height: 0; padding: 12px 18px; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.bt-mark.has-logo .bt-word { width: 100%; height: 100%; justify-content: center; }
.bt-word.has-logo img { display: block; max-width: 100%; max-height: 58px; width: auto; height: auto; object-fit: contain; }
.bh-mark.has-logo { display: inline-flex; align-items: center; margin: 6px 0 10px; padding: 14px 22px; border-radius: 16px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line); }
.bh-mark.has-logo img { display: block; max-height: 72px; max-width: min(340px, 70vw); width: auto; height: auto; }
@media (max-width: 640px) {
  .bt-mark.has-logo { height: 64px; padding: 10px 12px; }
  .bt-word.has-logo img { max-height: 36px; }
  .bh-mark.has-logo { padding: 10px 16px; }
  .bh-mark.has-logo img { max-height: 52px; }
}

/* ---------- Redes sociales: logos oficiales a color ---------- */
.fl-fb .fl-ic, .fl-ig .fl-ic, .fl-tt .fl-ic, .fl-yt .fl-ic { background: none; box-shadow: none; border-radius: 0; }
.fl-ic svg.sl { width: 38px; height: 38px; fill: initial; filter: none; transform: none; }

/* ==========================================================================
   24 Reestructuracion: ENCONTRAR · DESCUBRIR · COMPRAR
   Navegacion corta (Inicio, Catalogo, Marcas, Nuevos, Oportunidades, Mas
   y Mi pedido), Oportunidades como un solo centro con tres motivos,
   catalogo sin buscador repetido y muro de marcas.
   ========================================================================== */

/* Barra superior: datos de la empresa + contacto directo */
.hu-links .hu-link { color: #FFFFFF; font-weight: 600; }
.hu-links .hu-link:hover { background: rgba(255,255,255,.1); }

/* Navegacion principal */
.dept-nav .dn-link { padding: 0 14px; }
.dn-more .dn-tool { height: 38px; }

/* Pie: herramientas como botones */
.footer-nav button { padding: 0; border: none; background: none; text-align: left; font-size: 13.5px; color: #9EA2AE; cursor: pointer; }
.footer-nav button:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Catalogo: encabezado compacto ---------- */
.catalog-head { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.catalog-head .page-sub { max-width: 640px; }
.catalog-head .ch-depts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.catalog-head .ch-dept { min-height: 64px; padding: 8px 12px 8px 8px; background: var(--surface); box-shadow: inset 4px 0 0 var(--tone), 0 0 0 1px var(--line); }
.catalog-head .ch-dept:hover { box-shadow: inset 4px 0 0 var(--tone), 0 0 0 1px var(--line-strong), var(--sh-1); }
.catalog-head .ch-pic { width: 46px; height: 46px; background: var(--stage, var(--surface-2)); }
.catalog-head .ch-name { font-size: 14.5px; }

/* ---------- Oportunidades: un centro, tres motivos ---------- */
.opp-tabs { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.opp-tabs::-webkit-scrollbar { display: none; }
.opp-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); font-size: 14.5px; font-weight: 700; text-decoration: none; transition: box-shadow var(--t-fast), background-color var(--t-fast), color var(--t-fast); }
.opp-tab svg { width: 18px; height: 18px; color: var(--opp); }
.opp-tab small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.opp-tab:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.opp-tab.on { background: var(--ink); color: var(--surface); box-shadow: none; }
.opp-tab.on svg, .opp-tab.on small { color: inherit; opacity: .85; }
.opp-detail { margin-top: 12px; }
.opp-desc { margin: 0; font-size: 14px; color: var(--ink-2); }
.opp-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.opp-urgent { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--avail-low-soft); color: var(--ink-2); }
.opp-urgent svg { width: 16px; height: 16px; color: var(--avail-low); flex: none; }
.opp-urgent b { color: var(--avail-low); }
.opp-detail .vol-levels-page { margin-top: 12px; }
.sc-tab svg { width: 15px; height: 15px; color: var(--opp); }
.sc-tab.on svg { color: inherit; }

/* ---------- Inicio: muro de marcas ---------- */
.brand-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bw-item { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.bw-item:hover { box-shadow: 0 0 0 1px var(--line-strong), var(--sh-2); transform: translateY(-2px); }
.bw-logo { display: flex; align-items: center; justify-content: center; height: 76px; padding: 10px 14px; background: #FFFFFF; }
.bw-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 15px; font-weight: 800; text-transform: uppercase; color: #14161B; text-align: center; }
.bw-mark.has-logo img { display: block; max-width: 100%; max-height: 50px; width: auto; height: auto; object-fit: contain; }
.bw-count { padding: 7px 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }

/* ---------- Mi pedido: acciones secundarias ---------- */
.of-totals .of-links { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.of-links .link-btn { font-size: 12.5px; color: var(--muted); }
.of-totals .of-clear { margin-left: 0; }

/* ---------- Celular: barra inferior con "Mas" ---------- */
@media (max-width: 1023px) {
  .hdr-main { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo . actions" "search search search"; }
  .tabbar a, .tabbar button { min-height: 48px; }
  #tabMore[aria-expanded="true"] { color: var(--brand); }
  .mm-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
  .mm-sheet { left: auto; right: 0; transform: translateX(102%); }
  .mmb-label:first-child { margin-top: 4px; }
  .mmb-cols .mmb-col { min-height: 92px; }
  .mmb-oportunidades svg { color: var(--opp); }
  .mmb-nuevos svg { color: var(--new); }
  .mmb-subs { display: flex; flex-direction: column; margin: -2px 0 6px; }
  .mmb-sub { display: flex; align-items: center; gap: 10px; padding: 11px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; }
  .mmb-sub svg { width: 18px; height: 18px; color: var(--opp); }
  .mmb-sub small { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--muted); }
  .mmb-sub:active { background: var(--surface-2); }
  .mmb-tools button { min-height: 48px; }
  .mmb-tools small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
  .catalog-head { margin-top: 4px; gap: 12px; }
  .catalog-head .page-sub { font-size: 13.5px; }
  .catalog-head .ch-depts { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(170px, 1fr); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scroll-snap-type: x mandatory; }
  .catalog-head .ch-depts::-webkit-scrollbar { display: none; }
  .catalog-head .ch-dept { scroll-snap-align: start; min-height: 58px; }
}
@media (max-width: 640px) {
  .opp-tabs { margin: 14px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); }
  .opp-tab { height: 42px; padding: 0 13px; font-size: 13.5px; }
  .brand-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .bw-logo { height: 54px; padding: 6px 8px; }
  .bw-mark.has-logo img { max-height: 32px; }
  .bw-count { padding: 5px 4px; font-size: 11px; }
}
/* La pestana "Inicio" de la barra inferior siempre esta a mano: arriba no
   se repite el boton (sigue al final de cada pagina). */
@media (max-width: 1023px) {
  .page-head > .home-back, .pdp-top > .home-back { display: none; }
}
@media (min-width: 1024px) {
  .brand-wall { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .bw-logo { height: 68px; padding: 8px 10px; }
  .bw-mark.has-logo img { max-height: 44px; }
}
