/* =========================================
   1. CSS VARIABLES & RESET
   ========================================= */
:root {
  --primary-color: #2563eb; /* Modern Blue */
  --primary-dark: #1e40af;
  --accent-color: #f59e0b; /* Amber for price/highlights */
  --text-dark: #111827;
  --text-gray: #6b7280;
  --bg-light: #f3f4f6;
  --white: #ffffff;
  --border-color: #e5e7eb;
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================================
   2. LAYOUT CONTAINERS
   ========================================= */
.car-page {
  padding: 1rem 1rem;
}

.car-page__container {
  max-width: 1280px;
  margin: 0 auto;
}

/* =========================================
   3. CAR HERO SECTION (Top Area)
   ========================================= */
.car-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: var(--white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  .car-hero {
    grid-template-columns: 1fr 1.2fr; /* Info left, Gallery right (larger) */
  }
}

/* --- Hero Info (Left) --- */
.car-hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
@media (max-width: 576px) {
    .car-hero__title{
        font-size: 1.3rem;
    }
}
.car-hero__top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.car-hero__trim {
  font-size: 1.1rem;
  color: var(--text-gray);
  font-weight: 500;
}

.car-hero__price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
}

/* Key Meta Data (Year, Miles, etc horizontal list) */
.car-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.car-hero__meta li {
  background: var(--bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Quick Spec Grid */
.car-hero__quick-spec {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 576px) {
  .car-hero__quick-spec {
    grid-template-columns: repeat(3, 1fr);
  }
}

.car-hero__quick-spec li {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 600;
}

.car-hero__quick-spec li span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.car-hero__quick-spec li span img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* --- Hero Gallery (Right) --- */
.car-hero__gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.car-hero__gallery-main {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background-color: #eee;
}

.car-hero__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.car-hero__gallery-main:hover img {
  transform: scale(1.05);
}

/* Thumbnails */
.car-hero__gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
}

.car-hero__thumb {
  display: block;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.7;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.car-hero__thumb:hover,
.car-hero__thumb.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.car-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================
   4. MAIN CONTENT AREA (Split Layout)
   ========================================= */
.car-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .car-main {
    grid-template-columns: 2fr 1fr; /* Content 2/3, Sidebar 1/3 */
  }
}

/* Sections Styling */
.car-section {
  background: var(--white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.car-section__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bg-light);
  display: inline-block;
  color: var(--text-dark);
}

.car-description {
  font-family: 400 14px/20px "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-gray);
  white-space: pre-line; /* Preserves line breaks from DB */
  
}

/* =========================================
   5. ACCORDION (Features)
   ========================================= */
.car-accordion {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.car-accordion__item {
  border-bottom: 1px solid var(--border-color);
}

.car-accordion__item:last-child {
  border-bottom: none;
}

.car-accordion__header {
  width: 100%;
  text-align: left;
  background: var(--white);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.car-accordion__header:hover {
  background: #f9fafb;
}

/* Chevron Icon for Accordion */
.car-accordion__header::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: bold;
}

.car-accordion__item--active .car-accordion__header::after {
  content: '-';
}

.car-accordion__content {
  display: none; /* Hidden by default */
  padding: 1.5rem;
  background: #fbfbfb;
  border-top: 1px solid var(--border-color);
}

.car-accordion__item--active .car-accordion__content {
  display: block; /* Visible when active */
  animation: slideDown 0.3s ease-out;
}

.car-accordion__content ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .car-accordion__content ul {
    grid-template-columns: 1fr 1fr;
  }
}

.car-accordion__content li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-gray);
}

.car-accordion__content li i {
  color: var(--primary-color); /* Green or Brand color checkmarks */
  font-size: 0.9rem;
}

/* =========================================
   6. TABS (Dimensions)
   ========================================= */
.car-tabs {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
}

/* =========================================
   7. ANIMATIONS
   ========================================= */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   8. CONTACT FORM SIDEBAR (New)
   ========================================= */

/* The card container */
.contact-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  
  /* Make it sticky! */
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 2rem; /* Distance from top of browser window */
}

.contact-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.contact-card__subtitle {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

/* Inputs & Textarea */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: #f9fafb;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); /* Subtle blue glow */
}

.contact-form textarea {
  resize: vertical; /* Allow vertical resizing only */
  min-height: 100px;
}

/* Buttons */
.btn-submit {
  width: 100%;
  padding: 0.85rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* "OR" divider */
.contact-card__or {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.contact-card__or::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

.contact-card__or span {
  background: var(--white);
  padding: 0 0.75rem;
  color: var(--text-gray);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
}

/* Call Button */
.btn-call {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.85rem;
  background-color: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-call:hover {
  border-color: var(--text-dark);
  background-color: var(--bg-light);
}



/* BRAND CTA WRAPPER */
.brand-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 18px 16px;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  gap: 18px;
  min-height: 130px;
}

/* LEFT: BRAND LOGO */
.brand-cta__left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-cta__logo {
  max-width: 154px;     /* bigger size */
  max-height: 91px;
  object-fit: contain;
  opacity: 0.95;
}

/* RIGHT: BUTTON STACK */
.brand-cta__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

/* CTA BUTTONS */
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease;
  color: #fff;
}

.cta-btn img {
  width: 20px;
  height: 20px;
}

/* CALL BUTTON */
.cta-btn--call {
  background: #1d4ed8;
}
.cta-btn--call:hover {
  background: #1e40af;
}

/* WHATSAPP BUTTON */
.cta-btn--whatsapp {
  background: #22c55e;
}
.cta-btn--whatsapp:hover {
  background: #15803d;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .brand-cta {
    flex-direction: column;
    text-align: center;
  }

  .brand-cta__right {
    width: 100%;
  }
  .car-hero__top-row {
    padding-bottom: 0.1rem
  }
  .car-hero__meta {
    gap: 0.1rem;
  }
  .car-hero {
    gap: 0.1rem;
  }
  .car-page {
    padding: 0;
}

}
/* ============================
   Performance & Dimensions
   ============================ */

.perf-section {
    margin-top: 3rem;
    background: #111;
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    border: 1px solid #222;
}

/* Header */
.perf-header {
    text-align: center;
    margin-bottom: 3rem;
}
.perf-header-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary, #e63946);
    margin-bottom: 0.75rem;
}
.perf-header-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin: 0 0 1rem;
}
.perf-header-title span { color: var(--primary, #e63946); }
.perf-header-line {
    width: 50px;
    height: 2px;
    background: var(--primary, #e63946);
    margin: 0 auto;
    opacity: 0.7;
}

/* Gauge Row */
.perf-gauges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.perf-gauge-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 1.8rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.perf-gauge-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary, #e63946);
}

.perf-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
}
.perf-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}
.perf-ring-track {
    fill: none;
    stroke: #2a2a2a;
    stroke-width: 7;
}
.perf-ring-fill {
    fill: none;
    stroke: var(--primary, #e63946);
    stroke-width: 7;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(230,57,70,0.4));
}
.perf-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.perf-ring-num {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.perf-ring-unit {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
    margin-top: 3px;
}
.perf-gauge-label {
    margin-top: 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    text-align: center;
}

/* Dimensions Grid */
.perf-dims {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
}
.perf-dim-item {
    padding: 1rem 1.4rem;
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
}
.perf-dim-item:nth-child(even) { border-right: none; }
.perf-dim-item:nth-last-child(-n+2) { border-bottom: none; }

.perf-dim-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.55rem;
}
.perf-dim-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}
.perf-dim-val {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}
.perf-dim-val em {
    font-style: normal;
    font-size: 0.75rem;
    color: #555;
    margin-left: 2px;
}
.perf-dim-bar-track {
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}
.perf-dim-bar {
    height: 100%;
    width: 0;
    background: var(--primary, #e63946);
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .perf-gauges {
        grid-template-columns: repeat(2, 1fr);
    }
    .perf-section {
        padding: 2rem 1rem;
    }
}
@media (max-width: 480px) {
    .perf-gauges {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .perf-ring-wrap { width: 100px; height: 100px; }
    .perf-ring-num { font-size: 1.5rem; }
}

/* Video Wrapper & Cards (Light theme) */
.video-wrapper {
    margin-bottom: 30px;
}
.video-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.video-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.video-card__title img {
    width: 20px;
    height: 20px;
}

/* Responsive 16:9 Aspect Ratio Hack 
   This ensures the video resizes perfectly on mobile without black bars
*/
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #000; /* Black background while loading */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* ============================
   MOBILE REORDER: HERO LAYOUT
   ============================ */
@media (max-width: 768px) {

  /* Main layout goes vertical */
  .car-hero {
    display: flex;
    flex-direction: column;
  }

  /* Reorder inside info block */
  .car-hero__title {
    order: 1;
  }

  .car-hero__top-row {
    order: 2;
  }

  .car-hero__meta {
    order: 3;
  }

  /* Move gallery between meta and price-row */
  .car-hero__gallery {
    order: 4;
  }

  /* Now price-row goes BELOW the image */
  .car-hero__price-row {
    order: 5;
    margin-top: 1rem;
  }

  /* Mobile image adjustments */
  .car-hero__gallery-main {
    height: 250px;
  }
}
/* ============================
   QUICK SPEC POSITIONING
   ============================ */

/* Default: show desktop version, hide mobile one */
.car-hero__price-row--mobile {
  display: none;
}

/* Mobile layout */
@media (max-width: 768px) {

  /* Hide desktop quick-spec under meta */
  .car-hero__price-row--desktop {
    display: none;
  }

  /* Show quick-spec under the gallery */
  .car-hero__price-row--mobile {
    display: block;
    margin-top: 1rem;
  }

  /* Make hero stack nicely on mobile */
  .car-hero {
    grid-template-columns: 1fr; /* keep single column */
  }

  /* Mobile image adjustments */
  .car-hero__gallery-main {
    height: 250px;
    border-radius: 10px;
  }

  .car-hero__gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
} 