/* =========================================================
   MICROFIX — Computación & Microelectrónica
   Hoja de estilos principal
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.2vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.45rem, 1.2rem + 1.1vw, 2.1rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --maxw: 1240px;
  --gutter: 5vw;
  --gutter: clamp(1.1rem, 5vw, 3.5rem);
  --header-h: 74px;

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark (default) */
:root,
[data-theme='dark'] {
  --bg: #070c14;
  --surface: #0c1522;
  --surface-2: #111e2e;
  --surface-3: #16283c;
  --border: #1d3247;
  --divider: #16263a;
  --text: #e8f1f8;
  --text-muted: #9db1c4;
  --text-faint: #6a8098;
  --primary: #35b6e0;
  --primary-hover: #55c8ec;
  --primary-ink: #04121c;
  --deep: #123f63;
  --ok: #2fbf7d;
  --warn: #e0a034;
  --shadow: 0 18px 45px -20px rgba(0, 0, 0, 0.85);
  --glow: 0 0 0 1px rgba(53, 182, 224, 0.25), 0 12px 40px -18px rgba(53, 182, 224, 0.55);
  --logo-dark: none;
  --logo-light: block;
}

[data-theme='light'] {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --surface-3: #e3ecf4;
  --border: #d3dfea;
  --divider: #e2eaf2;
  --text: #0e1c2b;
  --text-muted: #4d6478;
  --text-faint: #7f94a6;
  --primary: #0f6f93;
  --primary-hover: #0b5a79;
  --primary-ink: #ffffff;
  --deep: #123f63;
  --ok: #17845a;
  --warn: #9a6410;
  --shadow: 0 16px 40px -24px rgba(16, 40, 64, 0.4);
  --glow: 0 0 0 1px rgba(15, 111, 147, 0.18), 0 12px 32px -20px rgba(15, 111, 147, 0.5);
  --logo-dark: block;
  --logo-light: none;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 var(--space-4);
  font-weight: 800;
}

h1 {
  font-size: var(--text-2xl);
}
h2 {
  font-size: var(--text-xl);
}
h3 {
  font-size: var(--text-lg);
  font-weight: 700;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
}

::selection {
  background: var(--primary);
  color: var(--primary-ink);
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section--tight {
  padding-block: clamp(var(--space-12), 6vw, var(--space-16));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--primary);
  opacity: 0.7;
}

.lead {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 60ch;
}

.muted {
  color: var(--text-muted);
}

.center {
  text-align: center;
}

.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-12);
}

.section-head.center {
  margin-inline: auto;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.78rem 1.35rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
  line-height: 1.2;
  text-align: center;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-ink);
}
.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--wa {
  background: #25d366;
  color: #05240f;
}
.btn--wa:hover {
  background: #33e074;
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: var(--text-xs);
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 65px;
  width: auto;
}

.brand .logo-on-dark {
  display: var(--logo-light);
}
.brand .logo-on-light {
  display: var(--logo-dark);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a.is-active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.cart-count[hidden] {
  display: none;
}

.burger {
  display: none;
}

/* Menú móvil */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0 var(--space-6);
  transform: translateY(-120%);
  transition: transform 0.35s var(--ease);
  z-index: 55;
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  transform: translateY(0);
}

.mobile-nav a {
  display: block;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--divider);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  border-bottom: 1px solid var(--divider);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

[data-theme='light'] .hero__bg img {
  opacity: 0.2;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--bg) 18%, color-mix(in srgb, var(--bg) 72%, transparent) 55%, color-mix(in srgb, var(--bg) 35%, transparent) 100%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero__inner {
  max-width: 44rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.hero__panel {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero__panel-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.hero__link:hover,
.hero__link:focus-visible {
  background: var(--surface-2);
  border-color: var(--border);
}

.hero__link-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
}

.hero__link-ico svg {
  width: 21px;
  height: 21px;
}

.hero__link b {
  display: block;
  font-size: var(--text-sm);
  line-height: 1.3;
}

.hero__link small {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.hero__link i {
  font-style: normal;
  color: var(--text-faint);
  transition: transform 0.2s, color 0.2s;
}

.hero__link:hover i {
  color: var(--primary);
  transform: translateX(3px);
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero__panel-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .hero__panel {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-3);
  }
}

.hero h1 {
  margin-bottom: var(--space-5);
}

.hero h1 .accent {
  color: var(--primary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--divider);
}

@media (max-width: 620px) {
  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-4);
  }
}

.stat b {
  display: block;
  font-size: var(--text-xl);
  color: var(--text);
  letter-spacing: -0.03em;
}

.stat span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-weight: 700;
}

/* ---------- Grid utilidades ---------- */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(268px, 100%), 1fr));
}
.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p:last-child {
  margin-bottom: 0;
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  margin-bottom: var(--space-5);
}

.card__icon svg {
  width: 23px;
  height: 23px;
}

.card--flat:hover {
  transform: none;
}

.figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lista con check */
.ticks {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.ticks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* Franja de confianza */
.strip {
  background: var(--surface);
  border-block: 1px solid var(--divider);
  padding-block: var(--space-8);
}

.strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}

.strip__item span {
  display: block;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .strip__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.strip__item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.strip__item svg {
  width: 21px;
  height: 21px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.strip__item b {
  display: block;
  font-size: var(--text-sm);
}

.strip__item span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Pasos */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  padding: var(--space-6);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.steps li::before {
  content: '0' counter(step);
  display: block;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.steps b {
  display: block;
  margin-bottom: var(--space-2);
}

.steps p {
  font-size: var(--text-sm);
  margin: 0;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--deep), #08202f);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  text-align: center;
  color: #eaf6fc;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 182, 224, 0.35), transparent 65%);
  top: -220px;
  right: -140px;
}

.cta > * {
  position: relative;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: #b8d5e6;
  max-width: 52ch;
  margin-inline: auto;
}

.cta__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

.cta .btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cta .btn--ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Tienda ---------- */
.shop-hero {
  border-bottom: 1px solid var(--divider);
  padding-block: var(--space-16);
  position: relative;
  overflow: hidden;
}

.shop-hero__bg {
  position: absolute;
  inset: 0;
}

.shop-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.shop-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 20%, transparent 90%);
}

.shop-hero .wrap {
  position: relative;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--primary);
}

.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.search-box {
  position: relative;
  min-width: 0;
  flex: 1 1 240px;
  max-width: 100%;
}

.search-box input {
  width: 100%;
  padding: 0.62rem 0.9rem 0.62rem 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr));
  gap: var(--space-5);
}

.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.product:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: var(--shadow);
}

.product__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product:hover .product__media img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--primary-ink);
}

.badge--used {
  background: var(--warn);
  color: #150e02;
}

.badge--out {
  background: var(--surface-3);
  color: var(--text-muted);
}

.product__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.product__cat {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-weight: 700;
}

.product__name {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.product__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.product__price {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.product__price small {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0;
}

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.product__actions .btn {
  flex: 1 1 110px;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.skeleton {
  border-radius: var(--radius-lg);
  height: 340px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: sk 1.3s infinite linear;
}

@keyframes sk {
  to {
    background-position: -220% 0;
  }
}

/* ---------- Carrito lateral ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 15, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 80;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(420px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  transform: translateX(105%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer__head {
  padding: var(--space-5);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer__head h3 {
  margin: 0;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.drawer__foot {
  padding: var(--space-5);
  border-top: 1px solid var(--divider);
  display: grid;
  gap: var(--space-3);
}

.cart-line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
}

.cart-line img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.cart-line b {
  display: block;
  font-size: var(--text-sm);
  line-height: 1.3;
}

.cart-line small {
  color: var(--text-faint);
  font-size: var(--text-xs);
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.qty button {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
}

.qty button:hover {
  background: var(--surface-3);
  color: var(--primary);
}

.qty span {
  min-width: 20px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
}

.line-price {
  font-weight: 700;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.link-remove {
  background: none;
  border: 0;
  color: var(--text-faint);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}

.link-remove:hover {
  color: var(--primary);
}

.totals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 800;
  font-size: var(--text-lg);
}

/* ---------- Formularios ---------- */
.form {
  display: grid;
  gap: var(--space-4);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 620px) {
  .field--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-note {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.alert {
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.alert--ok {
  border-color: color-mix(in srgb, var(--ok) 50%, var(--border));
  color: var(--ok);
}

.alert--err {
  border-color: color-mix(in srgb, #e0554d 50%, var(--border));
  color: #e0554d;
}

/* ---------- Página interna ---------- */
.page-hero {
  padding-block: var(--space-16) var(--space-12);
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.page-hero__grid > :only-child {
  grid-column: 1 / -1;
}

.page-hero__aside {
  list-style: none;
  margin: 0;
  padding: var(--space-2) var(--space-5);
  display: grid;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border);
}

.page-hero__aside li {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--divider);
}

.page-hero__aside li:last-child {
  border-bottom: 0;
}

.page-hero__ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.page-hero__ico svg {
  width: 20px;
  height: 20px;
}

.page-hero__aside b {
  display: block;
  font-size: var(--text-sm);
}

.page-hero__aside span:not(.page-hero__ico) {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .page-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-hero__aside {
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    column-gap: var(--space-5);
  }
  .page-hero__aside li {
    border-bottom: 0;
  }
}

.breadcrumb {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Acordeón */
.acc {
  border-top: 1px solid var(--divider);
}

.acc__item {
  border-bottom: 1px solid var(--divider);
}

.acc__btn {
  width: 100%;
  background: none;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  text-align: left;
  padding: var(--space-5) var(--space-8) var(--space-5) 0;
  cursor: pointer;
  position: relative;
}

.acc__btn::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 22px;
  font-weight: 400;
}

.acc__item.open .acc__btn::after {
  content: '−';
}

.acc__panel {
  display: none;
  padding-bottom: var(--space-5);
}

.acc__item.open .acc__panel {
  display: block;
}

.acc__panel p {
  margin: 0;
  font-size: var(--text-sm);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding-block: var(--space-16) var(--space-8);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-8);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-footer h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.site-footer a,
.site-footer li {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--primary);
}

.site-footer .brand img {
  height: 40px;
  margin-bottom: var(--space-4);
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25d366;
  color: #05240f;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.7);
  transition: transform 0.25s var(--ease);
}

.wa-float:hover {
  transform: scale(1.08);
}

.wa-float svg {
  width: 27px;
  height: 27px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 140%);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 120;
  transition: transform 0.35s var(--ease);
  box-shadow: var(--shadow);
}

.toast.show {
  transform: translate(-50%, 0);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive header ---------- */
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  .burger {
    display: grid;
  }
  .header-actions {
    margin-left: auto;
  }
}

/* Utilidades */
.stack-sm > * + * {
  margin-top: var(--space-3);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-0 {
  margin-bottom: 0;
}

/* =========================================================
   Ficha de producto
   ========================================================= */
.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Tarjeta: foto y nombre abren la ficha */
.product__media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.product__media:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.product__peek {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.product:hover .product__peek,
.product__media:focus-visible .product__peek {
  opacity: 1;
  transform: none;
}

.product__name button {
  all: unset;
  cursor: pointer;
  transition: color 0.2s;
}

.product__name button:hover,
.product__name button:focus-visible {
  color: var(--primary);
}

.spec-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.spec-mini li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--divider);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.spec-mini .ico {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

/* Contenedor modal */
html.ficha-open,
html.ficha-open body {
  overflow: hidden;
}

.pmodal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(0px, 3vh, 32px) clamp(0px, 3vw, 32px);
}

.pmodal[hidden] {
  display: none;
}

.pmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 15, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s;
}

.pmodal__panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.28s var(--ease), transform 0.35s var(--ease);
  outline: none;
}

.pmodal.open .pmodal__backdrop {
  opacity: 1;
}

.pmodal.open .pmodal__panel {
  opacity: 1;
  transform: none;
}

.pmodal__bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-3) clamp(var(--space-4), 3vw, var(--space-8));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

.pmodal__back {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.4rem 0;
  transition: color 0.2s;
}

.pmodal__back:hover,
.pmodal__back:focus-visible {
  color: var(--primary);
}

.pmodal__crumbs {
  display: flex;
  gap: 0.45rem;
  font-size: var(--text-sm);
  color: var(--text-faint);
  padding-left: var(--space-5);
  border-left: 1px solid var(--divider);
}

.pmodal__crumbs button {
  all: unset;
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.pmodal__crumbs button:hover {
  text-decoration: underline;
}

.pmodal__x {
  margin-left: auto;
}

/* Layout de la ficha */
.pd {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas:
    'head head'
    'gal  buy'
    'desc desc'
    'more more';
  column-gap: clamp(var(--space-6), 4vw, var(--space-12));
  padding: clamp(var(--space-5), 3vw, var(--space-8)) clamp(var(--space-4), 3vw, var(--space-8)) var(--space-12);
}

.pd__head {
  grid-area: head;
  margin-bottom: var(--space-6);
}

.pd__cond {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.pd__cond.is-used {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
}

.pd__title {
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  max-width: 34ch;
}

.pd__meta {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* Galería */
.pd__gallery {
  grid-area: gal;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    'thumbs stage'
    'strip  strip';
  gap: var(--space-3);
  align-content: start;
}

.pd__gallery:not(:has(.pd__thumbs)) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'stage' 'strip';
}

.pd__thumbs {
  grid-area: thumbs;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pd__thumb {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  aspect-ratio: 1;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.pd__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd__thumb:hover,
.pd__thumb.is-active {
  opacity: 1;
}

.pd__thumb.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.pd__stage {
  grid-area: stage;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pd__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd__stage img.is-in {
  animation: galIn 0.35s var(--ease);
}

@keyframes galIn {
  from {
    opacity: 0.35;
    transform: scale(1.015);
  }
}

.pd__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pd__nav:hover {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}

.pd__nav .ico {
  width: 20px;
  height: 20px;
}

.pd__nav--prev {
  left: var(--space-3);
}

.pd__nav--next {
  right: var(--space-3);
}

.pd__count {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--text-muted);
}

/* Resumen de specs con íconos */
.spec-strip {
  grid-area: strip;
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
  gap: var(--space-2);
}

.spec-strip li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.spec-strip .ico {
  width: 26px;
  height: 26px;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.spec-strip__t {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.spec-strip b {
  font-size: var(--text-lg);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Panel de compra */
.pd__buy {
  grid-area: buy;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-self: start;
}

.pd__price {
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pd__price-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pd__price strong {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0.2rem 0 0.35rem;
}

.pd__price small {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.pd__pay {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pd__pay p {
  margin: 0.4rem 0 0;
  font-size: var(--text-xs);
  line-height: 1.55;
}

.pd__pay b {
  color: var(--text);
}

.pd__pay-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--text);
}

.pd__pay-head .ico {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

.pd__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.pd__facts li {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--divider);
}

.pd__facts li:last-child {
  border-bottom: 0;
}

.ico--fact {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border);
}

.pd__facts li.is-ok .ico--fact {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  color: var(--ok);
}

.pd__facts li.is-out .ico--fact {
  color: var(--text-faint);
}

.pd__facts b {
  display: block;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd__facts span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pd__cta {
  display: flex;
  gap: var(--space-2);
}

.pd__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.pd__qty button {
  width: 40px;
  height: 46px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 999px;
}

.pd__qty button:hover {
  color: var(--primary);
}

.pd__qty output {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 800;
}

.pd__add {
  flex: 1;
}

.pd__buy .btn .ico {
  width: 18px;
  height: 18px;
}

/* Bloques inferiores */
.pd__block {
  grid-column: 1 / -1;
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid var(--divider);
}

.pd__desc {
  grid-area: desc;
  margin-top: var(--space-10);
}

.pd__block h3 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-5);
}

.pd__desc p {
  margin: 0;
  max-width: 78ch;
  color: var(--text-muted);
  line-height: 1.7;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
  gap: var(--space-8) var(--space-6);
}

.spec-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ico--spec {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 10px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}

.spec-group h4 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spec-group dl {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.spec-group dl div {
  display: flex;
  gap: 0.4rem;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.spec-group dt {
  color: var(--text-faint);
  flex: none;
}

.spec-group dt::after {
  content: ':';
}

.spec-group dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.pd__related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: var(--space-4);
}

.rel {
  all: unset;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  padding: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.rel:hover,
.rel:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.rel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.rel__name {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
}

.rel__price {
  font-weight: 800;
  color: var(--primary);
}

/* Tablet */
@media (max-width: 900px) {
  .pd {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'head' 'gal' 'buy' 'desc' 'more';
  }

  .pd__buy {
    position: static;
    margin-top: var(--space-6);
  }

  .pmodal__crumbs {
    display: none;
  }
}

/* Celular: ventana a pantalla completa y miniaturas abajo */
@media (max-width: 640px) {
  .pmodal {
    padding: 0;
  }

  .pmodal__panel {
    border-radius: 0;
    border: 0;
  }

  .pd__gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'stage' 'thumbs' 'strip';
  }

  .pd__thumbs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .pd__thumb {
    width: 64px;
    flex: none;
  }

  .pd__nav {
    width: 36px;
    height: 36px;
  }

  .spec-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specs-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .pd__related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pmodal__panel,
  .pmodal__backdrop,
  .pd__stage img.is-in {
    transition: none;
    animation: none;
  }
}
