/* VDP essentials */
.vdp-hero-row{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start;margin-block:18px 8px}
#hero-carousel .splide__track img,
#colour-gallery .splide__track img{width:100%;height:auto;object-fit:contain;aspect-ratio:16/9;background:var(--jac-surface-muted);border-radius:10px}
.jac-admin-note{padding:10px 12px;background:var(--jac-warning-surface);border:1px dashed var(--jac-warning);border-radius:8px}

/*
==================================================
--- VDP 2.0 Component Styles (Phase 4 & 5) ---
==================================================
*/

/* --- 1. New Layout Wrappers --- */
.vdp-main-layout-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  margin-top: 2rem;
}

.vdp-left-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.vdp-right-col.vdp-sticky-card {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 1024px) {
  .vdp-main-layout-wrap {
    grid-template-columns: 1fr;
  }
  .vdp-right-col.vdp-sticky-card {
    position: relative;
    top: auto;
  }
}

/* --- 2. Title Section (title-section.php) --- */
.vdp-title-content {
  flex: 1 1 400px;
}
.vdp-title-content .breadcrumbs {
  margin-bottom: 0.5rem;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--jac-grey-500);
}
#inner-wrap .vdp-model-title,
.vdp-model-title {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--jac-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
}
.vdp-model-subtitle {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--jac-red);
  line-height: 1.6;
  letter-spacing: 0;
  margin-top: 0.5rem;
}

/* Title Actions Container */
.vdp-title-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.vdp-title-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Action Button Base Styles */
.vdp-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  border-radius: 6px;
  border: 2px solid var(--jac-border);
  background: var(--jac-white);
  color: var(--jac-ink);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.vdp-action-button:hover {
  border-color: var(--jac-red);
  color: var(--jac-red);
  background: var(--jac-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.vdp-action-button:active {
  transform: translateY(0);
}

/* Icon Styles */
.vdp-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Save Button - Explicit Default State */
.vdp-save-button {
  border-color: var(--jac-border);
  background: var(--jac-white);
  color: var(--jac-ink);
}

.vdp-save-button:hover {
  border-color: var(--jac-red);
  color: var(--jac-red);
  background: var(--jac-white);
}

/* Save Button States */
.vdp-save-button .vdp-icon-save {
  display: block;
}

.vdp-save-button .vdp-icon-saved {
  display: none;
}

/* Saved state - white border and text on dark background */
.vdp-save-button.is-saved {
  border-color: var(--jac-white);
  background: var(--jac-ink);
  color: var(--jac-white);
}

.vdp-save-button.is-saved .vdp-icon-save {
  display: none;
}

.vdp-save-button.is-saved .vdp-icon-saved {
  display: block;
}

.vdp-save-button.is-saved:hover {
  background: var(--jac-ink);
  border-color: var(--jac-white);
}

/* Brochure Button - Red Outline Primary */
.vdp-brochure-button {
  border-color: var(--jac-red) !important;
  color: var(--jac-red) !important;
  font-weight: 600 !important;
}

.vdp-brochure-button:hover {
  background: var(--jac-red) !important;
  color: var(--jac-white) !important;
  border-color: var(--jac-red) !important;
}

/* Responsive - basic overrides (premium mobile styles in dedicated block below line 1089) */
@media (max-width: 768px) {
  /* Title sizing handled by premium mobile block with higher specificity */
  #inner-wrap .vdp-model-title,
  .vdp-model-title {
    font-size: var(--font-size-h2); /* 2rem / 32px - mobile override */
  }

  .vdp-model-subtitle {
    font-size: 1.125rem;
  }
}


/* --- 3. Main Gallery (gallery-main-v2.php) --- */
.vdp-gallery-v2 .splide__thumbnails .splide__slide {
  height: auto; 
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.vdp-gallery-v2 .splide__thumbnails .splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  aspect-ratio: 4/3; /* Set 4:3 aspect ratio */
}
.vdp-gallery-v2 .splide__thumbnails .splide__slide:hover {
  opacity: 1;
}
.vdp-gallery-v2 .splide__thumbnails .splide__slide.is-active {
  opacity: 1;
  border: 2px solid var(--jac-red);
  border-radius: 4px;
}


/* --- 4. Finance Card V2 (Mockup Styles) --- */
.vdp-finance-card-v2 {
  background: var(--jac-white);
  border: 1px solid var(--jac-border);
  border-radius: var(--radius-lg); /* 12px for cards */
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.vdp-finance-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--jac-border);
}
.vdp-finance-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
.vdp-finance-card-price {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--jac-red);
  margin-top: 0.25rem;
}
.vdp-finance-result {
  padding: 1.5rem;
  background: var(--jac-surface-muted);
  border-bottom: 1px solid var(--jac-border);
}
.vdp-finance-result-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--jac-grey-500);
}
.vdp-finance-result-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--jac-black);
  line-height: 1.2;
  margin-top: 0.25rem;
}
.vdp-finance-result-disclaimer {
  display: block;
  font-size: 0.75rem;
  color: var(--jac-grey-500);
  margin-top: 0.5rem;
}
.vdp-finance-fields-wrap {
  display: none; 
}
.vdp-finance-cta {
  padding: 1.5rem;
  display: grid;
  gap: 0.75rem;
}
.vdp-finance-cta .jac-btn {
  width: 100%;
  text-align: center;
  margin: 0;
  /* Remove all !important - rely on canonical .jac-btn styles */
  /* Border-radius: 8px (inherited from jac-components.css) */
  /* Min-height: 48px (inherited from jac-components.css) */
  /* Focus states: inherited from jac-components.css */
}

/* No style overrides needed for .jac-btn--primary and .jac-btn--secondary */
/* Canonical styles from jac-components.css are correct */
.vdp-finance-phone-link {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--jac-graphite);
  text-decoration: none;
  font-size: 1.125rem;
}
.vdp-finance-phone-link:hover {
  color: var(--jac-red);
}

/* ============================================
   JAC Finance Card - Simplified Pricing Display
   Matches styling sample for VDP sidebar
   ============================================ */

/* Main Card Container */
.jac-finance-card-simple {
  background: var(--jac-white);
  border-radius: var(--radius-lg); /* 12px for cards */
  box-shadow: var(--shadow-card);
  padding: var(--space-24); /* 1.5rem / 24px - compact sidebar card */
  margin-bottom: 24px;
}

/* Header Section */
.jac-finance-header {
  margin-bottom: 24px;
}

.jac-finance-title {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--jac-ink);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Main Price Display */
.jac-price-main {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--jac-border);
}

.jac-price-amount {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--jac-red);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.jac-price-disclaimer {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--jac-grey-500);
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

/* Finance Info Grid */
.jac-finance-info {
  margin-bottom: 24px;
}

.jac-finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--jac-surface-soft);
}

.jac-finance-row:last-child {
  border-bottom: none;
}

.jac-finance-label {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1rem;
  color: var(--jac-grey-600);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.jac-finance-value {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1rem;
  color: var(--jac-ink);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

/* CTA Buttons */
.jac-finance-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* COMPONENT PURITY FIX:
   Local .jac-btn--primary and .jac-btn--secondary overrides removed (lines 414-466).
   Finance card buttons now rely on canonical .jac-btn system from jac-components.css.
   Added VDP-specific layout adjustments only.
*/
.jac-finance-ctas .jac-btn--primary,
.jac-finance-ctas .jac-btn--secondary {
  width: 100%;
}

/* Tertiary Button (Phone Call) */
.jac-btn-tertiary {
  width: 100%;
  padding: 14px 24px;
  background: var(--jac-white);
  color: var(--jac-black);
  border: 2px solid var(--jac-border);
  border-radius: 6px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.jac-btn-tertiary:hover {
  background: var(--jac-surface-muted);
  border-color: var(--jac-black);
  color: var(--jac-black);
  text-decoration: none;
}

/* Button Icons */
.jac-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Bottom Terms */
.jac-finance-terms {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--jac-grey-500);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  margin: 0;
  text-align: left;
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
  .jac-finance-card-simple {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .jac-finance-title {
    font-size: 20px;
  }
  
  .jac-price-amount {
    font-size: 28px;
  }
  
  .jac-finance-row {
    padding: 10px 0;
  }
  
  .jac-finance-label {
    font-size: 14px;
  }
  
  .jac-finance-value {
    font-size: 15px;
  }
  
  .jac-btn--primary,
  .jac-btn--secondary,
  .jac-btn-tertiary {
    padding: 12px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .jac-price-amount {
    font-size: 24px;
  }
  
  .jac-finance-title {
    font-size: 18px;
  }
}

/* ========================================
   Touch Target Optimization (Mobile UX)
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  .jac-btn--primary,
  .jac-btn--secondary,
  .jac-btn-tertiary {
    min-height: 48px; /* Ensures proper touch target size */
  }
}

/* ==========================================================================
   KEY HIGHLIGHTS V2 - With Colored Icons
   ========================================================================== */

.vdp-key-highlights-v2 {
    background: var(--jac-white);
    border-radius: var(--radius-lg); /* 12px for cards */
    padding: var(--space-24); /* 1.5rem / 24px */
    box-shadow: var(--shadow-card);
}

/* Header with Star Icon */
.vdp-highlights-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--jac-border);
}

.vdp-star-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.vdp-highlights-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--jac-black);
    margin: 0;
}

/* Highlights List */
.vdp-highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual Highlight Item */
.vdp-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.vdp-highlight-item:hover {
    background: var(--jac-surface-muted);
}

/* Icon Container */
.vdp-highlight-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: currentColor;
    background: var(--jac-white-a10);
    border-radius: 8px;
    border: 2px solid currentColor;
}

.vdp-highlight-icon svg {
    width: 20px;
    height: 20px;
}

/* Content */
.vdp-highlight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.25rem;
}

.vdp-highlight-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--jac-black);
    line-height: 1.4;
}

.vdp-highlight-subtitle {
    font-size: 0.875rem;
    color: var(--jac-grey-500);
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .vdp-key-highlights-v2 {
        padding: 1.25rem 1rem;
    }
    
    .vdp-highlight-item {
        gap: 0.75rem;
    }
    
    .vdp-highlight-icon {
        width: 36px;
        height: 36px;
    }
    
    .vdp-highlight-title {
        font-size: 0.9375rem;
    }
}

/* Remove old checkmark styles if present */
.vdp-key-highlights ul li::before,
.vdp-highlights-list li::before {
    display: none !important;
}

/* --- 6. Color Selector (NEW V3 STYLES) --- */
.vdp-color-gallery {
  margin-bottom: 1.5rem;
}
.vdp-color-selector-v3 .vdp-section-title {
  font-size: var(--font-size-h2); /* 2rem / 32px */
  font-weight: 700;
  margin-bottom: 0.25rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--jac-black);
}
.vdp-color-selector-v3 .vdp-section-title svg {
  width: 28px;
  height: 28px;
  color: var(--jac-red);
}
.vdp-color-selector-v3 .vdp-color-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--jac-grey-500);
  background: var(--jac-surface-soft);
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
}
.vdp-color-selector-v3 .vdp-section-subtitle {
  font-size: 1.125rem;
  color: var(--jac-grey-600);
  margin-bottom: 1.5rem;
}
.vdp-color-swatches-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}
.vdp-color-swatch-card {
  background: var(--jac-white);
  border: 1px solid var(--jac-border);
  padding: 0.5rem;
  border-radius: var(--radius-md); /* 8px for component cards */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  transition: border-color 0.2s ease;
}
.vdp-color-swatch-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
}
.vdp-color-swatch-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--jac-black);
}
.vdp-swatch-active-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--jac-red);
  color: var(--jac-white);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}
.vdp-swatch-active-check svg {
  width: 12px;
  height: 12px;
}
/* --- 6. Color Selector (NEW V3 STYLES) --- */
/* ... (rest of the color selector styles remain the same) ... */

.vdp-color-swatch-card:hover {
  /* This forcefully prevents the parent theme's red background on hover */
  background-color: var(--jac-white) !important; 
  
  /* This resets the border to its default state on hover */
  border-color: var(--jac-border) !important; 
  box-shadow: none !important;
}

.vdp-color-swatch-card.is-active {
  /* This is the correct style for the *selected* swatch */
  background-color: var(--jac-white) !important; /* Ensure it stays white even when active */
  border-color: var(--jac-red) !important;
  box-shadow: 0 0 0 1px var(--jac-red) !important;
}

.vdp-color-swatch-card.is-active:hover {
  /* This makes sure the active swatch doesn't lose its red border on hover */
  background-color: var(--jac-white) !important;
  border-color: var(--jac-red) !important;
  box-shadow: 0 0 0 1px var(--jac-red) !important;
}


/* --- 7. VDP Tab Section Styles --- */
/* (This section contains the vdp-tabs-v3 styles) */
.vdp-tabs-v3 .vdp-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--jac-border);
}
.vdp-tabs-v3 .vdp-tabs-nav li {
  margin: 0;
  padding: 0;
}
.vdp-tabs-v3 .vdp-tabs-nav .vdp-tab-link {
  display: block;
  padding: 1rem 1.5rem; /* Increased from 0.75rem for 48px height */
  min-height: 3rem; /* Explicit 48px minimum */
  text-decoration: none;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--jac-grey-500);
  transition: all 0.2s ease;
  background: var(--jac-surface-muted);
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
  border-radius: 6px 6px 0 0;
}
.vdp-tabs-v3 .vdp-tabs-nav .vdp-tab-link:hover {
  color: var(--jac-ink);
}
.vdp-tabs-v3 .vdp-tabs-nav .vdp-tab-link.active {
  color: var(--jac-ink);
  font-weight: 600;
  background: var(--jac-white);
  border-color: var(--jac-border);
  border-bottom-color: var(--jac-white);
}
.vdp-tabs-v3 .vdp-tabs-nav .vdp-tab-link:focus-visible {
  outline: 2px solid var(--jac-red);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 2px var(--jac-red-a20);
}
.vdp-tabs-v3 .vdp-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
  padding: 1.5rem 0;
}
.vdp-tabs-v3 .vdp-tab-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.vdp-tab-pane-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.vdp-tab-pane-intro {
  font-size: 1rem;
  color: var(--jac-grey-600);
  margin-bottom: 2rem;
}
.vdp-variants-list {
  display: grid;
  gap: 1rem;
}
.vdp-variant-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--jac-border);
}
.vdp-variants-list .vdp-variant-card:last-child {
  border-bottom: 0;
}
.vdp-variant-card-left {
  display: grid;
  gap: 0.5rem;
}
.vdp-variant-title {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--jac-ink);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
}
.vdp-variant-meta {
  display: flex;
  gap: 1.5rem;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--jac-grey-600);
  line-height: 1.5;
  letter-spacing: 0;
}
.vdp-variant-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.vdp-variant-meta svg {
  width: 16px;
  height: 16px;
  color: var(--jac-grey-500);
}
.vdp-variant-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
  flex-shrink: 0;
  margin-left: 1rem;
}
.vdp-variant-price {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: var(--font-size-h2); /* 2rem / 32px */
  font-weight: 700;
  color: var(--jac-red);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.vdp-variant-monthly {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--jac-grey-500);
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}
.vdp-variant-calc-button {
  background-color: var(--jac-red) !important;
  color: var(--jac-white) !important;
  border-radius: 4px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  font-weight: 600 !important;
}
.vdp-group-heading {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--jac-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--jac-surface-soft);
}
.vdp-group-heading:first-child {
  margin-top: 0;
}
.vdp-group-heading svg {
  width: 20px;
  height: 20px;
  color: var(--jac-red);
}
.vdp-specs-list {
  display: grid;
  gap: 1rem;
}
.vdp-spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--jac-black);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--jac-surface-soft);
}
.vdp-spec-label {
  color: var(--jac-grey-600);
  font-weight: 400;
}
#inner-wrap .vdp-features-list {
  list-style: disc;
  padding-left: 1.5rem;
  columns: 2;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--jac-black);
}
#inner-wrap .vdp-features-list li {
  margin-bottom: 0.5rem;
}
.vdp-gallery-grid-v3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.vdp-gallery-grid-v3 a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--jac-border);
  border-radius: var(--radius-md); /* 8px for components */
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease;
}
.vdp-gallery-grid-v3 a:hover {
  box-shadow: var(--shadow-card);
}
.vdp-gallery-grid-v3 img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--jac-border);
}
.vdp-gallery-item-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--jac-black);
  padding: 0.75rem 1rem 0.25rem;
}
.vdp-gallery-item-caption {
  display: block;
  font-size: 0.875rem;
  color: var(--jac-grey-600);
  padding: 0 1rem 0.75rem;
}

/* --- 8. White Box Styling for Content Sections --- */
.vdp-gallery-v2,
.vdp-color-selector-v3,
#vdp-overview,
.vdp-tab-section {
  background: var(--jac-white);
  border: 1px solid var(--jac-border);
  border-radius: var(--radius-lg); /* 12px for cards */
  box-shadow: var(--shadow-card);
  padding: 1.5rem 2rem;
}
.vdp-color-selector-v3,
.vdp-tab-section,
#vdp-overview {
  margin-top: 0;
  padding-top: 1.5rem;
  border-top: 0;
}
.vdp-gallery-v2 {
  padding: 1rem;
}
.vdp-tab-section {
  padding: 0 0 1.5rem 0;
}
.vdp-tab-section .vdp-tabs-content {
  padding: 0 2rem;
}
.vdp-tab-section .vdp-tabs-nav {
  padding: 0 2rem;
}
.vdp-tab-section .vdp-group-heading:first-child,
#vdp-overview .vdp-content h3 {
  margin-top: 0;
}
.vdp-color-selector-v3 .vdp-section-title {
  margin-top: 0;
}

/* --- FIX: Full-width Title Background (Task 1.1) --- */
.vdp-title-section-wrap {
    background: var(--jac-white);
    border-bottom: 1px solid var(--jac-border);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem 0;
    margin-top: 0;
    width: 100%;
}
.vdp-title-section-wrap-inner {
    /* These are the constraining styles */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
}

/* Back to Models Link */
.vdp-back-to-models {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--jac-grey-500);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.vdp-back-to-models:hover {
    color: var(--jac-red);
}

.vdp-back-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* =========================================================
   VDP Mobile/Tablet: Premium Title + CTA block
   Targets DOM:
   .vdp-title-section-wrap > .vdp-title-section-wrap-inner
     .vdp-title-content (a.vdp-back-to-models + h1.vdp-model-title)
     .vdp-title-actions (buttons)
   Breakpoint matches main layout switch (1024px)
   ========================================================= */
@media (max-width: 1024px) {
  /* Container with refined spacing */
  .vdp-title-section-wrap {
    padding: var(--space-16) var(--space-16) var(--space-24);
    background: var(--jac-white);
  }

  .vdp-title-section-wrap-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-16);
  }

  .vdp-title-content {
    width: 100%;
    flex: none;
  }

  /* Back link - subtle breadcrumb style */
  a.vdp-back-to-models {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-12) var(--space-8) var(--space-8);
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    color: var(--jac-grey-500);
    background: var(--jac-surface-soft);
    border: 1px solid transparent;
    transition: all 0.15s ease;
    margin-bottom: var(--space-8);
  }

  a.vdp-back-to-models:hover,
  a.vdp-back-to-models:active {
    color: var(--jac-ink);
    background: var(--jac-surface-1);
    border-color: var(--jac-border);
  }

  a.vdp-back-to-models .vdp-back-icon {
    width: 16px;
    height: 16px;
  }

  /* Title - premium typography */
  #inner-wrap h1.entry-title.vdp-model-title {
    font-size: clamp(1.625rem, 6.5vw, 2rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em;
    font-weight: 700;
    color: var(--jac-ink);
    margin: 0;
  }

  /* Subtitle spacing */
  .vdp-model-subtitle {
    margin-top: var(--space-4);
    font-size: 0.9375rem;
    color: var(--jac-grey-600);
  }

  /* Actions container - card-like with subtle background */
  .vdp-title-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-12);
    padding: var(--space-16);
    background: var(--jac-surface-soft);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
  }

  /* Actions row - grid layout for better organization */
  .vdp-title-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    width: 100%;
  }

  /* Base button styles - refined */
  .vdp-title-actions .vdp-action-button,
  .vdp-title-actions .jac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    min-height: 44px;
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--jac-border);
    background: var(--jac-white);
    color: var(--jac-ink);
    transition: all 0.15s ease;
  }

  #inner-wrap .vdp-title-actions .vdp-action-button,
  #inner-wrap .vdp-title-actions .jac-btn {
    min-height: 44px;
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-md);
    font-weight: 600;
  }

  /* Save & Share - secondary actions, 2-column layout */
  .vdp-title-actions .vdp-save-button,
  .vdp-title-actions .vdp-share-button {
    background: var(--jac-white);
    border-color: var(--jac-border);
    color: var(--jac-grey-600);
    font-size: 0.8125rem;
  }

  .vdp-title-actions .vdp-save-button:hover,
  .vdp-title-actions .vdp-share-button:hover,
  .vdp-title-actions .vdp-save-button:active,
  .vdp-title-actions .vdp-share-button:active {
    background: var(--jac-surface-1);
    border-color: var(--jac-ink-a20);
    color: var(--jac-ink);
  }

  /* Brochure button - primary CTA, full width */
  .vdp-title-actions .vdp-brochure-button {
    grid-column: 1 / -1;
    background: var(--jac-red) !important;
    border-color: var(--jac-red) !important;
    color: var(--jac-white) !important;
    font-size: 0.9375rem;
    min-height: 48px;
    box-shadow: 0 2px 8px var(--jac-red-a20);
  }

  .vdp-title-actions .vdp-brochure-button:hover,
  .vdp-title-actions .vdp-brochure-button:active {
    background: var(--jac-red-dark, #b71c1c);
    border-color: var(--jac-red-dark, #b71c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--jac-red-a30);
  }

  /* Compare toggle - full width, visible border */
  .vdp-title-actions .jac-compare-toggle {
    grid-column: 1 / -1;
    background: var(--jac-white);
    border: 2px solid var(--jac-ink-a20);
    color: var(--jac-ink);
  }

  .vdp-title-actions .jac-compare-toggle:hover,
  .vdp-title-actions .jac-compare-toggle:active {
    background: var(--jac-surface-1);
    border-color: var(--jac-ink-a20);
  }

  .vdp-title-actions .jac-compare-toggle.is-active {
    background: var(--jac-ink);
    border-color: var(--jac-ink);
    color: var(--jac-white);
  }

  /* Book/Finance buttons if present */
  .vdp-title-actions a[href*="book"],
  .vdp-title-actions button[data-jac-open="book"] {
    grid-column: 1 / -1;
    background: var(--jac-red);
    border-color: var(--jac-red);
    color: var(--jac-white);
  }

  .vdp-title-actions a[href*="finance"],
  .vdp-title-actions button[data-jac-open="finance"] {
    background: var(--jac-white);
    border-color: var(--jac-ink-a20);
    color: var(--jac-ink);
  }

  /* Focus states */
  .vdp-title-actions a:focus-visible,
  .vdp-title-actions button:focus-visible,
  a.vdp-back-to-models:focus-visible {
    outline: 2px solid var(--jac-red);
    outline-offset: 2px;
  }

  /* Icon sizing consistency */
  .vdp-title-actions .vdp-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  /* Touch feedback */
  .vdp-title-actions .vdp-action-button:active,
  .vdp-title-actions .jac-btn:active {
    transform: scale(0.98);
  }
}

/* VDP Content Spacing */
.vdp-main-layout-wrap {
    margin-bottom: 4rem;
}

/* --- 9. Fix Old Tab Styles (until tab-section.php is updated) --- */
/* This is temporary styling for the *old* tab structure */
.vdp-tab-section .vdp-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
  border-bottom: 2px solid var(--jac-border);
  justify-content: flex-start;
}
.vdp-tab-section .vdp-tabs-nav li {
  margin: 0;
  padding: 0;
}
.vdp-tab-section .vdp-tabs-nav .vdp-tab-link {
  display: block;
  padding: 0.75rem 1.5rem;
  margin-bottom: -2px;
  border: 2px solid transparent;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  color: var(--jac-grey-500);
  transition: all 0.2s ease;
}
.vdp-tab-section .vdp-tabs-nav .vdp-tab-link:hover {
  color: var(--jac-ink);
  background-color: var(--jac-surface-muted);
}
.vdp-tab-section .vdp-tabs-nav .vdp-tab-link.active {
  color: var(--jac-red);
  border-color: var(--jac-border);
  border-bottom-color: var(--jac-white);
}
.vdp-tab-section .vdp-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}
.vdp-tab-section .vdp-tab-pane.active {
  display: block;
}
#inner-wrap .vdp-tab-section .vdp-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
#inner-wrap .vdp-tab-section .vdp-data-table td:first-child {
  font-weight: 500;
  width: auto; /* --- FIX: Removed width: 40% --- */
}
#inner-wrap .vdp-tab-section .vdp-features-list {
  list-style: disc;
  padding-left: 1.5rem;
  columns: 2;
  gap: 1.5rem;
}
#inner-wrap .vdp-tab-section .vdp-features-list li {
  margin-bottom: 0.5rem;
}
.vdp-variant-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 1.15em;
  height: 1.15em;
  border: 2px solid var(--jac-grey-400);
  border-radius: 50%;
  transform: translateY(2px);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.vdp-variant-select::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--jac-red);
}
.vdp-variant-select:checked::before {
  transform: scale(1);
}
.vdp-variant-row.is-selected {
  background-color: var(--jac-surface-muted);
}
/* ==========================================================================
   MODAL FORMS STYLING (Task 1.4)
   ========================================================================== */

/* Modal Form Wrapper */
.jac-modal-form-wrapper {
    background: var(--jac-white);
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Modal Header */
.jac-modal-header {
    background: linear-gradient(135deg, var(--jac-red) 0%, var(--jac-red-a80) 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: var(--jac-white);
}

.jac-modal-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--jac-white);
}

.jac-modal-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    color: var(--jac-white);
}

/* Modal Content */
.jac-modal-content {
    padding: 2rem;
}

/* Fluent Form Overrides */
.jac-modal-content .fluentform {
    max-width: 100%;
}

.jac-modal-content .ff-el-group {
    margin-bottom: 1.25rem;
}

.jac-modal-content .ff-el-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--jac-border);
    border-radius: 4px;
    background: var(--jac-white);
    transition: border-color 0.2s ease;
}

.jac-modal-content .ff-el-form-control:focus {
    border-color: var(--jac-red);
    outline: none;
    box-shadow: 0 0 0 3px var(--jac-red-a10);
}

.jac-modal-content .ff-btn-submit {
    background: var(--jac-red);
    color: var(--jac-white);
    border: none;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm); /* 4px for small elements */
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    display: inline-block;
}

.jac-modal-content .ff-btn-submit:hover {
    background: var(--jac-graphite);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.jac-modal-content .ff-btn-submit:active {
    transform: translateY(0);
}

/* Success Message */
.jac-modal-content .ff-message-success {
    background: var(--jac-status-success);
    color: var(--jac-white);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Error Message */
.jac-modal-content .ff-message-error {
    background: var(--jac-red-a88);
    color: var(--jac-white);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jac-modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .jac-modal-title {
        font-size: 1.5rem;
    }
    
    .jac-modal-subtitle {
        font-size: 0.875rem;
    }
    
    .jac-modal-content {
        padding: 1.5rem 1rem;
    }
    
    .jac-modal-content .ff-btn-submit {
        width: 100%;
        padding: 1rem;
    }
}

/* GLightbox Modal Overrides */
.gslide-media {
    max-width: 90vw !important;
}

.gslide-media.gslide-inline {
    height: auto !important;
}

.gslide-inline {
    background: transparent !important;
}

.gclose {
    z-index: 99999 !important;
}

/* =========================================================
   VDP Mobile: Variant card price overflow fix
   Prevents EV model prices (e.g. R 549,900) from running
   off the edge on small screens.
   ========================================================= */
@media (max-width: 768px) {
  .vdp-variant-card {
    flex-wrap: wrap;
    gap: var(--space-12);
  }

  .vdp-variant-card-left {
    flex: 1 1 100%;
    min-width: 0;
  }

  .vdp-variant-card-right {
    flex: 1 1 100%;
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }

  .vdp-variant-price {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    word-break: break-word;
  }

  .vdp-variant-title {
    font-size: 1rem;
  }

  .vdp-variant-meta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

