/* =============================================
   LABSOURCED — PRODUCT DETAIL PAGE
   ============================================= */

.product-breadcrumb {
  background: #f8f8f3;
  padding: .75rem 0;
  border-bottom: 1px solid #eee;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: #999;
}
.product-breadcrumb a { color: #06332F; text-decoration: none; }
.product-breadcrumb a:hover { text-decoration: underline; }
.product-breadcrumb span { color: #444; }

.product-detail-section { padding: 3rem 0 4rem; }
.product-detail-loading { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Image Side */
.pd-image-side {}
.pd-main-image-wrap {
  border-radius: 20px;
  overflow: hidden;
  background: #f8f8f3;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.pd-main-image-wrap img {
  max-width: 85%; max-height: 85%;
  object-fit: contain;
  transition: transform .4s ease;
}
.pd-main-image-wrap:hover img { transform: scale(1.05); }

/* Info Side */
.pd-badge { display: inline-block; background: #06332F; color: #C8A96A; font-family: 'Inter', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 20px; margin-bottom: .75rem; }
.pd-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: #111; line-height: 1.1; margin-bottom: .5rem; }
.pd-rating-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.pd-stars { color: #C8A96A; font-size: 1.1rem; letter-spacing: .05em; }
.pd-review-count { font-family: 'Inter', sans-serif; font-size: .85rem; color: #888; }
.pd-short-desc { font-family: 'Inter', sans-serif; font-size: .95rem; color: #555; line-height: 1.7; margin-bottom: 2rem; }

.pd-variations-label { font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #999; margin-bottom: .75rem; }
.pd-variations-grid { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.pd-var-btn {
  padding: .65rem 1.2rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .9rem; font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center;
}
.pd-var-btn .var-price { font-size: .75rem; font-weight: 400; color: #888; margin-top: .2rem; }
.pd-var-btn:hover { border-color: #06332F; color: #06332F; }
.pd-var-btn.active { border-color: #06332F; background: #06332F; color: #fff; }
.pd-var-btn.active .var-price { color: #C8A96A; }

.pd-price-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.pd-price { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 700; color: #06332F; }

.pd-qty-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.pd-qty-label { font-family: 'Inter', sans-serif; font-size: .85rem; color: #555; }
.pd-qty-ctrl { display: flex; align-items: center; border: 1.5px solid #ddd; border-radius: 10px; overflow: hidden; }
.pd-qty-minus, .pd-qty-plus { width: 40px; height: 44px; border: none; background: #f8f8f3; cursor: pointer; font-size: 1.1rem; transition: background .2s; }
.pd-qty-minus:hover, .pd-qty-plus:hover { background: #06332F; color: #fff; }
.pd-qty-num { width: 50px; height: 44px; border: none; text-align: center; font-family: 'Inter', sans-serif; font-size: .95rem; font-weight: 600; outline: none; }

.pd-add-btn { width: 100%; padding: 1.1rem; margin-bottom: .75rem; font-size: 1rem; }

.pd-trust { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #f0f0f0; }
.pd-trust-item { display: flex; align-items: center; gap: .5rem; font-family: 'Inter', sans-serif; font-size: .8rem; color: #777; }
.pd-trust-item svg { color: #C8A96A; flex-shrink: 0; }

/* Tabs */
.pd-tabs { margin-top: 3rem; }
.pd-tab-nav { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 2rem; overflow-x: auto; }
.pd-tab-btn {
  padding: .85rem 1.5rem;
  border: none; background: none;
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: #888; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
  white-space: nowrap;
}
.pd-tab-btn:hover { color: #06332F; }
.pd-tab-btn.active { color: #06332F; font-weight: 600; border-bottom-color: #06332F; }
.pd-tab-content { display: none; }
.pd-tab-content.active { display: block; }
.pd-desc { font-family: 'Inter', sans-serif; font-size: .95rem; color: #555; line-height: 1.8; }
.pd-specs-table { width: 100%; border-collapse: collapse; }
.pd-specs-table tr { border-bottom: 1px solid #f0f0f0; }
.pd-specs-table td { padding: .75rem; font-family: 'Inter', sans-serif; font-size: .9rem; }
.pd-specs-table td:first-child { color: #888; font-weight: 500; width: 40%; }
.pd-specs-table td:last-child { color: #111; font-weight: 600; }

/* Reviews Section */
.reviews-section { background: #f8f8f3; padding: 4rem 0; }
.reviews-summary { display: flex; align-items: center; gap: 2rem; background: #fff; border-radius: 16px; padding: 1.5rem 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.rs-big-rating { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; font-weight: 700; color: #06332F; }
.rs-stars { font-size: 1.4rem; color: #C8A96A; }
.rs-count { font-family: 'Inter', sans-serif; font-size: .85rem; color: #888; }

.reviews-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; }
.review-card { background: #fff; border-radius: 16px; padding: 1.5rem; border: 1px solid #eee; }
.review-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; }
.review-name { font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 700; color: #111; }
.review-date { font-family: 'Inter', sans-serif; font-size: .78rem; color: #bbb; }
.review-stars { color: #C8A96A; font-size: .95rem; margin-bottom: .4rem; }
.review-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 700; color: #111; margin-bottom: .3rem; }
.review-body { font-family: 'Inter', sans-serif; font-size: .88rem; color: #555; line-height: 1.6; }

/* Review Form */
.review-form-wrap { background: #fff; border-radius: 20px; padding: 2.5rem; border: 1px solid #eee; margin-top: 2rem; }
.review-form-wrap h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: #06332F; margin-bottom: 1.5rem; }
.review-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .05em; }
.form-group input, .form-group textarea, .form-group select {
  padding: .75rem 1rem; border: 1.5px solid #eee; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: .9rem; color: #111;
  outline: none; transition: border-color .2s; background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #06332F; }

/* Star rating input */
.star-rating-input { display: flex; gap: .25rem; font-size: 1.8rem; cursor: pointer; margin-top: .25rem; }
.star-inp { color: #ddd; transition: color .15s; }
.star-inp.active, .star-inp:hover { color: #C8A96A; }

/* Related Section */
.related-section { padding: 4rem 0; }

@media (max-width: 768px) {
  .product-detail-layout, .product-detail-loading { grid-template-columns: 1fr; gap: 2rem; }
  .review-form-grid { grid-template-columns: 1fr; }
  .pd-trust { gap: 1rem; }
}

/* ==============================================
   COA GALLERY — IMAGE SWITCHER
   ============================================== */

/* Main display viewer (replaces product image when COA is active) */
.pd-main-display {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #f8f8f3;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}
.pd-main-display img.pd-display-img {
  max-width: 85%; max-height: 85%;
  object-fit: contain;
  transition: transform .4s ease, opacity .3s ease;
}
.pd-main-display:hover img.pd-display-img { transform: scale(1.05); }

/* PDF viewer inside main display */
.pd-main-display .pd-coa-frame-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.pd-main-display.coa-active .pd-coa-frame-wrap { opacity: 1; pointer-events: all; }
.pd-main-display.coa-active img.pd-display-img { opacity: 0; pointer-events: none; transform: scale(1); }
.pd-coa-frame-wrap iframe { width: 100%; height: 100%; border: none; }
.pd-coa-frame-wrap .coa-img-preview { max-width: 90%; max-height: 90%; object-fit: contain; border-radius: 10px; }
.pd-coa-frame-label {
  position: absolute;
  top: 12px;
  left: 14px;
  background: #06332F;
  color: #C8A96A;
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity .3s ease;
}
.pd-main-display.coa-active .pd-coa-frame-label { opacity: 1; }

/* Back to product hint when COA is active */
.pd-back-hint {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  color: #888;
  margin-bottom: .5rem;
  animation: fadeIn .3s ease;
}
.pd-back-hint.visible { display: flex; }
.pd-back-hint svg { color: #C8A96A; }

/* COA Thumbnails strip */
.pd-coa-strip {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
}
.pd-coa-strip-label {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: .15rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pd-coa-strip-label span {
  background: rgba(200,169,106,.2);
  color: #06332F;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* Individual COA card in the strip */
.pd-coa-thumb {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .65rem 1rem;
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  transition: all .22s ease;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}
.pd-coa-thumb::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #C8A96A;
  border-radius: 4px 0 0 4px;
  transform: scaleY(0);
  transition: transform .22s ease;
}
.pd-coa-thumb:hover {
  border-color: rgba(200,169,106,.5);
  background: rgba(200,169,106,.04);
  box-shadow: 0 2px 12px rgba(200,169,106,.15);
  transform: translateX(3px);
}
.pd-coa-thumb:hover::before { transform: scaleY(1); }
.pd-coa-thumb.active {
  border-color: #C8A96A;
  background: rgba(200,169,106,.08);
  box-shadow: 0 4px 16px rgba(200,169,106,.2);
  transform: translateX(4px);
}
.pd-coa-thumb.active::before { transform: scaleY(1); }

.pd-coa-thumb-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #06332F, #0a4f47);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #C8A96A;
}
.pd-coa-thumb-icon.img-type { background: linear-gradient(135deg, #2d5a27, #3d7a35); }
.pd-coa-thumb-info { flex: 1; min-width: 0; }
.pd-coa-thumb-name {
  font-size: .84rem;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-coa-thumb-type {
  font-size: .72rem;
  color: #aaa;
  margin-top: 1px;
}
.pd-coa-thumb-open {
  flex-shrink: 0;
  color: #C8A96A;
  transition: transform .2s;
}
.pd-coa-thumb:hover .pd-coa-thumb-open,
.pd-coa-thumb.active .pd-coa-thumb-open { transform: translateX(2px); }

/* Product thumbnail to restore view */
.pd-product-thumb {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .5rem 1rem;
  background: #f8f8f3;
  border: 1.5px dashed #ddd;
  border-radius: 12px;
  cursor: pointer;
  transition: all .22s ease;
  font-family: 'Inter', sans-serif;
}
.pd-product-thumb:hover { border-color: #06332F; background: rgba(6,51,47,.04); }
.pd-product-thumb .pd-pt-img {
  width: 32px; height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}
.pd-product-thumb-label { font-size: .82rem; font-weight: 600; color: #555; }
.pd-product-thumb-sub { font-size: .72rem; color: #aaa; }

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

