/* ============================================================
   Almohada Cervical Ergonómica — Landing Page
   ============================================================ */

:root {
  --primary: #000000;
  --secondary: #10b981;
  --price-color: #000000;
  --header-bg: #ffffff;
  --header-text: #111827;
  --footer-bg: #111827;

  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --border-soft: #f3f4f6;
  --bg: #ffffff;
  --bg-soft: #f9fafb;

  --radius: 8px;
  --radius-lg: 12px;
  --maxw: 1200px;

  /* Azul tomado de las imágenes del producto. Global: lo usan el bloque de
     compra y el carrito. */
  --nb-accent: #2e6bd6;
  --nb-accent-deep: #1e4fa5;
  --nb-accent-soft: #e8f0fd;
  --nb-border: #dbe6f6;
  --nb-ink: #16253d;
  --nb-muted: #5b6b80;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* `clip` (no scroll container) keeps the off-screen cart drawer from
     widening the page without breaking the sticky header. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 78px;
}

.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 50px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--header-text);
  opacity: 0.75;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active { opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.icon-btn {
  background: none;
  border: 0;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  color: var(--header-text);
  position: relative;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.icon-btn:hover { opacity: 1; }
.icon-btn svg { width: 20px; height: 20px; }

.cart-badge {
  position: absolute;
  top: -3px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.nav-toggle { display: none; }

/* ============================================================
   Breadcrumb
   ============================================================ */

.breadcrumb {
  padding: 16px 0 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "›"; color: var(--text-soft); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text-muted); }

/* ============================================================
   Product block
   ============================================================ */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: 16px 0 56px;
  align-items: start;
}

/* --- Gallery --- */

.gallery-main {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  /* El navegador conserva el scroll vertical; el gesto horizontal llega al JS. */
  touch-action: pan-y;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Evita que el navegador arrastre el fantasma de la imagen al deslizar. */
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.18s;
}

.gallery-main:hover .gallery-nav { opacity: 1; }
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-nav svg { width: 16px; height: 16px; }

/* Siempre una sola fila: en escritorio caben las 9; en móvil la fila
   se desplaza en horizontal en vez de partirse en dos. */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  /* Sin esto la fila crece más allá de la columna en vez de desplazarse. */
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumbs button {
  /* Escritorio: las 9 se reparten la columna. Móvil: tamaño fijo y la fila rueda. */
  flex: 1 1 0;
  min-width: 0;
  scroll-snap-align: start;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  transition: border-color 0.15s;
}

.gallery-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs button:hover { border-color: var(--text-soft); }
.gallery-thumbs button.is-active { border-color: var(--primary); border-width: 2px; }

/* --- Info --- */

.rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.rating-stars { display: inline-flex; gap: 2px; }

.rating-stars svg {
  width: 19px;
  height: 19px;
  fill: #f5c33b;
}

.rating-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--nb-ink, #16253d);
}

.product-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.benefits svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 3px;
  color: var(--secondary);
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.price-now {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--price-color);
}

.price-was {
  font-size: 17px;
  color: var(--text-soft);
  text-decoration: line-through;
}

.price-off {
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 999px;
  padding: 3px 10px;
}

.buy-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.05s;
}

.buy-btn:hover { opacity: 0.88; }
.buy-btn:active { transform: scale(0.995); }

.payments {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  /* Se reparten de borde a borde para cuadrar con el botón de compra. */
  justify-content: space-between;
  gap: 6px;
  margin-top: 16px;
}

/* Los 8 métodos comparten el ancho disponible y encogen para caber
   siempre en una sola línea; el max-width evita que crezcan en escritorio. */
.payments svg {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  max-width: 42px;
  aspect-ratio: 48 / 32;
}

/* ============================================================
   Bloque de compra (selector de packs)
   ============================================================ */

/* --- Lista de estrellas --- */

.star-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 13px;
}

.star-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 700;
  color: var(--nb-ink);
  line-height: 1.3;
}

.star-list span { font-size: 17px; line-height: 1; flex: 0 0 auto; }

/* --- Separador "COMPRA MÁS - AHORRA MÁS" --- */

.bundle-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.bundle-divider::before,
.bundle-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--nb-border);
}

.bundle-divider span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--nb-accent);
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Packs --- */

.bundles { display: grid; gap: 12px; }

.bundle {
  position: relative;
  display: block;
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.bundle:hover { border-color: #b9d0f0; }

.bundle.is-selected {
  border-color: var(--nb-accent);
  border-width: 2px;
  background: var(--nb-accent-soft);
}

.bundle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.bundle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}

.bundle-radio {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid #bfcfe4;
  border-radius: 999px;
  background: #fff;
  display: block;
  position: relative;
}

.bundle.is-selected .bundle-radio { border-color: var(--nb-accent); }

.bundle.is-selected .bundle-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--nb-accent);
}

.bundle-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }

.bundle-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--nb-accent);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.bundle-save {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--nb-ink);
  background: #dceafb;
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

.bundle-sub { font-size: 14.5px; color: var(--nb-muted); }

.bundle-price { text-align: right; display: grid; gap: 2px; }

.bundle-unit {
  font-size: 17px;
  font-weight: 700;
  color: var(--nb-accent);
  white-space: nowrap;
}


.bundle-was {
  font-size: 14.5px;
  color: var(--nb-muted);
  text-decoration: line-through;
}

/* Etiquetas "MÁS POPULAR" / "MEJOR OFERTA" */

.bundle-flag {
  position: absolute;
  top: -14px;
  right: -1px;
  background: var(--nb-accent-deep);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 16px;
  border-radius: 9px 9px 0 9px;
  white-space: nowrap;
  z-index: 2;
}

.bundle.is-selected .bundle-flag { right: -2px; }

/* --- Botón + garantías --- */

.product-info .buy-btn {
  margin-top: 22px;
  background: var(--nb-accent);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.assurances {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
}

.assurances li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--nb-ink);
}

/* Los iconos se alinean con la primera línea aunque el texto ocupe dos. */
.assurances svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: -1px;
  color: var(--nb-accent);
}

.product-info .payments { margin-top: 20px; }

/* ============================================================
   Posturas
   ============================================================ */

.posturas { padding: 8px 0 48px; }

.posturas h2 {
  margin: 0 0 30px;
  text-align: center;
  font-size: clamp(22px, 3vw, 31px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--nb-ink);
}

.posturas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.posturas figure { margin: 0; display: grid; gap: 14px; }

.posturas img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: var(--bg-soft);
}

.posturas figcaption {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--nb-ink);
}

@media (max-width: 820px) {
  .posturas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .posturas figcaption { font-size: 13.5px; }
}

/* ============================================================
   Description
   ============================================================ */

.description { padding: 8px 0 0; }

/* ============================================================
   Video carousel
   ============================================================ */

.videos {
  padding: 40px 0 56px;
  position: relative;
}

.videos-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px;
}

.videos-track::-webkit-scrollbar { display: none; }

.video-card {
  position: relative;
  flex: 0 0 calc((100% - 56px) / 5);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  cursor: pointer;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Botón de sonido: los vídeos se reproducen solos y en silencio. */
.video-sound {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.15s;
}

.video-sound:hover { background: rgba(0, 0, 0, 0.72); }
.video-sound svg { width: 17px; height: 17px; }

/* Alterna el icono según el estado de sonido. */
.video-sound .ico-on { display: none; }
.video-card.is-unmuted .video-sound .ico-off { display: none; }
.video-card.is-unmuted .video-sound .ico-on { display: block; }

.videos-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 5;
  color: var(--text);
}

.videos-nav.prev { left: 4px; }
.videos-nav.next { right: 4px; }
.videos-nav svg { width: 16px; height: 16px; }

/* ============================================================
   Opiniones
   ============================================================ */

.reviews { background: #f7f6f3; padding: 56px 0 60px; margin-top: 8px; }

.reviews-eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nb-accent);
}

.reviews-title {
  margin: 0 0 36px;
  text-align: center;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nb-ink);
}

/* Carrusel: 3 tarjetas por vista en escritorio, 1 en móvil. */
.reviews-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  align-items: start;
  padding: 4px;
  min-width: 0;
}

.reviews-track::-webkit-scrollbar { display: none; }

.review {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(20, 30, 50, 0.06), 0 8px 24px rgba(20, 30, 50, 0.05);
}

.review header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }

.review-avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--nb-accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review header div { display: grid; gap: 2px; min-width: 0; }
.review header strong { font-size: 15.5px; font-weight: 700; color: var(--nb-ink); }
.review-date { font-size: 13.5px; color: var(--text-muted); }

.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #16a34a;
}

.review-verified svg { width: 13px; height: 13px; flex: 0 0 13px; }

.review-stars { display: flex; gap: 3px; color: #f5b301; margin-bottom: 12px; }
.review-stars svg { width: 17px; height: 17px; }

.review h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; color: var(--nb-ink); }

.review p {
  margin: 0 0 18px;
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: #4b5563;
}

.review img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* --- Flechas y puntos --- */

.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.reviews-nav button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--nb-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.reviews-nav button:hover { opacity: 0.85; }
.reviews-nav button:disabled { opacity: 0.25; cursor: default; }
.reviews-nav svg { width: 18px; height: 18px; }

.reviews-dots { display: flex; gap: 7px; }

.reviews-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d8d5cf;
  transition: background 0.2s;
}

.reviews-dots button.is-active { background: var(--nb-accent); }

@media (max-width: 900px) {
  .review { flex: 0 0 100%; }
  .reviews-track { gap: 16px; }
  .reviews { padding: 44px 0 48px; }
}

/* ============================================================
   FAQ
   ============================================================ */

.faq { padding: 24px 0 64px; }

.faq-eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nb-accent);
}

.faq h2 {
  margin: 0 0 32px;
  text-align: center;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--nb-accent);
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  background: #f7f6f3;
  border: 1px solid var(--nb-border);
  border-radius: 20px;
  overflow: hidden;
}

.faq-item + .faq-item { border-top: 1px solid #e6e3dd; }

.faq-q {
  width: 100%;
  background: none;
  border: 0;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: var(--nb-ink);
  transition: background 0.15s;
}

.faq-q:hover { background: rgba(0, 0, 0, 0.02); }

.faq-ico {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #14151a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s;
}

.faq-ico svg { width: 17px; height: 17px; }
.faq-item.is-open .faq-ico { transform: rotate(180deg); }

.faq-a { display: none; padding: 0 24px 24px; }

.faq-a p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--nb-muted);
  max-width: 72ch;
}

.faq-item.is-open .faq-a { display: block; }

@media (max-width: 640px) {
  .faq-q { padding: 18px 16px; font-size: 15.5px; gap: 14px; }
  .faq-ico { flex: 0 0 30px; width: 30px; height: 30px; }
  .faq-a { padding: 0 16px 20px; }
  .faq-a p { font-size: 14.5px; }
}

/* ============================================================
   Trust badges
   ============================================================ */

.trust {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.trust-item svg {
  width: 26px;
  height: 26px;
  margin: 0 auto 10px;
  color: var(--text);
  stroke-width: 1.5;
}

.trust-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}

.trust-item p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--footer-bg);
  color: #d1d5db;
  padding: 48px 0 0;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-col a { color: #d1d5db; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  /* Fuerza dos filas de cuatro en vez de 6 + 2. */
  max-width: 150px;
}

.footer-payments svg { width: 30px; height: 20px; flex: 0 0 30px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: #9ca3af;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a { color: #9ca3af; transition: color 0.15s; }
.footer-social a:hover { color: #fff; }
.footer-social svg { width: 15px; height: 15px; }

/* ============================================================
   Floating buy bar
   ============================================================ */

.floating-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.floating-bar.is-visible { transform: translateY(0); }

.floating-price { display: grid; line-height: 1.2; }
.floating-price .now { font-size: 17px; font-weight: 700; }
.floating-price .was { font-size: 12px; color: var(--text-soft); text-decoration: line-through; }

.floating-bar .buy-btn { width: auto; flex: 1; padding: 13px 20px; }

/* ============================================================
   Cart drawer
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 90;
}

.overlay.is-open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  background: #fff;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}

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

.cart-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-logo { display: flex; align-items: center; }
.cart-logo img { height: 40px; width: auto; }

.cart-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  color: var(--nb-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-close svg { width: 20px; height: 20px; }

/* --- Reserva con cuenta atrás --- */

.cart-reserve {
  background: var(--nb-accent);
  color: #fff;
  text-align: center;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cart-reserve strong { font-weight: 800; }
.cart-reserve.is-expired { background: #b91c1c; }

.cart-body { flex: 1; overflow-y: auto; padding: 18px 16px; }

/* --- Barra de envío gratis --- */

.cart-ship { margin-bottom: 20px; }

.cart-ship p {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nb-accent);
}

.cart-ship-bar {
  height: 9px;
  border-radius: 999px;
  background: #e6ecf6;
  position: relative;
}

.cart-ship-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--nb-accent);
  transition: width 0.3s ease;
  position: relative;
}

.cart-ship-bar span::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--nb-accent);
}

/* --- Línea de producto --- */

.cart-line {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.cart-line img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.cart-line h4 {
  margin: 0 0 7px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--nb-ink);
}

.cart-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--nb-accent-soft);
  color: var(--nb-accent);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.cart-tag svg { width: 12px; height: 12px; }

.cart-line-price { text-align: right; display: grid; justify-items: end; gap: 3px; }
.cart-line-price s { font-size: 12.5px; color: var(--text-soft); }
.cart-line-price strong { font-size: 16px; font-weight: 800; color: var(--nb-ink); }

.cart-remove {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--text-soft);
  margin-top: 4px;
}

.cart-remove:hover { color: #b91c1c; }
.cart-remove svg { width: 19px; height: 19px; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty button {
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  color: var(--nb-ink);
  font-size: 16px;
  line-height: 1;
}

.qty button:hover { background: var(--bg-soft); }
.qty span { min-width: 32px; text-align: center; font-size: 13.5px; font-weight: 700; }

.cart-empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 36px 0; }

/* --- Upsell --- */

.cart-upsell { margin-top: 20px; }

.cart-upsell h5 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--nb-ink);
}

.cart-upsell-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}

.cart-upsell-row::-webkit-scrollbar { display: none; }

.cart-up-card {
  /* Crecen para repartirse la fila: con una sola tarjeta no queda coja. */
  flex: 1 1 148px;
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px;
  display: grid;
  gap: 7px;
  background: #fff;
  text-align: left;
}

.cart-up-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.cart-up-card b { font-size: 12.5px; font-weight: 700; color: var(--nb-ink); line-height: 1.3; }

.cart-up-price { display: flex; align-items: baseline; gap: 6px; }
.cart-up-price strong { font-size: 14px; font-weight: 800; color: var(--nb-accent); }
.cart-up-price s { font-size: 11.5px; color: var(--text-soft); }

.cart-up-card button {
  border: 0;
  border-radius: 8px;
  background: var(--nb-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px;
  width: 100%;
}

/* --- Pie --- */

.cart-foot { border-top: 1px solid var(--border); padding: 14px 16px; display: grid; gap: 12px; }

.cart-protect {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.cart-protect-ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--nb-accent-soft);
  color: var(--nb-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-protect-ico svg { width: 24px; height: 24px; }
.cart-protect-copy { display: grid; gap: 2px; }
.cart-protect-copy strong { font-size: 13.5px; font-weight: 700; color: var(--nb-ink); }
.cart-protect-copy span { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.cart-protect-price { font-size: 14px; font-weight: 800; color: var(--nb-ink); }

.cart-switch-input { position: absolute; opacity: 0; width: 0; height: 0; }

.cart-switch {
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.18s;
  flex: 0 0 44px;
}

.cart-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.cart-switch-input:checked + .cart-switch { background: var(--nb-accent); }
.cart-switch-input:checked + .cart-switch::after { transform: translateX(19px); }

.cart-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--nb-ink); }

.cart-foot .buy-btn {
  border-radius: 10px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 800;
  background: var(--nb-accent);
  letter-spacing: 0.01em;
}

.cart-trust {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--nb-accent-soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--nb-accent);
}

.cart-trust svg { width: 15px; height: 15px; flex: 0 0 15px; }

.cart-payments {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: center;
}

.cart-payments svg { flex: 1 1 0; min-width: 0; max-width: 40px; height: auto; aspect-ratio: 48/32; }

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -16px);
  background: var(--text);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .video-card { flex: 0 0 calc((100% - 42px) / 4); }
}

@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: inline-flex; order: -1; }
  .header-inner { height: 64px; }
  .logo img { height: 40px; }
  .video-card { flex: 0 0 calc((100% - 28px) / 3); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 640px) {
  .product-title { font-size: 23px; }
  .price-now { font-size: 27px; }
  .gallery-thumbs button { flex: 0 0 56px; }
  .video-card { flex: 0 0 62%; }
  .videos-nav { display: none; }
  .assurances { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  body { padding-bottom: 72px; }
}
