/* Product detail page (PDP) */

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  width: 100%;
}

.pdp-gallery {
  position: sticky;
  top: calc(var(--site-header-height, 5rem) + 12px);
}

.pdp-gallery__stage {
  position: relative;
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.pdp-gallery__main {
  aspect-ratio: 4 / 5;
  max-height: min(520px, 58vh);
  min-height: 280px;
  margin: 0;
  border: none;
  border-radius: 0;
}

.pdp-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(12, 6, 18, 0.65);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}

.pdp-gallery__nav:hover {
  background: rgba(251, 113, 133, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.pdp-gallery__nav--prev { left: 0.65rem; }
.pdp-gallery__nav--next { right: 0.65rem; }

.pdp-gallery__counter {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(12, 6, 18, 0.7);
  color: #fff;
}

.pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.pdp-thumb {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pdp-thumb.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-buy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pdp-buy__panel {
  padding: clamp(1.15rem, 2.5vw, 1.75rem);
  border-radius: var(--radius-lg, 20px);
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
}

html[data-theme="light"] .pdp-buy__panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
  border-color: rgba(26, 16, 36, 0.1);
}

.pdp-buy h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.pdp-buy .product-price {
  font-size: 1.35rem;
  margin: 0.25rem 0 0.75rem;
}

.pdp-desc {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
  font-size: 0.95rem;
}

.pdp-options {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.pdp-option label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.pdp-option select,
.pdp-option input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

html[data-theme="light"] .pdp-option select,
html[data-theme="light"] .pdp-option input {
  background: #fff;
  border-color: rgba(26, 16, 36, 0.15);
  color: var(--text);
}

.pdp-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.pdp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.pdp-actions .btn {
  width: 100%;
  margin: 0;
  justify-content: center;
}

.pdp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.pdp-reviews {
  margin-top: var(--space-2xl, 3rem);
  padding: var(--space-lg, 1.5rem);
  border-radius: var(--radius-lg, 20px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .pdp-reviews {
  background: rgba(255, 255, 255, 0.92);
}

.pdp-reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pdp-reviews__score {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
}

.pdp-review-list {
  display: grid;
  gap: 1rem;
}

.pdp-review {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .pdp-review {
  background: #fff;
}

.pdp-review strong {
  display: block;
  margin-bottom: 0.25rem;
}

.pdp-review span {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .pdp {
    grid-template-columns: 1fr;
  }

  .pdp-gallery {
    position: static;
  }

  .pdp-gallery__main {
    max-height: 420px;
  }
}
