/**
 * Product Detail Page - Tabs Styles
 * Clean rewrite — no double borders
 */

/* ========================================
   TABS WRAPPER
   ======================================== */

/* section-card already provides: white bg, 1px border, 16px radius, 20px padding */
.product-tabs {
  margin-top: 12px;
}

.product-tabs-container {
  /* no extra padding — section-card padding is enough */
}

/* ========================================
   TAB NAVIGATION
   ======================================== */

.product-tabs-container .nav-tabs {
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  flex-wrap: nowrap;
  gap: 1px;
  margin-bottom: 20px;
  /* reset Bootstrap defaults */
  border-top: none;
  border-left: none;
  border-right: none;
}

.product-tabs-container .nav-tabs .nav-item {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.product-tabs-container .nav-tabs .nav-item .nav-link {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-tabs-container .nav-tabs .nav-link {
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0;
  background: transparent !important;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: -2px; /* overlap the nav-tabs border-bottom */
  text-decoration: none;
  outline: none;
}

.product-tabs-container .nav-tabs .nav-link:focus {
  box-shadow: none;
  outline: none;
}

.product-tabs-container .nav-tabs .nav-link i {
  font-size: 13px;
}

.product-tabs-container .nav-tabs .nav-link:hover {
  color: #0aad0a;
  border-bottom-color: rgba(10, 173, 10, 0.4) !important;
}

.product-tabs-container .nav-tabs .nav-link.active {
  color: #0aad0a;
  border-bottom-color: #0aad0a !important;
  font-weight: 700;
}

/* ========================================
   TAB CONTENT — flat, no card-inside-card
   ======================================== */

.product-tabs-container .tab-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.product-tabs-container .tab-pane {
  color: inherit;
}

/* ========================================
   DESCRIPTION — identical row design to specification
   ======================================== */

.description-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* desc-item mirrors spec-item exactly: icon + text, 2-col grid */
.desc-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.desc-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.desc-text {
  font-family: 'Hind Siliguri', 'Roboto', sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.8;
  color: inherit;
}

.desc-intro {
  font-family: 'Hind Siliguri', 'Roboto', sans-serif;
}

.desc-section-header span {
  font-family: 'Hind Siliguri', 'Roboto', sans-serif;
}

.desc-key {
  font-family: 'Hind Siliguri', 'Roboto', sans-serif;
}

/* ── Double-bar custom bullet ── */
.desc-bullet {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  width: 36px;
  position: relative;
}

.db-bar {
  display: block;
  height: 5px;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.db-bar--top    { width: 22px; }
.db-bar--bottom { width: 13px; }

.desc-item:hover .db-bar--top    { width: 26px; }
.desc-item:hover .db-bar--bottom { width: 18px; }

/* Cycling gradients per row */
.desc-item:nth-child(6n+1) .db-bar--top    { background: linear-gradient(90deg, #0aad0a, #22c55e); }
.desc-item:nth-child(6n+1) .db-bar--bottom { background: linear-gradient(90deg, #16a34a, #4ade80); }

.desc-item:nth-child(6n+2) .db-bar--top    { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.desc-item:nth-child(6n+2) .db-bar--bottom { background: linear-gradient(90deg, #2563eb, #93c5fd); }

.desc-item:nth-child(6n+3) .db-bar--top    { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.desc-item:nth-child(6n+3) .db-bar--bottom { background: linear-gradient(90deg, #d97706, #fcd34d); }

.desc-item:nth-child(6n+4) .db-bar--top    { background: linear-gradient(90deg, #ef4444, #f87171); }
.desc-item:nth-child(6n+4) .db-bar--bottom { background: linear-gradient(90deg, #dc2626, #fca5a5); }

.desc-item:nth-child(6n+5) .db-bar--top    { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.desc-item:nth-child(6n+5) .db-bar--bottom { background: linear-gradient(90deg, #7c3aed, #c4b5fd); }

.desc-item:nth-child(6n+6) .db-bar--top    { background: linear-gradient(90deg, #ec4899, #f472b6); }
.desc-item:nth-child(6n+6) .db-bar--bottom { background: linear-gradient(90deg, #db2777, #fbcfe8); }

/* *** check variant */
.desc-bullet--check { position: relative; }
.db-check {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #fff;
  text-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* ── Intro paragraph ── */
.desc-intro {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-dark);
  background: linear-gradient(135deg, #f0fdf4, #f8faff);
  border-left: 4px solid #0aad0a;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-family: 'Roboto', sans-serif;
}

[data-bs-theme="dark"] .desc-intro {
  background: linear-gradient(135deg, #0a1f12, #0f1b2d);
  color: #d1fae5;
}

/* ── Section header ── */
.desc-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ecfdf5, #dbeafe);
  border-left: 4px solid #0aad0a;
  border-radius: 8px;
  margin: 14px 0 6px 0;
  font-weight: 700;
  font-size: 13.5px;
  color: #065f46;
  letter-spacing: 0.01em;
}

[data-bs-theme="dark"] .desc-section-header {
  background: linear-gradient(135deg, #052e16, #1e3a5f);
  color: #6ee7b7;
}

.desc-header-icon {
  color: #0aad0a;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Spacer ── */
.desc-spacer { height: 6px; }

/* ── Bold key in key:value items ── */
.desc-key {
  font-weight: 700;
  color: var(--text-dark);
}

.summary-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ========================================
   SPECIFICATIONS
   ======================================== */

.specification-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item {
  display: grid;
  grid-template-columns: 36px 160px 16px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.spec-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.spec-icon {
  color: #0aad0a;
  font-size: 16px;
  text-align: center;
}

.spec-label {
  font-weight: 700;
  color: #6b7280;
  font-size: 13px;
}

.spec-separator {
  color: #9ca3af;
  text-align: center;
}

.spec-value {
  color: inherit;
  font-weight: 500;
  font-size: 13px;
}

/* ========================================
   REVIEWS
   ======================================== */

.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  padding: 14px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
}

.review-date {
  color: #9ca3af;
  font-size: 12px;
}

.review-rating {
  color: #ffc107;
  font-size: 13px;
}

.review-text {
  line-height: 1.6;
  font-size: 13px;
}

/* ========================================
   DARK MODE
   ======================================== */

[data-bs-theme="dark"] .product-tabs-container .nav-tabs {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .product-tabs-container .nav-tabs .nav-link {
  color: #9ca3af;
}

[data-bs-theme="dark"] .product-tabs-container .nav-tabs .nav-link:hover {
  color: #0aad0a;
  border-bottom-color: rgba(10, 173, 10, 0.4) !important;
}

[data-bs-theme="dark"] .product-tabs-container .nav-tabs .nav-link.active {
  color: #0aad0a;
  border-bottom-color: #0aad0a !important;
}

[data-bs-theme="dark"] .desc-item {
  background: #1f2937;
}

[data-bs-theme="dark"] .desc-item:hover {
  background: #374151;
}

[data-bs-theme="dark"] .spec-item {
  background: #1f2937;
}

[data-bs-theme="dark"] .spec-item:hover {
  background: #374151;
}

[data-bs-theme="dark"] .spec-label {
  color: #9ca3af;
}

[data-bs-theme="dark"] .review-item {
  background: #1f2937;
  border-color: #374151;
}

/* ========================================
   REVIEW MODAL & STAR RATING
   ======================================== */

.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
  font-size: 28px;
}

.star-rating-input input[type="radio"] {
  display: none;
}

.star-rating-input label {
  cursor: pointer;
  color: #d1d5db;
  transition: all 0.2s ease;
  margin: 0;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: #ffc107;
  transform: scale(1.1);
}

.star-rating-input input[type="radio"]:checked ~ label {
  color: #ffc107;
}

#reviewModal .modal-dialog {
  max-width: 480px;
}

#reviewModal .modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#reviewModal .modal-header {
  background: linear-gradient(135deg, #0aad0a, #089408);
  color: white;
  border-bottom: none;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
}

#reviewModal .modal-title {
  font-weight: 700;
  font-size: 16px;
}

#reviewModal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  font-size: 12px;
  padding: 8px;
}

#reviewModal .btn-close:hover {
  opacity: 1;
}

#reviewModal .modal-body {
  padding: 20px;
  background: var(--card-bg);
}

#reviewModal .form-label {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

#reviewModal .form-control {
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  transition: all 0.3s ease;
}

#reviewModal .form-control:focus {
  border-color: #0aad0a;
  box-shadow: 0 0 0 3px rgba(10, 173, 10, 0.08);
  outline: none;
  background: var(--card-bg);
}

#reviewModal .form-control-sm {
  padding: 7px 10px;
  font-size: 13px;
}

#reviewModal .modal-footer {
  background: var(--body-bg);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  gap: 8px;
}

#reviewModal .btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

#reviewModal .btn-success {
  background: linear-gradient(135deg, #0aad0a, #089408);
  border: none;
  transition: all 0.3s ease;
}

#reviewModal .btn-success:hover {
  background: linear-gradient(135deg, #0cc40c, #0aad0a);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(10, 173, 10, 0.25);
}

#reviewModal .btn-secondary {
  background: #6c757d;
  border: none;
}

#reviewModal .btn-secondary:hover {
  background: #5a6268;
}

#addReviewBtn {
  background: linear-gradient(135deg, #0aad0a, #089408);
  border: none;
  font-weight: 600;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#addReviewBtn:hover {
  background: linear-gradient(135deg, #0cc40c, #0aad0a);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(10, 173, 10, 0.25);
}

[data-bs-theme="dark"] #reviewModal .modal-content {
  background: var(--card-bg);
}

[data-bs-theme="dark"] #reviewModal .modal-body {
  background: var(--card-bg);
}

[data-bs-theme="dark"] #reviewModal .form-control {
  background: #1f2937;
  border-color: #374151;
  color: #ffffff;
}

[data-bs-theme="dark"] #reviewModal .form-control:focus {
  background: #1f2937;
  border-color: #0aad0a;
}

[data-bs-theme="dark"] #reviewModal .modal-footer {
  background: #1f2937;
  border-color: #374151;
}

/* ========================================
   RESPONSIVE — SPECIFICATION
   ======================================== */

@media (max-width: 768px) {
  .spec-item {
    grid-template-columns: 28px 110px 12px 1fr;
    gap: 6px;
    padding: 8px 10px;
  }
}

@media (max-width: 400px) {
  .spec-item {
    grid-template-columns: 24px 90px 10px 1fr;
    gap: 5px;
    padding: 7px 8px;
  }
}
