@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=Plus+Jakarta+Sans:ital,wght@0,400..800;1,400..800&display=swap');

:root {
  --primary: #2c3e50;
  --primary-dark: #1a2332;
  --primary-light: #5a7a9a;
  --secondary: #1a2332;
  --accent: #3d5a80;
  --luxury: #b8956a;
  --luxury-light: #d4bc94;
  --luxury-muted: rgba(184, 149, 106, 0.15);
  --bg: #faf6f0;
  --bg-soft: #f5efe6;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text: #1a2332;
  --text-secondary: #3d4f63;
  --text-muted: #6b7c8f;
  --border: #e8dfd2;
  --border-light: #f0e8dc;
  --success: #0d7a5f;
  --warning: #b45309;
  --danger: #c53030;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.04);
  --shadow: 0 4px 24px rgba(26, 35, 50, 0.06);
  --shadow-lg: 0 16px 48px rgba(26, 35, 50, 0.1);
  --shadow-card: 0 1px 3px rgba(26, 35, 50, 0.03), 0 8px 32px rgba(26, 35, 50, 0.06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-stat: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-label-tracking: 0.08em;
  --site-texture: url('../images/site-bg.png');
  --site-bg: url('../images/site-bg.png');
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background-color: #ebe6df;
  background-image: var(--site-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

h1, h2, h3, h4,
.hero h1,
.page-title,
.detail-title,
.section-header h2,
.section-header-row h2,
.auth-brand-panel h1,
.footer-brand .logo-name strong,
.car-title,
.detail-price {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* Premium label type — matches hero-badge "✦ Premium Pre-Owned" */
.type-premium-label,
.hero-badge,
.mobile-nav-label,
.detail-price-label,
.footer-col-title,
.filter-group label,
.footer-tagline-top {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: var(--font-label-tracking);
  text-transform: uppercase;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

/* Premium UI icons */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
  vertical-align: middle;
}

.ui-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  fill: none;
  display: block;
}

.ui-icon-sm svg { width: 0.95rem; height: 0.95rem; }
.ui-icon-md svg { width: 1.25rem; height: 1.25rem; }
.ui-icon-lg svg { width: 1.75rem; height: 1.75rem; }
.ui-icon-xl svg { width: 2rem; height: 2rem; }

.hero-trust-icon.ui-icon { color: var(--luxury); }
.hero-trust-icon.ui-icon svg { width: 1.05rem; height: 1.05rem; }

.auth-perk-icon.ui-icon { color: var(--luxury); }
.auth-perk-icon.ui-icon svg { width: 1.15rem; height: 1.15rem; }

.feature-card .ui-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(184, 149, 106, 0.14), rgba(184, 149, 106, 0.06));
  border: 1px solid rgba(184, 149, 106, 0.22);
  color: var(--luxury);
  margin-bottom: 14px;
}

.feature-card .ui-icon svg { width: 1.5rem; height: 1.5rem; }

.footer-badge .ui-icon { color: var(--luxury-light); }
.footer-badge .ui-icon svg { width: 0.75rem; height: 0.75rem; }

.btn-detail-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  display: block;
}

.empty-state .ui-icon-xl {
  color: var(--text-muted);
  margin: 0 auto 12px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 8px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(26, 35, 50, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
  justify-self: start;
  min-width: 0;
}

.logo span,
.logo .logo-accent { color: var(--primary-dark); }

.logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-size: 0.98rem;
}

.logo-name strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-name .logo-accent {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--luxury);
}

.logo-light .logo-name,
.logo-light .logo-name strong { color: #fff; }
.logo-light .logo-name .logo-accent { color: var(--primary-light); }

.logo-image {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 11px;
  flex-shrink: 0;
  background: #0a0a0a;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.12);
  overflow: hidden;
}

.logo-image.logo-image-full {
  width: auto;
  height: 52px;
  max-width: 180px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--secondary) 0%, #2d3561 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(26, 31, 54, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.015em;
  padding: 10px 18px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  line-height: 1.25;
  font-family: var(--font);
}

.nav a:hover {
  color: var(--secondary);
  background: transparent;
}

.nav a.active {
  color: var(--secondary);
  background: transparent;
  font-weight: 700;
  box-shadow: none;
  position: relative;
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--luxury), var(--luxury-light));
}

/* My Account dropdown */
.nav-item.nav-dropdown {
  position: relative;
}

.nav-link.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.015em;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  line-height: 1.25;
}

.nav-link.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: var(--secondary);
  background: transparent;
}

.nav-link.nav-dropdown-toggle.active {
  color: var(--secondary);
  background: transparent;
  font-weight: 700;
  box-shadow: none;
  position: relative;
}

.nav-link.nav-dropdown-toggle.active::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--luxury), var(--luxury-light));
}

.nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform var(--transition);
  margin-left: 0;
}

.nav-caret svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 120;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a,
.nav-dropdown-menu .nav-dropdown-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--transition);
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu .nav-dropdown-logout:hover {
  background: var(--bg-elevated);
  color: var(--secondary);
}

.nav-dropdown-menu .nav-dropdown-register {
  color: var(--primary);
}

.header-actions { display: none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle:hover { background: var(--border-light); }

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 198;
  opacity: 0;
  transition: opacity var(--transition);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: auto;
  right: 0;
  width: min(300px, calc(100vw - 6px));
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background-color: #ebe6df;
  background-image: var(--site-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 199;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 40px rgba(26, 35, 50, 0.14);
  display: flex;
  flex-direction: column;
  padding: 8px 6px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-right: max(6px, env(safe-area-inset-right));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.mobile-drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 246, 240, 0.92) 50%, rgba(245, 239, 230, 0.94) 100%);
  pointer-events: none;
  z-index: 0;
}

.mobile-drawer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 120px;
  background: radial-gradient(ellipse 70% 100% at 100% 0%, rgba(184, 149, 106, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.mobile-drawer > * {
  position: relative;
  z-index: 1;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid rgba(184, 149, 106, 0.22);
}

.mobile-drawer-logo.logo-name strong { color: var(--primary-dark); }
.mobile-drawer-logo .logo-accent { color: var(--luxury); }

.mobile-drawer-header .logo { font-size: 0.95rem; min-width: 0; }

.mobile-drawer-header .logo-image {
  width: 32px;
  height: 32px;
  padding: 2px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(26, 35, 50, 0.1);
}

.mobile-drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.06);
}

.mobile-drawer-close:hover {
  background: #fff;
  border-color: rgba(184, 149, 106, 0.45);
  color: var(--primary-dark);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  width: 100%;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 11px 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
  transition: all var(--transition);
  text-align: left;
  font-family: var(--font);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: #fff;
  color: var(--primary-dark);
  border-color: rgba(184, 149, 106, 0.42);
  box-shadow: 0 4px 14px rgba(184, 149, 106, 0.12);
}

.mobile-nav a.active {
  border-left: 3px solid var(--luxury);
  padding-left: 8px;
}

.mobile-account-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(184, 149, 106, 0.2);
  width: 100%;
  flex: 0 0 auto;
}

.mobile-nav-label {
  font-size: 0.62rem;
  color: var(--luxury);
  padding: 2px 10px 6px;
  text-align: left;
}

.mobile-account-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: all var(--transition);
  text-decoration: none;
}

.mobile-sub-link:hover {
  background: #fff;
  color: var(--primary-dark);
  border-color: rgba(184, 149, 106, 0.35);
}

.mobile-sub-link-primary {
  color: #1a2332;
  border-color: rgba(212, 188, 148, 0.55);
  background: linear-gradient(135deg, #d4bc94 0%, #b8956a 100%);
  font-weight: 700;
}

.mobile-sub-link-primary:hover {
  color: #1a2332;
  background: linear-gradient(135deg, #e0c9a0 0%, #c4a06e 100%);
}

.mobile-logout {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.25);
  background: rgba(220, 38, 38, 0.08);
}

.mobile-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0 max(24px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.mobile-drawer-actions .btn {
  width: 100%;
  justify-content: center;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-overlay {
  display: block;
  opacity: 1;
}

body.menu-open .mobile-drawer {
  transform: translateX(0);
}

body.menu-open .floating-buttons {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Filters collapsible */
.filters-toggle-wrap {
  display: none;
  margin-bottom: 16px;
}

.filters-toggle {
  width: 100%;
  justify-content: center;
}

.filters-bar.collapsible {
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}

/* Responsive tables */
.table-mobile-label {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Admin mobile topbar - customer site only uses drawer */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, #5c7a9e 0%, #3d5a80 55%, #293241 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(61, 90, 128, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 90, 128, 0.35);
  color: #fff;
}

.btn-outline {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: var(--bg-elevated);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--secondary);
  background: var(--bg-elevated);
}

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

/* Hero */
.hero {
  position: relative;
  padding: 36px 0 44px;
  background: transparent;
  overflow: visible;
  border-bottom: none;
}

.hero-home {
  padding: 28px 0 20px;
}

.hero-home-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.hero-home-copy {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(184, 149, 106, 0.28);
  color: var(--primary-dark);
  font-size: 0.74rem;
  margin-bottom: 14px;
}

.hero-highlight {
  color: var(--primary);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 400;
  line-height: 1.65;
  max-width: 520px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-trust-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 0;
  margin: 0;
}

.hero-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-trust-icon {
  font-size: 0.95rem;
}

.hero-search-card {
  background: #ffffff;
  border: 1px solid rgba(26, 35, 50, 0.1);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 28px rgba(26, 35, 50, 0.08);
  position: relative;
  z-index: 1;
}

.hero-search-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.hero-search-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hero-search-box {
  max-width: none;
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hero-quick-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.hero-quick-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-quick-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.hero-quick-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(61, 90, 128, 0.06);
}

.section-home-featured {
  padding-top: 24px;
}

.section-home-cars-start {
  padding-top: 16px;
  padding-bottom: 28px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  margin-bottom: 24px;
}

.section-header-row h2 {
  margin-bottom: 6px;
}

.section-header-row p {
  margin: 0;
}

.section-home-why .section-header {
  margin-bottom: 28px;
}

.hero::before,
.hero::after {
  display: none;
}

.stats-strip {
  padding: 8px 0 16px;
  margin-top: 0;
  position: relative;
  z-index: 3;
}

.stats-bar-home {
  margin-top: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6.5vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  color: var(--secondary);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
  line-height: 1.7;
}

/* Search Box */
.search-box {
  background: #ffffff;
  border: 1px solid rgba(26, 35, 50, 0.1);
  border-radius: var(--radius-xl);
  padding: 8px;
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 8px 28px rgba(26, 35, 50, 0.08);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 16px 22px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }
.search-box .btn { border-radius: calc(var(--radius-xl) - 4px); }

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 0;
  position: relative;
  z-index: 3;
}

.stat-card {
  background: #ffffff;
  border: 1px solid rgba(26, 35, 50, 0.1);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 6px 22px rgba(26, 35, 50, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  position: relative;
  z-index: 1;
  font-family: var(--font-stat);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(26, 35, 50, 0.12);
}

.stat-card .number {
  font-family: var(--font-stat);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'kern' 1;
}

.stat-card .label {
  font-family: var(--font-stat);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-top: 6px;
  text-transform: none;
}

/* Section */
.section { padding: 32px 0; }
.section-alt { padding: 36px 0; }
.cars-page-section { padding-top: 20px; }

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  color: var(--secondary);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Car Grid — equal-height aligned cards */
.car-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-card);
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(184, 149, 106, 0.35);
}

.car-image {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(145deg, #1a2332 0%, #2c3e50 100%);
  flex-shrink: 0;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card:hover .car-image img {
  transform: scale(1.06);
}

.car-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.car-status {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-available { background: rgba(5, 150, 105, 0.92); color: #fff; }
.status-booked { background: rgba(217, 119, 6, 0.92); color: #fff; }
.status-sold { background: rgba(220, 38, 38, 0.92); color: #fff; }

.car-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.car-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
  letter-spacing: 0.02em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 18px;
  flex: 1;
}

.car-specs span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 6px;
}

.car-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.car-price .current {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.car-price .original {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

/* Filters */
.cars-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filters-sidebar {
  position: sticky;
  top: 76px;
}

.filters-sidebar-title {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.filters-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
  padding: 18px 16px;
}

.filters-sidebar-inner .filter-group {
  margin: 0;
}

.filters-sidebar-inner .filter-actions {
  width: 100%;
  margin-top: 4px;
}

.cars-main {
  min-width: 0;
}

.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-group label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--secondary);
  background: var(--bg-card);
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--secondary);
  background: var(--bg-card);
}

.form-group textarea { resize: vertical; min-height: 100px; }
.form-footer { text-align: center; margin-top: 28px; color: var(--text-muted); font-size: 0.92rem; }

/* Car Detail */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  grid-template-areas:
    "gallery sidebar"
    "body sidebar";
  gap: 22px;
  align-items: start;
}

.detail-page-section {
  padding-top: 12px;
  padding-bottom: 20px;
}

@media (min-width: 1100px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 368px;
    gap: 28px;
  }

  .detail-main-image {
    min-height: 420px;
    max-height: min(68vh, 560px);
  }

  .gallery-thumbs-vertical {
    max-height: min(68vh, 560px);
  }

  .gallery-nav {
    width: 50px;
    height: 50px;
    font-size: 1.35rem;
    opacity: 1;
  }

  .gallery-nav.prev { left: 16px; }
  .gallery-nav.next { right: 16px; }

  .detail-sidebar {
    top: 84px;
  }
}

.detail-gallery-wrap { grid-area: gallery; min-width: 0; }
.detail-body { grid-area: body; min-width: 0; }

.detail-gallery {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.specs-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.spec-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.spec-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(61, 90, 128, 0.08);
  color: var(--accent);
}

.spec-icon svg {
  width: 17px;
  height: 17px;
}

.spec-copy {
  min-width: 0;
  flex: 1;
}

.spec-item .label {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.spec-item .value {
  font-family: var(--font);
  font-weight: 700;
  margin-top: 3px;
  color: var(--secondary);
  font-size: 0.84rem;
  line-height: 1.3;
}

.features-list { display: flex; flex-wrap: wrap; gap: 6px; }

.features-list-compact { gap: 5px; }

.feature-tag {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.detail-head {
  margin-bottom: 10px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.detail-info-col-side .detail-section-title-spaced {
  margin-top: 12px;
}

@media (min-width: 900px) {
  .detail-info-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 16px;
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .specs-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.detail-sidebar {
  grid-area: sidebar;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0;
  position: sticky;
  top: 92px;
  height: fit-content;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.detail-sidebar-inner {
  padding: 24px 22px 22px;
}

.detail-price-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.detail-price-label {
  display: block;
  font-size: 0.68rem;
  color: var(--luxury);
  margin-bottom: 6px;
}

.detail-price {
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  line-height: 1.1;
  word-break: break-word;
}

.detail-price-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.88rem;
  margin: 0;
  font-weight: 500;
}

.detail-price-discount {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
  text-decoration: none;
}

.detail-sidebar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0;
}

.detail-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.detail-views svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.detail-status-note {
  font-size: 0.88rem;
  text-align: center;
  margin-top: 12px;
  font-weight: 600;
}

.detail-status-warning { color: var(--warning); }
.detail-status-danger { color: var(--danger); margin-top: 16px; }

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  width: 100%;
}

.detail-actions .btn-detail {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: nowrap;
}

.btn-detail-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.btn-detail-primary {
  background: linear-gradient(135deg, #2c3e50 0%, #1a2332 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(26, 35, 50, 0.2);
}

.btn-detail-primary .btn-detail-icon {
  background: rgba(255, 255, 255, 0.12);
}

.btn-detail-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 35, 50, 0.28);
  color: #fff;
}

.btn-detail-outline {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.btn-detail-outline .btn-detail-icon {
  background: var(--bg-elevated);
}

.btn-detail-outline:hover {
  border-color: var(--luxury);
  color: var(--secondary);
  background: var(--luxury-muted);
}

.btn-detail-success {
  background: linear-gradient(135deg, #0d7a5f 0%, #065f46 100%);
  color: #fff;
  border: none;
}

.btn-detail-success .btn-detail-icon {
  background: rgba(255, 255, 255, 0.15);
}

.btn-detail-success:hover {
  color: #fff;
  transform: translateY(-1px);
}

.detail-contact-card {
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-light);
  border-radius: 0;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.detail-contact-card h4 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--luxury);
  margin-bottom: 12px;
  font-weight: 700;
}

.detail-contact-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
}

.detail-contact-row:hover {
  color: var(--primary);
}

.detail-contact-row .detail-contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--luxury);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-contact-row .detail-contact-icon svg {
  width: 14px;
  height: 14px;
}

.detail-contact-value {
  word-break: break-word;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
}

tr:hover td { background: var(--bg-elevated); }
tr:last-child td { border-bottom: none; }

/* Badge */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-pending { background: #fef3c7; color: #b45309; }
.badge-confirmed { background: #d1fae5; color: #047857; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-new { background: #dbeafe; color: #1d4ed8; }

/* Footer */
.footer {
  background:
    linear-gradient(180deg, rgba(20, 28, 40, 0.97) 0%, rgba(12, 17, 26, 0.99) 100%),
    var(--site-bg);
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--luxury), var(--luxury-light), var(--luxury), transparent) 1;
}

.footer-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 100%);
  height: 200px;
  background: radial-gradient(ellipse, rgba(184, 149, 106, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 149, 106, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.footer-accent-bar {
  display: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.75fr);
  gap: 28px 40px;
  padding: 36px 0 24px;
  align-items: start;
}

.footer-brand,
.footer-col,
.footer-links-grid {
  min-width: 0;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
}

.footer-brand .logo {
  margin-bottom: 10px;
  display: inline-flex;
  max-width: 100%;
}

.footer-brand-label {
  display: none;
}

.footer-brand .logo-name strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.footer-brand .logo-name .logo-accent {
  color: var(--luxury-light);
  letter-spacing: 0.14em;
}

.footer-brand .footer-about {
  margin-top: 0;
  max-width: 340px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
}

.footer-tagline-top {
  margin: 12px 0 10px;
  font-size: 0.68rem;
  color: var(--luxury-light);
  line-height: 1.4;
}

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(184, 149, 106, 0.12);
  border: 1px solid rgba(184, 149, 106, 0.28);
}

.footer-col-title {
  margin: 0 0 12px;
  font-size: 0.65rem;
  color: var(--luxury-light);
}

.footer-list,
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-list a {
  display: block;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  transition: color var(--transition), padding-left var(--transition);
}

.footer-list a:hover {
  color: var(--luxury-light);
  padding-left: 4px;
}

.footer-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--transition);
  min-width: 0;
}

.footer-contact-link > span:last-child {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.footer-contact-link:hover {
  color: var(--luxury-light);
}

.footer-contact-link.footer-contact-static:hover {
  color: rgba(255, 255, 255, 0.68);
}

.footer-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(184, 149, 106, 0.12);
  border: 1px solid rgba(184, 149, 106, 0.25);
  color: var(--luxury-light);
  flex-shrink: 0;
  margin-top: 1px;
}

.footer-icon svg {
  width: 14px;
  height: 14px;
}

.footer .logo { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 0 20px;
  border-top: 1px solid rgba(184, 149, 106, 0.15);
}

.footer-copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  line-height: 1.4;
  width: 100%;
  text-align: center;
}

.footer-tagline {
  display: none;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 16px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.35s ease;
  min-width: 300px;
  font-weight: 600;
  font-size: 0.92rem;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Loading */
.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination button {
  padding: 11px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.pagination button:hover,
.pagination button.active {
  border-color: var(--secondary);
  color: var(--secondary);
  background: var(--bg-elevated);
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  margin-bottom: 24px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.modal-close {
  float: right;
  background: var(--bg-elevated);
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  line-height: 1;
  transition: background var(--transition);
}

.modal-close:hover { background: var(--border); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.4; }

/* Auth page */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--secondary);
  overflow: hidden;
  border-right: 1px solid rgba(26, 35, 50, 0.1);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-panel-logo {
  margin-bottom: 10px;
}

.auth-site-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 90, 128, 0.1), transparent 70%);
  pointer-events: none;
}

.auth-brand-panel .logo,
.auth-brand-panel .auth-panel-logo { color: var(--secondary); }
.auth-brand-panel .logo-name,
.auth-brand-panel .logo-name strong { color: var(--secondary); }
.auth-brand-panel .logo-name .logo-accent { color: var(--primary); }

.auth-brand-panel h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--secondary);
}

.auth-brand-panel p,
.auth-brand-panel .auth-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 380px;
}

.auth-perks {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.auth-perk-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(61, 90, 128, 0.1);
  border: 1px solid rgba(61, 90, 128, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.72);
  overflow-y: auto;
}

.auth-form-panel .form-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 36px 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.auth-page h2 {
  text-align: left;
  margin-bottom: 6px;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.02em;
  font-size: 1.65rem;
}

.auth-page .subtitle {
  text-align: left;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 500;
  font-size: 0.92rem;
}

.auth-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 24px;
}

.auth-mobile-brand .logo {
  justify-content: center;
  margin-bottom: 8px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
}

.tab {
  padding: 14px 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab.active {
  color: var(--secondary);
  border-bottom-color: var(--primary);
}

/* Why section feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card .icon {
  margin-bottom: 16px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(184, 149, 106, 0.14), rgba(184, 149, 106, 0.06));
  border: 1px solid rgba(184, 149, 106, 0.22);
  border-radius: 14px;
  color: var(--luxury);
}

.feature-card .icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 0.01em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  font-weight: 500;
}

/* Section alt background */
.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Page titles */
.page-title {
  font-family: var(--font);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

/* Car detail gallery */
.detail-gallery { position: relative; background: #0f1419; border-radius: var(--radius-xl); overflow: hidden; }

.gallery-layout {
  display: flex;
  align-items: stretch;
  min-height: 320px;
}

.gallery-thumbs-vertical {
  width: 92px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(68vh, 560px);
  background: #fff;
  border-right: 1px solid var(--border-light);
  scrollbar-width: thin;
  scrollbar-color: #c5d0de transparent;
}

.gallery-thumbs-vertical::-webkit-scrollbar { width: 5px; }
.gallery-thumbs-vertical::-webkit-scrollbar-thumb { background: #c5d0de; border-radius: 999px; }

.gallery-thumb-v {
  flex-shrink: 0;
  width: 100%;
  height: 62px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.68;
  background: #f3f5f8;
  transition: opacity var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.gallery-thumb-v:hover,
.gallery-thumb-v.active {
  opacity: 1;
  border-color: var(--luxury);
  box-shadow: 0 0 0 1px rgba(184, 149, 106, 0.35);
}

.gallery-thumb-v img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-main-image {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #0f1419;
  aspect-ratio: auto;
  min-height: 320px;
  max-height: min(68vh, 560px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.detail-image-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #0f1419;
  border: none;
  border-radius: 0;
}

.detail-main-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.22s ease, transform 0.35s ease;
  border-radius: 0;
}

.detail-main-image img.is-switching {
  opacity: 0;
  transform: scale(0.98);
}

.detail-main-image img.slide-from-right {
  animation: gallerySlideIn 0.32s ease forwards;
}

.detail-main-image img.slide-from-left {
  animation: gallerySlideInRev 0.32s ease forwards;
}

@keyframes gallerySlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes gallerySlideInRev {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid var(--border-light);
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d1d9e6;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.gallery-dot.active {
  background: var(--luxury);
  width: 22px;
  border-radius: 999px;
}

.gallery-dot:hover {
  background: var(--primary-light);
}

.gallery-expand {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(15, 20, 25, 0.72);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gallery-expand:hover {
  background: rgba(15, 20, 25, 0.9);
  border-color: rgba(184, 149, 106, 0.5);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 14, 20, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 72px;
}

.image-lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(96vw, 1600px);
  max-height: 88vh;
}

.image-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  background: transparent;
  padding: 0;
  transition: opacity 0.2s ease;
}

.image-lightbox img.is-switching {
  opacity: 0;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(184, 149, 106, 0.5);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(184, 149, 106, 0.5);
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 20, 25, 0.55);
  backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  z-index: 2; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all var(--transition);
}
.gallery-nav:hover {
  background: rgba(15, 20, 25, 0.8);
  border-color: var(--luxury);
  color: #fff;
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-counter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(41, 50, 65, 0.8); color: #fff; font-size: 0.72rem;
  padding: 4px 12px; border-radius: 20px; font-weight: 600; z-index: 2;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 0;
  max-height: none;
  overflow-y: visible;
  padding: 12px 14px 14px;
  background: #fff;
  border-top: 1px solid var(--border-light);
}

.detail-thumbs.scroll-row {
  display: flex;
  grid-template-columns: unset;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
}

.detail-thumb {
  flex-shrink: 0;
  width: 88px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: all var(--transition);
}

.detail-thumb:hover,
.detail-thumb.active {
  opacity: 1;
  border-color: var(--luxury);
  box-shadow: 0 0 0 1px var(--luxury);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .detail-thumb { width: 72px; height: 54px; }
}

.detail-title {
  font-family: var(--font);
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  line-height: 1.25;
}

.detail-meta {
  color: var(--text-muted);
  margin-bottom: 0;
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.4;
}

.detail-section-title {
  margin-bottom: 8px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.01em;
}

.detail-section-title-spaced { margin: 12px 0 8px; }

.detail-page-section {
  padding-top: 16px;
  overflow-x: clip;
}

#carDetail {
  min-width: 0;
  overflow-x: clip;
}

.detail-desc {
  color: var(--text-muted);
  line-height: 1.55;
  font-weight: 500;
  font-size: 0.88rem;
  margin: 0;
}

.desc-preview {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
}

.desc-preview:hover { color: var(--secondary); }

.desc-preview-text {
  word-break: break-word;
}

.desc-more {
  display: inline;
  margin-left: 4px;
  color: var(--luxury);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.desc-list-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.desc-list-modal.is-open { display: flex; }

.desc-list-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.desc-list-modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 96vw);
  max-height: min(88vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(26, 35, 50, 0.22);
}

.desc-list-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.desc-list-modal-header h3 {
  margin: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--secondary);
}

.desc-list-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.desc-list-modal-body {
  padding: 8px 10px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.desc-point-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desc-point-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f7f3ec;
  border: 1px solid #ebe3d6;
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.desc-point-list li .desc-point-mark {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--success);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  line-height: 1;
}

.desc-point-list li .desc-point-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

@media (max-width: 480px) {
  .desc-list-modal-panel {
    width: 100%;
    max-height: 90vh;
    border-radius: 12px;
  }

  .desc-point-list li {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}

/* ============================================
   RESPONSIVE — Tablet & Mobile
   ============================================ */

/* Large tablet */
@media (max-width: 1200px) {
  .car-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid {
    grid-template-columns: 1fr 340px;
    grid-template-areas:
      "gallery sidebar"
      "body sidebar";
    gap: 28px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .container { padding: 0 8px; }

  .hero-home-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cars-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "sidebar"
      "body";
    gap: 24px;
  }
  .detail-sidebar { position: static; }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -40px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0 24px;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    padding: 14px 0 18px;
  }

  .section { padding: 32px 0; }
  .section-header { margin-bottom: 24px; }
  .section-header h2 { font-size: 1.85rem; }

  .filters-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-bar .filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .filters-bar .filter-actions .btn { flex: 1; min-width: 140px; }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  html { font-size: 15px; }

  body { background-attachment: scroll; }

  .container {
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  .cars-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filters-sidebar {
    position: static;
  }

  .filters-sidebar-inner.collapsible {
    max-height: none;
    opacity: 1;
    overflow: visible;
    padding: 16px;
    border: 1px solid var(--border);
  }

  /* Header */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
    gap: 8px;
  }

  .header .container {
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  .logo {
    font-size: 1rem;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }

  .logo-image {
    width: 34px;
    height: 34px;
    padding: 2px;
  }

  .logo-name strong {
    font-size: 0.98rem;
  }

  .logo-name .logo-accent {
    font-size: 0.56rem;
  }

  .nav { display: none; }

  .menu-toggle { display: flex; }

  .header-right {
    gap: 0;
    flex-shrink: 0;
  }

  /* Login & Register live inside My Account menu */
  .header-actions {
    display: none !important;
  }

  .hero-home-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-home {
    padding: 14px 0 18px;
  }

  .hero-home-copy {
    text-align: left;
  }

  .hero-lead {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-cta-row {
    justify-content: stretch;
  }

  .hero-cta-row .btn {
    flex: 1;
    min-width: 0;
  }

  .hero-trust-list {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .hero-search-card {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .mobile-drawer {
    width: min(300px, calc(100vw - 4px));
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  .section { padding: 20px 0; }
  .section-alt { padding: 22px 0; }
  .detail-page-section { padding-top: 10px; padding-bottom: 16px; }
  .cars-page-section { padding-top: 12px; }

  .footer-top {
    padding: 28px 0 18px;
    gap: 20px;
  }

  .footer-bottom {
    padding: 12px 0 14px;
  }

  .floating-buttons {
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    gap: 6px;
  }

  .floating-btn {
    width: 32px;
    height: 32px;
    box-shadow: 0 2px 10px rgba(26, 35, 50, 0.16);
  }

  .floating-btn svg {
    width: 14px;
    height: 14px;
  }

  .support-chat-panel {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 76px);
    width: calc(100vw - 16px);
  }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  /* Hero */
  .hero {
    padding: 24px 0 28px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
    margin-bottom: 14px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 28px;
    padding: 0 4px;
  }

  .search-box {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 12px;
    max-width: 100%;
  }

  .search-box input {
    padding: 14px 16px;
    text-align: center;
  }

  .search-box .btn {
    width: 100%;
    padding: 14px;
  }

  /* Stats */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
  }

  .stat-card {
    padding: 14px 10px;
    min-height: 88px;
  }

  .stat-card .number { font-size: 1.45rem; }
  .stat-card .label { font-size: 0.8rem; }

  /* Sections */
  .section { padding: 20px 0; }
  .section-alt { padding: 22px 0; }
  .section-header { margin-bottom: 16px; }
  .section-header h2 { font-size: 1.6rem; }
  .section-header p { font-size: 0.95rem; }

  /* Grids */
  .car-grid { grid-template-columns: 1fr; gap: 10px; }
  .feature-grid { grid-template-columns: 1fr; gap: 10px; }

  .car-image { height: 190px; }
  .car-body { padding: 12px 10px 14px; }
  .car-title { font-size: 0.98rem; min-height: auto; }
  .car-price .current { font-size: 1.2rem; }

  .car-card {
    border-radius: 12px;
  }

  .feature-card {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .stat-card {
    padding: 14px 10px;
    min-height: 88px;
  }

  .hero-search-card {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .hero-home {
    padding: 10px 0 14px;
  }

  .stats-strip {
    padding: 6px 0 10px;
  }

  .stats-bar {
    gap: 8px;
  }

  /* Filters */
  .filters-toggle-wrap { display: block; }

  .filters-bar.collapsible {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0;
    padding: 0 20px;
    border: none;
  }

  .filters-bar.collapsible.is-open {
    max-height: 2000px;
    opacity: 1;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid var(--border);
  }

  .filters-bar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 10px;
    margin-bottom: 12px;
  }

  .filters-bar > .btn {
    width: 100%;
  }

  /* Page titles */
  .page-title { font-size: 1.6rem; }
  .page-subtitle { margin-bottom: 24px; font-size: 0.92rem; }

  /* Car detail */
  .detail-page-section {
    padding-top: 10px;
    padding-bottom: 16px;
  }

  .detail-grid {
    gap: 12px;
  }

  .detail-gallery {
    border-radius: var(--radius-lg);
    margin: 0;
  }

  .gallery-layout {
    flex-direction: column;
  }

  .gallery-thumbs-vertical {
    width: 100%;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-top: 1px solid var(--border-light);
    order: 2;
    padding: 10px 12px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-thumb-v {
    width: 72px;
    height: 54px;
  }

  .detail-main-image {
    order: 1;
    min-height: 240px;
    max-height: 52vh;
  }

  .detail-main-image {
    aspect-ratio: 4 / 3;
    min-height: 240px;
    max-height: 52vh;
    padding: 0;
  }

  .detail-image-frame {
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  .detail-main-image img {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .detail-title { font-size: 1.25rem; margin-top: 0; line-height: 1.3; }
  .detail-meta { font-size: 0.82rem; margin-bottom: 0; line-height: 1.45; }
  .detail-head { margin-bottom: 8px; }
  .detail-info-grid { gap: 10px; }
  .detail-sidebar {
    padding: 0;
    border-radius: var(--radius-lg);
    width: 100%;
    margin: 0;
  }
  .detail-sidebar-inner { padding: 12px 10px; }
  .detail-price { font-size: 1.75rem; }
  .detail-actions { gap: 8px; }
  .detail-actions .btn-detail { padding: 11px 14px; font-size: 0.86rem; }

  .image-lightbox { padding: 52px 10px 40px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox-hint { display: none; }

  .detail-section-title { font-size: 0.92rem; margin-bottom: 6px; }
  .detail-section-title-spaced { margin: 10px 0 6px; }

  .specs-grid,
  .specs-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .spec-item { padding: 8px 10px; }

  .feature-card { padding: 16px 12px; }

  /* Forms */
  .form-card {
    padding: 22px 14px;
    border-radius: var(--radius-lg);
    max-width: 100%;
  }

  .auth-page { padding: 0; }

  .auth-shell { grid-template-columns: 1fr; min-height: auto; }

  .auth-brand-panel { display: none; }

  .auth-mobile-brand { display: block; }

  .auth-form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 8px 28px;
    align-items: flex-start;
    padding-top: 28px;
  }

  .auth-form-panel .form-card {
    padding: 28px 22px;
    border-radius: var(--radius-lg);
  }

  .auth-page h2 { font-size: 1.45rem; text-align: center; }
  .auth-page .subtitle { text-align: center; margin-bottom: 24px; }

  /* Tabs */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 0;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar { display: none; }

  .tab {
    padding: 12px 18px;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Tables — card layout on mobile */
  .table-wrap { border-radius: var(--radius); }

  table.responsive-table { min-width: 0; }

  table.responsive-table thead { display: none; }

  table.responsive-table tbody tr {
    display: block;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  table.responsive-table tbody tr:hover td { background: transparent; }

  table.responsive-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
  }

  table.responsive-table td:last-child { border-bottom: none; }

  table.responsive-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
  }

  table.responsive-table td .btn { margin-top: 4px; }

  /* Footer */
  .footer {
    margin-top: 32px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 26px 0 18px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-brand .footer-about {
    max-width: none;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    padding: 12px 0 16px;
  }

  /* Modal */
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }

  .modal {
    padding: 24px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85dvh;
  }

  .modal h3 { font-size: 1.2rem; margin-bottom: 20px; }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
  }

  .pagination button {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-width: 44px;
    min-height: 44px;
  }

  /* Toast */
  .toast-container {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  .header .container {
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  .stats-bar { grid-template-columns: 1fr; }

  .hero { padding: 40px 0 60px; }

  .car-specs {
    gap: 6px;
  }

  .car-specs span {
    font-size: 0.78rem;
    padding: 3px 8px;
  }

  .car-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .pagination button:not(.active):not(:first-child):not(:last-child) {
    display: none;
  }

  .pagination button.active,
  .pagination button:first-child,
  .pagination button:last-child {
    display: inline-flex;
  }

  .detail-actions .btn-lg {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .feature-card .icon {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .menu-toggle,
  .tab,
  .pagination button,
  .car-card {
    -webkit-tap-highlight-color: transparent;
  }

  .car-card:hover {
    transform: none;
  }

  .car-card:active {
    transform: scale(0.98);
  }

  .stat-card:hover,
  .feature-card:hover {
    transform: none;
  }
}

/* Floating support + scroll to top */
.floating-buttons {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.floating-buttons .floating-btn,
.floating-buttons .floating-chat-wrap,
.floating-buttons .support-chat-panel {
  pointer-events: auto;
}

.floating-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  border: none;
  box-shadow: 0 3px 12px rgba(26, 35, 50, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
  cursor: pointer;
}

.floating-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  display: block;
}

.floating-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(26, 35, 50, 0.24);
}

.floating-btn.scroll-top {
  background: #4f46e5;
  opacity: 0;
  pointer-events: none;
}

.floating-btn.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-btn.scroll-top:hover {
  background: #6366f1;
}

.floating-btn.chat {
  background: #0284c7;
  color: #fff;
}

.floating-btn.chat:hover {
  background: #0369a1;
}

.floating-btn.chat.is-open {
  background: #0369a1;
}

.floating-chat-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.support-chat-hint {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 6px 11px;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(145deg, #0284c7, #0ea5e9);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.support-chat-hint.is-visible {
  opacity: 1;
  visibility: visible;
}

.support-chat-panel {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + 104px);
  width: min(340px, calc(100vw - 28px));
  max-height: min(480px, calc(100dvh - 140px));
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(26, 35, 50, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99989;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.support-chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.support-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1a2332, #2c3e50);
  color: #fff;
}

.support-chat-head strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.support-chat-head small {
  display: block;
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 2px;
}

.support-chat-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.support-chat-close svg {
  width: 16px;
  height: 16px;
}

.support-chat-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.support-chat-msg {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.support-chat-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
}

.support-chat-msg.user {
  align-self: flex-end;
  background: #1a2332;
  color: #fff;
}

.support-chat-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.support-chat-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.support-chat-action svg {
  width: 18px;
  height: 18px;
  stroke: var(--luxury);
}

.support-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-chat-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.support-chat-compose {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.support-chat-compose input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-family: inherit;
}

.support-chat-compose button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--secondary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

body.support-chat-open .header,
body.support-chat-open .section,
body.support-chat-open .footer {
  filter: blur(3px);
}

body.support-chat-open .floating-buttons,
body.support-chat-open .support-chat-panel {
  filter: none !important;
}

@media (max-width: 480px) {
  .support-chat-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 96px);
  }

  .support-chat-hint {
    display: none;
  }
}

