/* =====================
   CSS Variables (NBSense Brand)
   ===================== */
:root {
  --accent: #075ebb;
  --accent-dark: #054fa0;
  --accent-light: #e8f0fb;
  --heading: #2d465e;
  --text: #212529;
  --text-muted: #6c757d;
  --border: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --success: #16a34a;
  --star: #f59e0b;
  --danger: #dc2626;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --font-body: 'Roboto', system-ui, sans-serif;
  --font-heading: 'Nunito', sans-serif;
  --font-nav: 'Inter', sans-serif;
}

/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }
h1,h2,h3,h4,h5 { font-family: var(--font-heading); color: var(--heading); line-height: 1.25; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }

/* =====================
   Breadcrumb
   ===================== */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.breadcrumb-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb li + li::before { content: '/'; margin-right: 8px; color: var(--border); }
.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* =====================
   Container
   ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================
   Product Section
   ===================== */
.product-section {
  padding: 36px 0 48px;
  background: var(--surface);
}
.product-grid {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Thumbnails */
.thumb-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.thumb {
  width: 80px;
  height: 80px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
}
.thumb.active,
.thumb:hover { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Main Image */
.main-image-col { position: relative; }
.main-image-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f7f9fc;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Product Info */
.product-info-col {}

.product-badge {
  display: inline-block;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.product-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.3;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.stars { display: flex; gap: 2px; }
.stars i { color: var(--star); font-size: 16px; }
.stars i.half { position: relative; color: #ddd; }
.rating-score { font-weight: 700; color: var(--text); font-size: 15px; }
.rating-count { color: var(--accent); font-size: 14px; }
.rating-count:hover { text-decoration: underline; }

/* Price Box */
.price-box {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.price-current { font-size: 26px; font-weight: 700; color: var(--accent); }
.price-original { font-size: 15px; color: var(--text-muted); text-decoration: line-through; }
.price-save {
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}
.product-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.65;
}
.stock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.in-stock { color: var(--success); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.in-stock::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}
.stock-remaining { color: var(--text-muted); }

/* Color Selector */
.color-label { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.color-options { display: flex; gap: 10px; margin-bottom: 6px; }
.color-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 2px white inset; }
.color-name { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

/* Quantity + Add to Cart */
.purchase-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 38px; height: 44px;
  border: none;
  background: #f3f6fa;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
  transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--border); }
.qty-input {
  width: 44px;
  text-align: center;
  border: none;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  background: #fff;
  height: 44px;
}
.btn-cart {
  flex: 1;
  min-width: 180px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s;
}
.btn-cart:hover { background: var(--accent-dark); }
.btn-wishlist {
  width: 44px; height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: border-color .2s, color .2s;
}
.btn-wishlist:hover { border-color: var(--danger); color: var(--danger); }

/* Perks */
.perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.perk-item i { color: var(--accent); font-size: 16px; }

/* =====================
   Tabs Section
   ===================== */
.tabs-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0 0 60px;
}
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 36px;
}
.tab-btn {
  padding: 16px 28px;
  border: none;
  background: transparent;
  font-family: var(--font-nav);
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color .2s;
  font-weight: 500;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s;
}
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn:hover { color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Description Tab */
.desc-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.desc-main h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.desc-main p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.desc-main h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feature-card .feat-icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.feature-card p { font-size: 13px; color: var(--text-muted); margin: 0; }

.included-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.included-box h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.included-box h3 i { color: var(--accent); }
.included-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.included-list li:last-child { border-bottom: none; }
.included-list li i { color: var(--success); font-size: 16px; }

/* Specs Tab */
.specs-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.spec-group { margin-bottom: 8px; }
.spec-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 12px;
}
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td {
  padding: 10px 8px;
  font-size: 14px;
}
.spec-table td:first-child { color: var(--text-muted); width: 45%; }
.spec-table td:last-child { font-weight: 500; color: var(--text); }
.spec-table tr:nth-child(odd) td { background: #f8fafc; }

/* Feedback Tab */
.feedback-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.rating-summary {
  background: #f3f7fd;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}
.rating-big { font-size: 64px; font-weight: 800; color: var(--heading); line-height: 1; margin-bottom: 8px; }
.rating-summary .stars { justify-content: center; margin-bottom: 6px; }
.rating-summary .stars i { font-size: 20px; }
.rating-based { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.btn-review {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background .2s;
}
.btn-review:hover { background: var(--accent-dark); }

.rating-bars { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.bar-label { display: flex; align-items: center; gap: 4px; width: 30px; flex-shrink: 0; }
.bar-label i { color: var(--star); font-size: 13px; }
.bar-track {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .6s ease;
}
.bar-count { width: 24px; text-align: right; color: var(--text-muted); font-size: 13px; }

/* Review Cards */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.reviewer-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.reviewer-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.reviewer-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.reviewer-meta .stars i { font-size: 13px; }
.review-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.review-body { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.review-actions { display: flex; gap: 10px; }
.btn-review-action {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.btn-review-action:hover { border-color: var(--accent); color: var(--accent); }

/* =====================
   Responsive
   ===================== */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }
  .product-info-col { grid-column: 1 / -1; }
  .thumb-col { flex-direction: row; flex-wrap: wrap; }
  .thumb { width: 64px; height: 64px; }
  .specs-layout { grid-template-columns: 1fr; }
  .desc-layout { grid-template-columns: 1fr; }
  .feedback-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
  .thumb-col { flex-direction: row; }
  .tabs-nav { overflow-x: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: 1fr; }
  .purchase-row { flex-wrap: wrap; }
  .btn-cart { min-width: 100%; }
  .rating-big { font-size: 48px; }
}