/* ============================================================
   MOSTAFA AUTO — LUXURY AUTOMOTIVE CLIENT PORTAL
   Theme Engine: Light (Default) & Dark Modes
   Brand Colors: Pure White, Deep Slate/Black, Crimson Sport Red (#e60026)
   ============================================================ */

:root {
  /* Common Brand Colors */
  --primary-red: #e60026;
  --primary-red-hover: #ff1a40;
  --primary-red-glow: rgba(230, 0, 38, 0.25);
  --primary-red-dark: #a3001a;

  --color-green: #10b981;
  --color-gold: #f59e0b;
  --color-blue: #3b82f6;

  /* Fonts */
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   THEME VARIABLES (LIGHT BY DEFAULT)
   ============================================================ */
html[data-theme="light"] {
  --bg-main: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f9;
  --bg-card-glass: rgba(255, 255, 255, 0.9);
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  --border-color: rgba(15, 23, 42, 0.09);
  --border-color-hover: rgba(230, 0, 38, 0.4);

  --text-main: #0f172a;
  --text-white: #0f172a;
  /* Main headings */
  --text-sub: #475569;
  --text-muted: #64748b;

  --header-bg: rgba(255, 255, 255, 0.92);
  --announcement-bg: #0f172a;
  --announcement-text: #ffffff;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-sub: #94a3b8;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
  --card-media-bg: #e2e8f0;
}

/* DARK THEME */
html[data-theme="dark"] {
  --bg-main: #0a0a0d;
  --bg-surface: #13131a;
  --bg-card: #13131a;
  --bg-card-hover: #1b1b24;
  --bg-card-glass: rgba(19, 19, 26, 0.85);
  --bg-input: #1a1a24;
  --bg-input-focus: #20202c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(230, 0, 38, 0.45);

  --text-main: #ffffff;
  --text-white: #ffffff;
  --text-sub: #a0a0b2;
  --text-muted: #6e6e82;

  --header-bg: rgba(10, 10, 13, 0.92);
  --announcement-bg: #0c0c10;
  --announcement-text: #a0a0b2;
  --footer-bg: #07070a;
  --footer-text: #ffffff;
  --footer-sub: #a0a0b2;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.5);
  --card-media-bg: #111116;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ar);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html[dir="ltr"] body {
  font-family: var(--font-en);
}

/* RTL / LTR Direction Helpers for Arrows */
html[dir="ltr"] #backToCatalogArrow,
html[dir="ltr"] #authBackArrow,
html[dir="ltr"] #profileBackArrow {
  transform: rotate(180deg);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 20%, var(--primary-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-red {
  color: var(--primary-red) !important;
}

.text-green {
  color: var(--color-green) !important;
}

.text-gold {
  color: var(--color-gold) !important;
}

.text-center {
  text-align: center;
}

/* Sub Badge */
.sub-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(230, 0, 38, 0.1);
  border: 1px solid rgba(230, 0, 38, 0.25);
  color: var(--primary-red);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.section-header {
  margin-bottom: 48px;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text-white);
}

.section-desc {
  color: var(--text-sub);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================================
   TOP ANNOUNCEMENT BAR
   ============================================================ */
.top-announcement {
  background: var(--announcement-bg);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--announcement-text);
  padding: 8px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.announcement-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-red);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--primary-red);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

.top-contact-links {
  display: flex;
  gap: 18px;
}

.top-contact-links a {
  color: var(--announcement-text);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}

.top-contact-links a:hover {
  color: var(--primary-red);
  opacity: 1;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.main-header {
  position: fixed;
  top: 37px;
  left: 0;
  right: 0;
  width: 100%;

  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);

  z-index: 990;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: auto;
  height: 55px;
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;

  box-shadow: 0 4px 15px var(--primary-red-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-en);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-white);
  line-height: 1.1;
}

.logo-title span {
  color: var(--primary-red);
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: rgba(230, 0, 38, 0.08);
}

.nav-link.active {
  color: var(--primary-red);
}

.badge-count {
  background: var(--primary-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 50px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
  transform: rotate(20deg);
}

/* Language Switcher */
.lang-switch-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.lang-switch-btn:hover {
  border-color: var(--primary-red);
}

/* User Profile Dropdown */
.user-dropdown-group {
  position: relative;
}

.user-profile-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px 6px 8px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.user-profile-btn:hover {
  border-color: var(--border-color-hover);
}

.user-avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red), #ff4d6d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.user-info-text {
  text-align: start;
  line-height: 1.1;
}

.user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
}

.user-role {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.user-dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  width: 100%;
  text-align: start;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(230, 0, 38, 0.08);
  color: var(--primary-red);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.logout-item:hover {
  background: rgba(230, 0, 38, 0.15);
  color: var(--primary-red);
}

/* Mobile Toggle */
.mobile-toggle-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-red-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-red-hover), var(--primary-red));
  box-shadow: 0 6px 22px rgba(230, 0, 38, 0.4);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-outline-light:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.btn-danger {
  background: rgba(230, 0, 38, 0.15);
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.btn-danger:hover {
  background: var(--primary-red);
  color: #fff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  padding: 60px 0 90px;
  margin-top: 80px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(230, 0, 38, 0.08);
  border: 1px solid rgba(230, 0, 38, 0.25);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-main);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-sub);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.stat-card {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
  z-index: 20;
  overflow: visible;
}

.hero-car-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  overflow: visible;
  z-index: 10;
}

.hero-car-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.hero-floating-card {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-color);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  animation: float 4s ease-in-out infinite;
  z-index: 30;
}

.hero-floating-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-white);
}

.hero-floating-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-float {
  top: 24px;
  inset-inline-start: -24px;
}

.bottom-float {
  bottom: 24px;
  inset-inline-end: -24px;
  animation-delay: 2s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============================================================
   CATALOG & SHOWROOM SECTION
   ============================================================ */
.catalog-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}

.catalog-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-box i {
  position: absolute;
  top: 50%;
  inset-inline-start: 16px;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px 12px 44px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

html[dir="rtl"] .search-box input {
  padding: 12px 44px 12px 16px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px var(--primary-red-glow);
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.custom-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:focus {
  outline: none;
  border-color: var(--primary-red);
}

/* Cars Grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
}

.catalog-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Individual Car Card */
.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
}

.car-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-color-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 20px rgba(230, 0, 38, 0.1);
}

.car-card-media {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: var(--card-media-bg);
}

.car-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.car-card:hover .car-card-img {
  transform: scale(1.05);
}

.car-brand-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.car-finitions-badge {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 14px;
  background: var(--primary-red);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.car-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.car-name-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-white);
}

.car-short-desc {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.car-specs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.spec-chip {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

html[data-theme="dark"] .spec-chip {
  background: rgba(255, 255, 255, 0.04);
}

.car-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.car-price-block {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.car-price-num {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-white);
}

/* ============================================================
   FULLSCREEN PAGES (CONFIGURATOR & AUTH)
   ============================================================ */
.fullscreen-page {
  padding: 40px 0 80px;
  min-height: calc(100vh - 140px);
}

.page-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.config-page-title-wrap {
  text-align: center;
}

.config-page-title-wrap h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-white);
}

.edit-mode-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--color-gold);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fullscreen-configurator-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: flex-start;
}

.config-visual-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 96px;
}

.main-preview-frame {
  position: relative;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-media-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.main-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.engine-boite-badge {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.thumbnails-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.thumb-item {
  width: 85px;
  height: 60px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  background: var(--card-media-bg);
}

.thumb-item.active {
  border-color: var(--primary-red);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-guarantee-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Config Options Right Panel */
.config-options-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.config-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.config-label {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-white);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-red);
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.selected-val-label {
  font-size: 0.9rem;
  color: var(--primary-red);
  font-weight: 800;
  margin-inline-start: auto;
}

/* Finition Selection Cards */
.finition-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.finition-select-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.finition-select-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.finition-select-card.selected {
  border-color: var(--primary-red);
  background: rgba(230, 0, 38, 0.06);
  box-shadow: 0 0 16px rgba(230, 0, 38, 0.15);
}

.finition-card-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-white);
}

.finition-card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.finition-price-tag {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-red);
}

/* Color Swatches Grid */
.color-swatches-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-swatch-btn {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.color-swatch-btn.selected {
  border-color: var(--primary-red);
  background: rgba(230, 0, 38, 0.1);
  color: var(--primary-red);
}

/* Paid Options List */
.paid-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paid-option-row {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.paid-option-row:hover {
  border-color: var(--border-color-hover);
}

.paid-option-row.selected {
  border-color: var(--primary-red);
  background: rgba(230, 0, 38, 0.06);
}

.paid-opt-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.paid-opt-checkbox {
  accent-color: var(--primary-red);
  width: 18px;
  height: 18px;
}

.paid-opt-price {
  font-family: var(--font-en);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-red);
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
}

.form-control {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px var(--primary-red-glow);
}

/* Sticky Order Summary Bar */
.config-order-bar {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.price-summary-box {
  display: flex;
  flex-direction: column;
}

.price-summary-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-summary-val {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-red);
}

.config-footer-actions {
  display: flex;
  gap: 12px;
}

/* ============================================================
   AUTH FULL-SCREEN PAGE (SPLIT SCREEN)
   ============================================================ */
.auth-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 580px;
}

.auth-visual-side {
  position: relative;
  background: url('/images/gac_gs3_silver.jpg') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 48px;
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-visual-content h2 {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
}

.auth-visual-content p {
  color: #e2e8f0;
  font-size: 1rem;
}

.auth-perks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.9rem;
}

.auth-perks-list div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form-side {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}

.auth-card-box {
  width: 100%;
  max-width: 420px;
}

.auth-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card-hover);
  padding: 4px;
  border-radius: var(--radius-md);
  flex: 1;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-red);
  box-shadow: var(--shadow-sm);
}

.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.auth-alert.error {
  background: rgba(230, 0, 38, 0.1);
  border: 1px solid rgba(230, 0, 38, 0.3);
  color: var(--primary-red);
}

/* ============================================================
   CLIENT DASHBOARD (MY ORDERS & VERSEMENTS)
   ============================================================ */
.dashboard-section {
  padding: 50px 0 90px;
}

.dashboard-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}

.dashboard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.metric-box {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(230, 0, 38, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-red);
}

.metric-val {
  display: block;
  font-family: var(--font-en);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-white);
}

.metric-lbl {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.dash-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.dash-tab-btn:hover,
.dash-tab-btn.active {
  color: var(--text-main);
  background: rgba(230, 0, 38, 0.08);
}

.dash-tab-btn.active {
  color: var(--primary-red);
}

/* Orders List Grid */
.orders-list-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.client-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.client-order-card:hover {
  border-color: var(--border-color-hover);
}

.order-car-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--card-media-bg);
}

.order-details-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-id-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-en);
}

.order-car-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
}

.order-specs-sub {
  font-size: 0.85rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Progress bar */
.order-progress-wrapper {
  margin-top: 10px;
  max-width: 450px;
}

.order-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.order-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

html[data-theme="dark"] .order-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.order-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-red), var(--color-green));
  border-radius: 10px;
  transition: width 0.6s ease;
}

.order-actions-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Status Badges */
.status-pill {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-unconfirmed {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-confirmed {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-shipped {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-delivered {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-cancelled {
  background: rgba(230, 0, 38, 0.15);
  color: var(--primary-red);
  border: 1px solid rgba(230, 0, 38, 0.3);
}

/* Profile Password Box */
.profile-password-box {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 16px 0;
}

.profile-password-box h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}

/* Versement Table */
.versement-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.luxury-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}

.luxury-table th {
  background: var(--bg-card-hover);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.luxury-table td {
  padding: 16px 20px;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}

.luxury-table tr:hover td {
  background: var(--bg-card-hover);
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section {
  padding: 80px 0 100px;
  border-top: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-color-hover);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(230, 0, 38, 0.1);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-white);
}

.feature-card p {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.brand-col p {
  color: var(--footer-sub);
  font-size: 0.95rem;
  margin: 16px 0 20px;
  max-width: 360px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: #fff;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--footer-sub);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--primary-red);
  padding-inline-start: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--footer-sub);
}

.bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   MODALS & OVERLAYS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  display: none;
}

.mobile-overlay.show {
  display: block;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: -300px;
  width: 290px;
  background: var(--bg-card);
  border-inline-end: 1px solid var(--border-color);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.mobile-drawer.show {
  inset-inline-start: 0;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mobile-user-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: auto;
}

.drawer-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.drawer-link:hover {
  background: rgba(230, 0, 38, 0.08);
  color: var(--primary-red);
}

.drawer-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.mobile-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 280px;
  max-width: 420px;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-color: var(--color-green);
}

.toast.error {
  border-color: var(--primary-red);
}

.toast.info {
  border-color: var(--color-blue);
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   RESPONSIVENESS (MOBILE, TABLET, DESKTOP)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-stats-row {
    justify-content: center;
  }

  .fullscreen-configurator-grid {
    grid-template-columns: 1fr;
  }

  .config-visual-panel {
    position: relative;
    top: 0;
  }

  .auth-split-grid {
    grid-template-columns: 1fr;
  }

  .auth-visual-side {
    min-height: 240px;
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-btn-group {
    display: none;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .top-announcement {
    display: block;
    font-size: 0.75rem;
    padding: 6px 0;
  }

  .announcement-inner {
    justify-content: center;
    text-align: center;
  }

  .top-contact-links {
    display: none;
  }

  .main-header {
    top: 25px;
  }

  .hero-floating-card {
    position: static;
    margin: 10px 0;
    box-shadow: var(--shadow-sm);
    animation: none;
  }

  .client-order-card {
    grid-template-columns: 1fr;
    text-align: start;
  }

  .order-actions-col {
    align-items: stretch;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .config-order-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}


/* Included (free) equipment chips on the car detail page */
.included-options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.included-option-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.85rem;
}

.included-option-chip i {
  color: #22c55e;
}


/* =========================================================
   Logo image (navbar / drawer / footer)
========================================================= */
.logo-mark.logo-mark-img {
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.logo-img {
  display: block;
  width: 100px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.brand-inline-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* =========================================================
   Option icons (replace check marks)
========================================================= */
.opt-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  font-size: 1.1rem;
  line-height: 1;
}

.opt-icon-fallback {
  color: var(--primary-red);
  font-size: 1rem;
}

html[data-theme="dark"] .opt-icon-svg {
  filter: invert(1) brightness(1.1);
}

.included-option-chip .opt-icon {
  width: 22px;
  height: 22px;
}

.included-option-chip {
  gap: 8px;
}

.paid-option-row .opt-icon {
  width: 32px;
  height: 32px;
}

.paid-opt-left {
  min-width: 0;
}

.paid-opt-left>span:last-child {
  overflow-wrap: anywhere;
}

.paid-option-row.selected {
  box-shadow: 0 0 0 1px var(--primary-red) inset;
}

.paid-option-row.selected .opt-icon-svg {
  filter: invert(20%) sepia(95%) saturate(6000%) hue-rotate(345deg) brightness(90%);
}

/* =========================================================
   Finition stock badges
========================================================= */
.stock-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.stock-badge.sold-out {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.stock-badge.low {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.finition-select-card.is-sold-out {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.car-name-link {
  color: inherit;
  text-decoration: none;
}

.car-name-link:hover {
  color: var(--primary-red);
}

/* =========================================================
   Mobile responsiveness fixes
========================================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .fullscreen-configurator-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding-inline: 16px;
  }

  .cars-grid,
  #carsGrid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .toast,
  .toast-item,
  .toast-message {
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
  }

  .logo-sub {
    display: none;
  }

  .logo-title {
    font-size: 1.05rem;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .section-title,
  .section-heading {
    font-size: 1.6rem;
  }

  .paid-option-row {
    padding: 10px 12px;
    gap: 10px;
  }

  .paid-opt-left {
    gap: 10px;
  }

  .paid-opt-price {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .finition-select-card {
    padding: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .finition-price-tag {
    font-size: 0.95rem;
  }

  .config-order-bar .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-content,
  .modal-box,
  .modal-dialog {
    width: calc(100vw - 24px);
    max-width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .client-order-card {
    padding: 16px;
    gap: 16px;
  }

  .form-grid,
  .profile-grid {
    grid-template-columns: 1fr !important;
  }

  .auth-visual-side {
    min-height: 180px;
    padding: 24px 20px;
  }

  .auth-form-side {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .btn {
    padding-inline: 16px;
  }

  .top-announcement .announcement-badge strong {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .included-options-list {
    gap: 6px;
  }

  .included-option-chip {
    font-size: 0.78rem;
    padding: 6px 10px;
  }
}

/* Header on phones: JS sets inline display on the auth group, so force it hidden
   (login / register live in the mobile drawer) and keep the hamburger on-screen */
@media (max-width: 768px) {
  .auth-btn-group {
    display: none !important;
  }

  .header-container {
    gap: 8px;
  }

  .header-actions {
    gap: 8px;
    margin-inline-start: auto;
  }

  .brand-logo {
    min-width: 0;
  }
  
  .announcement-badge strong {
    font-size: 10px !important;
    line-height: 1.4;
  }

  .user-info-text,
  .user-profile-btn .dropdown-arrow {
    display: none;
  }

  .user-profile-btn {
    padding: 4px;
  }

  .user-dropdown-menu {
    inset-inline-end: 0;
    max-width: calc(100vw - 24px);
  }
}

/* Configurator: let grid children shrink instead of pushing the page wider than the screen */
.fullscreen-configurator-grid>* {
  min-width: 0;
}

.thumbnails-track {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .fullscreen-configurator-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {

  .config-visual-panel,
  .config-options-panel,
  .config-section,
  .main-preview-frame {
    max-width: 100%;
    min-width: 0;
  }

  .guarantee-item {
    min-width: 0;
  }

  .guarantee-item span {
    overflow-wrap: anywhere;
  }

  .config-section-title,
  .config-section h3 {
    overflow-wrap: anywhere;
  }
}