/* atupuerta.mx — fresh online grocery + restaurant supply */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* defaults — overridden by Tweaks at runtime */
  --primary: oklch(0.55 0.15 150);
  --primary-deep: oklch(0.32 0.08 150);
  --primary-soft: oklch(0.94 0.04 150);
  --accent: oklch(0.72 0.17 55);
  --accent-soft: oklch(0.96 0.04 70);
  --bg: oklch(0.985 0.008 90);
  --surface: oklch(1 0 0);
  --ink: oklch(0.18 0.015 145);
  --ink-2: oklch(0.42 0.015 145);
  --ink-3: oklch(0.62 0.015 145);
  --rule: oklch(0.92 0.006 145);
  --rule-strong: oklch(0.86 0.008 145);
  --shadow-sm: 0 1px 0 rgba(20, 30, 22, 0.04), 0 1px 2px rgba(20, 30, 22, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(20, 40, 24, 0.08), 0 2px 4px rgba(20, 40, 24, 0.04);
  --shadow-lg: 0 18px 40px -16px rgba(20, 60, 30, 0.18), 0 4px 12px rgba(20, 60, 30, 0.06);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-feature-settings: 'zero'; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* Oculta CUALQUIER elemento con x-cloak hasta que Alpine inicialice.
   Evita el "flash" del modal de código postal / dropdowns al navegar. */
[x-cloak] { display: none !important; }

/* ─── Form fields ─── */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-3); }
.field input:hover:not(:disabled):not(:focus),
.field select:hover:not(:disabled):not(:focus),
.field textarea:hover:not(:disabled):not(:focus) { border-color: var(--ink-3); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px oklch(0.55 0.15 150 / 0.13);
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: var(--bg);
  color: var(--ink-3);
  cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 70px; line-height: 1.55; }
.field select {
  cursor: pointer;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'><path fill='none' stroke='%23708070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field .hint {
  font-size: 12px; color: var(--ink-3);
  margin-top: 6px; line-height: 1.45;
}
/* Filas de campos lado a lado, que se apilan en móvil */
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; }

/* ─── Layout container ─── */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .wrap { padding: 0 20px; } }

/* ─── Top promo bar ─── */
.promo {
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  padding: 9px 0;
  text-align: center;
}
.promo b { color: var(--accent); font-weight: 600; }
.promo .dot { opacity: 0.4; margin: 0 10px; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 251, 248, 0.92);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--primary); color: white;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 6px oklch(0.55 0.15 150 / 0.3);
}
.brand-mark::after {
  content: '';
  position: absolute;
}
.brand .tld { color: var(--ink-3); font-weight: 500; }

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0 18px;
  height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px oklch(0.55 0.15 150 / 0.1);
}
.search-bar input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 14.5px; color: var(--ink);
}
.search-bar input::placeholder { color: var(--ink-3); }
.search-bar .kbd {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--rule-strong); border-radius: 5px;
  padding: 1px 5px;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  appearance: none; border: 0; background: transparent;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.icon-btn:hover { background: oklch(0.55 0.15 150 / 0.08); color: var(--primary-deep); }
.icon-btn .badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: 'Geist Mono', monospace;
  letter-spacing: -0.04em;
}

.nav-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  border: 0;
}
.nav-pill .dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 oklch(0.55 0.15 150 / 0.5);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(0.55 0.15 150 / 0.5); }
  100% { box-shadow: 0 0 0 8px oklch(0.55 0.15 150 / 0); }
}

/* second nav row — categories */
.subnav {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav button {
  appearance: none; border: 0; background: transparent;
  padding: 8px 14px;
  font-size: 13.5px; color: var(--ink-2);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.subnav button:hover { background: oklch(0.55 0.15 150 / 0.06); color: var(--ink); }
.subnav button.active { background: var(--ink); color: var(--bg); }
.subnav .divider { width: 1px; height: 16px; background: var(--rule); margin: 0 6px; }

/* Mobile nav reflow (≤768px): brand + actions on top row, search full-width below */
@media (max-width: 768px) {
  .nav-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "search search";
    gap: 12px 10px;
    padding: 12px 0;
  }
  .brand       { grid-area: brand; font-size: 17px; min-width: 0; overflow: hidden; }
  /* El wordmark se recorta si falta espacio en vez de empujar las acciones fuera */
  .brand span  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .nav-actions { grid-area: actions; gap: 4px; flex-shrink: 0; }
  .nav-actions > * { flex-shrink: 0; }   /* el botón de login nunca se comprime */
  .search-bar  { grid-area: search; height: 42px; }
  .search-bar .kbd { display: none; }
  .nav-fav { display: none; }            /* redundante: la barra de búsqueda ya está visible */
  .nav-actions .btn { white-space: nowrap; }
}
/* Pantallas muy angostas: oculta el wordmark, deja solo el logo (asegura que quepa todo) */
@media (max-width: 400px) {
  .brand span { display: none; }
}

/* ─── Buttons ─── */
.btn {
  appearance: none; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 14px oklch(0.55 0.15 150 / 0.28);
}
.btn-primary:hover { background: oklch(0.5 0.15 150); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: oklch(0.12 0.015 145); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn-accent { background: var(--accent); color: white; }
.btn-soft {
  background: var(--primary-soft); color: var(--primary-deep);
}
.btn-soft:hover { background: oklch(0.91 0.06 150); }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ─── Cards / surfaces ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.card-pad { padding: 22px; }

/* ─── Typography ─── */
.kicker {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0;
}
.lead {
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.muted { color: var(--ink-3); }

/* ─── Section spacing ─── */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-hd {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}

/* ─── Product cards ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.product:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.product-image {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.product-image image-slot {
  width: 100%; height: 100%;
  --slot-bg: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}
.product-tag {
  position: absolute; top: 10px; left: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ink); color: var(--bg);
}
.product-tag.local { background: var(--primary); }
.product-tag.sale { background: var(--accent); }
.product-tag.new { background: oklch(0.32 0.08 150); }
.product-fav {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  color: var(--ink-2);
}
.product-fav:hover { color: var(--accent); }
.product-fav.on { color: var(--accent); }
.product-title {
  font-size: 14.5px; line-height: 1.25; font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.product-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}
.product-price { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.product-price-was { font-size: 12.5px; color: var(--ink-3); text-decoration: line-through; margin-left: 4px; }
.product-unit { font-size: 11.5px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }
.add-btn {
  appearance: none; border: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  transition: transform 0.1s, background 0.15s;
}
.add-btn:hover { background: var(--primary); }
.add-btn:active { transform: scale(0.9); }

/* qty stepper inside product card */
.qty-stepper {
  display: inline-flex; align-items: center;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  height: 34px;
}
.qty-stepper button {
  appearance: none; border: 0; background: transparent;
  color: var(--bg);
  width: 30px; height: 34px;
  display: grid; place-items: center;
  font-size: 14px;
}
.qty-stepper b {
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  min-width: 16px; text-align: center;
}

/* ─── Hero base ─── */
.hero {
  position: relative;
  padding: 36px 0 64px;
}

/* ─── Category tile ─── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 980px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
.cat {
  position: relative;
  aspect-ratio: 1 / 1.05;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.15s;
  cursor: pointer;
}
.cat:hover { transform: translateY(-3px); border-color: var(--primary); }
.cat-emoji {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg);
  display: grid; place-items: center;
  font-size: 28px;
}
.cat-name { font-size: 14.5px; font-weight: 500; line-height: 1.15; }
.cat-count {
  font-size: 11px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.02em;
}

/* curated tile color treatments */
.cat-c1 { background: oklch(0.96 0.05 145); border-color: oklch(0.9 0.06 145); }
.cat-c2 { background: oklch(0.96 0.05 70);  border-color: oklch(0.9 0.06 70); }
.cat-c3 { background: oklch(0.97 0.04 30);  border-color: oklch(0.91 0.05 30); }
.cat-c4 { background: oklch(0.97 0.03 270); border-color: oklch(0.91 0.04 270); }
.cat-c5 { background: oklch(0.97 0.03 200); border-color: oklch(0.92 0.04 200); }
.cat-c6 { background: oklch(0.96 0.04 110); border-color: oklch(0.9 0.05 110); }

/* ─── Hero variant A: address-first ─── */
.hero-a-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-a-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 500;
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 28px;
}
.hero-stats {
  display: flex; gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.hero-stat .n {
  font-size: 28px; font-weight: 600; letter-spacing: -0.025em;
}
.hero-stat .l {
  font-size: 12.5px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* the address composer */
.address-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.address-card .row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 16px;
}
.address-card .row + .row { border-top: 1px solid var(--rule); }
.address-card label {
  font-size: 11px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.address-card input, .address-card select {
  border: 0; background: transparent; outline: none;
  font-size: 16px; font-weight: 500; color: var(--ink);
  flex: 1; padding: 0;
  appearance: none;
}
.address-card .row .col { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.address-card .check-cp {
  background: var(--primary); color: white;
  border-radius: var(--radius);
  border: 0; padding: 14px 22px; font-weight: 500; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
}

/* hero illustration / basket */
.hero-illus {
  position: relative;
  aspect-ratio: 1 / 1.05;
  background:
    radial-gradient(circle at 30% 25%, oklch(0.96 0.06 70 / 0.7), transparent 55%),
    radial-gradient(circle at 75% 75%, oklch(0.94 0.08 150 / 0.55), transparent 55%),
    var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--rule);
  overflow: hidden;
  padding: 24px;
}
.hero-illus image-slot {
  position: absolute; inset: 12px;
  width: calc(100% - 24px); height: calc(100% - 24px);
}
.hero-chip {
  position: absolute;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--rule);
  z-index: 2;
}
.hero-chip .ic {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: white;
}
.hero-chip.alt .ic { background: var(--accent); }
.hero-chip .meta { font-size: 11px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }

/* ─── Hero variant B: search-first ─── */
.hero-b {
  background:
    radial-gradient(ellipse at top right, oklch(0.94 0.08 70 / 0.5), transparent 50%),
    radial-gradient(ellipse at bottom left, oklch(0.92 0.1 150 / 0.4), transparent 55%);
  padding: 56px 0;
  border-radius: var(--radius-xl);
}
.hero-b-inner {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.big-search {
  margin: 28px auto 0;
  max-width: 680px;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
}
.big-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 17px;
}
.suggested {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-top: 20px;
}
.suggested .chip {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.suggested .chip:hover { background: var(--surface); }

/* ─── Hero variant C: editorial big-image ─── */
.hero-c {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  min-height: 540px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px;
}
.hero-c image-slot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-c::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
.hero-c > * { position: relative; z-index: 2; }
.hero-c .h1 { color: var(--bg); max-width: 14ch; }
.hero-c .lead { color: rgba(255,255,255,0.8); max-width: 50ch; }

/* ─── Promise / value strip ─── */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 768px) { .values { grid-template-columns: repeat(2, 1fr); } }
.value-item {
  padding: 28px 24px;
  display: flex; gap: 14px;
  align-items: flex-start;
  border-right: 1px solid var(--rule);
}
.value-item:last-child { border-right: 0; }
.value-item .ic {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-deep);
  flex-shrink: 0;
}
.value-item h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; }
.value-item p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }

/* ─── B2B teaser ─── */
.b2b-teaser {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-xl);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.b2b-teaser::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 65%);
  opacity: 0.45;
  pointer-events: none;
}
@media (max-width: 980px) {
  .b2b-teaser { grid-template-columns: 1fr; padding: 36px; }
}
.b2b-teaser .h2 { color: var(--bg); }
.b2b-teaser .lead { color: rgba(255,255,255,0.7); }
.b2b-teaser .kicker { color: var(--accent); }
.b2b-features { display: flex; flex-direction: column; gap: 4px; position: relative; }
.b2b-feature {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.b2b-feature .n {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--accent);
  width: 24px; flex-shrink: 0;
}
.b2b-feature .t { font-size: 14px; font-weight: 500; }
.b2b-feature .v { margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 12px; color: rgba(255,255,255,0.6); }

/* ─── Footer ─── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  margin: 0 0 14px; font-size: 12px;
  color: rgba(255,255,255,0.45);
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 500;
}
.footer a { display: block; padding: 5px 0; font-size: 14px; color: rgba(255,255,255,0.75); }
.footer a:hover { color: var(--accent); }
.footer-brand .brand { color: white; margin-bottom: 16px; }
.footer-brand .brand .tld { color: rgba(255,255,255,0.5); }
.footer-brand p { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.55); max-width: 36ch; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.4);
  font-family: 'Geist Mono', monospace;
}

/* ─── Catalog page ─── */
.catalog-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: flex-start;
}
.filters-toggle {
  display: none;
  width: 100%;
  align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  cursor: pointer;
  margin-bottom: 16px;
}
.filters-toggle:hover { border-color: var(--rule-strong); }
@media (max-width: 980px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .filters-toggle { display: flex; }
  .filters { position: static; top: auto; display: none; margin-bottom: 4px; }
  .filters.is-open { display: block; }
}
.filters {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 100px;
}
/* Override DESPUÉS de la base para ganar por cascada: en móvil no sticky. */
@media (max-width: 980px) {
  .filters { position: static; top: auto; }
}
.filter-group + .filter-group { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rule); }
.filter-group h6 {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-list label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink-2);
  cursor: pointer;
}
.filter-list label:hover { color: var(--ink); }
.filter-list input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px;
  border: 1.5px solid var(--rule-strong); border-radius: 4px;
  display: grid; place-items: center;
  background: var(--surface);
  cursor: pointer;
}
.filter-list input[type="checkbox"]:checked {
  background: var(--primary); border-color: var(--primary);
}
.filter-list input[type="checkbox"]:checked::after {
  content: '✓'; color: white; font-size: 11px; line-height: 1;
}
/* Radios de categoría (mismo look que los checkboxes, en círculo) */
.filter-list input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 1.5px solid var(--rule-strong); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); cursor: pointer;
  transition: border-color 0.15s;
}
.filter-list input[type="radio"]:checked { border-color: var(--primary); }
.filter-list input[type="radio"]:checked::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
/* El nombre ocupa el espacio disponible y trunca si es largo (no desborda la barra) */
.filter-list label > span:first-of-type {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.filter-list label:has(input:checked) { color: var(--ink); font-weight: 500; }
.filter-list .count {
  margin-left: auto; flex: 0 0 auto;
  font-size: 11.5px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
}

.range-slider { padding: 4px 0 0; }
.range-row { display: flex; gap: 8px; }
.range-row input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 8px;
  font-size: 13px; background: var(--bg); outline: none;
}
.range-row input:focus { border-color: var(--primary); }

.catalog-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.catalog-results {
  font-size: 13px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
}

.sort-select {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 8px 36px 8px 14px;
  font-size: 13.5px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='rgba(0,0,0,.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ─── Product detail ─── */
.pd-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: flex-start;
}
@media (max-width: 980px) { .pd-grid { grid-template-columns: 1fr; gap: 32px; } }
.pd-gallery {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px;
  aspect-ratio: 1 / 1;
  position: relative;
}
.pd-gallery image-slot {
  width: 100%; height: 100%;
  --slot-bg: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}
.pd-thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-top: 14px;
}
.pd-thumb {
  aspect-ratio: 1; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
  cursor: pointer;
}
.pd-thumb.active { border-color: var(--primary); border-width: 2px; }
.pd-thumb image-slot { width:100%; height:100%; }

.breadcrumbs {
  display: flex; gap: 6px; align-items: center;
  font-size: 13px; color: var(--ink-3);
  margin-bottom: 16px;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.5; }

.pd-title { font-size: 36px; line-height: 1.05; font-weight: 600; letter-spacing: -0.025em; margin: 4px 0 8px; }
.pd-supplier { font-size: 13.5px; color: var(--ink-3); }
.pd-supplier b { color: var(--primary-deep); font-weight: 500; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; }
.pd-rating .stars { color: var(--accent); }
.pd-rating .count { color: var(--ink-3); }

.pd-price-block {
  margin: 24px 0;
  display: flex; align-items: baseline; gap: 14px;
}
.pd-price { font-size: 38px; font-weight: 600; letter-spacing: -0.025em; }
.pd-price-was { font-size: 18px; color: var(--ink-3); text-decoration: line-through; }
.pd-price-unit { font-size: 13px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }

.pd-variants {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 14px 0;
}
.pd-variant {
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px;
  min-width: 80px;
}
.pd-variant.active { border-color: var(--ink); border-width: 2px; padding: 9px 13px; }
.pd-variant .v-name { font-weight: 500; }
.pd-variant .v-price { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--ink-3); }

.pd-row {
  display: flex; gap: 12px;
  margin: 24px 0;
}
.pd-buy {
  flex: 1;
  height: 56px;
  font-size: 16px;
}

.pd-info-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 18px;
}
.pd-info {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.pd-info .ic { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.pd-info h6 { margin: 0 0 2px; font-size: 13px; font-weight: 600; }
.pd-info p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }

.pd-details {
  margin-top: 22px;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}
.pd-details h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.pd-details p { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.pd-spec {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.pd-spec > div {
  padding: 12px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
}
.pd-spec dt { color: var(--ink-3); font-family: 'Geist Mono', monospace; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.pd-spec dd { margin: 2px 0 0; font-weight: 500; }

/* ─── Cart drawer ─── */
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(20, 30, 22, 0.4);
  z-index: 90;
  backdrop-filter: blur(2px);
  animation: fade-in 0.2s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 100vw;
  background: var(--bg);
  z-index: 100;
  display: flex; flex-direction: column;
  animation: slide-in 0.25s cubic-bezier(.2,.8,.2,1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.15);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
}
.drawer-hd h3 { margin: 0; font-size: 18px; font-weight: 600; }
.drawer-hd .count {
  font-size: 12px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-foot {
  padding: 20px 24px;
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item .ci-img {
  width: 64px; height: 64px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.cart-item .ci-img image-slot { width: 100%; height: 100%; }
.cart-item .ci-info h6 { margin: 0; font-size: 14px; font-weight: 500; }
.cart-item .ci-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-family: 'Geist Mono', monospace; }
.cart-item .ci-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-item .ci-price { font-weight: 600; font-size: 14.5px; }

.totals-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; padding: 6px 0;
  color: var(--ink-2);
}
.totals-row .v { font-variant-numeric: tabular-nums; }
.totals-row.total {
  font-size: 18px; font-weight: 600; color: var(--ink);
  padding-top: 12px; margin-top: 6px;
  border-top: 1px solid var(--rule);
  letter-spacing: -0.02em;
}

/* ─── Checkout ─── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: flex-start;
}
@media (max-width: 980px) { .checkout-grid { grid-template-columns: 1fr; } }
.co-step {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}
.co-step + .co-step { margin-top: 14px; }
.co-step-hd {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.co-step-hd .n {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: 'Geist Mono', monospace;
  font-size: 13px; font-weight: 600;
}
.co-step-hd h3 { margin: 0; font-size: 18px; font-weight: 600; }
.co-step-hd .check {
  margin-left: auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center;
}

.co-field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.co-field label {
  font-size: 11.5px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.co-field input, .co-field select, .co-field textarea {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}
.co-field input:focus, .co-field select:focus, .co-field textarea:focus { border-color: var(--primary); }
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.co-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.co-slot {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.co-slot:hover { border-color: var(--ink-3); }
.co-slot.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  border-width: 2px; padding: 13px;
}
.co-slot .day {
  font-size: 11px; font-family: 'Geist Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3);
}
.co-slot .time { font-size: 16px; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; }
.co-slot .fee { font-size: 11.5px; color: var(--primary-deep); margin-top: 4px; font-family: 'Geist Mono', monospace; font-weight: 500; }
.co-slot.express::before {
  content: 'EXPRESS';
  position: absolute; top: -8px; right: 10px;
  background: var(--accent); color: white;
  font-size: 9.5px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
}

.co-pay-grid { display: flex; flex-direction: column; gap: 8px; }
.co-pay {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.co-pay:hover { border-color: var(--ink-3); }
.co-pay.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  border-width: 2px; padding: 15px;
}
.co-pay .radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.co-pay.active .radio { border-color: var(--primary); }
.co-pay.active .radio::after {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--primary);
}
.co-pay .pay-icon {
  width: 38px; height: 26px;
  border-radius: 5px;
  background: var(--ink);
  display: grid; place-items: center;
  color: white;
  font-size: 10px;
  font-family: 'Geist Mono', monospace;
  font-weight: 700;
}
.co-pay .pay-label { font-size: 14.5px; font-weight: 500; }
.co-pay .pay-sub { font-size: 12px; color: var(--ink-3); }

.co-summary {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 100px;
}
/* En móvil el resumen se apila al final: sin sticky para evitar que el
   contenido quede detrás de él al hacer scroll (override tras la base). */
@media (max-width: 980px) {
  .co-summary { position: static; top: auto; }
}
.co-summary h4 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.co-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
}
.co-line:last-of-type { border-bottom: 0; }
.co-line .pl { color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.co-line .pq {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  background: var(--bg); padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink-3);
}

.promo-input {
  display: flex; gap: 8px;
  margin: 16px 0;
}
.promo-input input {
  flex: 1; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: 10px;
  font-size: 13.5px; background: var(--bg); outline: none;
}

/* ─── B2B page ─── */
.b2b-hero {
  background:
    radial-gradient(ellipse at top right, oklch(0.94 0.08 70 / 0.6), transparent 50%),
    var(--ink);
  color: var(--bg);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 980px) { .b2b-hero { grid-template-columns: 1fr; padding: 40px 28px; } }
.b2b-hero .h1 { color: var(--bg); }
.b2b-hero .lead { color: rgba(255,255,255,0.75); }
.b2b-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.b2b-form h3 { margin: 0 0 4px; color: white; font-size: 18px; font-weight: 600; }
.b2b-form .sub { font-size: 12.5px; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.b2b-form .co-field input, .b2b-form .co-field select {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  color: white;
}
.b2b-form .co-field input::placeholder { color: rgba(255,255,255,0.4); }
.b2b-form .co-field label { color: rgba(255,255,255,0.55); }

.b2b-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 768px) { .b2b-benefits { grid-template-columns: 1fr; } }
.b2b-benefit {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}
.b2b-benefit .num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px; color: var(--accent);
  font-weight: 600; letter-spacing: 0.06em;
  margin-bottom: 22px;
}
.b2b-benefit h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.b2b-benefit p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* ─── Tracking ─── */
.track-hero {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 980px) { .track-hero { grid-template-columns: 1fr; } }
.track-map {
  position: relative;
  aspect-ratio: 5 / 4;
  background:
    linear-gradient(120deg, oklch(0.96 0.04 145) 0%, oklch(0.93 0.05 145) 100%);
  border-radius: var(--radius);
  overflow: hidden;
}
.track-map svg { width: 100%; height: 100%; display: block; }

.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute; left: 10px; top: 14px; bottom: 14px;
  width: 2px; background: var(--rule);
}
.tl-step {
  position: relative;
  padding-bottom: 24px;
}
.tl-step:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -27px; top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--rule);
  display: grid; place-items: center;
  color: transparent;
}
.tl-step.done .tl-dot {
  background: var(--primary); border-color: var(--primary); color: white;
}
.tl-step.active .tl-dot {
  background: var(--surface); border-color: var(--primary); color: var(--primary);
}
.tl-step.active .tl-dot::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  position: absolute;
  animation: pulse-dot 1.6s ease-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}
.tl-time {
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 3px;
}
.tl-step.active .tl-time { color: var(--primary); }
.tl-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.tl-desc { font-size: 13px; color: var(--ink-3); }

.eta-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.eta-card .box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px;
}
.eta-card .l {
  font-size: 11px; color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.eta-card .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.eta-card .s { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.driver-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.driver-card .av {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-deep);
  display: grid; place-items: center;
  font-weight: 600; font-size: 16px;
  letter-spacing: -0.01em;
}
.driver-card .nm { font-size: 14.5px; font-weight: 500; }
.driver-card .vh { font-size: 12px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }
.driver-card .actions { margin-left: auto; display: flex; gap: 6px; }
.driver-card .actions button {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  color: var(--ink);
}
.driver-card .actions button:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ─── Account ─── */
.account-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 980px) { .account-grid { grid-template-columns: 1fr; } }
.account-side {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky; top: 100px;
}
/* En móvil el sidebar deja de ser sticky: si no, al hacer scroll el contenido
   (p. ej. Preferencias) se mete por detrás del menú de la cuenta.
   Va DESPUÉS de la regla base para que gane por orden de cascada. */
@media (max-width: 980px) {
  .account-side { position: static; top: auto; margin-bottom: 4px; }
}
.account-user {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 14px;
}
.account-user .av {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center;
  font-weight: 600;
}
.account-user .nm { font-size: 14.5px; font-weight: 500; }
.account-user .em { font-size: 12px; color: var(--ink-3); font-family: 'Geist Mono', monospace; }
.account-nav button {
  appearance: none; background: transparent; border: 0;
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px; color: var(--ink-2);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.account-nav button:hover { background: var(--bg); color: var(--ink); }
.account-nav button.active { background: var(--ink); color: var(--bg); }
.account-nav .ic { width: 16px; height: 16px; display: grid; place-items: center; opacity: 0.7; }

.account-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
}
.account-card + .account-card { margin-top: 16px; }
.account-card .hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.account-card h3 { margin: 0; font-size: 18px; font-weight: 600; }

.order-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.order-row:last-child { border-bottom: 0; }
.order-row .or-id { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--ink-3); }
.order-row .or-date { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.order-row .or-items { font-size: 13.5px; color: var(--ink); }
.order-row .or-imgs {
  display: flex;
}
.order-row .or-imgs > div {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.order-row .or-imgs > div:first-child { margin-left: 0; }
.order-row .or-status {
  font-size: 11.5px; font-family: 'Geist Mono', monospace;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-deep);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}
.order-row .or-status.transit { background: var(--accent-soft); color: oklch(0.45 0.15 50); }
.order-row .or-total { font-weight: 600; font-size: 15px; }

.addr-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 768px) { .addr-grid { grid-template-columns: 1fr; } }
.addr-tile {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}
.addr-tile.default { border-color: var(--primary); }
.addr-tile h6 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.addr-tile h6 .badge { font-size: 9.5px; font-family: 'Geist Mono', monospace; background: var(--primary); color: white; padding: 2px 6px; border-radius: 4px; margin-left: 6px; letter-spacing: 0.06em; }
.addr-tile p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* ─── Misc ─── */
.divider-y { width: 1px; height: 100%; background: var(--rule); }
.spacer-12 { height: 12px; }
.spacer-20 { height: 20px; }
.spacer-32 { height: 32px; }

/* Page transition */
.page-fade { animation: page-in 0.25s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Image fallback (no image in DB) ─── */
.img-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border-radius: inherit;
  color: var(--primary-deep);
  font-family: 'Geist Mono', monospace;
  font-size: clamp(20px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 0;
}
.img-fallback span { opacity: 0.6; }

/* Fotos de producto: contain → se ve la imagen COMPLETA sin recortarse
   (las imágenes grandes/no cuadradas ya no se cortan por el contenedor). */
.product-image img,
.pd-gallery img,
.pd-thumb img,
.cart-item .ci-img img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
/* Ilustración decorativa del hero: sí rellena (cover). */
.hero-illus img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ─── Drawer (Alpine x-show animations) ─── */
.drawer[x-cloak], .drawer-bg[x-cloak] { display: none !important; }

/* ─── Generic utility tweaks ─── */
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

/* ─── Unified alerts (storefront + admin shared semantics) ─── */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid transparent;
  background: var(--surface);
}
.alert a { color: inherit; text-decoration: underline; font-weight: 500; }
.alert + .alert { margin-top: 10px; }
.alert-success { background: oklch(0.96 0.04 150); color: oklch(0.32 0.10 150); border-color: oklch(0.85 0.08 150); }
.alert-error   { background: oklch(0.96 0.04 25);  color: oklch(0.38 0.18 25);  border-color: oklch(0.84 0.10 25);  }
.alert-info    { background: oklch(0.96 0.03 240); color: oklch(0.35 0.10 240); border-color: oklch(0.84 0.06 240); }
.alert-warning { background: oklch(0.96 0.06 80);  color: oklch(0.38 0.12 80);  border-color: oklch(0.85 0.10 80);  }

/* ─── Mobile breakpoint < 480px ─── */
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  h1, .h1 { font-size: 28px !important; }
  h2, .h2 { font-size: 22px !important; }
  h3, .h3 { font-size: 18px !important; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-stat .n { font-size: 28px !important; }
  .hero-a-grid { grid-template-columns: 1fr !important; }
  .hero-illus { display: none; }
  .pd-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .pd-info-cards { grid-template-columns: 1fr !important; }
  .product-grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
  .values { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px 18px; }
  .footer-brand { grid-column: 1 / -1; }
  .track-hero { grid-template-columns: 1fr !important; }
  .eta-card { grid-template-columns: 1fr 1fr; }
  .pd-row { flex-direction: column; align-items: stretch; }
  .pd-row .qty-stepper { width: 100%; }
  .pd-buy { width: 100%; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--rule); padding: 10px 0; }
  .tbl td { padding: 4px 0; }
  .breadcrumbs { font-size: 12px; flex-wrap: wrap; }
  .topbar-search { display: none; }
  .subnav { font-size: 12.5px; }
  .check-cp { font-size: 13px; }
  .cart-drawer { width: 100% !important; }
  .form-card, .account-card { padding: 16px !important; }
  /* Forzar grid de stats B2B a 2 col */
  section.section-tight .card[style*="grid-template-columns:repeat(4"] { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
