/* ── Product Detail Page Styles ──────────────────────────── */

/* Toast (product page) */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1209; color: #f5f0e8;
  padding: 12px 24px; border-radius: 8px;
  font-size: 13px; font-weight: 600; z-index: 9999;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
  white-space: nowrap;
}

/* Breadcrumb */
.breadcrumb-wrap {
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  font-size: 12px; color: var(--muted-fg);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--muted-fg); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { opacity: .5; }

/* Product Layout */
.pd-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: flex-start;
}

/* Gallery */
.pd-gallery { display: flex; gap: 12px; position: sticky; top: 90px; }
.pd-thumbs {
  display: flex; flex-direction: column; gap: 8px;
}
.pd-thumb {
  width: 80px; height: 96px;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
}
.pd-thumb.active { border-color: var(--accent); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { border-color: var(--accent); }

.pd-main-img-wrap {
  position: relative;
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--muted);
  aspect-ratio: 4/5;
}
.pd-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.pd-main-img-wrap:hover .pd-main-img { transform: scale(1.04); }
.pd-fit-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,.92);
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em;
  padding: 5px 12px;
  border-radius: 4px;
  color: var(--fg);
}

/* Info Panel */
.pd-info { padding-top: 8px; }
.pd-brand-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pd-brand {
  font-size: 12px; font-weight: 700;
  color: var(--fg);
  margin: 0;
}
.pd-wish-top-btn { background: none; border: none; cursor: pointer; color: var(--fg); padding: 0; }
.pd-name {
  font-family: 'Karla', sans-serif;
  font-size: 14px; font-weight: 400;
  color: #6b7280;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Price */
.pd-price-row {
  display: flex; align-items: baseline;
  gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.pd-price-now {
  font-size: 20px; font-weight: 800; color: var(--fg);
}
.pd-price-was {
  font-size: 14px; color: #9ca3af;
  text-decoration: line-through;
}
.pd-off-badge-text {
  color: #16a34a; font-size: 13px; font-weight: 700;
}
.pd-tax { font-size: 10px; color: #9ca3af; }

/* Mini Tags */
.pd-mini-tags { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.mini-tag { display: inline-block; font-size: 11px; padding: 6px 10px; border-radius: 6px; width: fit-content; }
.mini-tag.pink-tag { background: #fdf2f8; color: #831843; border: 1px solid #fbcfe8; }
.mini-tag.blue-tag { background: #e0f2fe; color: #0369a1; }
.mini-tag.grey-tag { background: #f3f4f6; color: #374151; }

/* Size */
.pd-size-section { margin-bottom: 20px; }
.pd-size-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.pd-section-label {
  font-size: 13px; font-weight: 700; color: var(--fg);
}
.pd-size-guide {
  font-size: 12px; color: #0284c7;
  text-decoration: none; font-weight: 600;
}
.pd-sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.size-btn {
  width: 44px; height: 44px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; color: #374151;
  transition: border-color .15s, color .15s;
}
.size-btn:hover { border-color: #0284c7; }
.size-btn.active { border-color: #0284c7; color: #0284c7; }
.pd-size-note { font-size: 11px; color: var(--sale); font-weight: 600; margin-top: 8px; }
.pd-size-notify { font-size: 11px; font-weight: 600; color: #4b5563; }
.pd-size-notify a { color: #0284c7; text-decoration: none; }

/* Actions */
.pd-actions {
  display: flex; gap: 12px;
  margin-bottom: 32px;
}
.pd-add-btn {
  flex: 1;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  padding: 18px 24px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .14em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, background .3s;
}
.pd-add-btn:hover { opacity: .88; transform: translateY(-1px); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* Delivery */
.pd-delivery { margin-bottom: 20px; }
.pd-pincode-row {
  display: flex; gap: 8px;
}
.pd-pincode-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  color: var(--fg);
  background: var(--card);
  outline: none;
  transition: border-color .2s;
}
.pd-pincode-input:focus { border-color: var(--accent); }
.pd-pincode-btn {
  padding: 10px 20px;
  background: var(--fg); color: var(--bg);
  border: none; border-radius: 8px;
  font-family: 'Karla', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.pd-pincode-btn:hover { opacity: .8; }
.pd-delivery-result {
  font-size: 13px; margin-top: 8px;
  font-weight: 600;
  min-height: 20px;
}

/* Accordion */
.pd-accordion {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.pd-accordion summary {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pd-accordion summary::-webkit-details-marker { display: none; }
.pd-accordion summary::after {
  content: '+';
  font-size: 18px;
  color: var(--muted-fg);
}
.pd-accordion[open] summary::after { content: '−'; }
.pd-accordion ul {
  margin-top: 12px;
  padding-left: 16px;
  list-style: disc;
}
.pd-accordion li { font-size: 13px; color: var(--muted-fg); margin-bottom: 6px; }

/* Related */
.pd-related-section {
  background: var(--muted);
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

/* Trust Badges */
.pd-trust {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.pd-trust-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-fg);
  text-align: center;
  border-right: 1px solid var(--border);
}
.pd-trust-item:last-child { border-right: none; }
.pd-trust-item svg { color: var(--accent); }

/* Product Details Table */
.pd-desc-text {
  font-size: 13px;
  color: var(--muted-fg);
  line-height: 1.7;
  margin: 12px 0;
}
.pd-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.pd-details-table td {
  padding: 8px 4px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.pd-details-table td:first-child {
  color: var(--muted-fg);
  width: 90px;
  font-weight: 600;
  padding-right: 16px;
}
.pd-details-table td:last-child { font-weight: 700; color: var(--fg); }
.pd-care-list { padding-left: 16px; list-style: disc; margin-top: 10px; }
.pd-care-list li { font-size: 13px; color: var(--muted-fg); margin-bottom: 5px; }

/* Reviews Section */
.pd-reviews-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0;
}
.pd-reviews-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: flex-start;
}
.pd-section-h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.pd-section-h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}
.pd-recommend {
  font-size: 12px; font-weight: 600; color: #16a34a; margin-bottom: 24px; display: flex; align-items: center; gap: 6px;
}
.pd-recommend span { color: #16a34a; }

.pd-rating-overview {
  display: flex; gap: 32px; align-items: flex-start;
}
.pd-rating-big-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 90px;
}
.pd-rating-big { font-family: 'Karla', sans-serif; font-size: 48px; line-height: 1; color: #1f2937; font-weight: 400; }
.pd-stars-big { display: flex; gap: 2px; font-size: 14px; color: #facc15; }
.pd-total-ratings { font-size: 11px; color: #6b7280; text-align: center; }
.pd-rate-btn {
  margin-top: 10px; padding: 6px 20px; font-size: 11px; font-weight: 700; color: #0284c7;
  border: 1px solid #bae6fd; border-radius: 4px; background: transparent; cursor: pointer;
}

.pd-rating-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rb-row { display: flex; align-items: center; gap: 8px; }
.rb-label { font-size: 11px; font-weight: 700; width: 10px; flex-shrink: 0; color: #1f2937; }
.rb-track { flex: 1; background: #e5e7eb; height: 4px; overflow: hidden; border-radius: 0; }
.rb-fill { height: 100%; background: #22c55e; border-radius: 0; }
.rb-count { font-size: 10px; color: #6b7280; width: 32px; text-align: right; flex-shrink: 0; }

/* Individual Review Cards */
.pd-reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.review-stars { display: flex; gap: 2px; font-size: 14px; }
.review-name { font-size: 13px; font-weight: 700; }
.review-date { font-size: 11px; color: var(--muted-fg); margin-left: auto; }
.review-text { font-size: 13px; color: var(--fg); line-height: 1.6; }
.review-footer { margin-top: 12px; }
.review-like-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted-fg);
  font-family: 'Karla', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color .15s, border-color .15s;
}
.review-like-btn:hover { color: var(--accent); border-color: var(--accent); }
.review-like-btn:disabled { opacity: .6; cursor: default; }

/* Responsive */
@media (max-width: 900px) {
  .pd-wrap { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 80px; }
  .pd-gallery { position: static; flex-direction: column-reverse; gap: 8px; }
  .pd-thumbs { flex-direction: row; }
  .pd-thumb { width: 64px; height: 80px; }
  .pd-reviews-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .pd-wrap { padding: 16px 16px 60px; gap: 16px; }
  .breadcrumb { font-size: 10px; padding: 0 16px; }
  
  /* Shrink Image */
  .pd-main-img-wrap { border-radius: 12px; }
  .pd-fit-badge { font-size: 9px; padding: 4px 8px; top: 12px; left: 12px; }
  .pd-thumb { width: 50px; height: 60px; border-radius: 6px; }

  /* Info */
  /* Mini tags */
  .pd-mini-tags { gap: 6px; margin-bottom: 16px; }
  .mini-tag { font-size: 10px; padding: 5px 8px; }
  
  /* Delivery */
  .pd-delivery { margin-bottom: 16px; }
  .pd-pincode-input { padding: 8px 12px; font-size: 12px; height: 38px; }
  .pd-pincode-btn { padding: 8px 16px; font-size: 11px; height: 38px; }
  .pd-delivery-result { font-size: 11px; }
  
  /* Trust badges */
  .pd-trust { margin-bottom: 16px; border-radius: 8px; }
  .pd-trust-item { padding: 10px 4px; font-size: 9px; gap: 4px; }
  .pd-trust-item svg { width: 16px; height: 16px; }
  
  /* Accordion */
  .pd-accordion { padding: 10px 0; }
  .pd-accordion summary { font-size: 11px; }
  .pd-accordion li { font-size: 11px; margin-bottom: 4px; }
  .pd-desc-text { font-size: 11px; margin: 8px 0; }
  .pd-details-table td { font-size: 11px; padding: 6px 4px; }
  
  /* Reviews */
  .pd-reviews-section { padding: 32px 0; }
  .pd-reviews-inner { gap: 24px; }
  .pd-section-h2 { font-size: 22px; margin-bottom: 4px; }
  .pd-recommend { font-size: 11px; margin-bottom: 16px; }
  
  .pd-rating-overview { gap: 16px; align-items: center; }
  .pd-rating-big-wrap { min-width: 70px; }
  .pd-rating-big { font-size: 42px; }
  .pd-stars-big { font-size: 12px; }
  .pd-total-ratings { font-size: 9px; }
  .rb-label { font-size: 10px; width: 8px; }
  .rb-track { height: 3px; }
  .rb-count { font-size: 9px; width: 28px; }
  
  .pd-section-h3 { font-size: 13px; margin-bottom: 12px; }
  .pd-reviews-list { gap: 10px; }
  .review-card { padding: 12px 14px; border-radius: 8px; }
  .review-name { font-size: 11px; }
  .review-date { font-size: 9px; }
  .review-stars { font-size: 12px; }
  .review-text { font-size: 11px; }
  .review-like-btn { font-size: 10px; padding: 4px 10px; }

  /* Related Products Grid - No side gaps */
  .pd-related-section { padding: 24px 0; }
  .pd-related-section .section-inner { padding: 0 8px; }
  .pd-related-section .section-title { font-size: 18px; margin-bottom: 16px !important; padding: 0 8px; }
  .pd-related-section .products-grid { gap: 8px !important; padding: 0; }
}


/* ?? Reviews Expand/Collapse ?? */
.reviews-collapsible {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin 0.5s ease-in-out;
}
.reviews-collapsible.expanded {
  max-height: 3000px; /* large enough to fit reviews */
  opacity: 1;
  margin-top: 24px;
}
.pd-rating-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
