/* ============================================================
   CREATIVA DIGITAL — Sistema de diseño "Taller digital"
   Web estática · mobile-first · WCAG 2.2 AA
   ============================================================ */

/* ---------- Fuentes autoalojadas ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/jakarta-var-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

/* ---------- Tokens ---------- */
:root {
  /* Marca — teal más saturado y decidido */
  --brand-50: hsl(168, 64%, 96%);
  --brand-100: hsl(168, 58%, 88%);
  --brand-200: hsl(168, 52%, 78%);
  --brand-300: hsl(168, 52%, 58%);
  --brand-400: hsl(168, 72%, 40%);
  --brand-500: hsl(168, 100%, 30%);
  --brand-600: hsl(168, 100%, 24%);
  --brand-700: hsl(168, 100%, 18%);
  --brand-800: hsl(169, 82%, 13%);
  --brand-900: hsl(170, 55%, 8%);

  /* Acento cálido (precio / oferta) */
  --accent-100: hsl(28, 100%, 93%);
  --accent-400: hsl(26, 96%, 56%);
  --accent-500: hsl(24, 95%, 50%);
  --accent-600: hsl(22, 92%, 42%);

  /* Tinte para sombras / glows de color (no negro puro) */
  --shadow-tint: 168 60% 18%;
  --brand-glow: 168 100% 30%;
  --paper: hsl(168, 30%, 99%);

  /* Neutros — un punto más limpios */
  --gray-0: hsl(0, 0%, 100%);
  --gray-25: hsl(168, 22%, 98%);
  --gray-50: hsl(166, 16%, 96%);
  --gray-100: hsl(165, 13%, 91%);
  --gray-200: hsl(165, 10%, 85%);
  --gray-300: hsl(165, 8%, 72%);
  --gray-400: hsl(168, 7%, 52%);
  --gray-500: hsl(170, 9%, 41%);
  --gray-700: hsl(172, 14%, 25%);
  --gray-900: hsl(178, 25%, 11%);

  /* Semánticos */
  --success-bg: hsl(152, 60%, 94%);
  --success: hsl(152, 75%, 26%);
  --warning-bg: hsl(42, 100%, 92%);
  --warning: hsl(35, 90%, 32%);
  --error-bg: hsl(354, 80%, 96%);
  --error: hsl(354, 75%, 41%);
  --info-bg: hsl(205, 85%, 95%);
  --info: hsl(207, 85%, 36%);

  /* Roles */
  --color-bg: var(--gray-0);
  --color-bg-subtle: var(--gray-25);
  --color-surface: var(--gray-0);
  --color-border: var(--gray-100);
  --color-border-input: var(--gray-200);
  --color-text: var(--gray-900);
  --color-text-muted: var(--gray-500);
  --color-primary: var(--brand-600);
  --color-primary-hover: var(--brand-700);
  --color-primary-soft: var(--brand-50);
  --color-accent: var(--accent-600);
  --color-focus: var(--brand-500);
  --color-price: var(--gray-900);
  --color-whatsapp: hsl(142, 72%, 26%); /* AA con texto blanco */

  /* Tipografía */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.55rem + 1.5vw, 2.5rem);
  --text-4xl: clamp(2rem, 1.6rem + 2vw, 3rem);
  --text-5xl: clamp(2.25rem, 1.7rem + 2.6vw, 3.5rem);
  --text-display: clamp(2.5rem, 1.4rem + 4.6vw, 5rem);
  --text-price: clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);
  --text-price-xl: clamp(2.75rem, 2rem + 3.4vw, 4rem);

  /* Tracking escalado (firma Linear/Vercel) */
  --tracking-tight: -0.011em;
  --tracking-tighter: -0.022em;
  --tracking-display: -0.038em;
  --tracking-label: 0.06em;

  /* Espaciado */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem;
  --space-10: 8rem;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 7rem);
  --container-max: 1200px;
  --container-wide: 1320px;
  --container-pad: clamp(1rem, 4vw, 2rem);
  --header-h: 64px;

  /* Radios */
  --radius-xs: 6px; --radius-sm: 8px; --radius-md: 12px;
  --radius-lg: 16px; --radius-xl: 24px; --radius-full: 999px;

  /* Sombras en capas con tinte de marca + border-as-shadow */
  --hairline: 0 0 0 1px hsl(var(--shadow-tint) / 0.07);
  --shadow-xs: var(--hairline), 0 1px 2px hsl(var(--shadow-tint) / 0.05);
  --shadow-sm: var(--hairline), 0 1px 3px hsl(var(--shadow-tint) / 0.08), 0 2px 6px -2px hsl(var(--shadow-tint) / 0.06);
  --shadow-md: var(--hairline), 0 4px 10px -2px hsl(var(--shadow-tint) / 0.10), 0 8px 24px -8px hsl(var(--shadow-tint) / 0.10);
  --shadow-lg: 0 1px 2px hsl(var(--shadow-tint) / 0.08), 0 12px 28px -8px hsl(var(--shadow-tint) / 0.16), 0 24px 48px -16px hsl(var(--shadow-tint) / 0.14);
  --shadow-float: 0 24px 50px -18px hsl(var(--shadow-tint) / 0.28), 0 12px 24px -16px hsl(var(--shadow-tint) / 0.22);
  --shadow-cta: 0 1px 2px hsl(var(--shadow-tint) / 0.14), 0 8px 20px -4px hsl(var(--brand-glow) / 0.30);
  --shadow-glow: 0 2px 4px hsl(var(--shadow-tint) / 0.16), 0 14px 32px -6px hsl(var(--brand-glow) / 0.42);
  --shadow-top: 0 -4px 16px hsl(var(--shadow-tint) / 0.10);
  --ring-focus: 0 0 0 3px hsl(168 70% 45% / 0.40);

  /* Gradientes con intención */
  --grad-cta: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  --grad-text: linear-gradient(120deg, var(--brand-500) 0%, var(--brand-400) 45%, var(--accent-500) 100%);
  --grad-band: linear-gradient(160deg, var(--brand-700), var(--brand-900));
  --hero-mesh:
    radial-gradient(48% 42% at 12% 8%, hsl(168 100% 30% / 0.14), transparent 62%),
    radial-gradient(42% 40% at 92% 42%, hsl(24 95% 50% / 0.08), transparent 60%),
    radial-gradient(60% 50% at 50% 120%, hsl(168 64% 90% / 0.55), transparent 70%);

  /* Movimiento */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 320ms;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
body { letter-spacing: var(--tracking-tight); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: var(--tracking-tighter);
  font-weight: 800;
  text-wrap: balance;
}
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: var(--tracking-label);
  font-size: var(--text-xs); font-weight: 700; color: var(--brand-600); margin-bottom: var(--space-2);
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 700; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
::placeholder { color: var(--gray-400); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-pad); }
.container-wide { max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--container-pad); }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 300;
  background: var(--brand-700); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; color: #fff; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0 var(--space-5); height: 48px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  font-weight: 700; font-size: var(--text-base); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--grad-cta); color: #fff;
  box-shadow: var(--shadow-cta), inset 0 1px 0 hsl(0 0% 100% / 0.18);
  border-radius: var(--radius-sm);
}
.btn-primary:hover { background: var(--grad-cta); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-glow), inset 0 1px 0 hsl(0 0% 100% / 0.22); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--gray-100); color: var(--gray-500); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--color-surface); color: var(--color-primary); border-color: transparent; box-shadow: var(--hairline); }
.btn-secondary:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--color-primary-hover); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn-whatsapp:hover { background: hsl(142, 70%, 32%); color: #fff; }
.btn-lg { height: 56px; font-size: var(--text-lg); }
.btn-sm { height: 38px; padding-inline: var(--space-4); font-size: var(--text-sm); }
.btn .arrow { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-xs);
  font-size: var(--text-xs); font-weight: 700; line-height: 1.6;
}
.badge-brand { background: var(--brand-600); color: #fff; }
.badge-accent { background: var(--accent-600); color: #fff; }
.badge-soft { background: var(--brand-50); color: var(--brand-700); }
.badge-info { background: var(--info-bg); color: var(--info); }
.pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--brand-50); color: var(--brand-900);
  border-radius: var(--radius-full); padding: 6px 14px;
  font-size: var(--text-sm); font-weight: 600;
}

/* ============================================================
   HEADER
   ============================================================ */
.topbar { background: var(--brand-50); color: var(--brand-900); font-size: var(--text-xs); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 32px; gap: var(--space-4); }
.topbar-usps { display: flex; gap: var(--space-5); list-style: none; padding: 0; overflow: hidden; }
.topbar-usps li { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.topbar-usps svg { color: var(--brand-500); flex: none; }
.topbar a { color: var(--brand-900); font-weight: 700; white-space: nowrap; }
@media (max-width: 767px) { .topbar-usps li:nth-child(n+2) { display: none; } }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: hsl(0 0% 100% / 0.72);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid hsl(var(--shadow-tint) / 0.07);
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); background: hsl(0 0% 100% / 0.88); }
@supports not (backdrop-filter: blur(1px)) { .site-header { background: hsl(0 0% 100% / 0.98); } }
.header-main { display: flex; align-items: center; gap: var(--space-4); height: var(--header-h); }
.header-logo { flex: none; display: flex; align-items: center; }
.header-logo img { height: 40px; width: auto; }
.header-search { flex: 1 1 auto; max-width: 520px; position: relative; display: none; }
.header-search input {
  width: 100%; height: 44px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border-input); background: var(--gray-50);
  padding: 0 var(--space-4) 0 44px; font-size: var(--text-base);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.header-search input:focus { background: #fff; border-color: var(--brand-500); box-shadow: var(--ring-focus); outline: none; }
.header-search .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); pointer-events: none;
}
.header-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.header-action {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 48px; height: 48px; padding: 0 var(--space-2);
  border-radius: var(--radius-sm); color: var(--gray-700); font-size: 10px; font-weight: 600;
  background: none; border: 0; cursor: pointer;
}
.header-action:hover { background: var(--brand-50); color: var(--brand-700); }
.header-action svg { width: 22px; height: 22px; }
.header-action .count {
  position: absolute; top: 2px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--radius-full); background: var(--accent-600); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  transition: transform var(--dur-base) var(--ease-spring);
}
.header-action .count.is-empty { display: none; }
.header-action .count.bump { transform: scale(1.35); }
.header-phone { display: none; align-items: center; gap: var(--space-2); font-weight: 700; color: var(--gray-900); white-space: nowrap; }
.header-phone:hover { color: var(--brand-600); }
.header-phone svg { color: var(--brand-500); }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; flex: none;
  border: 0; background: none; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--gray-900);
}
@media (max-width: 479px) {
  .header-action span:not(.count) { display: none; }
  .header-action { min-width: 44px; }
  /* en móvil estrecho la "Ayuda" está en el menú y el footer: evita el desbordamiento */
  .header-action--help { display: none; }
}
.menu-btn:hover { background: var(--brand-50); }

@media (min-width: 1024px) {
  .header-search { display: block; }
  .header-phone { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Navegación de categorías (desktop) */
.cat-nav { display: none; border-top: 1px solid var(--color-border); }
.cat-nav ul { display: flex; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.cat-nav > .container-wide > ul { flex-wrap: wrap; }
.cat-nav a.cat-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 var(--space-3); height: 44px;
  color: var(--gray-700); font-weight: 600; font-size: var(--text-sm);
}
.cat-nav a.cat-link::after {
  content: ''; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 0;
  height: 3px; background: var(--brand-500); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-base) var(--ease-out);
}
.cat-nav a.cat-link:hover, .cat-nav li.open > a.cat-link, .cat-nav a.cat-link[aria-current="true"] { color: var(--brand-600); }
.cat-nav a.cat-link:hover::after, .cat-nav li.open > a.cat-link::after, .cat-nav a.cat-link[aria-current="true"]::after { transform: scaleX(1); }
.cat-nav a.cat-link.is-offer { color: var(--accent-600); }
@media (min-width: 1024px) { .cat-nav { display: block; } }

/* Mega-menú */
.cat-nav li.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--color-surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg); border-top: 1px solid var(--color-border);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
  z-index: 90;
}
.cat-nav li.open > .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner { max-width: var(--container-wide); margin-inline: auto; padding: var(--space-6) var(--container-pad); display: grid; grid-template-columns: repeat(3, 1fr) 280px; gap: var(--space-6); }
.mega-col-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--gray-400); margin-bottom: var(--space-3); }
.mega-list { display: flex; flex-direction: column; gap: 2px; list-style: none; padding: 0; }
.mega-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-sm); color: var(--gray-700); }
.mega-item:hover { background: var(--brand-50); color: var(--brand-700); }
.mega-item img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex: none; background: var(--gray-50); }
.mega-item .name { font-weight: 600; font-size: var(--text-sm); line-height: 1.3; }
.mega-item .from { font-size: var(--text-xs); color: var(--gray-500); }
.mega-feature {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-border); background: var(--gray-25);
}
.mega-feature img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.mega-feature .body { padding: var(--space-4); }
.mega-feature .title { font-weight: 700; }
.mega-feature .price { font-size: var(--text-sm); color: var(--gray-500); }

/* Drawer móvil */
.drawer-overlay {
  position: fixed; inset: 0; background: hsl(178 25% 11% / 0.5); z-index: 190;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 380px); z-index: 200;
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  transform: translateX(-102%); transition: transform var(--dur-slow) var(--ease-out);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
}
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
.drawer-head img { height: 32px; }
.drawer-close { width: 44px; height: 44px; border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: var(--gray-50); }
.drawer-search { padding: var(--space-3) var(--space-4); position: relative; }
.drawer-search input {
  width: 100%; height: 48px; border-radius: var(--radius-md);
  border: 1px solid var(--color-border-input); background: var(--gray-50); padding: 0 var(--space-4);
  font-size: var(--text-base);
}
.drawer-search input:focus { background: #fff; border-color: var(--brand-500); box-shadow: var(--ring-focus); outline: none; }
.drawer-nav { flex: 1; padding: var(--space-2) 0; }
.drawer-nav details { border-bottom: 1px solid var(--color-border); }
.drawer-nav summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: var(--space-2) var(--space-4);
  font-weight: 600; cursor: pointer; list-style: none;
}
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary .chev { transition: transform var(--dur-base) var(--ease-out); color: var(--gray-400); }
.drawer-nav details[open] summary { color: var(--brand-600); }
.drawer-nav details[open] summary .chev { transform: rotate(180deg); }
.drawer-nav .sub { padding: 0 var(--space-4) var(--space-3); display: flex; flex-direction: column; }
.drawer-nav .sub a { padding: 10px var(--space-3); border-radius: var(--radius-sm); color: var(--gray-700); font-size: var(--text-sm); }
.drawer-nav .sub a:hover { background: var(--brand-50); }
.drawer-nav > a { display: flex; align-items: center; min-height: 52px; padding: var(--space-2) var(--space-4); font-weight: 600; color: var(--gray-900); border-bottom: 1px solid var(--color-border); }
.drawer-foot { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); border-top: 1px solid var(--color-border); }

/* Buscador dropdown */
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 150;
  background: var(--color-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border);
  max-height: 70vh; overflow-y: auto; padding: var(--space-2);
}
.search-result { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-sm); color: var(--gray-900); }
.search-result:hover { background: var(--brand-50); }
.search-result img, .search-result-ph { width: 44px; height: 44px; border-radius: var(--radius-xs); object-fit: cover; flex: none; background: var(--gray-50); }
.search-result-name { display: block; font-weight: 600; font-size: var(--text-sm); }
.search-result-meta { display: block; font-size: var(--text-xs); color: var(--gray-500); }
.search-empty { padding: var(--space-4); text-align: center; color: var(--gray-500); font-size: var(--text-sm); }

/* ============================================================
   HERO + STRIP CONFIANZA
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) 0 var(--section-y);
  background-color: var(--paper);
  background-image: var(--hero-mesh);
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero-grid { display: grid; gap: var(--space-6); align-items: center; }
.hero h1 {
  font-size: var(--text-display); line-height: 1.02;
  letter-spacing: var(--tracking-display); margin: var(--space-3) 0 var(--space-4);
}
.hero h1 .mark {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0;
}
.hero .lead { color: var(--gray-700); font-size: var(--text-lg); max-width: 48ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-xl); box-shadow: var(--shadow-float); aspect-ratio: 4/5; object-fit: cover; width: 100%; max-height: 540px; }
.hero-media .float-card {
  position: absolute; display: flex; align-items: center; gap: var(--space-2);
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: 700;
}
.hero-media .float-card svg { color: var(--brand-500); }
.hero-media .price-card {
  position: absolute; bottom: var(--space-4); left: calc(-1 * var(--space-4));
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4); display: flex; flex-direction: column;
}
.hero-media .price-card .from { font-size: var(--text-xs); color: var(--gray-500); font-weight: 600; }
.hero-media .price-card .amount {
  font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 800;
  color: var(--brand-600); font-variant-numeric: tabular-nums; line-height: 1;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 52fr 48fr; }
}
@media (max-width: 1023px) {
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-media .price-card { left: var(--space-3); }
}

.trust-strip { border-block: 1px solid var(--color-border); background: var(--color-bg-subtle); }
.trust-strip ul {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3);
  list-style: none; padding: var(--space-4) 0; margin: 0;
}
.trust-strip li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); }
.trust-strip svg { color: var(--brand-500); flex: none; }
@media (min-width: 768px) { .trust-strip ul { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   SECCIONES Y CARDS
   ============================================================ */
.section { padding: var(--section-y) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.section-head .sub { color: var(--gray-500); margin-top: var(--space-2); }
.section-link { font-weight: 700; white-space: nowrap; }
.section-alt { background: var(--color-bg-subtle); }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
.card-grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }

.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--color-surface); border: none;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px hsl(var(--brand-glow) / 0.14), 0 14px 30px -10px hsl(var(--brand-glow) / 0.20), 0 4px 10px -4px hsl(var(--shadow-tint) / 0.10);
}
.pcard-img { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-50); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-badges { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: var(--space-1); z-index: 2; }
.pcard-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); flex: 1; }
.pcard-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); line-height: 1.3; }
.pcard:hover .pcard-title { color: var(--brand-600); }
.pcard-desc { font-size: var(--text-sm); color: var(--gray-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-price { margin-top: auto; padding-top: var(--space-2); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pcard-price .from { font-size: var(--text-xs); color: var(--gray-500); }
.pcard-price .amount { font-weight: 700; font-size: var(--text-lg); font-variant-numeric: tabular-nums; color: var(--accent-600); }
.pcard-price .tax { font-size: var(--text-xs); color: var(--gray-500); }
.pcard-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--text-sm); color: var(--brand-600); margin-top: var(--space-2); }
.pcard-cta .arrow { transition: transform var(--dur-base) var(--ease-out); }
.pcard:hover .pcard-cta .arrow { transform: translateX(4px); }
.pcard > a.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }

/* Card de categoría */
.ccard {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-md); overflow: hidden; border: none;
  background: var(--color-surface); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ccard:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px hsl(var(--brand-glow) / 0.14), 0 14px 30px -10px hsl(var(--brand-glow) / 0.20), 0 4px 10px -4px hsl(var(--shadow-tint) / 0.10);
}
.ccard-img { aspect-ratio: 16/10; overflow: hidden; background: var(--gray-50); }
.ccard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.ccard:hover .ccard-img img { transform: scale(1.05); }
.ccard-body { padding: var(--space-4); }
.ccard-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); }
.ccard:hover .ccard-title { color: var(--brand-600); }
.ccard-desc { font-size: var(--text-sm); color: var(--gray-500); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-count { font-size: var(--text-xs); color: var(--gray-500); margin-top: var(--space-2); font-weight: 600; }
.ccard > a.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }

/* Migas */
.breadcrumbs { padding: var(--space-3) 0; font-size: var(--text-sm); color: var(--gray-500); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-1); list-style: none; padding: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--gray-500); margin-right: var(--space-1); }
.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--brand-600); }
.breadcrumbs [aria-current] { color: var(--gray-900); font-weight: 600; }

/* Banda de confianza pre-footer */
.preband { background: var(--brand-800); color: #fff; }
.preband-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); padding: var(--space-7) 0; }
.preband-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.preband-item svg { color: var(--brand-300); flex: none; }
.preband-item .t { font-weight: 700; }
.preband-item .s { font-size: var(--text-sm); color: hsl(165 25% 78%); }
@media (min-width: 1024px) { .preband-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--gray-900); color: hsl(165, 15%, 75%); font-size: var(--text-sm); }
.footer-grid { display: grid; gap: var(--space-5); padding: var(--space-7) 0 var(--space-6); }
.footer-col .footer-title { color: #fff; font-weight: 700; font-size: var(--text-base); margin-bottom: var(--space-3); font-family: var(--font-display); }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer a { color: hsl(165, 15%, 75%); }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: var(--space-2); align-items: flex-start; }
.footer-contact svg { color: var(--brand-300); flex: none; margin-top: 2px; }
.footer-logo { height: 36px; width: auto; margin-bottom: var(--space-3); }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: hsl(178 25% 18%); color: #fff;
}
.footer-social a:hover { background: var(--brand-600); }
.footer-bottom { border-top: 1px solid hsl(178 25% 20%); padding: var(--space-4) 0; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; font-size: var(--text-xs); }
.footer-bottom .pay { display: flex; gap: var(--space-2); align-items: center; color: var(--gray-400); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.3fr; } }

/* WhatsApp FAB */
.wa-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 160;
  display: inline-flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: var(--radius-full);
  background: var(--color-whatsapp); color: #fff; box-shadow: var(--shadow-lg);
  transition: transform var(--dur-base) var(--ease-out);
  animation: wa-pulse 2.6s ease-out infinite;
}
.wa-fab:hover { transform: scale(1.08); color: #fff; animation: none; }
.wa-fab svg { width: 32px; height: 32px; }
@keyframes wa-pulse {
  0% { box-shadow: var(--shadow-lg), 0 0 0 0 hsl(142 72% 35% / 0.55); }
  70% { box-shadow: var(--shadow-lg), 0 0 0 16px hsl(142 72% 35% / 0); }
  100% { box-shadow: var(--shadow-lg), 0 0 0 0 hsl(142 72% 35% / 0); }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } }
body.has-configbar .wa-fab { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1024px) {
  .wa-fab { right: 16px; bottom: 24px; }
  body.has-configbar .wa-fab { bottom: 24px; }
}

/* ============================================================
   CONFIGURADOR
   ============================================================ */
.product-layout { display: grid; gap: var(--space-6); padding-bottom: var(--space-8); }
@media (min-width: 1024px) {
  .product-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
}

.product-head { margin-bottom: var(--space-5); }
.product-head h1 { font-size: var(--text-3xl); margin-bottom: var(--space-2); }
.product-head .short { color: var(--gray-500); max-width: 60ch; }
.product-gallery { display: flex; gap: var(--space-2); margin-top: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.product-gallery img {
  width: 132px; height: 110px; object-fit: cover; border-radius: var(--radius-md);
  border: 1px solid var(--color-border); flex: none; scroll-snap-align: start;
  cursor: zoom-in; transition: border-color var(--dur-fast);
}
.product-gallery img:hover { border-color: var(--brand-400); }
.product-gallery img.is-main { width: 100%; max-width: 420px; height: auto; aspect-ratio: 4/3; }

/* Pasos */
.steps { display: flex; flex-direction: column; gap: var(--space-6); }
.step { scroll-margin-top: calc(var(--header-h) + 60px); }
.step-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--radius-full);
  border: 2px solid var(--gray-200); color: var(--gray-400);
  font-size: var(--text-sm); font-weight: 700;
  transition: background var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
.step.is-done .step-num, .step.is-active .step-num { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.step-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); }
.step-help { color: var(--gray-500); font-size: var(--text-sm); margin: 0 0 var(--space-3) calc(28px + var(--space-3)); }
.step-body { margin-left: 0; }
@media (min-width: 768px) { .step-body { margin-left: calc(28px + var(--space-3)); } }

/* Medidas */
.measure-presets { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700);
  border-radius: var(--radius-full); padding: 8px 16px; min-height: 40px;
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.chip:hover { border-color: var(--gray-300); box-shadow: var(--shadow-xs); }
.chip.is-selected { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }
.measure-inputs { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-start; }
.measure-field { flex: 1 1 150px; max-width: 220px; }
.measure-field label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.input-suffix { position: relative; }
.input-suffix input {
  width: 100%; height: 52px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-input); background: #fff;
  padding: 0 52px 0 var(--space-4); font-size: var(--text-base); font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.input-suffix .suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: var(--text-sm); font-weight: 600; pointer-events: none;
}
.input-suffix input:focus { border-color: var(--brand-500); box-shadow: var(--ring-focus); outline: none; }
.input-suffix input.is-valid { border-color: var(--success); }
.input-suffix input.is-invalid { border-color: var(--error); background: var(--error-bg); }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--error); font-size: var(--text-sm); margin-top: 6px; }
.field-error svg { flex: none; margin-top: 3px; }

/* Previsualización proporcional */
.size-preview { margin-top: var(--space-4); display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.size-preview .canvas { flex: 0 1 320px; min-width: 0; }
.size-preview .rect {
  background: var(--brand-50); border: 2px solid var(--brand-300); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-700); font-size: var(--text-sm); font-weight: 700;
  transition: width var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out);
  min-width: 56px; min-height: 30px; max-width: 100%;
}
.size-preview .surface { font-size: var(--text-sm); color: var(--gray-500); font-weight: 600; white-space: nowrap; }
.size-preview .surface strong { color: var(--gray-900); font-variant-numeric: tabular-nums; }

/* Opciones tipo card */
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .opt-grid { grid-template-columns: repeat(3, 1fr); } }
.opt-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  padding: var(--space-3); cursor: pointer; background: #fff; min-height: 64px;
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast), opacity var(--dur-fast);
}
.opt-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-xs); }
.opt-card input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card.is-selected { border-color: var(--brand-600); background: var(--brand-50); }
.opt-card.is-disabled { opacity: 0.45; cursor: not-allowed; }
.opt-card .check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: var(--radius-full);
  background: var(--brand-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform var(--dur-base) var(--ease-spring);
}
.opt-card.is-selected .check { transform: scale(1); }
.opt-card img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-50); }
.opt-card .opt-name { font-weight: 600; font-size: var(--text-sm); line-height: 1.3; padding-right: 24px; }
.opt-card .opt-note { font-size: var(--text-xs); color: var(--gray-500); }
.opt-card .opt-delta { font-size: var(--text-xs); font-weight: 700; color: var(--gray-700); margin-top: auto; font-variant-numeric: tabular-nums; }
.opt-card .opt-delta.included { color: var(--success); }
.opt-info-btn {
  position: relative; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: var(--radius-full);
  border: 0; background: var(--gray-50); color: var(--gray-500); cursor: pointer; font-size: 12px; font-weight: 700;
}
.opt-info-btn:hover { background: var(--brand-100); color: var(--brand-700); }
.opt-desc { grid-column: 1 / -1; background: var(--info-bg); color: var(--gray-700); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); }
.opt-desc[hidden] { display: none; }

/* Stepper cantidad */
.qty-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--color-border-input); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button {
  width: 52px; border: 0; background: var(--gray-50); cursor: pointer;
  font-size: var(--text-lg); font-weight: 700; color: var(--gray-700);
  transition: background var(--dur-fast);
}
.qty-stepper button:hover { background: var(--brand-50); color: var(--brand-700); }
.qty-stepper button:active { background: var(--brand-100); }
.qty-stepper input {
  width: 80px; height: 52px; border: 0; text-align: center;
  font-weight: 700; font-size: var(--text-lg); font-variant-numeric: tabular-nums;
  border-inline: 1.5px solid var(--color-border-input);
}
.qty-stepper input:focus { outline: none; background: var(--brand-50); }

/* Tabla de descuentos */
.qty-table-wrap { margin-top: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.qty-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.qty-table th {
  text-align: right; padding: var(--space-2) var(--space-3);
  background: var(--gray-25); color: var(--gray-500); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border);
}
.qty-table th:first-child, .qty-table td:first-child { text-align: left; }
.qty-table td { padding: var(--space-2) var(--space-3); text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--color-border); }
.qty-table tr:last-child td { border-bottom: 0; }
.qty-table tbody tr { cursor: pointer; transition: background var(--dur-fast); }
.qty-table tbody tr:hover { background: var(--gray-25); }
.qty-table tbody tr.is-selected { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand-600); }
.qty-table .disc { color: var(--accent-600); font-weight: 700; }
.qty-table .best { white-space: nowrap; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--gray-200); border-radius: var(--radius-md);
  padding: var(--space-5); text-align: center; color: var(--gray-500);
  transition: border-color var(--dur-fast), background var(--dur-fast);
  cursor: pointer; font-size: var(--text-sm);
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.dropzone svg { margin: 0 auto var(--space-2); color: var(--brand-400); }
.dropzone .file-ok { color: var(--success); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Panel resumen */
.summary-panel {
  background: var(--color-surface); border: none;
  border-top: 2px solid var(--brand-500);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: var(--space-5); display: none; flex-direction: column; gap: var(--space-4);
}
@media (min-width: 1024px) {
  .summary-panel { display: flex; position: sticky; top: calc(var(--header-h) + 16px); }
}
.summary-product { display: flex; gap: var(--space-3); align-items: center; }
.summary-product img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-50); }
.summary-product .name { font-weight: 700; font-family: var(--font-display); line-height: 1.25; }
.summary-product .dims { font-size: var(--text-sm); color: var(--gray-500); }
.summary-selections { display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.summary-selections .row { display: flex; justify-content: space-between; gap: var(--space-2); }
.summary-selections .label { color: var(--gray-500); }
.summary-selections .value { font-weight: 600; text-align: right; }
.price-breakdown { border-top: 1px solid var(--color-border); padding-top: var(--space-3); display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); }
.price-breakdown .row { display: flex; justify-content: space-between; gap: var(--space-2); font-variant-numeric: tabular-nums; }
.price-breakdown .row .l { color: var(--gray-500); }
.price-breakdown .row .v { font-weight: 600; }
.price-breakdown .row.discount .v { color: var(--accent-600); }
.price-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2);
  border-top: 1px solid var(--color-border); padding-top: var(--space-3);
  transition: background var(--dur-base), box-shadow var(--dur-base);
  border-radius: var(--radius-sm);
}
.price-total.pulse { background: var(--brand-50); box-shadow: inset 0 0 0 1px hsl(var(--brand-glow) / 0.20); }
.price-total .label { font-weight: 700; }
.price-total .amount { font-size: var(--text-price-xl); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tighter); line-height: 1; color: var(--brand-600); }
.price-total .unit { font-size: var(--text-sm); color: var(--gray-500); font-weight: 500; }
.price-tax-note { font-size: var(--text-xs); color: var(--gray-500); text-align: right; margin-top: -6px; }
.delivery-line { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--gray-700); }
.delivery-line svg { color: var(--brand-500); flex: none; }
.delivery-line strong { color: var(--success); }
.summary-trust { display: flex; justify-content: space-between; gap: var(--space-2); font-size: var(--text-xs); color: var(--gray-500); border-top: 1px solid var(--color-border); padding-top: var(--space-3); flex-wrap: wrap; }
.summary-trust span { display: inline-flex; gap: 4px; align-items: center; }

/* Barra sticky móvil */
.configbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--color-surface); box-shadow: var(--shadow-top);
  padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: var(--space-3);
}
.configbar .price-zone { flex: 1; min-width: 0; cursor: pointer; background: none; border: 0; text-align: left; padding: 0; }
.configbar .total { font-size: var(--text-2xl); font-weight: 800; color: var(--brand-600); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.configbar .total .chev { color: var(--gray-400); transition: transform var(--dur-base); }
.configbar.sheet-open .total .chev { transform: rotate(180deg); }
.configbar .note { font-size: var(--text-xs); color: var(--gray-500); }
.configbar .btn { flex: none; }
@media (min-width: 1024px) { .configbar { display: none; } }

.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 149;
  background: var(--color-surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg); padding: var(--space-5) var(--space-4) 96px;
  transform: translateY(105%); transition: transform var(--dur-slow) var(--ease-out);
  max-height: 75vh; overflow-y: auto;
}
.bottom-sheet.open { transform: translateY(0); }
@media (min-width: 1024px) { .bottom-sheet { display: none; } }

/* Descripción del producto */
.product-desc { padding: var(--space-6) 0; border-top: 1px solid var(--color-border); margin-top: var(--space-6); }
.product-desc h3 { margin-bottom: var(--space-3); }
.product-desc .prose { max-width: 75ch; color: var(--gray-700); }
.prose h3 { font-size: var(--text-xl); margin: var(--space-5) 0 var(--space-2); }
.prose h2 { font-size: var(--text-2xl); margin: var(--space-5) 0 var(--space-3); }
.prose p { margin-bottom: var(--space-3); }
.prose ul, .prose ol { margin: 0 0 var(--space-3) 1.2em; }
.prose li { margin-bottom: 4px; }
.prose img { border-radius: var(--radius-md); margin-block: var(--space-3); }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   CARRITO
   ============================================================ */
.cart-layout { display: grid; gap: var(--space-5); align-items: start; padding-bottom: var(--space-8); }
@media (min-width: 1024px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
.cart-item {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: var(--space-3);
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-4);
}
.cart-item img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-50); }
.cart-item .name { font-weight: 700; }
.cart-item .config { font-size: var(--text-sm); color: var(--gray-500); margin-top: 2px; }
.cart-item .line-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-item .remove {
  border: 0; background: none; color: var(--gray-400); cursor: pointer;
  display: inline-flex; gap: 4px; align-items: center; font-size: var(--text-sm);
  padding: 4px 8px; border-radius: var(--radius-xs);
}
.cart-item .remove:hover { color: var(--error); background: var(--error-bg); }
.cart-totals {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
@media (min-width: 1024px) { .cart-totals { position: sticky; top: calc(var(--header-h) + 16px); } }
.cart-empty { text-align: center; padding: var(--space-8) 0; color: var(--gray-500); }
.cart-empty svg { margin: 0 auto var(--space-4); color: var(--brand-300); }

/* Formularios */
.form-field { margin-bottom: var(--space-4); }
.form-field label { display: block; font-weight: 600; font-size: var(--text-sm); color: var(--gray-700); margin-bottom: 6px; }
.form-field .req { color: var(--error); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 52px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-input); background: var(--gray-50);
  padding: 12px var(--space-4); font-size: var(--text-base);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  background: #fff; border-color: var(--brand-500); box-shadow: var(--ring-focus); outline: none;
}
.form-field input.is-invalid, .form-field textarea.is-invalid { border-color: var(--error); background: var(--error-bg); }
.form-check { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--text-sm); color: var(--gray-700); }
.form-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-600); flex: none; }
.form-success {
  background: var(--success-bg); color: var(--success); border-radius: var(--radius-md);
  padding: var(--space-4); display: flex; gap: var(--space-2); align-items: center; font-weight: 600;
}

/* FAQ accordion */
.faq-list { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 56px; padding: var(--space-3) 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--text-lg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex: none; color: var(--gray-400); transition: transform var(--dur-base) var(--ease-out); }
.faq-item[open] summary { color: var(--brand-600); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .answer { padding: 0 0 var(--space-5); color: var(--gray-500); max-width: 70ch; }

/* Toast */
.toast-zone { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: 16px; z-index: 250; display: flex; flex-direction: column; gap: var(--space-2); }
.toast {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--gray-900); color: #fff; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-lg);
  font-size: var(--text-sm); font-weight: 600;
  animation: toast-in var(--dur-slow) var(--ease-out);
  max-width: min(92vw, 380px);
}
.toast a { color: var(--brand-300); }
.toast svg { color: var(--brand-300); flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }

/* Skeleton */
.skeleton {
  background: var(--gray-50);
  background-image: linear-gradient(90deg, var(--gray-50) 0%, var(--gray-100) 50%, var(--gray-50) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* Página CMS / contenido */
.page-head { padding: var(--space-6) 0 var(--space-4); }
.page-head .sub { color: var(--gray-500); max-width: 65ch; margin-top: var(--space-2); }
.cms-content { padding-bottom: var(--space-8); max-width: 800px; }

/* Hero de categoría */
.cat-hero {
  position: relative; padding: var(--space-7) 0 var(--space-5);
  background-color: var(--paper); background-image: var(--hero-mesh); background-repeat: no-repeat;
  border-bottom: 1px solid hsl(var(--shadow-tint) / 0.07);
}
.cat-hero .desc { color: var(--gray-700); max-width: 75ch; margin-top: var(--space-3); }
.subcat-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

/* Tablas genéricas */
.table-wrap { overflow-x: auto; }

/* ============================================================
   SECCIONES DE PORTADA
   ============================================================ */
.dtf-banner {
  display: grid; border-radius: var(--radius-xl); overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-md);
}
.dtf-media video, .dtf-media img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.dtf-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; justify-content: center; }
.dtf-body h2 { font-size: var(--text-3xl); }
.dtf-body p { color: var(--gray-700); max-width: 52ch; }
.dtf-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dtf-tags span {
  padding: 6px 14px; border-radius: var(--radius-full);
  background: var(--gray-50); border: 1px solid var(--color-border);
  font-weight: 700; font-size: var(--text-xs); color: var(--gray-900);
}
.dtf-tags .neon {
  background: linear-gradient(90deg, hsl(152 60% 92%), hsl(322 70% 94%), hsl(207 80% 93%));
}
@media (min-width: 1024px) { .dtf-banner { grid-template-columns: 1fr 1fr; } }

.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }
.service-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-3); text-align: center;
  color: var(--gray-900); font-weight: 700;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.service-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--brand-600); }
.service-tile img { width: 84px; height: 84px; object-fit: contain; }

.app-banner {
  display: grid; gap: var(--space-5); align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); padding: var(--space-6);
}
.app-badges { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.app-badges img { height: 48px; width: auto; }
.app-shot { border-radius: var(--radius-lg); justify-self: center; max-height: 300px; width: auto; }
@media (min-width: 768px) { .app-banner { grid-template-columns: 1.2fr 1fr; } }

/* Contacto */
.contact-layout { display: grid; gap: var(--space-6); padding-bottom: var(--space-6); }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 1fr 1.2fr; } }
.contact-cards { display: flex; flex-direction: column; gap: var(--space-3); }
.contact-card {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4);
}
.contact-card svg { color: var(--brand-500); flex: none; margin-top: 2px; }
.contact-form {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-5);
}
.map-wrap { padding-bottom: var(--space-8); }

/* Mini confianza de producto */
.trust-mini { display: flex; flex-wrap: wrap; gap: var(--space-4); list-style: none; padding: 0; margin-top: var(--space-3); }
.trust-mini li { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); }
.trust-mini svg { color: var(--brand-500); }

/* Chips de entrega */
.delivery-chip { position: relative; }
.delivery-chip strong { font-variant-numeric: tabular-nums; }

/* Botón favorito de producto */
.fav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700);
  border-radius: var(--radius-full); padding: 8px 16px; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.fav-btn:hover { border-color: var(--brand-400); color: var(--brand-600); }
.fav-btn.is-fav { color: var(--error); border-color: var(--error); background: var(--error-bg); }

/* Utilidades */
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }

@media (max-width: 767px) { .d-none-mobile { display: none; } }


/* ---------- Foco visible (QA accesibilidad) ---------- */
.opt-card:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.chip:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.qty-table tbody tr:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }

/* Botón de pausa de vídeos */
.video-toggle {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 0; background: hsl(178 25% 11% / 0.72); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.video-toggle:hover { background: hsl(178 25% 11% / 0.9); }

/* Clases del editor de texto enriquecido del contenido original */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }
.ql-indent-1 { padding-left: 2em; }
.ql-indent-2 { padding-left: 4em; }

/* Muestras de color del configurador */
.opt-swatch {
  display: block; width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 2px solid var(--gray-100); box-shadow: inset 0 0 0 2px #fff;
}

/* ============================================================
   DISEÑADOR ONLINE (v2 — manipulación directa)
   ============================================================ */
.designer-modal {
  position: fixed; inset: 0; z-index: 300; background: hsl(178 25% 11% / 0.6);
  display: none; padding: clamp(0px, 2vw, 24px);
}
.designer-modal.open { display: block; }
.designer-shell {
  background: var(--color-surface); border-radius: var(--radius-lg);
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.designer-top {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.designer-title { font-family: var(--font-display); }
.designer-areas { display: flex; gap: var(--space-1); flex-wrap: wrap; flex: 1; }
.designer-areas .chip { min-height: 34px; padding: 4px 12px; font-size: var(--text-xs); }
.designer-top-actions { display: flex; gap: var(--space-1); align-items: center; margin-left: auto; }

/* barra contextual (aparece al seleccionar una capa) */
.designer-ctx {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 6px var(--space-3); border-bottom: 1px solid var(--color-border);
  background: var(--gray-25); min-height: 48px;
}
.dtb {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: var(--text-sm); font-weight: 600;
}
.dtb:hover { border-color: var(--brand-400); background: var(--brand-50); }
.dtb.on { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.dtb-danger:hover { border-color: var(--error); background: var(--error-bg); }
.dtb-select { height: 36px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: #fff; padding: 0 8px; font-size: var(--text-sm); max-width: 130px; }
.dtb-color { width: 36px; height: 36px; padding: 2px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.designer-quality { font-size: var(--text-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); }
.designer-quality.q-good { background: var(--success-bg); color: var(--success); }
.designer-quality.q-mid { background: var(--warning-bg); color: var(--warning); }
.designer-quality.q-low { background: var(--error-bg); color: var(--error); }

.designer-main { flex: 1; display: flex; min-height: 0; }
.designer-rail {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3) var(--space-2); border-right: 1px solid var(--color-border);
  background: var(--gray-25); overflow-y: auto;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 64px; min-height: 56px; padding: 6px 2px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: none;
  cursor: pointer; font-size: 11px; font-weight: 600; color: var(--gray-700);
}
.rail-btn:hover { background: #fff; border-color: var(--gray-200); color: var(--brand-700); }
.rail-ic { font-size: 20px; font-weight: 800; line-height: 1.2; }
.rail-shapes-wrap { position: relative; }
.rail-shapes {
  position: absolute; left: calc(100% + 6px); top: 0; z-index: 5;
  display: flex; gap: 4px; padding: 6px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.designer-canvas-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--gray-50); min-height: 0; overflow: hidden; padding: 12px;
}
#designer-canvas { touch-action: none; border-radius: 4px; }

.designer-foot {
  display: flex; gap: var(--space-2); align-items: center;
  padding: var(--space-2) var(--space-3); border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.designer-hint { font-size: var(--text-xs); color: var(--gray-500); flex: 1; min-width: 180px; }

@media (max-width: 767px) {
  .designer-main { flex-direction: column-reverse; }
  .designer-rail {
    flex-direction: row; justify-content: center;
    border-right: 0; border-top: 1px solid var(--color-border);
    padding: var(--space-1) var(--space-2); overflow-x: auto; overflow-y: visible;
  }
  .rail-btn { width: 60px; min-height: 48px; }
  .rail-shapes { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translateX(-50%); }
  .designer-hint { display: none; }
}

.designer-cta { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.design-previews { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.design-previews img { width: 110px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.designer-step { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: var(--radius-lg); padding: var(--space-4); }


/* ============================================================
   PANEL PROFESIONAL (B2B)
   ============================================================ */
.b2b-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  flex-wrap: wrap; margin-bottom: var(--space-5);
}
.b2b-hello { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.b2b-toolbar-actions { display: flex; gap: var(--space-2); }
.b2b-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (min-width: 900px) { .b2b-stats { grid-template-columns: repeat(4, 1fr); } }
.b2b-stat {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: 4px;
}
.b2b-stat-label { font-size: var(--text-xs); font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; }
.b2b-stat-value { font-size: var(--text-2xl); font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.b2b-stat-total { background: var(--brand-50); border-color: var(--brand-200); }
.b2b-stat-total .b2b-stat-value { color: var(--brand-700); }
.b2b-table-wrap { box-shadow: var(--shadow-sm); }
.b2b-table tbody tr.b2b-row { cursor: default; }
.b2b-table tbody tr.b2b-row:hover { background: var(--gray-25); }
.b2b-works {
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; color: var(--gray-700);
}
.b2b-detail-cell { background: var(--gray-25); text-align: left; padding: var(--space-3) var(--space-5) !important; }
.b2b-line {
  display: flex; justify-content: space-between; gap: var(--space-4); align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.b2b-line:last-child { border-bottom: 0; }
.b2b-line-cfg { font-size: var(--text-xs); color: var(--gray-500); margin-top: 2px; max-width: 60ch; white-space: normal; }
.b2b-line-nums { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--text-sm); }

/* Visor de imágenes (lightbox) */
.lightbox {
  position: fixed; inset: 0; z-index: 350; display: none;
  background: hsl(178 25% 8% / 0.92);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1100px); max-height: 86vh;
  object-fit: contain; border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px hsl(0 0% 0% / .5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  border: 0; background: hsl(0 0% 100% / .12); color: #fff;
  font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: hsl(0 0% 100% / .25); }
.lb-close { top: 16px; right: 16px; font-size: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: hsl(0 0% 100% / .85); font-size: var(--text-sm); font-weight: 600;
}

/* Acceso profesional: login + solicitud lado a lado */
.b2b-access { display: grid; gap: var(--space-4); align-items: start; }
.b2b-access .contact-form { max-width: none; }
.b2b-signup-box { background: var(--brand-50); border-color: var(--brand-200); }
@media (min-width: 900px) { .b2b-access { grid-template-columns: 1fr 1.1fr; gap: var(--space-5); } }

/* ============================================================
   FILTROS DE CATÁLOGO (página de categoría con muchos productos)
   ============================================================ */
.cat-toolbar { margin-bottom: var(--space-5); }
.cat-subcats { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.cat-subcat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700);
  border-radius: var(--radius-full); padding: 7px 14px; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}
.cat-subcat-chip:hover { border-color: var(--brand-400); }
.cat-subcat-chip.is-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 4px 12px -4px hsl(var(--brand-glow) / 0.40); }
.cat-subcat-chip .n { font-size: var(--text-xs); opacity: .7; }
.cat-filters {
  position: sticky; top: var(--header-h); z-index: 40;
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center;
  background: hsl(0 0% 100% / 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xs); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.cat-filter-group { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex-wrap: wrap; }
.cat-filter-label { font-size: var(--text-xs); font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }
.cat-select { height: 38px; max-width: 100%; min-width: 0; border: 1px solid var(--color-border-input); border-radius: var(--radius-sm); background: #fff; padding: 0 8px; font-size: var(--text-sm); }
.cat-swatches { display: flex; gap: 5px; }
.cat-swatch { width: 26px; height: 26px; border-radius: var(--radius-full); border: 2px solid var(--gray-200); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 2px #fff; }
.cat-swatch.is-on { border-color: var(--brand-600); transform: scale(1.08); }
.cat-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); cursor: pointer; }
.cat-toggle input { width: 18px; height: 18px; accent-color: var(--brand-600); }
.cat-count { font-size: var(--text-sm); color: var(--gray-500); margin: var(--space-3) 0; font-weight: 600; }
.cat-empty { text-align: center; color: var(--gray-500); padding: var(--space-7) 0; }

/* ============================================================
   Showcase caso real · "La escala como héroe" (gran formato)
   Banda oscura, número gigante ámbar, foto vertical de testigo.
   Solo tokens reales. Responsive 1 col (móvil) -> 2 col (>=1024px).
   Acentos con contraste AA verificado sobre --grad-band.
   ============================================================ */
.showcase-mega {
  position: relative;
  display: grid;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--grad-band);
  color: #fff;
  box-shadow: var(--shadow-float);
  isolation: isolate;
}
.showcase-mega::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 12% 0%, hsl(var(--brand-glow) / 0.30), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, hsl(22 92% 42% / 0.20), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.showcase-mega-body {
  position: relative;
  z-index: 1;
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  justify-content: center;
}
.showcase-mega-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: var(--tracking-tighter);
  color: var(--brand-200); /* AA: 5.63:1 sobre el extremo claro de la banda */
  margin: 0;
}
.showcase-mega-figure {
  display: flex;
  align-items: baseline;
  gap: 0.12em;
  margin: 0;
  line-height: 0.9;
}
.showcase-mega-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 2.5rem + 14vw, 9rem);
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--accent-400) 0%, var(--accent-500) 55%, var(--accent-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 14px 32px hsl(22 92% 42% / 0.25);
}
.showcase-mega-unit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1rem + 4vw, 3rem);
  letter-spacing: -0.02em;
  color: #fff;
}
.showcase-mega-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tighter);
  color: #fff;
  margin: 0;
  max-width: 24ch;
}
.showcase-mega-desc {
  color: hsl(0 0% 100% / 0.86);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0;
  max-width: 48ch;
}
.showcase-mega-desc strong { color: #fff; }
.showcase-mega-desc em {
  color: var(--brand-200); /* AA: 5.63:1 — sube desde brand-300 (4.10) */
  font-style: normal;
  font-weight: 600;
}
.showcase-mega-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.showcase-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: hsl(0 0% 100% / 0.06);
  border: 1px solid hsl(0 0% 100% / 0.12);
}
.showcase-stat-n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  color: var(--accent-400); /* texto grande/bold: AA-large 3.13:1; mantiene el ámbar del sistema */
  line-height: 1;
}
.showcase-stat-l {
  font-size: var(--text-xs);
  color: hsl(0 0% 100% / 0.82); /* AA: 5.23:1 — sube desde 0.72 (3.99) */
  font-weight: 600;
}
.showcase-credit {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: hsl(0 0% 100% / 0.7); /* crédito legal, texto secundario */
  margin: 0;
  max-width: 52ch;
}
.showcase-credit strong { color: hsl(0 0% 100% / 0.92); font-weight: 700; }
.showcase-mega .hero-ctas { margin-top: var(--space-2); }

.showcase-mega-media {
  position: relative;
  z-index: 1;
  margin: 0;
  aspect-ratio: 3 / 4;
  max-height: 70vh;
}
.showcase-mega-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.showcase-mega-media::after {
  /* funde el borde superior de la foto con la banda en móvil */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsl(170 55% 8% / 0.55) 0%, transparent 22%);
  pointer-events: none;
}
.showcase-mega-cap {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: hsl(170 55% 8% / 0.72); /* sube desde 0.62 para AA del texto blanco sobre cielo claro */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid hsl(0 0% 100% / 0.16);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
}
.showcase-mega-cap::before {
  /* punto de "en vivo" para reforzar «trabajo real, instalado» */
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--accent-400);
  flex: none;
}

@media (min-width: 1024px) {
  .showcase-mega {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
  .showcase-mega-body { padding: var(--space-8) var(--space-7); }
  .showcase-mega-media {
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
  }
  .showcase-mega-media::after {
    /* en desktop el degradado funde el borde izquierdo con la banda */
    background: linear-gradient(90deg, hsl(170 55% 8% / 0.85) 0%, transparent 28%);
  }
}

/* Trabajos reales — tira deslizante de casos con scroll-snap */
.works-strip-wrap { overflow: hidden; }
.works-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 78vw, 420px);
  gap: var(--space-4);
  margin: 0 auto;
  padding-top: var(--space-2);
  padding-bottom: var(--space-4);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space-4);
  -webkit-overflow-scrolling: touch;
}
.works-strip::-webkit-scrollbar { height: 8px; }
.works-strip::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
.works-strip::-webkit-scrollbar-track { background: transparent; }
.work-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: var(--hairline), var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  background: var(--gray-100);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--hairline), var(--shadow-float); }
.work-card img, .work-card video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.work-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, hsl(170 55% 8% / 0.55) 100%);
  pointer-events: none;
}
.work-cap {
  position: absolute;
  left: var(--space-3); bottom: var(--space-3);
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: hsl(170 55% 8% / 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid hsl(0 0% 100% / 0.16);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  max-width: calc(100% - var(--space-5));
}
.work-card .stretched { position: absolute; inset: 0; z-index: 3; }
@media (min-width: 768px) {
  .works-strip { grid-auto-columns: clamp(300px, 31vw, 420px); }
}


/* ============================================================
   Estabilidad de carga (CLS) y accesibilidad — auditoría 13/06
   ============================================================ */

/* Reserva el hueco del configurador y de los paneles que rellena el JS,
   SOLO mientras están vacíos (con :empty se libera al montarse, sin dejar
   espacio en blanco en productos sencillos). Reduce el salto de maquetación. */
#configurator:empty { min-height: 340px; }
#summary-panel:empty { display: block; min-height: 320px; }
.cat-filters:empty { min-height: 56px; }
.noscript-note { color: var(--gray-600); margin-top: var(--space-3); }

/* Tap targets cómodos en móvil: enlaces de migas, pie y barra superior con
   altura/área de toque suficiente y separación entre ellos. */
@media (max-width: 767px) {
  .breadcrumbs a,
  .breadcrumbs [aria-current] { display: inline-flex; align-items: center; min-height: 40px; }
  .footer-col ul { gap: var(--space-1); }
  .footer-col ul a,
  .footer-contact a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 0; }
  .topbar a { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Fuentes: 'optional' evita el reflow del texto al cargar la tipografía.
   Como ya van precargadas en el <head>, llegan a tiempo en la práctica y se
   aplican; en conexiones muy lentas se usa el fallback sin provocar saltos. */

/* ============================================================
   Galería "Así lo hicimos" (making-of del caso real) — 13/06
   ============================================================ */
.makingof { margin-top: var(--space-6); }
.makingof-title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); margin-bottom: var(--space-1); }
.makingof-sub { color: var(--gray-500); margin-bottom: var(--space-4); max-width: 60ch; }
.makingof-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 768px) { .makingof-grid { grid-template-columns: repeat(4, 1fr); } }
.makingof-item { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); box-shadow: var(--shadow-sm); }
.makingof-item picture { display: block; }
.makingof-item img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in;
  transition: transform var(--dur-slow) var(--ease-out);
}
.makingof-item:hover img { transform: scale(1.05); }
.makingof-item figcaption {
  display: flex; align-items: center; gap: 8px;
  padding: var(--space-3); font-size: var(--text-sm); color: var(--gray-700); font-weight: 600; line-height: 1.3;
}
.makingof-step {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-600); color: #fff; font-weight: 800; font-size: var(--text-xs);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Checkout multi-paso (estilo Proshop) ===== */
.co-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 var(--space-5); padding: 0; flex-wrap: wrap; }
.co-step { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 150px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--gray-50); color: var(--gray-500); font-size: var(--text-sm); font-weight: 600; }
.co-step.is-current { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-200); }
.co-step.is-done { color: var(--success); cursor: pointer; }
.co-step-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--gray-200); color: var(--gray-600); font-weight: 800; font-size: var(--text-sm); }
.co-step.is-current .co-step-n { background: var(--brand-600); color: #fff; }
.co-step.is-done .co-step-n { background: var(--success); color: #fff; }
.co-step-l { line-height: 1.1; }
@media (max-width: 640px) { .co-step-l { display: none; } .co-step { flex: 0 0 auto; min-width: 0; } .co-step.is-current { flex: 1 1 auto; } .co-step.is-current .co-step-l { display: inline; } }

.co-panel { animation: co-fade .2s ease; }
@keyframes co-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.co-h { font-size: var(--text-lg); font-weight: 800; margin: 0 0 4px; }
.co-note { color: var(--gray-500); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.co-row2 { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.co-check { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: 600; margin: 4px 0 14px; cursor: pointer; }
.co-check input { width: 18px; height: 18px; flex: none; accent-color: var(--brand-500); }
.co-check--terms { align-items: flex-start; }
.co-check--terms input { margin-top: 1px; }

.co-opts { display: flex; flex-direction: column; gap: 10px; }
.co-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: border-color .15s, background .15s; }
.co-opt:hover { border-color: var(--brand-300); }
.co-opt input { width: 20px; height: 20px; flex: none; accent-color: var(--brand-600); }
.co-opt:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-600); }
.co-opt-ic { font-size: 22px; line-height: 1; }
.co-opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-opt-main strong { font-weight: 700; }
.co-opt-sub { font-size: var(--text-sm); color: var(--gray-500); }
.co-secure { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--gray-500); margin: 14px 0 0; }
.co-alt { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px dashed var(--color-border); display: flex; flex-direction: column; gap: 8px; text-align: center; }

.co-sumh { font-size: var(--text-lg); font-weight: 800; margin: 0 0 var(--space-3); }
.co-sumlist { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow: auto; margin-bottom: var(--space-3); }
.co-sumline { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: var(--text-sm); }
.co-sumline img, .co-sumph { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); }
.co-sumtxt { display: flex; flex-direction: column; min-width: 0; }
.co-sumtxt .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-sumtxt .c { color: var(--gray-500); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-sumpr { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.co-sumrm { border: 0; background: none; color: var(--gray-400); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; line-height: 1; }
.co-sumrm:hover { color: var(--error); background: var(--error-bg); }
.co-actions { margin-top: var(--space-4); display: flex; flex-direction: column; gap: 8px; }
.co-actions .btn-lg { width: 100%; }
.co-freebar { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: var(--radius-md); padding: 10px 12px; }
.co-freebar .t { font-size: var(--text-sm); font-weight: 600; margin-bottom: 6px; }
.co-freebar .b { height: 6px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.co-freebar .b > div { height: 100%; background: var(--brand-500); }
