/* =====================================================================
   estilos.css: diseño de la tienda.
   Paleta navideña sobria: rojo profundo, verde pino, dorado y crema.
   Colores, tipografía y medidas viven en :root. Móvil primero.
   ===================================================================== */

:root {
  --rojo: #8f1d2c;
  --rojo-oscuro: #5c1220;
  --verde: #1b4a38;
  --verde-oscuro: #0f2a1f;
  --verde-noche: #0a1f17;
  --dorado: #c9a227;
  --dorado-claro: #e6c75f;
  --dorado-suave: rgba(201, 162, 39, 0.35);
  --crema: #f6efe3;
  --marfil: #fffaf2;
  --tinta: #241b1b;
  --tinta-suave: #6e615d;
  --borde: #e3d8c6;
  --whatsapp: #25d366;
  --whatsapp-texto: #0b3d22;
  --sombra: 0 10px 30px rgba(36, 27, 27, 0.12);
  --sombra-suave: 0 2px 10px rgba(36, 27, 27, 0.06);
  --radio: 16px;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --fuente-titulo: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ancho: 1120px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--fuente);
  color: var(--tinta);
  background: var(--crema);
  line-height: 1.5;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .marca {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 3px solid var(--dorado);
  outline-offset: 2px;
}

/* Títulos de sección con una línea dorada corta debajo */
.titulo-seccion {
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  line-height: 1.15;
  color: var(--rojo-oscuro);
}
.titulo-seccion::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--dorado);
}

/* ---------- Accesibilidad ---------- */
.saltar {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 12px;
  background: var(--tinta);
  color: #fff;
  border-radius: 8px;
  z-index: 100;
}
.saltar:focus { left: 8px; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(246, 239, 227, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dorado-suave);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rojo-oscuro);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
}
@media (min-width: 560px) {
  .marca { font-size: 1.15rem; }
}
.marca::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background: var(--dorado);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.boton-carrito {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--marfil);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sombra-suave);
}
.boton-carrito svg { width: 22px; height: 22px; }
.boton-carrito__num {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--rojo);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.boton-carrito__num[hidden] { display: none; }

/* ---------- Portada: escena por capas ---------- */
.portada {
  position: relative;
  overflow: hidden;
  color: var(--crema);
  background:
    radial-gradient(ellipse 70% 55% at 85% 95%, rgba(230, 199, 95, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(27, 74, 56, 0.9), transparent 70%),
    linear-gradient(180deg, var(--verde-oscuro), var(--verde-noche));
}
.portada__interior {
  position: relative;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 40px 16px 0;
  display: grid;
  gap: 24px;
}
.portada__texto-bloque {
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: 34rem;
}
.portada h1 {
  font-size: clamp(2.15rem, 7.4vw, 3.7rem);
  line-height: 1.04;
  font-weight: 600;
  color: var(--marfil);
}
.portada h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--dorado-claro);
}
.portada__texto {
  font-size: 1.05rem;
  max-width: 30em;
  color: rgba(246, 239, 227, 0.86);
}
.portada__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.escena {
  position: relative;
  height: min(118vw, 470px);
  margin: 0 -16px;
}
.escena__luz {
  position: absolute;
  right: -4%;
  bottom: -8%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 199, 95, 0.32), rgba(230, 199, 95, 0) 62%);
  pointer-events: none;
}
.escena::after {
  /* Sombra en el piso bajo el gnomo */
  content: "";
  position: absolute;
  right: 6%;
  bottom: 2px;
  width: 58%;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%);
}
.escena__gnomo {
  position: absolute;
  right: 3%;
  bottom: 0;
  z-index: 2;
  width: min(70%, 400px);
  height: auto;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.45));
  animation: aparecer 0.9s ease-out both;
}
/* Esferas colgando de hilos dorados, a distintas profundidades */
.escena__colgante {
  position: absolute;
  top: -8px;
  left: var(--x);
  display: grid;
  justify-items: center;
  transform-origin: 50% 0;
  animation: balanceo 2.6s cubic-bezier(0.3, 0.6, 0.3, 1) both;
  animation-delay: var(--retraso, 0s);
}
.escena__hilo {
  position: relative;
  width: 2px;
  height: calc(var(--largo) + var(--extra, 0px));
  background: linear-gradient(180deg, rgba(230, 199, 95, 0) 0, rgba(230, 199, 95, 0.55) 40%, var(--dorado-claro));
}
.escena__hilo::after {
  /* Capuchón dorado de la esfera */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 14px;
  height: 11px;
  transform: translateX(-50%);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, var(--dorado-claro), #9a7a16);
}
.escena__colgante img {
  width: var(--d);
  height: var(--d);
  margin-top: 2px;
  border-radius: 50%;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45));
}
.escena__colgante--1 { --x: 4%; --largo: 190px; --d: 150px; --retraso: 0.1s; z-index: 3; }
.escena__colgante--2 { --x: 56%; --largo: 60px; --d: 100px; --retraso: 0.35s; z-index: 1; opacity: 0.92; }
.escena__colgante--3 { --x: 30%; --largo: 120px; --d: 118px; --retraso: 0.2s; z-index: 2; }

@keyframes balanceo {
  0% { transform: rotate(-6deg); }
  45% { transform: rotate(4deg); }
  75% { transform: rotate(-1.5deg); }
  100% { transform: rotate(0); }
}
@keyframes aparecer {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 560px) {
  .escena { height: 470px; margin: 0; }
  .escena__colgante--1 { --x: 8%; --d: 170px; --largo: 200px; }
  .escena__colgante--2 { --x: 52%; --d: 110px; --largo: 60px; }
  .escena__colgante--3 { --x: 32%; --d: 130px; --largo: 120px; }
}
@media (min-width: 880px) {
  .portada__interior {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: end;
    gap: 32px;
    padding: 64px 24px 0;
  }
  .portada__texto-bloque { padding-bottom: 72px; }
  .portada h1 { font-size: clamp(2.6rem, 4.6vw, 3.9rem); }
  .escena { height: 540px; }
  .escena__gnomo { width: min(74%, 430px); right: 0; }
  /* Los hilos nacen en el borde superior de la portada (64px de relleno) */
  .escena__colgante { top: -64px; --extra: 64px; }
  .escena__colgante--1 { --x: 2%; --d: 180px; --largo: 170px; }
  .escena__colgante--2 { --x: 44%; --d: 112px; --largo: 70px; }
  .escena__colgante--3 { --x: 24%; --d: 136px; --largo: 215px; }
}

/* ---------- Aviso ---------- */
.aviso {
  max-width: var(--ancho);
  margin: 24px auto 0;
  padding: 10px 16px;
  border-left: 4px solid var(--dorado);
  background: var(--marfil);
  font-size: 0.95rem;
}
.aviso[hidden] { display: none; }

/* ---------- Catálogo ---------- */
.catalogo {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 36px 16px 56px;
}
.catalogo h2 { margin-bottom: 16px; }

.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.filtros::-webkit-scrollbar { display: none; }
.filtros[hidden] { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--marfil);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip[aria-pressed="true"] {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}

.rejilla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 720px) {
  .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1000px) {
  .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.vacio {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--tinta-suave);
}

/* ---------- Tarjeta ---------- */
.tarjeta {
  display: flex;
  flex-direction: column;
  background: var(--marfil);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra-suave);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
  .tarjeta:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
}
.tarjeta__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: pointer;
}
.tarjeta__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.is-agotado .tarjeta__media img { filter: grayscale(1); opacity: 0.7; }

.insignia {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--dorado);
  color: #3d2e00;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.insignia--oferta { background: var(--rojo); color: #fff; }
.insignia--agotado { background: var(--tinta); color: #fff; }
.tarjeta__video {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 42, 31, 0.8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.tarjeta__video::before { content: "▶ "; font-size: 0.6rem; }

.tarjeta__cuerpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}
.tarjeta__nombre { font-size: 1.05rem; line-height: 1.25; }
.tarjeta__nombre button {
  all: unset;
  cursor: pointer;
  font: inherit;
  color: var(--tinta);
}
.tarjeta__nombre button:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }
.tarjeta__desc {
  font-size: 0.875rem;
  color: var(--tinta-suave);
}
.tarjeta__precio {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rojo-oscuro);
}
.tarjeta__precio s,
.ficha__precio s {
  margin-left: 6px;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--tinta-suave);
}
.tarjeta__acciones {
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.tarjeta__acciones .boton {
  padding-left: 8px;
  padding-right: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.boton:hover { filter: brightness(1.06); }
.boton:active { transform: scale(0.98); }
.boton--primario { background: var(--rojo); color: #fff; }
.boton--whatsapp { background: var(--whatsapp); color: var(--whatsapp-texto); }
.boton--texto { background: transparent; color: var(--tinta-suave); }
.boton--dorado { background: var(--dorado-claro); color: var(--verde-noche); }
.boton--contorno {
  background: transparent;
  color: var(--marfil);
  border-color: rgba(246, 239, 227, 0.45);
}
.boton--contorno:hover { background: rgba(246, 239, 227, 0.08); }
.boton--grande { min-height: 54px; font-size: 1.05rem; }
.boton--chico { min-height: 40px; padding: 6px 14px; font-size: 0.9rem; border-radius: 999px; }
.boton--ancho { grid-column: 1 / -1; }
.precio-desde {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tinta-suave);
  margin-right: 2px;
}

/* Presentaciones (media docena, caja completa, combinada) */
.presentaciones,
.combinar { margin-top: 14px; }
.combinar[hidden] { display: none; }
.presentacion,
.combinar__opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.presentacion:has(input:checked),
.combinar__opcion:has(input:checked) {
  border-color: var(--rojo);
  box-shadow: inset 0 0 0 1px var(--rojo);
  background: #fff8f0;
}
.presentacion input,
.combinar__opcion input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--rojo);
}
.presentacion__texto {
  flex: 1;
  display: grid;
}
.presentacion__texto small {
  font-size: 0.8rem;
  color: var(--tinta-suave);
}
.presentacion__precio { font-weight: 700; color: var(--rojo-oscuro); }
.combinar__opcion img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}
.combinar__vista {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.combinar__vista:empty { display: none; }
.combinar__titulo {
  font-size: 0.9rem;
  font-weight: 700;
}
.combinar__vista img,
.combinar__vista video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #111;
}
.precio-pendiente {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tinta-suave);
}
.boton:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cómo pedir ---------- */
.como-pedir {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 16px 56px;
}
.como-pedir h2 { margin-bottom: 16px; }
.pasos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: paso;
}
@media (min-width: 720px) {
  .pasos { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.pasos li {
  counter-increment: paso;
  padding: 18px;
  background: var(--marfil);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.pasos li::before {
  content: counter(paso);
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--verde-oscuro);
  color: var(--dorado-claro);
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  font-weight: 600;
}
.pasos strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- Puntos de entrega ---------- */
.puntos {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 16px 56px;
}
.puntos[hidden] { display: none; }
.puntos h2 { margin-bottom: 10px; }
.puntos__intro { color: var(--tinta-suave); margin-bottom: 12px; }
.puntos__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 720px) {
  .puntos__lista { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.punto {
  display: grid;
  gap: 4px;
  padding: 18px;
  background: var(--marfil);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.punto__nombre {
  font-family: var(--fuente-titulo);
  font-size: 1.15rem;
  font-weight: 600;
}
.punto__dato { font-size: 0.9rem; color: var(--tinta-suave); }
.punto__mapa { color: var(--verde); font-weight: 700; }
.punto__distancia { font-weight: 700; color: var(--verde); }
.punto.is-cercano {
  border-color: var(--dorado);
  box-shadow: inset 0 0 0 1px var(--dorado), var(--sombra-suave);
}

/* ---------- Formas de pago ---------- */
.pago {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 16px 56px;
}
.pago h2 { margin-bottom: 10px; }
.pago__intro { color: var(--tinta-suave); margin-bottom: 12px; }
.pago__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 560px) {
  .pago__lista { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
.pago__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 18px;
  background: var(--marfil);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
}
.pago__icono {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verde-oscuro);
  color: var(--dorado-claro);
}
.pago__icono svg { width: 26px; height: 26px; }
.pago__nombre {
  font-family: var(--fuente-titulo);
  font-size: 1.15rem;
  font-weight: 600;
}
.pago__dato { font-size: 0.9rem; color: var(--tinta-suave); }

/* ---------- Mapa de puntos de entrega ---------- */
.mapa-bloque { margin: 4px 0 16px; }
.mapa__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mapa {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 280px;
  margin-top: 10px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  background: #e9e4da;
}
.mapa[hidden] { display: none; }
.mapa--chico { height: 240px; }
@media (min-width: 720px) {
  .mapa { height: 380px; }
  .mapa--chico { height: 280px; }
}
.mapa__aviso {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.mapa__aviso:empty { display: none; }
.mapa__error {
  padding: 16px;
  color: var(--tinta-suave);
}
.mapa .leaflet-container { font-family: inherit; font-size: 0.85rem; }
.mapa__pin {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rojo);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.mapa__pin.is-cercano { background: var(--verde); }
.mapa .leaflet-popup-content { margin: 10px 12px; line-height: 1.4; }
.mapa .leaflet-popup-content a { color: var(--verde); font-weight: 700; }

/* ---------- Pie ---------- */
.pie {
  padding: 32px 16px 96px;
  text-align: center;
  background: var(--verde-noche);
  color: var(--crema);
  font-size: 0.95rem;
  border-top: 1px solid var(--dorado-suave);
}
.pie p + p { margin-top: 8px; }
.pie a { color: var(--dorado-claro); }
.pie__marca {
  font-family: var(--fuente-titulo);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--marfil);
}

/* ---------- Diálogos (ficha y carrito) ---------- */
dialog.dialogo {
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--marfil);
  color: var(--tinta);
  box-shadow: var(--sombra);
}
dialog.dialogo::backdrop { background: rgba(10, 31, 23, 0.6); }
@media (min-width: 720px) {
  dialog.dialogo {
    width: min(92vw, 880px);
    margin: auto;
    border-radius: var(--radio);
  }
  dialog.dialogo--carrito { width: min(92vw, 560px); }
}

.dialogo__cuerpo {
  position: relative;
  max-height: 92vh;
  overflow: auto;
  padding: 20px 16px 28px;
}
.dialogo__cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: var(--crema);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.dialogo__titulo {
  font-size: 1.5rem;
  margin-bottom: 12px;
  padding-right: 48px;
}

/* Ficha */
.ficha { display: grid; gap: 16px; }
@media (min-width: 720px) {
  .ficha { grid-template-columns: 1fr 1fr; gap: 24px; }
}
/* Galería deslizable: foto, video, más fotos */
.galeria { position: relative; }
.galeria__pista {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.galeria__pista::-webkit-scrollbar { display: none; }
.galeria__diapositiva {
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.galeria__diapositiva img,
.galeria__diapositiva video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.galeria__diapositiva--video { background: #111; }
.galeria__diapositiva--video video { object-fit: contain; }
.galeria__flecha {
  position: absolute;
  top: calc(50% - 20px);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.92);
  box-shadow: var(--sombra);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.galeria__flecha--izq { left: 8px; }
.galeria__flecha--der { right: 8px; }
@media (hover: hover) and (min-width: 720px) {
  .galeria__flecha { display: grid; place-items: center; }
}
.galeria__puntos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.galeria__punto {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--borde);
  cursor: pointer;
}
.galeria__punto.is-activo { background: var(--rojo); }
.galeria__punto--video {
  width: auto;
  height: auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tinta-suave);
}
.galeria__punto--video::before { content: "Video"; }
.galeria__punto--video.is-activo { color: #fff; }
.galeria__ayuda {
  margin-top: 6px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}
.galeria__ayuda[hidden] { display: none; }
.ficha__titulo {
  font-size: 1.6rem;
  line-height: 1.15;
  padding-right: 48px;
}
.ficha__precio {
  margin-top: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rojo-oscuro);
}
.ficha__descripcion { margin-top: 12px; }

/* Colores: el mismo adorno en otro color es otro producto; al elegirlo cambia la ficha */
.colores { margin-top: 14px; }
.colores__titulo {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: var(--tinta-suave);
}
.colores__titulo b { color: var(--tinta); }
.colores__lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}
.color-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.color-chip[aria-pressed="true"] {
  border-color: var(--rojo);
  box-shadow: inset 0 0 0 1px var(--rojo);
  background: #fff8f0;
  cursor: default;
}

/* Tarjeta del otro color, al final de la ficha */
.relacionado {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: #fff;
}
.relacionado__titulo {
  grid-column: 1 / -1;
  font-size: 0.875rem;
  color: var(--tinta-suave);
}
.relacionado__media {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.relacionado__media img {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  object-fit: cover;
}
.relacionado__nombre {
  font-family: var(--fuente-titulo);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}
.relacionado__precio { font-weight: 700; color: var(--rojo-oscuro); margin-top: 2px; }
.relacionado .boton {
  grid-column: 1 / -1;
  min-height: 42px;
}
@media (min-width: 480px) {
  .relacionado { grid-template-columns: 84px 1fr auto; }
  .relacionado .boton { grid-column: auto; }
}
.ficha__disponibilidad {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--rojo);
}
.linea__unico {
  font-size: 0.85rem;
  color: var(--tinta-suave);
}
.detalles {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 14px 0 0;
  font-size: 0.9rem;
}
.detalles dt { color: var(--tinta-suave); }
.detalles dd { margin: 0; }

/* Formularios */
.campo { display: block; margin-top: 14px; }
.campo > span:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: 0.875rem;
  color: var(--tinta-suave);
}
select,
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: inherit;
}
textarea { resize: vertical; }

.cantidad {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--borde);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.cantidad button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--crema);
  font-size: 1.2rem;
  cursor: pointer;
}
.cantidad input[type="number"] {
  width: 56px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  text-align: center;
  -moz-appearance: textfield;
}
.cantidad input::-webkit-outer-spin-button,
.cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cantidad > span {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
}

.acciones {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
@media (min-width: 480px) {
  .acciones { grid-template-columns: 1fr 1fr; }
  .acciones--columna { grid-template-columns: 1fr; }
}

fieldset {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 0.875rem;
  color: var(--tinta-suave);
}
.opcion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 40px;
  padding: 6px 0;
}
.opcion input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--rojo); }
.opcion small {
  display: block;
  font-size: 0.8rem;
  color: var(--tinta-suave);
}
.opcion b { color: var(--verde); }
.mapa-bloque--carrito { margin: 10px 0 0; }
.mapa-bloque--carrito .mapa__acciones { align-items: center; }
.mapa-bloque--carrito .boton--dorado { box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35); }
.mapa-bloque--carrito .boton--texto {
  min-height: 40px;
  padding: 6px 8px;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Carrito */
.lineas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.linea {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--borde);
}
.linea img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}
.linea__nombre { font-weight: 700; }
.linea__detalle { font-size: 0.85rem; color: var(--tinta-suave); }
.linea__precio { font-weight: 700; margin-top: 2px; color: var(--rojo-oscuro); }
.linea__controles {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 480px) {
  .linea { grid-template-columns: 64px 1fr auto; align-items: center; }
  .linea__controles { grid-column: auto; flex-direction: column; align-items: flex-end; }
}
.linea__quitar {
  border: 0;
  background: transparent;
  color: var(--tinta-suave);
  text-decoration: underline;
  cursor: pointer;
  min-height: 32px;
}
.total {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--dorado);
  font-size: 1.2rem;
}
.total strong { color: var(--rojo-oscuro); }
.nota {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}

/* ---------- Barra inferior "Concluir compra" (solo con carrito lleno) ---------- */
.barra-pedido {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
}
.barra-pedido[hidden] { display: none; }
.barra-pedido .boton {
  width: 100%;
  box-shadow: 0 10px 24px rgba(11, 61, 34, 0.35);
}
.barra-pedido__total {
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(11, 61, 34, 0.25);
  font-weight: 600;
}
.barra-pedido__total:empty { display: none; }
.icono-wa {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: currentColor;
}
@media (min-width: 720px) {
  .barra-pedido { left: auto; width: 380px; }
}

/* ---------- Aviso breve ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 40;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--verde-oscuro);
  color: var(--marfil);
  font-size: 0.95rem;
  box-shadow: var(--sombra);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
