/* =========================================================================
   PRODUCT DETAIL PAGE — product.html
   ========================================================================= */

.breadcrumb { padding: calc(var(--nav-clear) + 10px) 0 10px; font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 8px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--blue-300); }

.product-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; padding-block: 20px 40px; align-items: start; }

.gallery { position: sticky; top: calc(var(--nav-clear) + 20px); }
.gallery__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  cursor: crosshair;
}

.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__lens {
  position: absolute;
  width: 150px; height: 150px;
  border: 2px solid rgba(255, 253, 247, 0.7);
  background: rgba(48, 102, 153, 0.12);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery__main:hover .gallery__lens { opacity: 1; }
.gallery__zoom-pane {
  position: absolute;
  top: 0; inset-inline-start: calc(100% + 20px);
  width: 480px; height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background-repeat: no-repeat;
  background-color: var(--navy-800);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 20;
}
.gallery__main:hover .gallery__zoom-pane { opacity: 1; }
@media (max-width: 1300px) { .gallery__zoom-pane { display: none; } }

.gallery__thumbs { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery__thumb {
  width: 74px; height: 92px; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; opacity: 0.6; transition: all 0.3s var(--ease); flex-shrink: 0;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { border-color: var(--blue-300); opacity: 1; }

/* ---------------------------------------------------------------------- */
/* INFO PANEL                                                              */
/* ---------------------------------------------------------------------- */
.product-info__cat { color: var(--blue-300); font-weight: 700; font-size: 0.85rem; }
.product-info__title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 10px 0 14px; }
.product-info__rating { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--text-secondary); font-size: 0.9rem; }
.product-info__rating .stars { color: var(--blue-300); letter-spacing: 2px; }
.product-info__price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.product-info__price .now { font-family: var(--font-num); font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.product-info__price .old { font-family: var(--font-num); font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.product-info__price .save { font-size: 0.78rem; color: var(--success); background: rgba(76,224,160,0.14); padding: 4px 10px; border-radius: var(--radius-pill); }
.product-info__desc { color: var(--text-secondary); margin-bottom: 26px; line-height: 1.8; }

.option-group { margin-bottom: 24px; }
.option-group h4 { font-size: 0.92rem; margin-bottom: 12px; }
.option-swatches { display: flex; gap: 10px; }
.option-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; position: relative; transition: transform 0.25s var(--ease); }
.option-swatch:hover { transform: scale(1.1); }
.option-swatch.is-active { border-color: var(--white); box-shadow: 0 0 0 2px var(--blue-300); }
.option-sizes { display: flex; gap: 10px; flex-wrap: wrap; }
.size-btn { min-width: 46px; height: 46px; padding: 0 12px; border-radius: var(--radius-sm); background: rgba(255, 253, 247, 0.05); border: 1px solid var(--glass-border); color: var(--text-primary); font-weight: 600; transition: all 0.3s var(--ease); }
.size-btn:hover { border-color: var(--blue-300); }
.size-btn.is-active { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); border-color: transparent; color: #FFFDF7; }

.qty-row { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.qty-stepper { display: flex; align-items: center; border-radius: var(--radius-pill); border: 1px solid var(--glass-border); overflow: hidden; }
.qty-stepper button { width: 42px; height: 42px; background: rgba(255, 253, 247, 0.04); border: none; color: var(--text-primary); font-size: 1.2rem; }
.qty-stepper button:hover { background: rgba(255, 253, 247, 0.1); }
.qty-stepper span { min-width: 40px; text-align: center; font-family: var(--font-num); font-weight: 700; }
.stock-hint { font-size: 0.85rem; color: var(--text-muted); }
.stock-hint.out { color: var(--danger); font-weight: 700; }

.product-info__actions { display: flex; gap: 14px; margin-bottom: 30px; }

.trust-row { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 18px; border-top: 1px solid var(--glass-border); }
.trust-row .trust { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-secondary); }
.trust-row svg { width: 18px; height: 18px; color: var(--blue-300); }

.order-counter {
  margin-top: 22px; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-md);
  background: rgba(48, 102, 153, 0.08); border: 1px solid rgba(48, 102, 153, 0.25);
  font-size: 0.9rem;
}
.order-counter strong { color: var(--blue-300); font-family: var(--font-num); }
.order-counter svg { width: 20px; height: 20px; color: var(--blue-300); flex-shrink: 0; }

@media (max-width: 900px) {
  .product-main { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .gallery { position: static; min-width: 0; }
  .product-info { min-width: 0; }
}

/* ---------------------------------------------------------------------- */
/* ACCORDION                                                               */
/* ---------------------------------------------------------------------- */
.accordion-section { padding-block: 20px 10px; }
.accordion__item { border-bottom: 1px solid var(--glass-border); }
.accordion__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px; background: none; border: none; color: var(--text-primary);
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
}
.accordion__trigger svg { width: 20px; height: 20px; transition: transform 0.4s var(--ease); color: var(--blue-300); }
.accordion__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.accordion__panel { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease), padding 0.5s var(--ease); }
.accordion__panel p { padding-bottom: 22px; color: var(--text-secondary); line-height: 1.9; max-width: 780px; }

/* ---------------------------------------------------------------------- */
/* REVIEWS                                                                 */
/* ---------------------------------------------------------------------- */
.reviews-summary { display: flex; align-items: center; gap: 40px; padding: 30px; border-radius: var(--radius-lg); margin-bottom: 36px; flex-wrap: wrap; }
.reviews-summary .score { text-align: center; }
.reviews-summary .score strong { font-family: var(--font-num); font-size: 3rem; color: var(--text-primary); display: block; }
.reviews-summary .score .stars { color: var(--blue-300); letter-spacing: 2px; }
.reviews-summary .bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-secondary); }
.bar-row .track { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 253, 247, 0.08); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--brand-color, #306699); border-radius: 4px; }

.reviews-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review-card { padding: 24px; border-radius: var(--radius-md); }
.review-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #FFFDF7; flex-shrink: 0; }
.review-card__name { font-weight: 700; font-size: 0.92rem; }
.review-card__date { font-size: 0.75rem; color: var(--text-muted); }
.review-card .stars { color: var(--blue-300); font-size: 0.85rem; margin-bottom: 8px; display: block; }
.review-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
@media (max-width: 700px) { .reviews-list { grid-template-columns: 1fr; } }

.review-form-host { margin-top: 26px; }
.review-open-btn { display: block; margin: 0 auto; }
.review-form { max-width: 560px; margin: 0 auto; padding: 26px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 14px; }
.review-form h4 { font-size: 1.05rem; }
.review-star-picker { display: flex; gap: 6px; font-size: 1.6rem; justify-content: flex-start; direction: ltr; }
.review-star-picker button { background: none; border: none; color: var(--glass-border); transition: color 0.2s var(--ease), transform 0.2s var(--ease); }
.review-star-picker button.is-active, .review-star-picker button:hover { color: var(--blue-300); transform: scale(1.15); }
.review-form input, .review-form textarea {
  width: 100%; background: rgba(255, 253, 247, 0.04); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 12px 15px; color: var(--text-primary); font-size: 0.9rem;
}
.review-form input:focus, .review-form textarea:focus { outline: none; border-color: var(--blue-500); }
.review-card.is-pending { opacity: 0.7; border: 1px dashed var(--glass-border); }
.review-card__pending-tag { font-size: 0.7rem; color: #ffc45c; background: rgba(255,196,92,0.14); padding: 3px 9px; border-radius: var(--radius-pill); margin-inline-start: 8px; }


[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb a,
[data-theme="dark"] .product-info__title,
[data-theme="dark"] .product-info__rating,
[data-theme="dark"] .product-info__desc,
[data-theme="dark"] .product-info__price .now,
[data-theme="dark"] .product-info__price .old,
[data-theme="dark"] .product-info__price .save,
[data-theme="dark"] .option-group h4,
[data-theme="dark"] .size-btn:not(.is-active),
[data-theme="dark"] .qty-stepper button,
[data-theme="dark"] .qty-stepper span,
[data-theme="dark"] .trust-row .trust,
[data-theme="dark"] .order-counter,
[data-theme="dark"] .order-counter span
[data-theme="dark"] .accordion__trigger span,
[data-theme="dark"] #relatedSection .section-head h2,
[data-theme="dark"] .accordion__trigger svg,
[data-theme="dark"] .accordion__panel p,
[data-theme="dark"] .reviews-section .section-head h2 {
  color: var(--brand-color, #306699);
  color: #306699;
}