/* =========================================================
   product.css — Product Detail Page
   ========================================================= */

/* =========================================================
   Breadcrumb (standalone here since header/footer are external)
   ========================================================= */
.breadcrumb-bar{ background: var(--ivory-deep); border-bottom: 1px solid var(--paper-line); padding: 14px 0; }
.breadcrumb-bar .container{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.breadcrumb-bar a{ color: var(--text-dim); transition: color .18s ease; }
.breadcrumb-bar a:hover{ color: var(--copper); }
.breadcrumb-bar span:last-child{ color: var(--text); font-weight: 600; }

/* =========================================================
   Product main layout
   ========================================================= */
.product-main{ padding-top: 48px; }
.product-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

/* =========================================================
   Gallery
   ========================================================= */
.product-gallery{ position: sticky; top: 24px; }
.gallery-main{ position: relative; margin-bottom: 14px; }
.gallery-main-img{ aspect-ratio: 1/1; border-radius: var(--radius); }
.gallery-main-img img{ width: 100%; height: 100%; object-fit: cover; }
.gallery-zoom{
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--paper-line); color: var(--ink); display: flex; align-items: center;
  justify-content: center; transition: border-color .18s ease, color .18s ease;
}
.gallery-zoom svg{ width: 18px; height: 18px; }
.gallery-zoom:hover{ border-color: var(--copper); color: var(--copper); }

.gallery-thumbs{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-thumb{
  aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--paper-line);
  padding: 0; background: none; transition: border-color .18s ease;
}
.gallery-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover{ border-color: var(--copper); }
.gallery-thumb.is-active{ border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper-tint); }

/* =========================================================
   Product info panel
   ========================================================= */
.product-brand-tag{
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--copper); margin-bottom: 10px;
}
.product-info h1{ font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }

.product-rating-row{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.stars{ color: var(--gold); letter-spacing: 1px; font-size: 14px; }
.rating-count{ font-size: 13px; color: var(--text-dim); }
.dot-sep{ color: var(--paper-line); }
.stock-status{ display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.stock-status svg{ width: 15px; height: 15px; }
.stock-status.in-stock{ color: #3E8E5A; }

.product-price-row{ display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.product-price-row .price-now{ font-size: 30px; }
.product-price-row .price-old{ font-size: 16px; }
.price-off{
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--copper);
  background: var(--copper-tint); padding: 4px 10px; border-radius: 999px;
}

.product-short-desc{ font-size: 14.5px; color: var(--text-dim); line-height: 1.65; margin-bottom: 22px; max-width: 480px; }

.product-highlights{ display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.product-highlights li{ display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; font-weight: 500; }
.product-highlights svg{ width: 18px; height: 18px; color: var(--copper); flex-shrink: 0; margin-top: 1px; }

.product-option{ margin-bottom: 22px; max-width: 420px; }
.product-option label{ display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.product-option select{
  width: 100%; border: 1.5px solid var(--paper-line); border-radius: var(--radius-sm); padding: 13px 14px;
  font-family: var(--font-body); font-size: 14px; background: var(--ivory); color: var(--text);
  transition: border-color .18s ease;
}
.product-option select:focus{ outline: none; border-color: var(--copper); }

.product-actions{ display: flex; align-items: stretch; gap: 12px; margin-bottom: 14px; }
.qty-stepper{
  display: flex; align-items: center; border: 1.5px solid var(--paper-line); border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0;
}
.qty-btn{
  width: 42px; background: var(--ivory-deep); border: none; font-size: 18px; color: var(--text);
  cursor: pointer; transition: background-color .18s ease;
}
.qty-btn:hover{ background: var(--copper-tint); color: var(--copper); }
.qty-stepper input{
  width: 46px; border: none; border-left: 1.5px solid var(--paper-line); border-right: 1.5px solid var(--paper-line);
  text-align: center; font-family: var(--font-body); font-size: 14.5px; font-weight: 600; height: 100%;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.product-actions .btn-block{ flex: 1; }
.wishlist-btn{ flex-shrink: 0; }
.buy-now-btn{ margin-bottom: 26px; }

.trust-mini-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.trust-mini{
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--ivory-deep); border-radius: var(--radius-sm); padding: 14px 8px;
}
.trust-mini svg{ width: 22px; height: 22px; color: var(--copper); }
.trust-mini span{ font-size: 11px; font-weight: 600; line-height: 1.3; }

.product-meta{ font-size: 12px; color: var(--text-dim); }
.product-meta span{ font-weight: 600; color: var(--text); }

/* =========================================================
   Tabs section
   ========================================================= */
.product-tabs-section{ padding: 56px 0; }
.product-tabs{ margin-bottom: 32px; flex-wrap: wrap; }
.tab-panel-wrap{ background: #fff; border: 1.5px solid var(--paper-line); border-radius: var(--radius); padding: 34px; }
.tab-panel{ display: none; }
.tab-panel.is-active{ display: block; animation: tabFade .25s ease; }
@keyframes tabFade{ from{ opacity: 0; transform: translateY(4px);} to{ opacity: 1; transform: translateY(0);} }
.tab-panel p{ font-size: 14.5px; color: var(--text-dim); line-height: 1.75; max-width: 720px; margin-bottom: 16px; }
.tab-panel p:last-child{ margin-bottom: 0; }

/* Specifications table */
.spec-table{ width: 100%; border-collapse: collapse; max-width: 620px; }
.spec-table tr{ border-bottom: 1px solid var(--paper-line); }
.spec-table tr:last-child{ border-bottom: none; }
.spec-table th, .spec-table td{ text-align: left; padding: 14px 16px; font-size: 14px; }
.spec-table th{ width: 200px; color: var(--text); font-weight: 600; background: var(--ivory-deep); }
.spec-table td{ color: var(--text-dim); }

/* Fitment */
.fitment-lede{ font-weight: 600; color: var(--text) !important; }
.fitment-list{ display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; max-width: 480px; }
.fitment-list li{ display: flex; align-items: center; gap: 10px; font-size: 14px; }
.fitment-list svg{ width: 18px; height: 18px; color: var(--copper); flex-shrink: 0; }
.fitment-note{ font-style: italic; font-size: 13.5px !important; }

/* Reviews */
.review-summary{ display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--paper-line); }
.review-score{ display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.review-score-num{ font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1; }
.review-bars{ flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.review-bar-row{ display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 10px; font-size: 12px; color: var(--text-dim); }
.review-bar{ height: 6px; border-radius: 999px; background: var(--ivory-deep); overflow: hidden; }
.review-bar i{ display: block; height: 100%; background: var(--gold); border-radius: 999px; }

.review-list{ display: flex; flex-direction: column; gap: 22px; margin-bottom: 28px; }
.review-card{ padding-bottom: 22px; border-bottom: 1px solid var(--paper-line); }
.review-card:last-child{ border-bottom: none; padding-bottom: 0; }
.review-card-head{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-author{ font-weight: 600; font-size: 13.5px; }
.review-date{ font-size: 12px; color: var(--text-dim); }
.review-card p{ margin-bottom: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px){
  .product-grid{ grid-template-columns: 1fr; gap: 34px; }
  .product-gallery{ position: static; }
  .review-summary{ flex-direction: column; gap: 20px; }
}

@media (max-width: 760px){
  .product-main{ padding-top: 32px; }
  .tab-panel-wrap{ padding: 24px 20px; }
  .product-tabs{ overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .product-tabs .tab-btn{ flex-shrink: 0; }
  .spec-table th{ width: 140px; }
  .product-actions{ flex-wrap: wrap; }
  .qty-stepper{ order: 1; }
  .product-actions .btn-block{ order: 2; flex-basis: 100%; }
  .wishlist-btn{ order: 3; }
}

@media (max-width: 520px){
  .gallery-thumbs{ grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .trust-mini-grid{ grid-template-columns: 1fr 1fr; }
  .trust-mini:last-child{ grid-column: 1 / -1; }
}
