/* ============================================================
   ClickVerge — Product Detail Styles
   ============================================================ */

.product-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; padding: 40px 0 60px;
}

/* ── Image Gallery ──────────────────────────────────────────── */
.product-gallery { display: flex; gap: 14px; align-items: flex-start; }
.gallery-thumbs {
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; width: 76px;
}
.gallery-thumb {
  width: 76px; height: 76px; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; border: 2px solid transparent;
  transition: var(--transition-fast);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }
.gallery-main {
  flex: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-alt); aspect-ratio: 1;
  position: relative;
}
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.3s ease;
}
.gallery-zoom-btn {
  position: absolute; bottom: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: var(--radius);
  background: rgba(255,255,255,0.9); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition-fast);
  border: 1px solid var(--border);
}
.gallery-zoom-btn:hover { background: var(--primary); color: #fff; }
.gallery-zoom-btn svg { width: 16px; height: 16px; }

/* ── Product Info ───────────────────────────────────────────── */
.product-info {}
.product-brand {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--teal-dark); margin-bottom: 8px;
}
.product-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700;
  color: var(--text); margin-bottom: 14px; line-height: 1.3;
}
.product-rating-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}
.review-count { font-size: 0.82rem; color: var(--primary); font-weight: 500; }
.review-count:hover { text-decoration: underline; }
.stock-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 600; color: var(--success);
}
.stock-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: block; }

/* Price */
.product-price-wrap { margin-bottom: 18px; }
.product-price-main { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.product-price-original { font-size: 1rem; color: var(--muted-light); text-decoration: line-through; margin-left: 10px; }
.product-price-save {
  display: inline-block; margin-top: 4px;
  font-size: 0.8rem; font-weight: 700; color: var(--success);
  background: rgba(34,197,94,0.1); padding: 2px 10px; border-radius: var(--radius-full);
}

/* Description */
.product-desc { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; margin-bottom: 20px; }

/* Size Selector */
.product-options { margin-bottom: 20px; }
.option-label { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.option-label span { color: var(--muted); font-weight: 400; }
.size-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.size-opt {
  padding: 8px 18px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--text-2);
  transition: var(--transition-fast);
}
.size-opt:hover, .size-opt.active { border-color: var(--primary); color: var(--primary); background: rgba(26,110,216,0.06); }
.size-opt.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* Qty + CTA */
.product-cta { display: flex; flex-direction: column; gap: 12px; }
.cta-row { display: flex; gap: 12px; align-items: center; }
.product-add-cart {
  flex: 1; padding: 14px; font-size: 0.95rem; font-weight: 700;
  background: linear-gradient(135deg, var(--teal) 0%, var(--primary) 100%);
  color: #fff; border-radius: var(--radius-full); border: none; cursor: pointer;
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,180,200,0.3);
}
.product-add-cart:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,180,200,0.4); }
.product-add-cart svg { width: 20px; height: 20px; }
.product-wishlist-btn {
  width: 52px; height: 52px; border-radius: var(--radius-full);
  border: 2px solid var(--border); color: var(--muted); background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: var(--transition-fast); flex-shrink: 0;
}
.product-wishlist-btn:hover { border-color: var(--error); color: var(--error); }
.product-wishlist-btn.active { border-color: var(--error); color: var(--error); fill: var(--error); }
.product-wishlist-btn svg { width: 22px; height: 22px; }
.btn-buy-now {
  width: 100%; padding: 14px; font-size: 0.95rem; font-weight: 700;
  background: transparent; color: var(--primary); border: 2px solid var(--primary);
  border-radius: var(--radius-full); cursor: pointer; transition: var(--transition);
}
.btn-buy-now:hover { background: var(--primary); color: #fff; }

/* Product Meta */
.product-meta { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.meta-row { display: flex; gap: 8px; font-size: 0.82rem; margin-bottom: 6px; }
.meta-row .meta-key { color: var(--muted); min-width: 80px; }
.meta-row .meta-val { color: var(--text-2); font-weight: 500; }
.meta-row a { color: var(--primary); }

/* ── Tabs ───────────────────────────────────────────────────── */
.product-tabs { padding: 48px 0; border-top: 1px solid var(--border); }
.tab-nav {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}
.tab-btn {
  padding: 12px 28px; font-size: 0.9rem; font-weight: 600;
  color: var(--muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition-fast);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: none; } }

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) td { background: var(--bg); }
.specs-table td {
  padding: 12px 16px; font-size: 0.875rem; border: 1px solid var(--border);
}
.specs-table td:first-child { font-weight: 600; color: var(--text-2); width: 220px; background: var(--bg-alt) !important; }

/* Reviews */
.review-summary { display: flex; gap: 32px; margin-bottom: 32px; align-items: center; }
.review-big-score { text-align: center; }
.review-big-score .score { font-size: 3rem; font-weight: 800; color: var(--text); line-height: 1; }
.review-big-score .total { font-size: 0.82rem; color: var(--muted); }
.review-bars { flex: 1; }
.review-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.8rem; }
.review-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.review-bar-fill { height: 100%; background: linear-gradient(90deg, var(--warning), #f97316); border-radius: var(--radius-full); }
.review-bar-count { min-width: 30px; text-align: right; color: var(--muted); }
.review-card {
  background: var(--card); border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--border-light); margin-bottom: 14px;
}
.review-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.reviewer-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.reviewer-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.review-date { font-size: 0.75rem; color: var(--muted); }
.review-verified { font-size: 0.72rem; color: var(--success); font-weight: 600; }
.review-text { font-size: 0.88rem; color: var(--text-2); line-height: 1.7; }

/* ── Responsive Product ─────────────────────────────────────── */
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 28px; }
  .gallery-thumbs { flex-direction: row; width: auto; }
  .gallery-thumb { width: 64px; height: 64px; }
  .product-gallery { flex-direction: column; }
}
@media (max-width: 600px) {
  .tab-btn { padding: 10px 16px; font-size: 0.82rem; }
  .review-summary { flex-direction: column; align-items: flex-start; }
}
