:root {
  --red: #c8102e;
  --yellow: #ffcc00;
  --black: #000;
}

/* Main image */
.product-main-img {
  width: 100%;
  max-width: 625px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  cursor: zoom-in;
}

/* ===============================
   IMAGE ZOOM OVERLAY
================================ */
#zoomOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.zoom-image {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: zoomIn .25s ease;
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}

@keyframes zoomIn {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* Tabs */
.nav-tabs .nav-link {
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  color: var(--red);
  border-color: var(--red) var(--red) #fff;
}

/* Characteristics list */
#productCharacteristics li {
  margin-bottom: 6px;
}

/* Related products */
.product-card {
  border-radius: 10px;
  border: 1px solid #eee;
  border-bottom: 4px solid var(--yellow);
  overflow: hidden;
  transition: .25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  border-bottom-color: var(--red);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}


/* ===============================
   PREMIUM SPECIFICATION TABLE
================================ */

.spec-title {
  font-weight: 700;
  color: var(--black);
  position: relative;
  padding-left: 12px;
}

.spec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 100%;
  background: var(--red);
  border-radius: 3px;
}

.spec-table {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fff;
}

/* Each row */
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-row:nth-child(even) {
  background: #fafafa;
}

.spec-row:hover {
  background: rgba(200, 16, 46, 0.05);
}

/* Left column */
.spec-key {
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-key::before {
  content: "■";
  font-size: 8px;
  color: var(--red);
}

/* Right column */
.spec-value {
  color: #000;
  font-weight: 500;
  text-align: right;
}

/* Mobile friendly */
@media (max-width: 576px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .spec-value {
    text-align: left;
    color: #444;
  }
}

/* ===============================
   PREMIUM MULTI-MODEL SPEC TABLE
================================ */

.spec-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

/* Sticky header */
.spec-compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 16px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(180deg, #f9f9f9, #eeeeee);
  border-bottom: 1px solid #e2e2e2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

/* Body cells */
.spec-compare-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f1f1;
  vertical-align: middle;
  transition: background 0.2s ease;
}

/* Zebra rows */
.spec-compare-table tbody tr:nth-child(even) {
  background: #fcfcfc;
}

/* Row hover */
.spec-compare-table tbody tr:hover {
  background: #f7f9fc;
}

/* ✅ First column: Parameter name */
.spec-compare-table tbody td:first-child {
  font-weight: 600;
  color: #222;
  width: 28%;
  position: relative;
  padding-left: 22px;
  background: linear-gradient(90deg, #fff, #fafafa);
}

.spec-compare-table tbody td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--red, #c5161c);
  border-radius: 2px;
}

/* ✅ Value cells */
.spec-value {
  display: block;
  text-align: center;
  font-weight: 500;
  color: #333;
}

.spec-unit {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

/* ✅ Rounded corners */
.spec-compare-table thead th:first-child {
  border-top-left-radius: 16px;
}

.spec-compare-table thead th:last-child {
  border-top-right-radius: 16px;
}

.spec-compare-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.spec-compare-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

/* ✅ Mobile optimization */
@media (max-width: 768px) {
  .spec-compare-table {
    font-size: 0.85rem;
  }

  .spec-compare-table thead th {
    padding: 10px 10px;
  }

  .spec-compare-table tbody td {
    padding: 10px 10px;
  }

  .spec-compare-table tbody td:first-child {
    width: 40%;
  }
}
