/* ============================================================
   HERMANOS JOTA — DETALLE DE PRODUCTO (product-detail.html)

   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════
   LAYOUT PRINCIPAL: sticky split
══════════════════════════ */
.product-detail {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.product-images {
  flex: 1 1 60%;
  min-width: 0;
}

.product-images figure,
.product-images img {
  display: block;
  width: 100%;
}

.product-images .image-slide {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #EDE7DE;
}

.product-images .image-slide:nth-child(even) {
  background: #E3DDD5;
}

.product-images .image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1 1 38%;
  max-width: 420px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.product-info-inner {
  padding: 48px 36px 32px;
  flex: 1;
}

/* subtle scrollbar en el panel si el contenido es largo */
.product-info::-webkit-scrollbar { width: 3px; }
.product-info::-webkit-scrollbar-track { background: transparent; }
.product-info::-webkit-scrollbar-thumb { background: #DDD8D1; border-radius: 2px; }

/* ══════════════════════════
   TEXTOS DEL PANEL
══════════════════════════ */
.product-category {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.product-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}

.product-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 24px;
}

.product-price {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

/* ══════════════════════════
   BOTÓN AÑADIR AL CARRITO — rust
══════════════════════════ */
.btn-add-cart {
  width: 100%;
  padding: 14px 24px;
  background: var(--rust);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s ease;
  margin-bottom: 14px;
}

.btn-add-cart:hover { background: var(--rust-dark); }

.btn-add-cart.added {
  background: #4A6E48; /* verde confirmación, igual que el original */
}

.stock-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6A9E68;
}

.stock-dot.out { background: #B07070; }

#stock-text { font-size: 12px; color: var(--muted); }

/* ══════════════════════════
   ACORDEÓN
══════════════════════════ */
.accordion { border-top: 1px solid var(--border); }
.accordion:last-of-type { border-bottom: 1px solid var(--border); }

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
}

.chevron {
  display: inline-block;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.accordion-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  padding-bottom: 20px;
  animation: accordionDown 0.22s ease both;
}

@keyframes accordionDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* subtítulo — 20px bold Inter */
.accordion-subtitle {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 2px 0 12px;
}

/* texto — 14px Inter, tono muted */
.accordion-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 18px;
}

/* links — 14px Inter, subrayado en acento rust */
.accordion-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.accordion-links a {
  font-size: 14px;
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(140, 61, 44, 0.4);
  transition: text-decoration-color 0.15s;
}

.accordion-links a:hover {
  text-decoration-color: var(--rust);
}

/* ══════════════════════════
   BARRA DE PROGRESO DE IMÁGENES
══════════════════════════ */
.image-progress {
  display: flex;
  gap: 8px;
  padding: 16px 36px;
  border-top: 1px solid var(--border);
}

.image-progress span {
  height: 2px;
  flex: 1;
  background: var(--border);
  border-radius: 1px;
  transition: background-color 0.3s;
}

.image-progress span.active {
  background: var(--ink);
}

/* ══════════════════════════
   DEBAJO DEL STICKY
══════════════════════════ */
.pull-quote {
  max-width: 640px;
  margin: 0 auto;
  padding: 88px 40px 80px;
  text-align: center;
  background: var(--surface);
}

.pull-quote-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 20px;
}

.pull-quote-author {
  font-size: 12px;
  color: var(--muted);
}

/* ══════════════════════════
   RESPONSIVE — abajo de 900px se apila
══════════════════════════ */
@media (max-width: 900px) {
  .product-detail { flex-direction: column; }

  .product-info {
    position: relative;
    top: auto;
    height: auto;
    max-width: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .product-images .image-slide { height: 70vh; }
}