/* ============================================================
   TECH ACCESSORIES — HOJA DE ESTILOS
   Tema oscuro único · mobile-first · Outfit variable
   Sistema de radios: contenedores 16px · inputs 12px · botones/chips píldora
   ============================================================ */

/* ---------- Fuente ---------- */
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0c0d10;
  --bg-2: #111318;
  --surface: #171a20;
  --surface-2: #1e222b;
  --line: #272c37;
  --line-soft: #1d212a;
  --text: #eef1f6;
  --text-2: #a9b0be;
  --text-3: #7d8494;
  --accent: #4da3ff;
  --accent-btn: #3d8bfd;
  --accent-btn-ink: #071022;
  --accent-soft: rgba(77, 163, 255, 0.12);
  --warn: #f5a524;
  --danger: #ff7a70;
  --ok: #4ade80;
  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 999px;
  --header-h: 58px;
  --shadow-pop: 0 18px 50px rgba(4, 8, 16, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1200px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Las anclas no quedan tapadas por el header fijo */
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

::selection { background: rgba(77, 163, 255, 0.35); }

/* ---------- Utilidades ---------- */
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: var(--accent-btn); color: var(--accent-btn-ink);
  padding: 10px 18px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
  transform: translateY(-64px); transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.loader__logo { position: relative; width: 84px; height: 84px; }
.loader__logo img { width: 64px; height: 64px; position: absolute; inset: 0; margin: auto; }
.loader__ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, var(--accent) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 1s linear infinite;
}
.loader__text { margin-top: 14px; font-size: 13px; color: var(--text-3); letter-spacing: 0.02em; }
@keyframes spin { to { transform: rotate(360deg); } }
html.is-loaded .loader, html.no-js .loader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent-btn); color: var(--accent-btn-ink); }
.btn--primary:hover { background: #5c9dff; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: #3a4150; background: rgba(255, 255, 255, 0.08); }
.btn--wa { background: #22c15e; color: #06230f; }
.btn--wa:hover { background: #35d571; }
.btn--sm { padding: 9px 16px; font-size: 14px; min-height: 38px; }
.btn--block { width: 100%; white-space: normal; text-align: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn .icon { flex: none; }

.icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon--sm { width: 17px; height: 17px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--header-h);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(12, 13, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.header__in {
  height: 100%; display: flex; align-items: center; gap: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto; min-width: 0;
}
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand b { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }

.nav-desktop { display: none; }
.nav-desktop a {
  text-decoration: none; font-size: 14.5px; color: var(--text-2);
  padding: 8px 12px; border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
}
.nav-desktop a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.header .btn--wa-head { display: none; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 0.15s var(--ease), border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: #3a4150; background: rgba(255, 255, 255, 0.08); }
.icon-btn:active { transform: scale(0.94); }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent-btn); color: var(--accent-btn-ink);
  font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
  transition: transform 0.2s var(--ease);
}
.cart-count[hidden] { display: none; }
.cart-count.is-bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Menú móvil ---------- */
.nav-sheet {
  border: 0; padding: 0; margin: 0;
  width: 100%; max-width: none; max-height: none;
  background: transparent;
}
.nav-sheet::backdrop { background: rgba(5, 6, 9, 0.6); backdrop-filter: blur(3px); }
.nav-sheet__panel {
  position: fixed; inset: 0 0 auto 0;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  background: rgba(15, 17, 22, 0.97);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 22px 22px;
  padding: 14px 16px calc(18px + var(--safe-b));
  transform: translateY(-8px); opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-sheet[open] .nav-sheet__panel { transform: translateY(0); opacity: 1; }
.nav-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.nav-sheet nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 10px; text-decoration: none;
  font-size: 17px; font-weight: 550; color: var(--text);
  border-radius: 12px;
}
.nav-sheet nav a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-sheet nav a .icon { color: var(--accent); }
.nav-sheet__cta { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 700px);
  min-height: min(78svh, 700px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--header-h) + 24px) 0 40px;
}
.hero__pause {
  position: absolute; right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(var(--header-h) + 14px);
  z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 13, 16, 0.55);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  display: grid; place-items: center;
}
.hero__pause:hover { color: var(--text); }
.hero.is-fallback .hero__pause { display: none; }
.hero__media, .hero__media video, .hero__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__media video, .hero__poster { object-fit: cover; object-position: center; }
.hero__poster { display: none; }
.hero.is-fallback video { display: none; }
.hero.is-fallback .hero__poster { display: block; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(12, 13, 16, 0.55) 0%, rgba(12, 13, 16, 0.3) 30%, rgba(12, 13, 16, 0.5) 62%, var(--bg) 100%);
}
.hero__content { position: relative; z-index: 2; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: rgba(15, 17, 22, 0.55);
  backdrop-filter: blur(8px);
  padding: 6px 13px; border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(30px, 8.2vw, 56px);
  font-weight: 700;
  max-width: 14ch;
  margin-bottom: 10px;
}
.hero__sub {
  color: var(--text-2);
  font-size: clamp(15px, 4vw, 18px);
  max-width: 44ch;
  margin-bottom: 22px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Secciones ---------- */
.section { padding: 44px 0; }
.section--tint { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section__head { margin-bottom: 20px; }
.section__head h2 { font-size: clamp(22px, 5.6vw, 32px); margin-bottom: 6px; }
.section__head p { color: var(--text-2); font-size: 15px; max-width: 56ch; }
.section__head--row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}

/* ---------- Categorías (fila swipe) ---------- */
.cat-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 128px;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 14px;
  margin: 0 -16px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 14px 13px;
  text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.cat-card:hover { border-color: #333a48; background: var(--surface-2); }
.cat-card:active { transform: scale(0.96); }
.cat-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.cat-card__icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.cat-card b { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.cat-card span { font-size: 12px; color: var(--text-3); }

/* ---------- Tienda: toolbar ---------- */
.store-toolbar {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 40;
  background: rgba(17, 19, 24, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 10px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.store-toolbar__row { display: flex; gap: 8px; }
.search-box {
  position: relative; flex: 1; min-width: 0;
}
.search-box .icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-box input {
  width: 100%; min-height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 38px 10px 42px;
  font-size: 15px;
  transition: border-color 0.2s;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.22); }
.search-box input::placeholder { color: #8a92a3; }
.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-3);
}
.search-clear:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.search-clear[hidden] { display: none; }

.filter-open {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14.5px; font-weight: 550;
}
.filter-open .f-count {
  min-width: 18px; height: 18px; border-radius: var(--r-pill);
  background: var(--accent-btn); color: var(--accent-btn-ink);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 5px;
}
.filter-open .f-count[hidden] { display: none; }

.chip-row {
  display: flex; gap: 7px; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13.5px; font-weight: 550; color: var(--text-2);
  transition: all 0.18s var(--ease);
  min-height: 34px;
}
.chip:hover { color: var(--text); border-color: #3a4150; }
.chip.is-active {
  background: var(--accent-btn); border-color: var(--accent-btn);
  color: var(--accent-btn-ink);
}

.store-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px; min-height: 24px;
}
.store-meta p { font-size: 13.5px; color: var(--text-3); }
.store-meta button {
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  padding: 4px 8px; border-radius: 8px;
}
.store-meta button[hidden] { display: none; }

/* ---------- Grid de productos ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.25s;
}
.card:hover { border-color: #333a48; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(4,8,16,0.4); }
.card__media {
  position: relative; aspect-ratio: 4 / 3;
  background: #f4f5f7; /* tile claro uniforme para fotos reales de producto */
}
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.card__media .img-fallback {
  position: absolute; inset: 0; display: none;
  place-content: center; place-items: center; gap: 6px; text-align: center;
  color: #9aa1ad;
}
.card__media .img-fallback small { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.card__media .img-fallback .icon { width: 30px; height: 30px; }
.card__media.is-broken img { visibility: hidden; }
.card__media.is-broken .img-fallback { display: grid; }
.card__tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: rgba(12, 13, 16, 0.72); backdrop-filter: blur(6px);
  color: var(--warn); border: 1px solid rgba(245, 165, 36, 0.35);
}
.card__body {
  padding: 11px 12px 12px;
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.card__brand { font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-3); text-transform: uppercase; }
.card__name {
  font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em;
}
.card__price-note { font-size: 12px; color: var(--accent); font-weight: 550; margin-top: auto; }
.card__actions { display: flex; gap: 7px; margin-top: 8px; }
.card__actions .btn { flex: 1; padding: 9px 10px; font-size: 13.5px; min-height: 38px; }
.card__add {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid transparent;
  transition: all 0.18s var(--ease);
}
.card__add:hover { background: var(--accent-btn); color: var(--accent-btn-ink); }
.card__add:active { transform: scale(0.9); }
.card__add.is-added { background: var(--accent-btn); color: var(--accent-btn-ink); }
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__link:focus-visible { outline-offset: -2px; }
.card__actions, .card__add { position: relative; z-index: 2; }

/* Skeletons */
.skel { pointer-events: none; }
.skel .card__media, .skel .s-line {
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
.skel .s-line { height: 12px; border-radius: 6px; }
.skel .s-line--w60 { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Estado vacío */
.empty {
  grid-column: 1 / -1;
  text-align: center; padding: 44px 18px;
  border: 1px dashed var(--line); border-radius: var(--r-card);
}
.empty .icon { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--text-3); }
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--text-2); font-size: 14px; max-width: 40ch; margin: 0 auto 16px; }

.store-more { display: grid; place-items: center; margin-top: 18px; }
.store-more[hidden] { display: none; }

/* ---------- Diálogos base ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: 0;
  width: 100%; max-width: none;
  max-height: none; height: auto;
  background: transparent;
  color: var(--text);
}
dialog.sheet::backdrop {
  background: rgba(5, 6, 9, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sheet__panel {
  position: fixed; inset: auto 0 0 0;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.32s;
  overflow: hidden;
}
dialog.sheet[open] .sheet__panel { transform: translateY(0); opacity: 1; }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.sheet__head h2, .sheet__head h3 { font-size: 17px; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 16px; flex: 1; }
.sheet__foot {
  flex: none; padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line-soft);
  display: flex; gap: 10px;
  background: var(--bg-2);
}

/* ---------- Modal de producto ---------- */
.pm__gallery { position: relative; }
.pm__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  overflow: auto;
  background: #f4f5f7;
  border: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.pm__stage::-webkit-scrollbar { display: none; }
.pm__stage img {
  width: 100%; height: 100%; object-fit: contain; padding: 6%;
  cursor: zoom-in;
  transition: width 0.2s var(--ease), height 0.2s var(--ease);
}
.pm__stage.is-zoom img { width: 180%; height: 180%; max-width: none; cursor: zoom-out; }
.pm__zoom-hint {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-2);
  background: rgba(12, 13, 16, 0.7); backdrop-filter: blur(6px);
  padding: 5px 10px; border-radius: var(--r-pill);
  pointer-events: none;
}
.pm__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pm__thumbs[hidden] { display: none; }
.pm__thumbs button {
  width: 58px; height: 46px; border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--line); padding: 0; background: #f4f5f7;
}
.pm__thumbs button.is-active { border-color: var(--accent); }
.pm__thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }

.pm__brand { font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.pm__name { font-size: 21px; margin-bottom: 8px; }
.pm__desc { color: var(--text-2); font-size: 14.5px; margin-bottom: 14px; }
.pm__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pm__chip {
  font-size: 12px; font-weight: 550; color: var(--text-2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 4px 11px;
}
.pm__price-note {
  display: flex; align-items: center; gap: 9px;
  background: var(--accent-soft);
  border: 1px solid rgba(77, 163, 255, 0.25);
  border-radius: var(--r-input);
  padding: 10px 13px;
  font-size: 13.5px; color: var(--text);
  margin-bottom: 16px;
}
.pm__price-note .icon { color: var(--accent); flex: none; }

.pm__tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.pm__tab {
  padding: 9px 13px; font-size: 14px; font-weight: 550; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: 0;
}
.pm__tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.pm__tabpanel ul { padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 6px; }
.pm__tabpanel[hidden] { display: none; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spec-grid div {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-input); padding: 9px 11px;
}
.spec-grid dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.spec-grid dd { font-size: 13.5px; font-weight: 550; margin: 2px 0 0; }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface-2);
  height: 44px;
}
.qty button {
  width: 42px; height: 100%; display: grid; place-items: center;
  color: var(--text-2); font-size: 18px;
}
.qty button:hover { color: var(--text); }
.qty output { min-width: 34px; text-align: center; font-weight: 650; font-size: 15px; }
.qty--sm { height: 36px; }
.qty--sm button { width: 34px; }

.pm__related { margin-top: 20px; }
.pm__related h3 { font-size: 15px; margin-bottom: 10px; }
.pm__rel-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px;
  gap: 9px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
.pm__rel-row::-webkit-scrollbar { display: none; }
.rel-card {
  border: 1px solid var(--line-soft); border-radius: 13px; overflow: hidden;
  background: var(--surface); text-align: left; padding: 0;
  transition: border-color 0.2s;
}
.rel-card:hover { border-color: #333a48; }
.rel-card img { aspect-ratio: 4 / 3; width: 100%; object-fit: contain; padding: 8%; background: #f4f5f7; }
.rel-card b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12px; font-weight: 550; line-height: 1.3; padding: 8px 9px 9px;
}

/* ---------- Carrito ---------- */
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 11px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 64px; height: 52px; object-fit: contain; padding: 5px; background: #f4f5f7; border-radius: 10px; border: 1px solid var(--line-soft); }
.cart-item__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item__meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.cart-item__rm {
  color: var(--text-3); width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
}
.cart-item__rm:hover { color: var(--danger); background: rgba(255, 122, 112, 0.1); }

.cart-summary {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-input); padding: 12px 14px;
  font-size: 13.5px; color: var(--text-2);
  margin-top: 14px;
}
.cart-summary b { color: var(--text); }
.cart-clear { font-size: 13px; color: var(--text-3); font-weight: 550; padding: 6px 8px; border-radius: 8px; }
.cart-clear:hover { color: var(--danger); }

/* ---------- Barra continuar ---------- */
/* La barra fija no debe tapar el final del documento */
body.has-bar { padding-bottom: calc(88px + var(--safe-b)); }

.continue-bar {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + var(--safe-b));
  z-index: 80;
  background: rgba(23, 26, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(calc(100% + 26px + var(--safe-b)));
  transition: transform 0.35s var(--ease);
}
.continue-bar.is-visible { transform: translateY(0); }
.continue-bar__info { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.continue-bar__ic {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.continue-bar__info b { font-size: 13.5px; display: block; line-height: 1.2; }
.continue-bar__info span { font-size: 12px; color: var(--text-3); }
.continue-bar .btn { flex: none; }
.continue-bar__view { display: none; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field label small { font-weight: 450; color: var(--text-3); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 11px 13px;
  font-size: 15px;
  min-height: 46px;
  transition: border-color 0.2s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.22);
}
.field input::placeholder, .field textarea::placeholder { color: #8a92a3; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a9b0be' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 38px;
}
.error-msg { font-size: 12.5px; color: var(--danger); display: none; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .error-msg { display: block; }
.field--check { grid-template-columns: auto 1fr; align-items: start; }
.field--check input {
  width: 19px; height: 19px; min-height: 0; margin-top: 2px;
  accent-color: var(--accent-btn);
}
.field--check label { font-weight: 450; font-size: 13px; color: var(--text-2); }
.legal-row { margin: -6px 0 10px; }
.legal-link {
  color: var(--accent); font-weight: 600; font-size: 12.5px;
  padding: 4px 0; text-decoration: underline;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }

.order-summary {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-input);
  padding: 12px 14px; margin-bottom: 16px;
}
.order-summary h3 { font-size: 14px; margin-bottom: 8px; }
.order-summary ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.order-summary li { font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; gap: 10px; }
.order-summary li b { color: var(--text); font-weight: 550; }
.order-summary li span { flex: none; color: var(--text-3); }

/* ---------- Cómo pedir ---------- */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.step {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-card); padding: 16px 14px;
  position: relative; overflow: hidden;
}
.step__num {
  position: absolute; right: 10px; top: 6px;
  font-size: 44px; font-weight: 800; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.05);
}
.step .cat-card__icon { margin-bottom: 12px; }
.step b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--text-2); }
.steps-note {
  margin-top: 14px; display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-input); padding: 12px 14px;
}
.steps-note .icon { color: var(--warn); flex: none; margin-top: 1px; }

/* ---------- Solicitud especial ---------- */
.request { display: grid; gap: 22px; }
.request__copy h2 { font-size: clamp(22px, 5.6vw, 32px); margin-bottom: 8px; }
.request__copy p { color: var(--text-2); font-size: 15px; margin-bottom: 16px; }
.request__perks { display: grid; gap: 9px; }
.request__perks li {
  display: flex; gap: 10px; align-items: center;
  font-size: 14px; color: var(--text-2);
}
.request__perks .icon { color: var(--ok); flex: none; width: 18px; height: 18px; }
.request__form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 16px;
}
.request__form .form-note { font-size: 12.5px; color: var(--text-3); margin: 4px 0 14px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; max-width: 760px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-input);
  overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 15px;
  font-weight: 600; font-size: 14.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { flex: none; color: var(--text-3); transition: transform 0.25s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.faq details p { padding: 0 15px 14px; color: var(--text-2); font-size: 14px; }

/* ---------- Contacto ---------- */
.contact-card {
  background: linear-gradient(140deg, var(--surface) 0%, #151b28 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 20px;
  display: grid; gap: 16px;
  position: relative; overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; inset: -40% -40% auto auto;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(77, 163, 255, 0.14) 0%, transparent 65%);
  pointer-events: none;
}
.contact-card h2 { font-size: clamp(21px, 5.4vw, 30px); position: relative; }
.contact-card > p { color: var(--text-2); font-size: 15px; max-width: 46ch; position: relative; }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.contact-data { display: grid; gap: 8px; position: relative; }
.contact-data a, .contact-data span {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; color: var(--text-2); text-decoration: none;
}
.contact-data .icon { color: var(--accent); width: 18px; height: 18px; }
.contact-data a:hover { color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 34px 0 0;
}
.footer__grid { display: grid; gap: 24px; }
.footer__brand p { color: var(--text-2); font-size: 13.5px; max-width: 32ch; margin-top: 10px; }
.footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 11px; font-weight: 650; }
.footer nav { display: grid; gap: 8px; }
.footer nav a, .footer nav button {
  font-size: 14px; color: var(--text-2); text-decoration: none;
  text-align: left; padding: 0; width: fit-content;
}
.footer nav a:hover, .footer nav button:hover { color: var(--text); }
.footer__bottom {
  margin-top: 28px; padding: 16px 0 calc(16px + var(--safe-b));
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--text-3);
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* ---------- Flotantes ---------- */
.fab-wa {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + var(--safe-b));
  z-index: 70;
  width: 54px; height: 54px; border-radius: 50%;
  background: #22c15e; color: #06230f;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(20, 160, 80, 0.35);
  transition: transform 0.2s var(--ease), bottom 0.35s var(--ease);
}
.fab-wa:hover { transform: scale(1.07); }
.fab-wa .icon { width: 26px; height: 26px; }
body.has-bar .fab-wa { bottom: calc(84px + var(--safe-b)); }

.to-top {
  position: fixed;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + var(--safe-b));
  z-index: 70;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(23, 26, 32, 0.9); backdrop-filter: blur(8px);
  color: var(--text-2);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.3s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--text); }
body.has-bar .to-top { bottom: calc(84px + var(--safe-b)); }

/* ---------- Toasts ----------
   Con popover="manual" los toasts se pintan en la top layer, por encima
   del backdrop de los <dialog>. Se anulan los estilos UA del popover. */
.toasts {
  position: fixed; inset: auto;
  top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 120; display: grid; gap: 8px; width: min(92vw, 380px);
  margin: 0; border: 0; padding: 0; background: transparent; overflow: visible;
  pointer-events: none;
}
.toasts:popover-open { display: grid; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(23, 26, 32, 0.95); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 13.5px; font-weight: 550;
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.3s var(--ease);
}
.toast .icon { flex: none; }
.toast--ok .icon { color: var(--ok); }
.toast--err .icon { color: var(--danger); }
.toast.is-out { opacity: 0; transform: translateY(-6px); transition: all 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }

/* ---------- Animaciones de aparición ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: none; }
html.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   BREAKPOINTS
   ============================================================ */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .section { padding: 56px 0; }
  .cat-row { grid-auto-columns: 148px; }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .request { grid-template-columns: 1fr 1fr; align-items: center; gap: 36px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .continue-bar { left: auto; right: 20px; width: 420px; }
  .continue-bar__view { display: inline-flex; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  :root { --header-h: 66px; }
  .nav-desktop { display: flex; align-items: center; gap: 2px; }
  .header .menu-btn { display: none; }
  .header .btn--wa-head { display: inline-flex; }
  .hero { min-height: min(86svh, 760px); align-items: center; padding-bottom: 60px; }
  .hero__content { max-width: 620px; }
  .hero__scrim {
    background:
      linear-gradient(to right, rgba(12, 13, 16, 0.78) 0%, rgba(12, 13, 16, 0.25) 60%, rgba(12, 13, 16, 0.1) 100%),
      linear-gradient(to bottom, rgba(12, 13, 16, 0.3) 0%, transparent 30%, var(--bg) 100%);
  }
  .store-toolbar { flex-direction: row; align-items: center; }
  .store-toolbar__row { flex: 1; }
  .chip-row { flex: none; max-width: 52%; }
  .sheet__panel {
    inset: 0; margin: auto;
    max-width: 520px; max-height: min(86dvh, 820px);
    height: fit-content;
    border-radius: 22px; border-bottom: 1px solid var(--line);
    transform: translateY(14px) scale(0.98);
  }
  dialog.sheet[open] .sheet__panel { transform: none; }
  .sheet--product .sheet__panel { max-width: 980px; }
  .pm__cols { display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; align-items: start; }
  .sheet--cart .sheet__panel {
    inset: 0 0 0 auto; margin: 0;
    max-width: 440px; max-height: none; height: 100dvh;
    border-radius: 0; border: 0; border-left: 1px solid var(--line);
    transform: translateX(30px);
  }
  dialog.sheet--cart[open] .sheet__panel { transform: none; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Pie del modal de producto en pantallas angostas: botón de WhatsApp solo icono */
@media (max-width: 560px) {
  #pmWa span { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; }
  #pmWa { padding: 12px 15px; }
}

/* En pantallas táctiles los efectos hover no deben quedarse "pegados" tras el toque */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: var(--line-soft); }
  .cat-card:hover { border-color: var(--line-soft); background: var(--surface); }
  .cat-card.is-active:hover { border-color: var(--accent); background: var(--accent-soft); }
  .card__add:hover { background: var(--accent-soft); color: var(--accent); }
  .icon-btn:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.04); }
  .btn--primary:hover { background: var(--accent-btn); }
  .btn--wa:hover { background: #22c15e; }
  .btn--ghost:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.05); }
}

/* Pantallas muy angostas */
@media (max-width: 355px) {
  .grid { grid-template-columns: 1fr; }
  .brand b { font-size: 15px; }
}
