/* ================================================================
   producto.css — Página de detalle de un producto individual
   Foto grande a un costado + info a la derecha, redes bajo la foto,
   y productos de la misma marca al pie
   ================================================================ */

.product-wrap { width: 100%; }

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.87rem;
  color: var(--text-3);
  margin-bottom: 1.75rem;
}

.breadcrumb a {
  color: var(--text-2);
  text-decoration: none;
  transition: var(--trans);
}
.breadcrumb a:hover { color: var(--primary); }

.breadcrumb-current { color: var(--text-3); }

/* ── PRODUCTO (foto + info) ─────────────────────────────────── */
.product-box {
  display: grid;
  /* minmax(0, …): sin eso la columna de info no se achica y en tablets
     empujaba los botones fuera de la pantalla */
  grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  animation: fadein 0.2s ease;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOTO / CARRUSEL ─────────────────────────────────────────── */
.product-photo-wrap { position: relative; }

/* Sin marco: la foto viene sobre blanco, igual que la página */
.product-photo {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: zoom-in;
}

.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface2);
  user-select: none;
}

.view-img-ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.view-img-ph svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-3);
}

/* flechas del carrusel, superpuestas a la foto */
.galeria-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: var(--trans);
}
.galeria-flecha:hover { color: var(--primary); border-color: var(--primary); opacity: 1; }
.galeria-flecha svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.galeria-flecha-izq { left: 12px; }
.galeria-flecha-der { right: 12px; }

.galeria-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.galeria-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-md);
  cursor: pointer;
  transition: var(--trans);
}
.galeria-dot.activo { background: var(--primary); transform: scale(1.2); }

/* ── ZOOM (lightbox de pantalla completa) ────────────────────── */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 0.15s ease;
}

.zoom-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  user-select: none;
}

.zoom-cerrar {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
}
.zoom-cerrar:hover { background: rgba(255,255,255,0.18); }

.zoom-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zoom-flecha:hover { background: rgba(255,255,255,0.18); }
.zoom-flecha svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.zoom-flecha-izq { left: 1.25rem; }
.zoom-flecha-der { right: 1.25rem; }

.zoom-contador {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 0.87rem;
}

@media (max-width: 640px) {
  .galeria-flecha { width: 38px; height: 38px; }
  .galeria-flecha-izq { left: 8px; }
  .galeria-flecha-der { right: 8px; }
  .zoom-flecha { width: 40px; height: 40px; }
}

/* ── INFO ────────────────────────────────────────────────────── */
.product-info { min-width: 0; padding-top: 0.25rem; }

.view-marca {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--purpura);
  margin-bottom: 0.35rem;
}

.view-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.3rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.product-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.meta-code {
  font-size: 0.87rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.view-price {
  font-family: var(--font-price);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1.9rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── TAGS DE ATRIBUTOS ───────────────────────────────────────── */
.attr-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.attr-label {
  font-size: 0.93rem;
  color: var(--text-2);
  margin-right: 0.15rem;
  flex-basis: 100%;
}
.attr-label strong { color: var(--text); font-weight: 500; }

/* Talles: cajitas de 44px, fáciles de tocar y de comparar de un vistazo */
.talle-chip {
  min-width: 48px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
}
.talle-chip:hover { border-color: var(--text); }
.talle-chip.selected,
.selector-compra .talle-chip.selected {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* circulito de color */
.color-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.93rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-md);
  padding: 0.3rem 0.9rem 0.3rem 0.55rem;
  border-radius: 99px;
}
.color-tag:hover { border-color: var(--text); }
.selector-compra .color-tag.selected {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
  background: var(--surface);
  color: var(--text);
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  flex-shrink: 0;
}

.color-dot-generic {
  background: repeating-linear-gradient(45deg, var(--surface2), var(--surface2) 3px, var(--border-md) 3px, var(--border-md) 4px);
}

/* ── ACCIONES ────────────────────────────────────────────────── */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ── ANTERIOR / SIGUIENTE ────────────────────────────────────── */
.prod-nav-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.prod-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 45%;
  min-height: 40px;
  font-size: 0.87rem;
  color: var(--text-2);
  text-decoration: none;
  transition: var(--trans);
}
.prod-nav-link:hover { color: var(--primary); }

.prod-nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-nav-link svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }
.prod-nav-next { margin-left: auto; text-align: right; }

/* ── PRODUCTOS DE LA MISMA MARCA ─────────────────────────────── */
.similares-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.similares-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
/* Tablet: foto e info mitad y mitad (con la foto fija de 340px mínimo
   no quedaba lugar para los botones) */
@media (max-width: 960px) {
  .product-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
}

@media (max-width: 720px) {
  .product-box {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .product-photo { aspect-ratio: 1 / 1; }
  .view-name  { font-size: 1.8rem; }
  .view-price { font-size: 1.5rem; }
}
