/* =============================================
   PRODUCT DETAIL PAGE STYLES
   ============================================= */

/* Breadcrumb */
.pdp-breadcrumb {
  font-size: 0.82rem;
  color: var(--color-warm-gray);
  padding: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pdp-breadcrumb a {
  color: var(--color-warm-gray);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.pdp-breadcrumb a:hover { color: var(--color-primary); }
.pdp-breadcrumb .sep { opacity: 0.4; }
.pdp-breadcrumb .current { color: var(--color-carbon); font-weight: 500; }

/* Main product layout */
.pdp-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Left column wrapper */
.pdp-left-col {
  position: sticky;
  top: 100px;
  align-self: start;
}

/* Gallery */
.pdp-gallery {
  display: flex;
  gap: 14px;
}

.pdp-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 76px;
  flex-shrink: 0;
}

.pdp-thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  border: 2px solid var(--color-gray-100);
  cursor: pointer;
  object-fit: cover;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  background: var(--color-cream);
}
.pdp-thumb:hover { border-color: var(--color-primary); transform: scale(1.04); }
.pdp-thumb.active { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-light, #f5e6ea); }

.pdp-main-img-wrap {
  flex: 1;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-cream);
  aspect-ratio: 1 / 1;
}

.pdp-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.pdp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: white;
  border: 1px solid var(--color-gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
  box-shadow: var(--shadow-sm);
  color: var(--color-carbon);
  font-size: 0.85rem;
}
.pdp-arrow:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.pdp-arrow.prev { left: 10px; }
.pdp-arrow.next { right: 10px; }
.pdp-arrow:disabled { opacity: 0.3; cursor: default; }

/* Product info panel */
.pdp-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pdp-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pdp-brand {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(143,60,75,0.08);
  padding: 4px 12px;
  border-radius: 20px;
}

.pdp-badge-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--color-primary);
  color: white;
}
.pdp-badge-label.new { background: var(--color-sage); }
.pdp-badge-label.sale { background: #e05e3b; }
.pdp-badge-label.bestseller { background: #8B6914; }

.pdp-name {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-carbon);
  margin: 0;
}

.pdp-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
}
.pdp-stars { color: #f0a500; }
.pdp-reviews { color: var(--color-warm-gray); }

.pdp-price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-100);
}

.pdp-price-current {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-primary);
}

.pdp-price-original {
  font-size: 1.1rem;
  color: var(--color-warm-gray);
  text-decoration: line-through;
}

.pdp-discount-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: white;
  background: #e05e3b;
  padding: 3px 9px;
  border-radius: 20px;
}

/* First purchase banner */
.pdp-first-purchase {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(143,60,75,0.08), rgba(143,60,75,0.04));
  border: 1px solid rgba(143,60,75,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
}
.pdp-first-purchase i { font-size: 1.1rem; }
.pdp-first-purchase span { flex: 1; }
.pdp-first-purchase strong { font-size: 1rem; }

/* Qty selector */
.pdp-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pdp-qty-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-carbon);
}

.pdp-qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--color-gray-100);
  border-radius: 10px;
  overflow: hidden;
}

.pdp-qty-btn {
  width: 38px;
  height: 38px;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-carbon);
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-qty-btn:hover { background: var(--color-cream); }

.pdp-qty-val {
  width: 44px;
  height: 38px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-left: 1.5px solid var(--color-gray-100);
  border-right: 1.5px solid var(--color-gray-100);
  outline: none;
  color: var(--color-carbon);
}

/* CTA buttons */
.pdp-cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdp-btn-cart {
  width: 100%;
  padding: 15px 24px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-bounce);
  letter-spacing: 0.02em;
}
.pdp-btn-cart:hover {
  background: var(--color-primary-dark, #6b2235);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(143,60,75,0.3);
}
.pdp-btn-cart:active { transform: translateY(0); }

.pdp-btn-wishlist {
  width: 100%;
  padding: 13px 24px;
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
}
.pdp-btn-wishlist:hover { background: rgba(143,60,75,0.06); }
.pdp-btn-wishlist.liked { background: rgba(143,60,75,0.08); }
.pdp-btn-wishlist.liked i { font-weight: 900; }

/* Info chips */
.pdp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.pdp-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--color-warm-gray);
  background: var(--color-cream);
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-gray-100);
}
.pdp-chip i { color: var(--color-sage); }

/* Related products */
.pdp-related {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-gray-100);
}

.pdp-related-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-carbon);
  margin-bottom: 28px;
}

/* Loading skeleton */
.pdp-skeleton {
  background: linear-gradient(90deg, #f0ede8 25%, #e8e4de 50%, #f0ede8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Error state */
.pdp-error {
  text-align: center;
  padding: 80px 24px;
}
.pdp-error i {
  font-size: 3rem;
  color: var(--color-warm-gray);
  margin-bottom: 20px;
}
.pdp-error h2 {
  font-family: var(--font-heading);
  color: var(--color-carbon);
  margin-bottom: 12px;
}
.pdp-error p { color: var(--color-warm-gray); margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .pdp-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .pdp-left-col {
    position: static;
  }
  .pdp-gallery {
    flex-direction: column-reverse;
  }
  .pdp-thumbnails {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .pdp-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
  }
  .pdp-main-img-wrap {
    aspect-ratio: 4 / 3;
  }
  .pdp-name { font-size: 1.5rem; }
  .pdp-price-current { font-size: 1.8rem; }
}

@media (max-width: 520px) {
  .pdp-wrapper { padding: 0 16px 40px; }
  .pdp-name { font-size: 1.3rem; }
  .pdp-grid { gap: 20px; }
}
