/* ============================================================
   PDP EXTENSIONS - Advanced Styling & Animations
   ============================================================ */

.pdp-body { background: var(--off-white); }
.pdp-container { padding: 48px 16px 80px; display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 900px) { .pdp-container { flex-direction: row; align-items: flex-start; gap: 80px; } }

/* Breadcrumbs */
.breadcrumbs { padding: 32px 16px 0; font-size: 0.85rem; color: #6b7280; font-weight: 500; }
.breadcrumbs a { color: var(--text-dark); transition: color 0.15s; }
.breadcrumbs a:hover { color: var(--gold); }

/* Left: Gallery */
.pdp-gallery { width: 100%; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) { .pdp-gallery { width: 50%; position: sticky; top: 100px; } }

.gallery-main { width: 100%; aspect-ratio: 4/5; background: #fff; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(0,0,0,0.04); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; transition: opacity 0.3s ease; }
.gallery-main img.fade-in { animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.gallery-thumbnails { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; /* hide scrollbar */ -ms-overflow-style: none; scrollbar-width: none; }
.gallery-thumbnails::-webkit-scrollbar { display: none; }
@media (max-width: 640px) {
  .gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }
  .thumb-btn {
    width: 100%;
  }
}
.thumb-btn { width: 80px; height: 80px; flex-shrink: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; transition: all 0.2s; padding: 8px; display: flex; align-items: center; justify-content: center; }
.thumb-btn img { width: 100%; height: 100%; object-fit: contain; }
.thumb-btn:hover { border-color: #d1d5db; }
.thumb-btn.active { border-color: var(--dark); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Right: Info */
.pdp-info { width: 100%; }
@media (min-width: 900px) { .pdp-info { width: 50%; padding-top: 24px; } }

.pdp-badge { display: inline-block; background: var(--dark); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 4px; margin-bottom: 16px; text-transform: uppercase; }
.pdp-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--text-dark); line-height: 1.1; margin-bottom: 16px; }

.pdp-rating-row { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.pdp-rating { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }
.pdp-review-count { font-size: 0.85rem; color: #6b7280; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.pdp-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.pdp-price { font-size: 1.75rem; font-weight: 700; color: var(--text-dark); }
.pdp-price-compare { font-size: 1.1rem; color: #9ca3af; text-decoration: line-through; }

.pdp-desc { font-size: 1.05rem; color: #4b5563; line-height: 1.7; margin-bottom: 32px; }

/* Size Selector */
.pdp-option { margin-bottom: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.pdp-option-header { display: flex; justify-content: space-between; margin-bottom: 16px; }
.pdp-option-title { font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.pdp-option-value { color: #6b7280; font-size: 0.95rem; }

.pdp-size-selector { display: flex; gap: 12px; flex-wrap: wrap; }
.size-btn { flex: 1; min-width: 90px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: #4b5563; transition: all 0.2s; position: relative; overflow: hidden; }
.size-btn::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--dark); border-radius: 8px; opacity: 0; transition: opacity 0.2s; }
.size-btn:hover { border-color: #9ca3af; }
.size-btn.active { color: var(--text-dark); background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.size-btn.active::after { opacity: 1; }

/* Actions */
.pdp-actions { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
@media (min-width: 480px) { .pdp-actions { flex-direction: row; } }

.pdp-qty-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; height: 56px; }
.pdp-qty-btn { width: 48px; height: 100%; background: none; border: none; font-size: 1.25rem; cursor: pointer; color: #6b7280; transition: color 0.2s; }
.pdp-qty-btn:hover { color: var(--text-dark); }
.pdp-qty-input { width: 40px; text-align: center; border: none; background: transparent; font-size: 1rem; font-weight: 600; color: var(--text-dark); outline: none; }

.btn-pdp-add { flex: 1; height: 56px; background: var(--dark); color: #fff; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.btn-pdp-add:hover { background: #000; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-pdp-add:active { transform: translateY(0); }

/* Value Props */
.pdp-micro-trust { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.micro-trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: #4b5563; }
.micro-trust-item svg { color: var(--gold); }

/* Accordions */
.pdp-accordions { border-top: 1px solid var(--border); }
.pdp-accordion { border-bottom: 1px solid var(--border); }
.pdp-acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; background: none; border: none; font-size: 1rem; font-weight: 600; color: var(--text-dark); cursor: pointer; transition: color 0.2s; }
.pdp-acc-btn:hover { color: var(--gold); }
.pdp-acc-btn svg { transition: transform 0.3s; color: #9ca3af; }
.pdp-accordion.active .pdp-acc-btn svg { transform: rotate(180deg); }
.pdp-acc-content { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.pdp-acc-inner { padding-bottom: 20px; font-size: 0.95rem; color: #6b7280; line-height: 1.6; }

/* Related Section */
.related-section { padding: 64px 0 100px; background: #fff; border-top: 1px solid var(--border); }
.related-title { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 40px; }

/* ============================================================
   REVIEWS SECTION STYLES
   ============================================================ */

.reviews-section { padding: 80px 0; background: var(--off-white); border-top: 1px solid var(--border); }
.reviews-header { text-align: center; margin-bottom: 60px; }
.reviews-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; margin-bottom: 24px; }

.reviews-stats { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avg-rating { font-size: 3rem; font-weight: 700; color: var(--dark); font-family: 'Playfair Display', serif; line-height: 1; }
.avg-stars { color: var(--gold); font-size: 1.25rem; letter-spacing: 4px; }
.total-reviews { font-size: 0.9rem; color: #6b7280; font-weight: 500; }

.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 48px; margin-top: 40px; }
@media (min-width: 1024px) { .reviews-grid { grid-template-columns: 350px 1fr; align-items: flex-start; } }

/* Write Review Card */
.write-review-card { background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); position: sticky; top: 120px; }
.write-review-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

.star-rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-rating-input input { display: none; }
.star-rating-input label { font-size: 2rem; color: #d1d5db; cursor: pointer; transition: color 0.15s; margin-bottom: 0; }
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: var(--gold); }

#review-text { width: 100%; min-height: 120px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: border-color 0.2s; resize: vertical; }
#review-text:focus { outline: none; border-color: var(--gold); }

.photo-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.preview-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.btn-submit-review { width: 100%; padding: 16px; background: var(--dark); color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s; }
.btn-submit-review:hover { background: #000; transform: translateY(-2px); }

.guest-msg-card { text-align: center; padding: 20px 0; }
.guest-msg-card p { font-size: 0.95rem; color: #4b5563; margin-bottom: 20px; }

/* Reviews List */
.reviews-list { display: flex; flex-direction: column; gap: 40px; }
.review-item { 
  background: rgba(255, 255, 255, 0.8); 
  backdrop-filter: blur(10px);
  padding: 48px; border-radius: 20px; 
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; 
}
.review-item:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }

.review-meta { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.review-user { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.25rem; color: var(--dark); margin-bottom: 4px; }
.review-date { font-size: 0.75rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.review-rating { color: var(--gold); font-size: 0.85rem; letter-spacing: 3px; }

.review-comment { font-size: 1.1rem; color: #4b5563; line-height: 1.8; font-style: italic; margin-bottom: 32px; position: relative; }
.review-comment::before { content: '“'; position: absolute; left: -24px; top: -10px; font-size: 3rem; color: rgba(212, 175, 55, 0.1); font-family: serif; }

.review-photos-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.review-photo { 
  width: 140px; height: 140px; object-fit: cover; 
  border-radius: 16px; cursor: zoom-in; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  border: 1px solid rgba(0,0,0,0.05); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.review-photo:hover { transform: scale(1.08) rotate(2deg); box-shadow: 0 15px 30px rgba(0,0,0,0.15); z-index: 2; }

/* Dynamic Animations triggers */
.loading-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
