/* ============================================================
   BY QKDA — Ficha de producto
   ============================================================ */

.pdp {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 80px;
  padding-top: 32px;
  padding-bottom: 96px;
  align-items: start;
}

/* ── Gallery ───────────────────────────────────────────────── */

.pdp__gallery {
  position: sticky;
  top: calc(72px + 24px);
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  align-items: start;
}

/* Thumbnail strip — vertical, left side */
.pdp__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  order: -1;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: none;
}
.pdp__thumbs::-webkit-scrollbar { display: none; }

.pdp__thumb {
  width: 76px;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5f2ee;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color 0.18s;
  padding: 0;
}
.pdp__thumb.is-active { border-color: var(--c-text); }
.pdp__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Main image */
.pdp__main-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5f2ee;
  cursor: zoom-in;
  position: relative;
}

.pdp__main-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pdp__main-wrap:hover .pdp__main-img { transform: scale(1.04); }

/* Zoom hint */
.pdp__zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,.08);
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--c-text-2);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  text-transform: uppercase;
}
.pdp__main-wrap:hover .pdp__zoom-hint { opacity: 1; }

/* ── Lightbox ──────────────────────────────────────────────── */

.pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,8,.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.pdp-lightbox.is-open { opacity: 1; pointer-events: auto; }
.pdp-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 32px 96px rgba(0,0,0,.5);
  transform: scale(.96);
  transition: transform .28s cubic-bezier(.16,1,.3,1);
}
.pdp-lightbox.is-open .pdp-lightbox__img { transform: scale(1); }
.pdp-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .15s;
}
.pdp-lightbox__close:hover { color: #fff; }
.pdp-lightbox__close svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.pdp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .15s;
}
.pdp-lightbox__nav:hover { color: #fff; }
.pdp-lightbox__nav--prev { left: 20px; }
.pdp-lightbox__nav--next { right: 20px; }
.pdp-lightbox__nav svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.pdp-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em;
}

/* ── Info ──────────────────────────────────────────────────── */

.pdp__info { padding-top: 8px; }

.pdp__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-2);
  margin-bottom: 24px;
}
.pdp__breadcrumb a { color: var(--c-text-2); transition: color 0.15s; }
.pdp__breadcrumb a:hover { color: var(--c-text); }
.pdp__breadcrumb span:not(:last-child) { opacity: 0.4; }

.pdp__badge { margin-bottom: 16px; display: inline-block; }

.pdp__title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
}

.pdp__price {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.pdp__price del { font-size: 16px; color: var(--c-text-3); font-weight: 400; }
.pdp__price .sale { color: var(--c-sale); }

.pdp__price-note {
  font-size: 12px;
  color: var(--c-text-2);
  margin-bottom: 16px;
}

/* ── Stock indicator ───────────────────────────────────────── */

.pdp__stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.pdp__stock::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pdp__stock--ok  { color: #4a7c60; }
.pdp__stock--low { color: #9b3a2a; }
.pdp__stock--out { color: var(--c-text-3); }

/* ── Variants ──────────────────────────────────────────────── */

.pdp__variant-group { margin-bottom: 24px; }

.pdp__variant-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pdp__selected-name {
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--c-text-2);
  text-transform: none;
}

.pdp__variants { display: flex; gap: 10px; flex-wrap: wrap; }

/* Image-swatch variant button */
.pdp__color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
}
.pdp__color-btn__img {
  width: 64px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5f2ee;
  border: 1.5px solid transparent;
  transition: border-color 0.18s;
}
.pdp__color-btn.is-active .pdp__color-btn__img { border-color: var(--c-text); }
.pdp__color-btn__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pdp__color-btn__label {
  font-size: 11px;
  color: var(--c-text-2);
  white-space: nowrap;
}
.pdp__color-btn.is-active .pdp__color-btn__label { color: var(--c-text); font-weight: 500; }

/* Color dot swatch */
.pdp__color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.6);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.15s, transform 0.15s;
  padding: 0;
}
.pdp__color-dot:hover { transform: scale(1.1); }
.pdp__color-dot.is-active { outline-color: var(--c-text); }

/* Text size buttons */
.pdp__size-btn {
  min-width: 52px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pdp__size-btn:hover { border-color: var(--c-text); }
.pdp__size-btn.is-active { background: var(--c-text); color: var(--c-white); border-color: var(--c-text); }

/* ── Quantity selector ─────────────────────────────────────── */

.pdp__qty-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.pdp__qty-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text);
}
.pdp__qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-border);
  height: 44px;
}
.pdp__qty-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 300;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--c-text);
  transition: background .15s;
}
.pdp__qty-btn:hover { background: #f5f2ee; }
.pdp__qty-val {
  width: 40px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  line-height: 44px;
}

/* ── Size warning ──────────────────────────────────────────── */

.pdp__size-warning {
  font-size: 12px;
  color: #c0392b;
  letter-spacing: .04em;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.pdp__size-warning.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Actions ───────────────────────────────────────────────── */

.pdp__actions {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 10px;
  margin-bottom: 32px;
}

.pdp__add-btn {
  width: 100%;
  height: 56px;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.pdp__wish {
  width: 56px;
  height: 56px;
  border: 1px solid var(--c-border);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: none;
  transition: border-color 0.15s;
}
.pdp__wish:hover { border-color: var(--c-text); }
.pdp__wish svg { width: 20px; height: 20px; transition: fill 0.15s; }
.pdp__wish.is-wished svg { fill: var(--c-text); }

/* ── Trust ─────────────────────────────────────────────────── */

.pdp__trust {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0;
}
.pdp__trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--c-text-2);
}
.pdp__trust svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Accordion ─────────────────────────────────────────────── */

.pdp__accordion { border-bottom: 1px solid var(--c-border); }

.pdp__acc-item { border-top: 1px solid var(--c-border); }

.pdp__acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  color: var(--c-text);
}
.pdp__acc-toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  transition: transform 0.25s;
}
.pdp__acc-item.is-open .pdp__acc-toggle svg { transform: rotate(45deg); }

.pdp__acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.pdp__acc-item.is-open .pdp__acc-body { max-height: 600px; }

.pdp__acc-body p, .pdp__acc-body ul {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
  padding-bottom: 20px;
}
.pdp__acc-body ul { padding-left: 18px; }
.pdp__acc-body li { list-style: disc; margin-bottom: 4px; }

/* ── Related ───────────────────────────────────────────────── */

.pdp__related {
  padding-top: 64px;
  padding-bottom: 80px;
  border-top: 1px solid var(--c-border);
}
.pdp__related-title {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 400;
  margin-bottom: 40px;
}

/* ── Sticky warning banner ──────────────────────────────────── */

.pdp-sticky-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #c0392b;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 11px 20px;
  border-radius: 100px;
  z-index: 801;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .3s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 4px 20px rgba(192,57,43,.4);
}
.pdp-sticky-warn.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pdp-sticky-warn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Sticky bar — pill flotante ─────────────────────────────── */

.pdp-sticky-bar {
  display: flex;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  width: max-content;
  max-width: calc(100vw - 24px);
  z-index: 800;
  background: #fff;
  border-radius: 20px;
  padding: 14px 14px 14px 28px;
  gap: 20px;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.07);
  opacity: 0;
  transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s;
  pointer-events: none;
}
.pdp-sticky-bar.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.pdp-sticky-bar.is-hidden {
  transform: translateX(-50%) translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}
.pdp-sticky-bar__info { min-width: 0; }
.pdp-sticky-bar__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.pdp-sticky-bar__price {
  font-size: 13px;
  color: var(--c-text-3);
  margin-top: 2px;
}
.pdp-sticky-bar__btn {
  height: 52px;
  padding: 0 28px;
  font-size: 11px;
  letter-spacing: .14em;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 14px;
  background: #1a1a18;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .pdp { grid-template-columns: 1fr; gap: 40px; }
  .pdp__gallery { position: static; }
}

@media (max-width: 768px) {
  .pdp { padding-top: 12px; padding-bottom: 60px; gap: 28px; }
  .pdp__gallery { grid-template-columns: 56px 1fr; gap: 6px; }
  .pdp__thumb { width: 56px; }
  .pdp__thumbs { max-height: 52vh; }
  .pdp__title { font-size: clamp(22px, 6vw, 32px); }
}

@media (max-width: 640px) {
  /* Galería: miniaturas abajo en horizontal */
  .pdp__gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .pdp__thumbs {
    order: 1;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .pdp__thumbs::-webkit-scrollbar { display: none; }
  .pdp__thumb {
    width: 52px;
    flex-shrink: 0;
  }
  .pdp__main-wrap { order: 0; }

  /* Info */
  .pdp__actions { grid-template-columns: 1fr 52px; gap: 8px; }
  .pdp__add-btn { height: 52px; font-size: 12px; }
  .pdp__wish { width: 52px; height: 52px; }
  .pdp__price { font-size: 19px; }
  .pdp__color-btn__img { width: 52px; }

  /* Sticky bar — full width en móvil */
  .pdp-sticky-bar {
    border-radius: 16px;
    padding: 12px 12px 12px 20px;
    gap: 12px;
  }
  .pdp-sticky-bar__name { max-width: 130px; font-size: 13px; }
  .pdp-sticky-bar__btn { height: 46px; padding: 0 18px; font-size: 10px; }

  /* Sticky warn */
  .pdp-sticky-warn { bottom: calc(86px + env(safe-area-inset-bottom)); font-size: 12px; }

  /* Lightbox nav oculto */
  .pdp-lightbox__nav { display: none; }

  /* Related — 2 columnas */
  .pdp__related { padding-top: 40px; padding-bottom: 56px; }
}
