/* ============================================================
   producto.css — estilos específicos de /producto/*.html
   (galería, zoom, layout de ficha). Header, drawer y carrito
   ahora viven en header.css / carrito.css / variables.css.
   ============================================================ */

.breadcrumb { max-width:1000px; margin:0 auto; padding:16px 20px 0; font-size:.8rem; color: var(--texto-muted); display:flex; flex-wrap:wrap; gap:6px; }

.breadcrumb .sep { opacity:.5; }

.breadcrumb .actual { color: var(--texto); font-weight:500; }

main { max-width:1000px; margin:0 auto; padding:20px; }

.producto-layout { display:grid; grid-template-columns:1fr; gap:28px; }

@media (min-width:760px) { .producto-layout { grid-template-columns:1fr 1fr; gap:40px; } }

.producto-galeria { max-width: 420px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

.producto-img {
  background: var(--bg-elevada);
  border: 1px solid var(--linea);
  border-radius: 16px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}

.producto-img img { width: 100%; height: 100%; object-fit: contain; padding: 18px; user-select: none; -webkit-user-drag: none; }

.producto-img .sin-foto { color: var(--texto-muted); font-size: 0.85rem; font-family: 'IBM Plex Mono', monospace; }

.galeria-flecha {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--linea); color: var(--texto);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; opacity: 0.85;
}

.galeria-flecha:hover { opacity: 1; }

.galeria-flecha svg { width: 15px; height: 15px; }

.galeria-flecha.izq { left: 8px; }

.galeria-flecha.der { right: 8px; }

.galeria-lupa {
  position: absolute; bottom: 8px; left: 8px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--linea); color: var(--texto);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; opacity: 0.85;
}

.galeria-lupa:hover { opacity: 1; }

.galeria-lupa svg { width: 15px; height: 15px; }

.galeria-contador {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(20,21,43,0.65); color: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem;
  padding: 3px 9px; border-radius: 20px; z-index: 5;
}

.galeria-miniaturas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.miniatura { flex-shrink: 0; width: 56px; height: 56px; border-radius: 10px; background: var(--bg-elevada); border: 2px solid transparent; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }

.miniatura img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.miniatura.activa { border-color: var(--azul); }

.modal-zoom-fondo { display: none; position: fixed; inset: 0; background: rgba(5,5,15,0.92); z-index: 100; align-items: center; justify-content: center; }

.modal-zoom-fondo.abierto { display: flex; }

.modal-zoom-contenido { position: relative; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }

.modal-zoom-contenido img { max-width: 92vw; max-height: 76vh; object-fit: contain; border-radius: 12px; background: #fff; }

.modal-zoom-cerrar { position: absolute; top: -46px; right: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 1px solid var(--linea); color: var(--texto); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; }

.modal-zoom-flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.92); color: #14152b; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }

.modal-zoom-flecha svg { width: 20px; height: 20px; }

.modal-zoom-flecha.izq { left: -14px; }

.modal-zoom-flecha.der { right: -14px; }

.modal-zoom-contador { color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; }

.badge-oferta-producto { position: absolute; top: 14px; right: 14px; background: var(--ember); color: var(--texto-sobre-ember); font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 6px 12px; border-radius: 8px; z-index: 6; }

.producto-categoria { font-family:'IBM Plex Mono', monospace; font-size:.72rem; text-transform:uppercase; color: var(--ember); margin:0 0 8px; }

.producto-nombre { font-family:'Big Shoulders Display', sans-serif; font-weight:800; font-size:clamp(1.6rem,4vw,2.2rem); margin:0 0 14px; }

.producto-precio { font-family:'Big Shoulders Display', sans-serif; font-weight:800; font-size:2.4rem; margin:0 0 16px; }

.producto-meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }

.producto-meta span { font-family:'IBM Plex Mono', monospace; font-size:.75rem; color: var(--texto-muted); background: var(--bg-elevada); border:1px solid var(--linea); border-radius:8px; padding:6px 12px; }

.btn-agregar-carrito-producto { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; background: var(--azul); color: var(--texto-sobre-azul); border:none; font-weight:700; font-size:1rem; padding:15px; border-radius:12px; cursor:pointer; margin-bottom:10px; }

.btn-whatsapp-producto { display:flex; align-items:center; justify-content:center; gap:10px; background: var(--whatsapp); color:#0d1f13; font-weight:700; font-size:1.02rem; padding:16px; border-radius:12px; margin-bottom:10px; }

.nota-entrega { font-size:.78rem; color: var(--texto-muted); text-align:center; }

.producto-seccion-titulo { font-family:'Big Shoulders Display', sans-serif; font-weight:800; font-size:1.15rem; margin:0 0 10px; padding-top:20px; border-top:1px solid var(--linea); }

.producto-seccion-texto { font-size:.92rem; line-height:1.7; color: var(--texto-muted); white-space:pre-line; }

/* El footer ya vive en footer.css */

.whatsapp-flotante { position:fixed; bottom:20px; right:20px; width:56px; height:56px; border-radius:50%; background: var(--whatsapp); display:flex; align-items:center; justify-content:center; box-shadow:0 6px 20px var(--sombra); z-index:20; }

.whatsapp-flotante svg { width:28px; height:28px; fill:#0d1f13; }

/* ============================================================
   Franjas de productos: "También te puede interesar" (relacionados,
   calculados al publicar) y "Vistos recientemente" (localStorage,
   llenada por producto.js). Comparten el mismo estilo de tarjeta.
   ============================================================ */

.franja-productos { max-width: 1000px; margin: 40px auto 0; padding: 0 20px; }

.franja-titulo {
  font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 1.3rem;
  margin: 0 0 14px; padding-top: 24px; border-top: 1px solid var(--linea);
}

.franja-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
}

.franja-tarjeta {
  flex: 0 0 150px; background: var(--bg-elevada); border: 1px solid var(--linea);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.franja-tarjeta:hover { border-color: var(--azul); transform: translateY(-2px); }

.franja-tarjeta-img { aspect-ratio: 1; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.franja-tarjeta-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.franja-tarjeta-img .sin-foto { color: var(--texto-muted); font-size: 0.65rem; font-family: 'IBM Plex Mono', monospace; }

.franja-tarjeta-nombre {
  font-size: 0.78rem; font-weight: 500; line-height: 1.3; margin: 8px 10px 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}

.franja-tarjeta-precio { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 1.05rem; margin: 0 10px 8px; }

.franja-tarjeta-agregar {
  margin: 0 10px 10px; background: var(--azul); color: var(--texto-sobre-azul); border: none;
  font-size: 0.75rem; font-weight: 600; padding: 8px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s ease;
}
.franja-tarjeta-agregar:hover { background: var(--azul-hover); }

/* ---------- Selector de color (variantes) ---------- */

.producto-variantes { margin-bottom: 18px; }

.producto-variantes-titulo {
  font-size: 0.85rem; font-weight: 600; color: var(--texto); margin: 0 0 10px;
}
.producto-variantes-titulo span#variante-color-activo { font-weight: 700; color: var(--azul); }

.producto-variantes-swatches { display: flex; flex-wrap: wrap; gap: 8px; }

.variante-swatch {
  width: 52px; height: 52px; border-radius: 10px; padding: 2px;
  background: var(--bg-elevada); border: 2px solid var(--linea);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color 0.15s ease;
}
.variante-swatch:hover { border-color: var(--azul-hover); }
.variante-swatch.activo { border-color: var(--azul); }
.variante-swatch img { width: 100%; height: 100%; object-fit: contain; }
.variante-swatch-sin-foto { width: 100%; height: 100%; background: var(--linea); border-radius: 6px; }
