/* =============================================================================
   Soft Imperio — Detalle de producto (producto.html)
   Solo usa tokens var(--...) existentes. Sin colores hardcodeados.
   ============================================================================= */

/* ---- Layout principal: visual + compra ---- */
.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  margin-top: clamp(1.5rem, 2vw, 2.25rem);
}
@media (max-width: 860px) {
  .pd-layout { grid-template-columns: 1fr; }
}

/* ---- Columna visual ---- */
.pd-visual { position: sticky; top: calc(var(--header-h, 70px) + 1.25rem); display: flex; flex-direction: column; gap: 0.9rem; }
@media (max-width: 860px) { .pd-visual { position: static; } }

.pd-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(280px, 38vw, 420px);
  padding: 2rem;
  background:
    radial-gradient(120% 120% at 50% 0%, var(--surface) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.pd-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 70% at 50% 45%, #000 0%, transparent 75%);
  pointer-events: none;
}
.pd-stage .brand-glyph {
  position: relative;
  box-shadow: var(--shadow-md);
}
.pd-stage__pins {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  z-index: 2;
}
.pd-stage__secure {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
}

/* ---- Mini galería / sellos bajo el visual ---- */
.pd-seals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.pd-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  padding: 0.85rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.pd-seal svg { width: 1.3rem; height: 1.3rem; color: var(--brand); }
.pd-seal span { font-size: 0.74rem; line-height: 1.3; color: var(--ink-muted); font-weight: 600; }

/* ---- Columna de compra ---- */
.pd-buy { display: flex; flex-direction: column; }
.pd-cat { font-size: 0.82rem; font-weight: 600; color: var(--brand-ink); letter-spacing: 0.01em; }
.pd-buy h1 {
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.6rem;
}
.pd-rating { margin-bottom: 1rem; }
.pd-summary { color: var(--ink-body); line-height: 1.6; max-width: 52ch; margin-bottom: 1.25rem; }

.pd-price-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  border-block: 1px solid var(--border);
}
.pd-save {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.2rem;
}

.pd-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0;
}

.pd-highlights { margin: 0.5rem 0 1.5rem; }

/* ---- Compra: cantidad + acciones ---- */
.pd-purchase {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.pd-qty-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pd-qty-row > label { font-size: 0.9rem; font-weight: 600; color: var(--ink-body); }
.pd-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.pd-stepper button {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  color: var(--ink-body);
  transition: background-color var(--t), color var(--t);
}
.pd-stepper button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.pd-stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; }
.pd-stepper button svg { width: 0.95rem; height: 0.95rem; }
.pd-stepper input {
  width: 3rem;
  height: 2.5rem;
  border: none;
  border-inline: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.pd-stepper input::-webkit-outer-spin-button,
.pd-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-stepper input:focus { outline: none; box-shadow: inset var(--ring); }
.pd-line-total { margin-left: auto; font-size: 0.9rem; color: var(--ink-muted); }
.pd-line-total b { color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.pd-actions { display: flex; flex-direction: column; gap: 0.65rem; }

/* ---- Sellos de confianza compra ---- */
.pd-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* ---- Sección de pestañas ---- */
.pd-tabs-wrap { margin-top: clamp(3rem, 5vw, 4.5rem); }
.pd-tab-body { padding-top: 1.75rem; max-width: 70ch; }
.pd-tab-body p { color: var(--ink-body); line-height: 1.7; margin-bottom: 1rem; }
.pd-tab-body p:last-child { margin-bottom: 0; }
.pd-tab-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }
.pd-tab-body h3:first-child { margin-top: 0; }

.pd-spec-table { min-width: 0; }
.pd-spec-table th { width: 38%; white-space: nowrap; }
.pd-spec-table th, .pd-spec-table td { padding-inline: 0 1rem; background: transparent; }
.pd-tab-body .data th:first-child { padding-left: 1rem; }

/* ---- Pasos de activación ---- */
.pd-steps { display: grid; gap: 1rem; counter-reset: pdstep; max-width: 60ch; }
.pd-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.pd-step__num {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.95rem;
  flex: none;
}
.pd-step h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.pd-step p { font-size: 0.92rem; color: var(--ink-muted); line-height: 1.55; margin: 0; }

/* ---- Relacionados ---- */
.pd-related { margin-top: clamp(3rem, 5vw, 4.5rem); }
.pd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 258px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 1.75rem;
}
