/* ===================================
   Film Tinting Simulator - Premium Styles
   Apple-inspired, minimal, dynamic design
   =================================== */

/* CSS Variables - Premium Palette */
:root {
  /* Colors - Refined & Premium */
  --primary-dark: #1d1d1f;
  --primary-blue: #0071e3;
  --accent-blue: #2997ff;
  --accent-light: #5ac8fa;
  --white: #ffffff;
  --off-white: #fbfbfd;
  --gray-50: #fafafa;
  --gray-100: #f5f5f7;
  --gray-200: #e8e8ed;
  --gray-300: #d2d2d7;
  --gray-400: #aeaeb2;
  --gray-500: #86868b;
  --gray-600: #6e6e73;
  --gray-700: #424245;
  --gray-800: #2c2c2e;
  --gray-900: #1c1c1e;

  /* Premium Accent Colors */
  --success: #34c759;
  --warning: #ff9f0a;
  --error: #ff3b30;
  --price-red: #ff2d55;

  /* Gradients - Subtle & Premium */
  --gradient-header: linear-gradient(180deg, #1d1d1f 0%, #2c2c2e 100%);
  --gradient-button: linear-gradient(180deg, #0071e3 0%, #0077ed 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);

  /* Shadows - Soft & Modern */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 24px rgba(0, 113, 227, 0.2);

  /* Borders */
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-color: rgba(0, 0, 0, 0.08);

  /* Typography - System Font Stack */
  --font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Transitions - Smooth Apple-like */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--gray-100);
  min-height: 100vh;
  color: var(--primary-dark);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* App Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

/* ===================================
   Header & Tabs
   =================================== */
.header {
  background: var(--gradient-header);
  padding: 0.5rem 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.tab-btn.active {
  background: var(--accent-blue);
  color: var(--white);
  border-color: var(--accent-light);
  box-shadow: 0 0 20px rgba(45, 125, 210, 0.4);
}

.tab-icon {
  font-size: 1.1rem;
}

.brand-logo {
  position: relative;
  z-index: 1;
}

.brand-logo img {
  height: 40px;
  width: auto;
}

/* ===================================
   Tab Content
   =================================== */
.main-content {
  position: relative;
  min-height: 600px;
}

.tab-content {
  display: none;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Control Panel
   =================================== */
.control-panel {
  background: rgba(26, 58, 92, 0.95);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.control-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-row.centered {
  justify-content: center;
}

.control-group {
  flex: 1;
  min-width: 180px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.label-badge {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* Styled Select */
.select-wrapper {
  position: relative;
}

.styled-select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  appearance: none;
  transition: all var(--transition-fast);
}

.styled-select:hover {
  border-color: var(--accent-blue);
}

.styled-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.2);
}

.select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  font-size: 0.7rem;
  pointer-events: none;
}

/* ===================================
   Vehicle Display (Exterior)
   =================================== */
.vehicle-display {
  display: flex;
  position: relative;
  min-height: 400px;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8) 0%, rgba(200, 210, 220, 0.4) 100%),
    linear-gradient(180deg, #e8f4fc 0%, #d0e4f4 100%);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.car-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-left: 340px;
  /* Make room for spec panel */
}

/* Image-based vehicle display */
.vehicle-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
}

.vehicle-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
  transition: filter var(--transition-normal);
}

.window-overlays {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.window-tint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity var(--transition-normal), background var(--transition-normal);
}

/* Legacy SVG support */
#car-svg {
  max-width: 100%;
  max-height: 350px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

/* ===================================
   Spec Panel
   =================================== */
.spec-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  transition: transform var(--transition-normal);
  display: flex;
}

.spec-panel.collapsed {
  transform: translateX(-290px);
}

.spec-toggle {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 60px;
  background: var(--accent-blue);
  border: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  z-index: 11;
}

.spec-toggle:hover {
  background: var(--primary-blue);
}

.toggle-icon {
  font-size: 1rem;
  transition: transform var(--transition-normal);
}

.spec-panel.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.spec-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

.spec-table-container {
  margin-bottom: 1rem;
}

.spec-header {
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.spec-header.front-header {
  background: linear-gradient(90deg, #2d7dd2 0%, #4da3ff 100%);
  color: var(--white);
}

.spec-header.surround-header {
  background: linear-gradient(90deg, #1a3a5c 0%, #2d5a8c 100%);
  color: var(--white);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.spec-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
}

.spec-table tbody tr:nth-child(even) {
  background: var(--gray-100);
}

.spec-table td {
  padding: 0.5rem 0.75rem;
}

.spec-table td:first-child {
  color: var(--gray-700);
}

.spec-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--primary-blue);
}

/* ===================================
   Price Display Panel
   =================================== */
.price-panel {
  background: white;
  border: 1px solid var(--primary-light);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.price-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--gray-300);
}

.price-header {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.price-detail {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.film-name {
  font-weight: 500;
  color: var(--primary-dark);
  flex: 1;
}

.film-price {
  font-weight: 700;
  color: var(--primary-blue);
  white-space: nowrap;
}

.price-discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--gray-300);
}

.discount-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #27ae60;
}

.discount-value {
  font-size: 1rem;
  font-weight: 700;
  color: #27ae60;
}

.price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.total-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e74c3c;
}

/* VLT Selectors */
.vlt-select {
  margin-top: 0.5rem;
}

.vlt-select-input {
  background-color: var(--gray-100);
  font-size: 0.9rem;
  color: var(--primary-blue);
  font-weight: 600;
}

/* ===================================
   Interior View
   =================================== */
.interior-display {
  position: relative;
  min-height: 450px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.interior-container {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 400px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: #1a1a2e;
}

.interior-image {
  width: 100%;
  height: auto;
  display: block;
}

.interior-background {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.sky {
  flex: 1;
  background: var(--gradient-sky);
}

.road {
  height: 45%;
  background:
    linear-gradient(180deg, #4a7c4e 0%, #3d6b40 40%, #505050 40%, #404040 100%);
  position: relative;
}

.road::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(90deg,
      #ffffff 0px,
      #ffffff 40px,
      transparent 40px,
      transparent 80px);
}

/* Comparison Row */
.comparison-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.comparison-side {
  flex: 1;
  max-width: 280px;
  text-align: center;
}

.interior-price {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-blue);
}

/* Tint Overlay - Two Sided */
.tint-overlay {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(26, 26, 46, 0.7);
  transition: background var(--transition-normal), opacity var(--transition-normal);
  pointer-events: none;
}

.tint-left {
  left: 0;
  width: 50%;
}

.tint-right {
  right: 0;
  width: 50%;
}

/* Boundary Slider */
.boundary-slider-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.boundary-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
  pointer-events: all;
  z-index: 20;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: ew-resize;
  pointer-events: all;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.slider-handle:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent-light);
}

.slider-arrows {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -2px;
}

/* Dashboard Overlay */
.dashboard-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  pointer-events: none;
}

.dashboard-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(30, 50, 70, 0.8) 30%, #1a2a3a 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: scaleX(1.2);
}

/* Tint Labels */
.tint-labels {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gray-100);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.tint-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.tint-label.left {
  color: var(--primary-blue);
}

/* ===================================
   CTA Panel
   =================================== */
.cta-panel {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 20;
}

.cta-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.cta-btn.primary {
  background: var(--primary-blue);
  color: var(--white);
}

.cta-btn.primary:hover {
  background: var(--accent-blue);
  transform: translateX(-5px);
}

.cta-btn.secondary {
  background: var(--white);
  color: var(--primary-blue);
  border: 1px solid var(--gray-300);
}

.cta-btn.secondary:hover {
  background: var(--gray-100);
  transform: translateX(-5px);
}

.cta-btn.tertiary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.cta-btn.tertiary:hover {
  background: var(--gray-200);
  transform: translateX(-5px);
}

.cta-icon {
  font-size: 1rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--primary-dark);
  color: var(--gray-500);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 0.75rem;
  }

  .tabs {
    width: 100%;
    justify-content: center;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  .brand-logo {
    display: none;
  }

  .control-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .control-group {
    min-width: 100%;
  }

  .spec-panel {
    position: relative;
    width: 100%;
    transform: none !important;
    margin-bottom: 1rem;
  }

  .spec-toggle {
    display: none;
  }

  .vehicle-display {
    flex-direction: column;
  }

  .car-container {
    padding: 1rem;
    padding-left: 1rem;
    /* Reset for mobile */
  }

  .cta-panel {
    position: relative;
    bottom: auto;
    right: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
  }

  .cta-btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 150px;
    justify-content: center;
  }

  .interior-container {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .tab-icon {
    display: none;
  }

  .cta-btn {
    flex: 1 1 100%;
    font-size: 0.8rem;
  }
}

/* ===================================
   Animations
   =================================== */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.spec-table-container {
  animation: slideIn 0.5s ease;
}

/* ===================================
   Film Select Button
   =================================== */
.film-select-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.film-select-btn:hover {
  border-color: var(--accent-blue);
  background: var(--gray-100);
}

.film-select-btn .select-arrow {
  color: var(--gray-500);
  font-size: 0.8rem;
}

/* ===================================
   Film Popup Modal
   =================================== */
.film-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.film-popup-overlay.active {
  display: flex;
}

.film-popup {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.film-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--gradient-header);
  color: var(--white);
}

.film-popup-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.film-popup-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.film-popup-close:hover {
  opacity: 1;
}

.film-popup-content {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

/* Brand Sections */
.brand-section {
  margin-bottom: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

.brand-name {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1rem;
}

.brand-films {
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Film Option Card */
.film-option {
  padding: 0.5rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.film-option:hover {
  background: var(--accent-light);
  color: var(--white);
  border-color: var(--accent-blue);
}

.film-option.selected {
  background: var(--accent-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.film-option-none {
  width: 100%;
  text-align: center;
  padding: 0.75rem;
  background: var(--gray-100);
  border: 2px dashed var(--gray-400);
  color: var(--gray-600);
}

/* Film with VLT Variants */
.film-option-group {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.film-option-header {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--gray-50);
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-200);
}

.film-option-header.selected {
  background: var(--accent-blue);
  color: var(--white);
}

.film-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--white);
}

.variant-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.6rem;
  min-width: 50px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-blue);
}

.variant-btn.selected {
  background: var(--accent-blue);
  border-color: var(--primary-blue);
  color: var(--white);
}

.variant-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: inherit;
}

.variant-vlt {
  font-size: 0.7rem;
  color: var(--gray-500);
}

.variant-btn.selected .variant-vlt {
  color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   Vehicle Select Button
   =================================== */
.vehicle-select-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vehicle-select-btn:hover {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vehicle-select-btn .vehicle-icon {
  font-size: 1.2rem;
}

.vehicle-select-btn .select-arrow {
  margin-left: auto;
  color: var(--gray-500);
  font-size: 0.8rem;
}

/* ===================================
   Vehicle Type Popup Modal
   =================================== */
.vehicle-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.vehicle-popup-overlay.active {
  display: flex;
}

.vehicle-popup {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.vehicle-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1a3a5c 0%, #2d5a8c 50%, #3d7ac2 100%);
  color: var(--white);
}

.vehicle-popup-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vehicle-popup-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.vehicle-popup-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.vehicle-popup-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.vehicle-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.vehicle-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(45, 125, 210, 0.1) 0%, rgba(45, 125, 210, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.vehicle-option:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(45, 125, 210, 0.15);
}

.vehicle-option:hover::before {
  opacity: 1;
}

.vehicle-option.selected {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, #e8f4ff 0%, #d0e8ff 100%);
  box-shadow: 0 8px 20px rgba(45, 125, 210, 0.2), inset 0 0 0 1px rgba(45, 125, 210, 0.3);
}

.vehicle-option.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.vehicle-option-icon {
  width: 120px;
  height: 60px;
  margin-bottom: 0.75rem;
  color: var(--primary-blue);
  transition: transform 0.25s ease, color 0.25s ease;
}

.vehicle-option:hover .vehicle-option-icon {
  transform: scale(1.1);
  color: var(--accent-blue);
}

.vehicle-option.selected .vehicle-option-icon {
  color: var(--accent-blue);
}

.vehicle-silhouette {
  width: 100%;
  height: 100%;
}

.vehicle-option-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.vehicle-option-desc {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Vehicle Icon Images (replacing SVGs) */
.vehicle-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.vehicle-option:hover .vehicle-icon-img {
  transform: scale(1.08);
}

.vehicle-option.selected .vehicle-icon-img {
  filter: brightness(0.9) saturate(1.2);
}

/* Popup Title Icon */
.popup-title-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* No Film Option at Top of Popup */
.no-film-option-container {
  margin-bottom: 1rem;
}

.film-option-none-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
  border: 2px dashed #e74c3c;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #c0392b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.film-option-none-top:hover {
  background: linear-gradient(180deg, #ffe0e0 0%, #ffd0d0 100%);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.film-option-none-top.selected {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-style: solid;
  border-color: #c0392b;
  color: white;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ===================================
   Upgraded Film Popup Styles
   =================================== */
.film-popup-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.film-popup {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  max-width: 680px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideUp 0.3s ease;
}

.film-popup-header {
  background: linear-gradient(135deg, #0f2544 0%, #1a4a7a 50%, #2d7dd2 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 20px 20px 0 0;
}

.film-popup-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.film-popup-close {
  background: rgba(255, 255, 255, 0.15);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.film-popup-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.film-popup-content {
  padding: 1.25rem;
}

/* Upgraded Brand Sections */
.brand-section {
  margin-bottom: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.brand-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background 0.2s ease;
}

.brand-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-name {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.05rem;
  flex: 1;
}

.brand-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-toggle-icon {
  color: var(--gray-500);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.brand-section.collapsed .brand-toggle-icon {
  transform: rotate(-90deg);
}

.brand-section.collapsed .brand-films {
  display: none;
}

.brand-films {
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

/* Upgraded Film Options */
.film-option {
  padding: 0.6rem 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.film-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-blue);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.film-option:hover {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, #e8f4ff 0%, #f0f7ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 125, 210, 0.15);
}

.film-option:hover::before {
  transform: scaleY(1);
}

.film-option.selected {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5a9e 100%);
  color: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(45, 125, 210, 0.3);
}

.film-option.selected::before {
  background: white;
  transform: scaleY(1);
}

.film-option-none {
  width: 100%;
  text-align: center;
  padding: 0.875rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed var(--gray-400);
  color: var(--gray-600);
  font-weight: 500;
}

.film-option-none:hover {
  background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%);
  border-color: var(--gray-500);
}

/* Upgraded Film Groups with Variants */
.film-option-group {
  width: 100%;
  border: 1.5px solid var(--gray-300);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  transition: all 0.2s ease;
}

.film-option-group:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(45, 125, 210, 0.1);
}

.film-option-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--gray-200);
}

.film-option-header.selected {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5a9e 100%);
  color: var(--white);
}

.film-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.variant-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  min-width: 60px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  border: 1.5px solid var(--gray-300);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.variant-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-blue);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.variant-btn:hover {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, #e8f4ff 0%, #f0f7ff 100%);
  transform: translateY(-2px);
}

.variant-btn:hover::before {
  transform: scaleX(1);
}

.variant-btn.selected {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5a9e 100%);
  border-color: var(--primary-blue);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(45, 125, 210, 0.3);
}

.variant-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: inherit;
}

.variant-vlt {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

.variant-btn.selected .variant-vlt {
  color: rgba(255, 255, 255, 0.85);
}

/* ===================================
   Responsive - Vertical Screens & Mobile
   =================================== */

/* Base Mobile / Vertical Screen Styles */
@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .app-container {
    max-width: 100%;
  }

  .header {
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .tabs {
    width: 100%;
    gap: 0.25rem;
  }

  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    flex: 1;
  }

  .tab-icon {
    font-size: 1rem;
  }

  .brand-logo img {
    max-height: 30px;
  }

  /* Control Panel - Compact Vertical Layout */
  .control-panel {
    padding: 0.75rem;
  }

  .control-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .control-group {
    width: 100%;
  }

  .control-label {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  /* Vehicle Display - MAIN FOCUS */
  .vehicle-display {
    min-height: 50vh;
    flex-direction: column;
  }

  .car-container {
    padding: 1rem;
    padding-left: 1rem;
    /* Remove spec panel offset */
  }

  .vehicle-image-wrapper {
    max-width: 100%;
    width: 100%;
  }

  /* Hide spec panel on mobile, show on demand */
  .spec-panel {
    position: fixed;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    transform: translateY(100%);
    z-index: 100;
  }

  .spec-panel:not(.collapsed) {
    transform: translateY(0);
  }

  .spec-toggle {
    top: -40px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  }

  .toggle-icon {
    transform: rotate(90deg);
  }

  /* Price Panel */
  .price-panel {
    margin: 0.5rem;
    padding: 0.75rem;
  }

  .price-panel-title {
    font-size: 1rem;
  }

  .total-value {
    font-size: 1.2rem;
  }

  /* CTA Buttons */
  .cta-panel {
    padding: 0.5rem;
  }

  .cta-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Interior View */
  .comparison-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .comparison-side {
    max-width: 100%;
  }

  .interior-display {
    min-height: 45vh;
  }

  .interior-container {
    min-height: 40vh;
  }

  /* Film Popup */
  .film-popup {
    max-width: 100%;
    max-height: 90vh;
    margin: 0.5rem;
  }

  .brand-header {
    padding: 0.5rem 0.75rem;
  }

  .brand-logo-img {
    width: 32px;
    height: 32px;
  }

  .film-option {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }

  /* Vehicle Popup Mobile */
  .vehicle-popup {
    max-width: 100%;
    max-height: 90vh;
    margin: 0.5rem;
    border-radius: 16px;
  }

  .vehicle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .vehicle-option {
    padding: 1rem 0.75rem;
  }

  .vehicle-option-icon {
    width: 100px;
    height: 50px;
  }

  .vehicle-option-name {
    font-size: 0.85rem;
  }

  .vehicle-option-desc {
    font-size: 0.75rem;
  }
}

/* Portrait Vertical Signage (tall narrow screens) */
@media screen and (max-aspect-ratio: 9/16) {
  html {
    font-size: 18px;
  }

  .header {
    padding: 1rem;
  }

  .tab-btn {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
  }

  /* Vehicle takes up most of the screen */
  .vehicle-display {
    min-height: 55vh;
  }

  .vehicle-image-wrapper {
    max-width: 90vw;
  }

  .control-panel {
    padding: 1rem;
  }

  .control-label {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }

  .styled-select,
  .film-select-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  /* Larger touch targets */
  .slider-handle {
    width: 70px;
    height: 70px;
  }

  .slider-arrows {
    font-size: 1.3rem;
  }

  /* Price display */
  .price-panel {
    padding: 1.5rem;
  }

  .total-value {
    font-size: 2rem;
  }

  /* Film popup for signage */
  .film-popup {
    max-width: 90vw;
  }

  .film-option {
    padding: 1rem 1.2rem;
    font-size: 1.1rem;
  }

  .brand-logo-img {
    width: 50px;
    height: 50px;
  }

  .brand-name {
    font-size: 1.2rem;
  }
}

/* Ultra narrow vertical (phone portrait) */
@media screen and (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .tab-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .tab-icon {
    font-size: 0.9rem;
  }

  .control-label .label-icon {
    font-size: 0.8rem;
  }

  .vlt-select-input {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .film-select-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Vehicle still main focus */
  .vehicle-display {
    min-height: 45vh;
  }

  .car-container {
    padding: 0.5rem;
  }

  .price-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .comparison-row {
    gap: 0.5rem;
  }

  .interior-price {
    font-size: 0.8rem;
    padding: 0.4rem;
  }
}

/* Landscape tablet/small desktop */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .car-container {
    padding-left: 280px;
  }

  .spec-panel {
    width: 260px;
  }
}

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {

  .tab-btn,
  .film-select-btn,
  .styled-select,
  .cta-btn,
  .film-option {
    min-height: 44px;
    /* Apple touch target minimum */
  }

  .slider-handle {
    width: 60px;
    height: 60px;
  }

  .film-popup-close {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
}

/* ===================================
   Mobile-First UI Components
   =================================== */

/* Desktop/Mobile visibility toggle classes */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media screen and (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }
}

/* ===================================
   Mobile Spec Accordion
   =================================== */
.mobile-spec-accordion {
  margin: 0.75rem;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.spec-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  transition: background 0.2s ease;
}

.spec-accordion-toggle:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.spec-accordion-icon {
  font-size: 1.1rem;
}

.spec-accordion-text {
  flex: 1;
  text-align: left;
}

.spec-accordion-arrow {
  font-size: 0.75rem;
  color: var(--gray-500);
  transition: transform 0.3s ease;
}

.mobile-spec-accordion.expanded .spec-accordion-arrow {
  transform: rotate(180deg);
}

.spec-accordion-content {
  display: none;
  padding: 0.75rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.mobile-spec-accordion.expanded .spec-accordion-content {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Mobile Sticky CTA Bar
   =================================== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #ffffff 100%);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sticky-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #2d7dd2 0%, #1a5a9e 100%);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius-lg);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(45, 125, 210, 0.35);
  transition: all 0.2s ease;
}

.sticky-cta-btn:hover {
  background: linear-gradient(135deg, #4da3ff 0%, #2d7dd2 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 125, 210, 0.45);
}

.sticky-cta-btn:active {
  transform: translateY(0);
}

.sticky-cta-btn .cta-icon {
  font-size: 1.2rem;
}

/* ===================================
   Mobile Price Panel Enhancements
   =================================== */
@media screen and (max-width: 768px) {
  .price-panel {
    margin: 0.75rem;
    margin-bottom: 6rem;
    /* Space for sticky CTA */
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
  }

  .price-panel-title {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
    color: var(--primary-blue);
  }

  .price-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .price-header {
    font-size: 0.85rem;
    color: var(--gray-600);
  }

  .film-name {
    font-size: 0.9rem;
  }

  .film-price {
    font-size: 0.95rem;
    color: var(--accent-blue);
  }

  .total-label {
    font-size: 1rem;
  }

  .total-value {
    font-size: 1.3rem;
    color: #e74c3c;
  }

  .price-discount {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    border: none;
    margin-top: 0.5rem;
  }

  .discount-label,
  .discount-value {
    font-size: 0.9rem;
  }

  /* Vehicle display on mobile */
  .vehicle-display {
    min-height: auto;
    margin: 0.5rem;
    border-radius: var(--border-radius-lg);
  }

  .car-container {
    padding: 0.75rem;
  }

  /* Hide old spec panel completely on mobile */
  .spec-panel.desktop-only {
    display: none !important;
  }

  /* Ensure content doesn't get hidden behind sticky CTA */
  #exterior-tab {
    padding-bottom: 1rem;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
  .mobile-sticky-cta {
    padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
  }

  .sticky-cta-btn {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .price-panel {
    margin: 0.5rem;
    margin-bottom: 5.5rem;
    padding: 0.875rem;
  }

  .price-panel-title {
    font-size: 1rem;
  }

  .total-value {
    font-size: 1.2rem;
  }

  .mobile-spec-accordion {
    margin: 0.5rem;
  }

  .spec-accordion-toggle {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .spec-accordion-content {
    padding: 0.5rem;
  }
}

/* ===================================
   PREMIUM DESKTOP STYLES
   Apple-inspired, minimal, dynamic
   =================================== */

/* Premium Header Styling */
@media screen and (min-width: 769px) {
  .header {
    background: var(--gradient-header);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .tabs {
    gap: 0.5rem;
  }

  .tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.875rem 1.5rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
  }

  .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
  }

  .tab-btn.active {
    background: var(--white);
    color: var(--primary-dark);
    box-shadow: var(--shadow-md);
  }

  /* Premium Control Panel */
  .control-panel {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 2rem;
    margin: 1.5rem;
    box-shadow: var(--shadow-sm);
  }

  .control-row {
    gap: 2rem;
  }

  .control-label {
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
  }

  .film-select-btn,
  .vehicle-select-btn {
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-dark);
    transition: all var(--transition-fast);
  }

  .film-select-btn:hover,
  .vehicle-select-btn:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
  }

  /* Fixed Spec Panel - Desktop */
  .spec-panel.desktop-only {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 340px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .spec-panel.desktop-only .spec-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 2rem;
  }

  .spec-panel.desktop-only .spec-content::-webkit-scrollbar {
    width: 6px;
  }

  .spec-panel.desktop-only .spec-content::-webkit-scrollbar-track {
    background: var(--gray-100);
  }

  .spec-panel.desktop-only .spec-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
  }

  .spec-panel.desktop-only .spec-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
  }

  /* Spec Table Premium Styling */
  .spec-table-container {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--white);
  }

  .spec-header {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
  }

  .spec-header.front-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
  }

  .spec-header.surround-header {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
    color: var(--white);
  }

  .spec-table {
    font-size: 0.875rem;
  }

  .spec-table td {
    padding: 0.625rem 1rem;
  }

  .spec-table td:first-child {
    color: var(--gray-600);
    font-weight: var(--font-weight-regular);
  }

  .spec-table td:last-child {
    color: var(--primary-dark);
    font-weight: var(--font-weight-semibold);
  }

  /* Vehicle Display Area - Desktop */
  .vehicle-display {
    min-height: 480px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: var(--border-radius-lg);
    margin: 0 1.5rem;
    overflow: hidden;
    position: relative;
  }

  .car-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-left: 360px;
    /* Space for spec panel */
    min-height: 480px;
  }

  .vehicle-image-wrapper {
    max-width: 550px;
    transition: transform var(--transition-slow);
  }

  .vehicle-image-wrapper:hover {
    transform: scale(1.02);
  }

  /* Price Panel - Desktop Premium */
  .price-panel {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 2rem;
    margin: 1.5rem;
    box-shadow: var(--shadow-sm);
  }

  .price-panel-title {
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
  }

  .price-item:last-of-type {
    border-bottom: none;
  }

  .price-header {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
  }

  .film-name {
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-dark);
  }

  .film-price {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-blue);
  }

  .price-discount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: var(--border-radius);
    border: none;
  }

  .discount-label {
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    color: var(--success);
  }

  .discount-value {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--success);
  }

  .price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--gray-200);
  }

  .total-label {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-dark);
  }

  .total-value {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--price-red);
    letter-spacing: -0.02em;
  }

  /* Full-Width CTA Section - Desktop */
  .cta-section {
    margin: 0 1.5rem 2rem;
  }

  .cta-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.125rem 2rem;
    background: var(--gradient-button);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-glow);
  }

  .cta-btn-full:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 32px rgba(0, 113, 227, 0.3);
  }

  .cta-btn-full:active {
    transform: translateY(0);
  }

  .cta-btn-full .cta-icon {
    font-size: 1.1rem;
  }

  .cta-btn-full .cta-text {
    flex: 1;
    text-align: center;
  }

  .cta-btn-full .cta-arrow {
    font-size: 1.1rem;
    opacity: 0.8;
    transition: transform var(--transition-fast);
  }

  .cta-btn-full:hover .cta-arrow {
    transform: translateX(4px);
  }

  /* Premium Footer */
  .footer {
    background: var(--gray-100);
    color: var(--gray-500);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    border-top: 1px solid var(--border-color);
  }

  /* Hide old CTA panel that was absolute */
  .cta-panel {
    display: none !important;
  }
}

/* Smooth entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.price-panel,
.cta-section {
  animation: fadeInUp 0.5s ease forwards;
}

.vehicle-image-wrapper {
  animation: fadeInUp 0.6s ease forwards;
}