/* ==========================================================================
   VINFAST HÙNG SƠN 3S - VEHICLE DETAIL COMPONENT STYLESHEET
   Location: /cars/car-detail.css
   ========================================================================== */

/* 1. VEHICLE DETAIL HERO BANNER */
.car-hero-section {
  position: relative;
  padding: 140px 0 80px;
  background: radial-gradient(circle at 80% 20%, #f1f6ff 0%, var(--bg-white) 70%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.car-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.car-hero-text {
  z-index: 2;
}

.car-badge {
  display: inline-block;
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
  padding: 6px 14px;
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.car-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-black);
  line-height: 1.2;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.car-hero-price-box {
  display: flex;
  gap: 25px;
  align-items: baseline;
  margin-bottom: 25px;
}

.car-hero-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-blue);
}

.car-hero-deposit {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 1.1 CAR HERO PRICE TABLE STYLES */
.car-hero-price-table-wrapper {
  width: 100%;
  max-width: 450px;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border-color, #e9ecef);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.04);
}

.car-hero-price-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  background-color: var(--bg-white, #ffffff);
}

.car-hero-price-table th {
  background-color: var(--primary-blue, #0066ff);
  color: var(--bg-white, #ffffff);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}

.car-hero-price-table th:last-child {
  text-align: right;
}

.car-hero-price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e9ecef);
  vertical-align: middle;
}

.car-hero-price-table tr:last-child td {
  border-bottom: none;
}

.car-hero-price-table tr:nth-child(even) td {
  background-color: var(--bg-gray, #f8f9fa);
}

.car-hero-price-table td.version-name {
  font-weight: 700;
  color: var(--text-black, #111111);
  font-size: clamp(0.75rem, 3.2vw, 0.95rem);
  text-align: left;
  white-space: nowrap;
}

.car-hero-price-table td.version-price {
  font-weight: 800;
  color: var(--primary-blue, #0066ff);
  font-size: clamp(0.8rem, 3.5vw, 1.05rem);
  text-align: right;
  white-space: nowrap;
}

/* Mobile responsive padding and adjustments */
@media (max-width: 480px) {
  .car-hero-price-table th {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .car-hero-price-table td {
    padding: 10px 12px;
  }
}

.car-hero-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 35px;
}

.car-hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.car-hero-img-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.car-hero-img-box img {
  width: 100%;
  max-width: 650px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 102, 255, 0.12));
  transition: transform var(--transition-slow);
}

/* 2. STICKY QUICK JUMP NAVIGATION BAR */
.detail-nav-sticky {
  position: sticky;
  top: var(--header-height);
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  z-index: 998;
  transition: all var(--transition-normal);
}

.main-header.scrolled~.detail-nav-sticky {
  top: 75px !important;
  /* Adjust top positioning when main header shrinks */
}

.detail-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 55px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Hide scrollbar for clean tab look */
}

.detail-nav-container::-webkit-scrollbar {
  display: none;
}

.detail-nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  height: 100%;
  align-items: center;
  white-space: nowrap;
}

.detail-nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding: 18px 0;
  transition: color var(--transition-fast);
}

.detail-nav-link:hover,
.detail-nav-link.active {
  color: var(--primary-blue);
}

.detail-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-blue);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.detail-nav-link.active::after {
  transform: scaleX(1);
}

.detail-nav-cta {
  display: flex;
  gap: 10px;
}

/* 3. PREMIUM PROMOTIONS CARD GRID */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.promo-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  transition: all var(--transition-normal);
}

.promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.05);
  border-color: var(--primary-blue-border);
}

.promo-icon {
  width: 44px;
  height: 44px;
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.promo-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.promo-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-black);
}

.promo-card-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 500;
}

/* 4. DETAIL CONTENT BLOCKS */
.detail-section-padding {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-section-padding:nth-child(even) {
  background-color: var(--bg-gray);
}

.detail-section-title-wrapper {
  margin-bottom: 40px;
  text-align: center;
}

.detail-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-black);
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.detail-section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-blue);
}

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.editorial-layout.reverse {
  direction: rtl;
  /* Flip column ordering */
}

.editorial-layout.reverse .editorial-text-col {
  direction: ltr;
  /* Reset text direction inside column */
}

.editorial-text-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editorial-p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 500;
}

.editorial-img-col img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-normal);
  display: block;
}

.editorial-img-col img:hover {
  transform: scale(1.02);
}

/* 5. INTERACTIVE COLOR SELECTOR Component */
.color-selector-wrapper {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  margin-top: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.color-selector-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.color-display-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.color-car-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.08));
}

.color-car-img.fade-out {
  opacity: 0;
  transform: scale(0.97);
}

.color-info-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.color-subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.color-name-display {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-black);
}

.color-swatches {
  display: flex;
  gap: 15px;
}

.color-swatch-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.color-swatch-btn::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.color-swatch-btn.active::after {
  border-color: var(--primary-blue);
}

/* Colors styling */
.color-swatch-btn.swatch-white {
  background-color: #ffffff;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15);
}

.color-swatch-btn.swatch-red {
  background-color: #c0392b;
}

/* 6. ADAS SAFETY SYSTEM STYLING */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.safety-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  transition: all var(--transition-normal);
}

.safety-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.04);
  border-color: var(--primary-blue-border);
}

.safety-icon {
  width: 40px;
  height: 40px;
  background-color: #fff9e6;
  color: #f39c12;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.safety-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safety-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-black);
}

.safety-card-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 500;
}

/* 7. DETAILED TECH SPECS TABLE STYLING */
.specs-table-container {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th {
  background-color: var(--primary-blue);
  color: var(--bg-white);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 16px 24px;
  text-align: left;
}

.specs-table td {
  padding: 16px 24px;
  font-size: 0.95rem;
  color: var(--text-black);
  border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table tr:nth-child(even) td {
  background-color: var(--bg-gray);
}

.specs-label {
  font-weight: 700;
  width: 40%;
}

.specs-value {
  font-weight: 500;
  color: var(--text-muted);
}

/* 8. GALLERY PICTURE GRID STYLING */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: var(--bg-white);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(10px);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* 9. RESPONSIVE MEDIA QUERIES */
@media (max-width: 992px) {
  .car-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .car-hero-price-box {
    justify-content: center;
  }

  .car-hero-buttons {
    justify-content: center;
  }

  .detail-nav-sticky {
    display: none !important;
    /* Hide sticky bar on smaller tablets and mobile */
  }

  .promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .editorial-layout.reverse {
    direction: ltr;
  }

  .color-selector-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .color-swatches {
    justify-content: center;
  }

  .safety-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .car-hero-title {
    font-size: 2.2rem;
  }

  .car-hero-price {
    font-size: 1.8rem;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .safety-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .color-selector-wrapper {
    padding: 24px;
  }
}

/* Redesigned Premium Promotion Unified Box */
.promo-unified-container {
  max-width: 650px;
  margin: 30px auto 0;
  border: 1.5px dashed #ff0000;
  border-radius: 8px;
  padding: 18px;
  /* Padding inside the red dashed border */
  background-color: #e8edf5;
  /* Matches background exactly */
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.05);
}

.promo-unified-header {
  background-color: #1e68f6;
  color: var(--bg-white);
  padding: 16px 20px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  /* Rounded corners inside */
  margin-bottom: 15px;
}

.promo-unified-body {
  padding: 5px;
}

.promo-unified-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-unified-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.promo-unified-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1.2px dashed #90cdf4;
  /* Custom light blue dashed separators */
  font-size: 0.98rem;
  color: var(--text-black);
  font-weight: 700;
  line-height: 1.5;
}

.promo-unified-item:last-child {
  border-bottom: none;
}

.promo-unified-item-icon {
  font-size: 1.1rem;
  color: #ff0000;
  flex-shrink: 0;
  margin-top: 2px;
}

.promo-unified-footer-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ff0000;
  /* Bold Red Highlight */
  text-align: center;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.promo-unified-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.promo-unified-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.promo-unified-btn.btn-coci {
  background-color: #1e68f6;
  color: var(--bg-white);
}

.promo-unified-btn.btn-coci:hover {
  background-color: #0b51c5;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.promo-unified-btn.btn-phone {
  background-color: #1e68f6;
  color: var(--bg-white);
}

.promo-unified-btn.btn-phone:hover {
  background-color: #0b51c5;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

@media (max-width: 600px) {
  .promo-unified-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}






/* ==========================================================================
   PREMIUM FIXED RIGHT SIDEBAR CARD WITH COMPACT GRADIENTS FOR VEHICLE PAGES
   ========================================================================== */
@media (min-width: 1200px) {

  /* DO NOT pad the body to keep the topbar and main header at full width */
  body.car-detail-body {
    padding: 0 !important;
  }

  /* Pad content containers below the header, excluding the topbar and header container */
  body.car-detail-body .container:not(.topbar-content):not(.header-container) {
    padding-right: 380px !important;
    padding-left: 20px !important;
    transition: padding var(--transition-normal);
  }

  /* Keep the sticky sub-navigation container full width, but pad its inner content to align links */
  .detail-nav-sticky {
    left: 0 !important;
    width: 100% !important;
    transition: all var(--transition-normal);
  }

  .car-sidebar-left-wrapper {
    position: fixed;
    top: 155px;
    /* Fits below the header + topbar */
    right: calc((100vw - 1400px) / 2 + 20px);
    /* Align perfectly inside the 1400px container grid! */
    left: auto !important;
    width: 340px;
    height: auto !important;
    /* Compact wrap height, no stretching! */
    max-height: calc(100vh - 180px);
    z-index: 999;
    display: block;
    transition: all var(--transition-normal);
    overflow-y: auto;
    /* Safety scroll on extremely small viewports */
    scrollbar-width: none;
    /* Hide scrollbar for premium glass look */
  }

  .car-sidebar-left-wrapper::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Safari/Chrome */
  }

  .main-header.scrolled~.car-sidebar-left-wrapper {
    top: 95px;
    /* Shifts up under the 75px scrolled header */
    max-height: calc(100vh - 120px);
  }
}

/* Fallback for medium desktops to prevent card from clipping */
@media (min-width: 1200px) and (max-width: 1440px) {
  .car-sidebar-left-wrapper {
    right: 20px !important;
  }
}

@media (max-width: 1199px) {
  .car-sidebar-left-wrapper {
    display: none !important;
  }
}

.car-sidebar-left-card {
  background: linear-gradient(135deg, #0d1b3e 0%, #040a1d 100%);
  /* Elegant deep corporate gradient */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

.sidebar-card-img-box {
  width: 100%;
  background: #ffffff;
  padding: 10px 15px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-card-img-box img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.05));
}

.sidebar-card-content {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  /* Compact gap between title, list, and buttons */
}

.sidebar-card-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  margin: 0;
  border-left: 4px solid #0066ff;
  /* High-end glowing blue brand border */
  padding-left: 10px;
  line-height: 1.2;
  text-align: left;
}

.sidebar-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Tight, readable spacing */
  text-align: left;
}

.sidebar-card-list li {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #e2e8f0;
  position: relative;
  padding-left: 16px;
  font-weight: 500;
}

.sidebar-card-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #00b0ff;
  /* Glowing cyan bullet points */
  font-weight: bold;
  font-size: 1.1rem;
  top: -2px;
}

.sidebar-card-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 2px;
  /* Pulls closely under the list! */
}

.sidebar-btn {
  width: 100%;
  border-radius: 30px;
  padding: 11px 15px;
  font-size: 0.90rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(197, 48, 48, 0.15);
}

.sidebar-btn-call {
  background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%);
  /* Modern glowing red-orange gradient */
  color: #ffffff;
}

.sidebar-btn-call:hover {
  background: linear-gradient(135deg, #9b2c2c 0%, #c53030 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(197, 48, 48, 0.35);
}

.sidebar-btn-quote {
  background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%);
  /* Matching glowing red-orange gradient */
  color: #ffffff;
}

.sidebar-btn-quote:hover {
  background: linear-gradient(135deg, #9b2c2c 0%, #c53030 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(197, 48, 48, 0.35);
}