/* =============================================
   CARRRS - Car Rental Platform
   Uber-style Design System
   ============================================= */

/* Google Fonts - Space Grotesk */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

/* =============================================
   CSS Variables
   ============================================= */
:root {
  /* Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-100: #f7f7f7;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #6b6b6b;
  --color-gray-600: #545454;
  --color-green: #06c167;
  --color-green-hover: #05a558;
  --color-green-light: #e8f9f0;
  --color-red: #e11900;

  /* Typography */
  --font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* =============================================
   Reset & Base Styles
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* =============================================
   Typography
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-black);
}

h1 {
  font-size: var(--font-size-5xl);
}
h2 {
  font-size: var(--font-size-4xl);
}
h3 {
  font-size: var(--font-size-3xl);
}
h4 {
  font-size: var(--font-size-2xl);
}
h5 {
  font-size: var(--font-size-xl);
}
h6 {
  font-size: var(--font-size-lg);
}

.text-xs {
  font-size: var(--font-size-xs);
}
.text-sm {
  font-size: var(--font-size-sm);
}
.text-base {
  font-size: var(--font-size-base);
}
.text-lg {
  font-size: var(--font-size-lg);
}
.text-xl {
  font-size: var(--font-size-xl);
}

.text-gray {
  color: var(--color-gray-500);
}
.text-green {
  color: var(--color-green);
}
.text-center {
  text-align: center;
}
.text-bold {
  font-weight: 600;
}
.text-medium {
  font-weight: 500;
}

/* =============================================
   Layout
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm {
  max-width: 800px;
}

.container-lg {
  max-width: 1400px;
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

/* Flexbox Utilities */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-end {
  justify-content: flex-end;
}
.gap-1 {
  gap: var(--space-1);
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-black);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-gray-600);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-black);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-black);
  transition: var(--transition-fast);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-green);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-green-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: var(--color-gray-600);
}

.btn-outline {
  background: transparent;
  color: var(--color-black);
  border: 1.5px solid var(--color-black);
}

.btn-outline:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-black);
}

.btn-ghost:hover {
  background: var(--color-gray-100);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-full {
  width: 100%;
}

/* =============================================
   Cards
   ============================================= */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--color-gray-100);
}

.card-body {
  padding: var(--space-5);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.card-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-black);
}

.card-price span {
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--color-gray-500);
}

.card-specs {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-gray-200);
}

.card-spec {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

/* =============================================
   Forms
   ============================================= */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-black);
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

/* Search Box */
.search-box {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-6);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--space-4);
  align-items: end;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.search-field label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-field input {
  padding: var(--space-3) 0;
  font-size: var(--font-size-base);
  font-weight: 500;
  border: none;
  border-bottom: 2px solid var(--color-gray-200);
  background: transparent;
  transition: border-color var(--transition-fast);
}

.search-field input:focus {
  outline: none;
  border-color: var(--color-black);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
  padding-top: 140px;
  padding-bottom: var(--space-20);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-gray-500);
  max-width: 600px;
  margin-bottom: var(--space-10);
}

/* =============================================
   Features / How It Works
   ============================================= */
.feature-card {
  text-align: center;
  padding: var(--space-8);
}

.feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-green-light);
  color: var(--color-green);
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-5);
  font-size: var(--font-size-2xl);
}

.feature-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.feature-text {
  color: var(--color-gray-500);
  line-height: 1.6;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-weight: 600;
  margin: 0 auto var(--space-4);
}

/* =============================================
   Car Detail Page
   ============================================= */
.car-detail {
  padding-top: 100px;
}

.car-gallery {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-gray-100);
}

.car-gallery img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.car-info {
  padding: var(--space-8) 0;
}

.car-name {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.car-type {
  font-size: var(--font-size-lg);
  color: var(--color-gray-500);
  margin-bottom: var(--space-6);
}

.car-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

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

.spec-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.spec-label {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.car-features {
  margin-bottom: var(--space-8);
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
}

.feature-item::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-green);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

/* Booking Sidebar */
.booking-card {
  position: sticky;
  top: 100px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.booking-price {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.booking-price span {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--color-gray-500);
}

.booking-divider {
  height: 1px;
  background: var(--color-gray-200);
  margin: var(--space-5) 0;
}

.booking-total {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-5);
}

/* Insurance Options */
.insurance-options {
  margin-bottom: var(--space-5);
}

.insurance-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.insurance-option:hover {
  border-color: var(--color-gray-400);
}

.insurance-option.selected {
  border-color: var(--color-green);
  background: var(--color-green-light);
}

.insurance-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}

.insurance-option.selected .insurance-radio {
  border-color: var(--color-green);
}

.insurance-option.selected .insurance-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--color-green);
  border-radius: var(--radius-full);
}

.insurance-content {
  flex: 1;
}

.insurance-name {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.insurance-desc {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.insurance-price {
  font-weight: 600;
  color: var(--color-green);
}

/* =============================================
   Filters Sidebar
   ============================================= */
.filters {
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
}

.filter-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-gray-200);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  cursor: pointer;
}

.filter-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.filter-checkbox.checked {
  background: var(--color-black);
  border-color: var(--color-black);
}

/* Price Range Slider */
.price-range {
  margin-top: var(--space-4);
}

.range-slider {
  width: 100%;
  height: 4px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-black);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.range-values {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

/* =============================================
   Checkout / Booking Page
   ============================================= */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-12);
  padding-top: 100px;
}

.checkout-section {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}

.checkout-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
}

.summary-car {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.summary-car-image {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--color-gray-100);
}

.summary-car-info h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.summary-dates {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-5) 0;
  font-size: var(--font-size-xl);
  font-weight: 700;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-desc {
  color: var(--color-gray-400);
  max-width: 300px;
}

.footer-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
  color: var(--color-gray-400);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  color: var(--color-gray-300);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-600);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
  color: var(--color-gray-400);
}

/* =============================================
   Map
   ============================================= */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-gray-100);
}

/* =============================================
   Badges & Tags
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background: var(--color-green-light);
  color: var(--color-green);
}

.badge-black {
  background: var(--color-black);
  color: var(--color-white);
}

/* =============================================
   Loading States
   ============================================= */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-100) 25%,
    var(--color-gray-200) 50%,
    var(--color-gray-100) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* =============================================
   Responsive Design - Mobile First
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .car-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Car detail layout */
  .car-detail .container > div[style*="grid-template-columns: 1fr 400px"] {
    display: block !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Navigation */
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-actions .btn-primary {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: 100px;
    padding-bottom: var(--space-10);
    min-height: auto;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  /* Search Box */
  .search-box {
    padding: var(--space-4);
  }

  .search-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .search-row .btn {
    margin-top: var(--space-2);
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Features */
  .features-list {
    grid-template-columns: 1fr;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Car Detail */
  .car-gallery img {
    height: 280px;
  }

  .car-name {
    font-size: var(--font-size-2xl);
  }

  .car-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .spec-value {
    font-size: var(--font-size-xl);
  }

  /* Booking Card - Make it full width on mobile */
  .booking-card {
    position: relative;
    top: auto;
    margin-top: var(--space-6);
  }

  /* Checkout */
  .checkout-section {
    padding: var(--space-5);
  }

  .checkout-title {
    font-size: var(--font-size-lg);
  }

  /* Buttons - Touch friendly sizing */
  .btn {
    min-height: 48px;
    padding: var(--space-4) var(--space-6);
  }

  .btn-lg {
    min-height: 56px;
    padding: var(--space-4) var(--space-8);
  }

  /* Filters sidebar - hide on mobile, could be a modal */
  .filters {
    display: none;
  }
}

/* Small Mobile - iPhone SE, etc */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .card-body {
    padding: var(--space-4);
  }

  .booking-card {
    padding: var(--space-4);
  }

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

  .search-box {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }

  /* Cards - Full bleed on small screens */
  .card {
    border-radius: var(--radius-md);
  }

  .card-image {
    aspect-ratio: 16 / 9;
  }

  /* Navigation */
  .nav-inner {
    height: 64px;
  }

  .nav-logo {
    font-size: var(--font-size-xl);
  }

  /* Insurance options - Stack better */
  .insurance-option {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .insurance-price {
    margin-left: auto;
  }
}

/* =============================================
   iOS Specific Optimizations
   Supports: iPhone 11 through iPhone 15 Pro Max
   ============================================= */

/* =============================================
   Safe Area Support (All Notched iPhones)
   iPhone X/11/12/13/14/15 series
   ============================================= */
@supports (padding-top: env(safe-area-inset-top)) {
  /* Navigation respects notch/Dynamic Island */
  .nav {
    padding-top: env(safe-area-inset-top);
  }

  .nav-inner {
    height: calc(72px + env(safe-area-inset-top));
  }

  /* Footer respects home indicator */
  .footer {
    padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom));
  }

  /* Body respects side insets (landscape) */
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Fixed elements at bottom need extra padding */
  .booking-card,
  .modal-content {
    padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  }

  /* Full-width mobile nav dropdown */
  .nav-links {
    top: calc(72px + env(safe-area-inset-top));
    padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  }
}

/* =============================================
   iOS Safari Viewport Height Fix
   Fixes 100vh issue on all iOS devices
   ============================================= */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }

  /* Use dynamic viewport units where supported */
  @supports (height: 100dvh) {
    .hero {
      min-height: 100dvh;
    }
  }
}

/* =============================================
   Prevent iOS Input Zoom (All iPhones)
   Font size must be 16px+ to prevent zoom
   ============================================= */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
    /* Prevent content shift on focus */
    transform: translateZ(0);
  }

  /* Larger touch targets for inputs */
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 48px;
    padding: var(--space-4);
  }
}

/* =============================================
   Touch-Friendly Tap Targets
   Min 44px per Apple HIG
   ============================================= */
@media (pointer: coarse) {
  .btn,
  .nav-link,
  .filter-option,
  .insurance-option,
  .card,
  .faq-question,
  .toc-link {
    min-height: 44px;
  }

  .filter-check {
    width: 24px;
    height: 24px;
  }

  .nav-link {
    padding: var(--space-3) var(--space-4);
  }

  /* Larger clickable area for links */
  a {
    padding: 2px 0;
  }
}

/* =============================================
   Prevent Text Selection & Tap Highlight
   ============================================= */
.btn,
.card,
.insurance-option,
.nav-toggle,
.nav-link,
.faq-question,
.category-tab {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* =============================================
   Smooth Scrolling with iOS Momentum
   ============================================= */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Scrollable containers */
.category-tabs,
.nav-links.active {
  -webkit-overflow-scrolling: touch;
}

/* =============================================
   Fix position:fixed on iOS Safari
   ============================================= */
.nav,
.booking-card,
.legal-toc {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* =============================================
   Mobile Navigation Menu Toggle
   ============================================= */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   Pull-to-Refresh Prevention
   ============================================= */
body {
  overscroll-behavior-y: contain;
}

/* =============================================
   iPhone 16 Pro Max / iPhone 17 Pro Max (2024-2025)
   Width: 440px (CSS), 6.9" Display
   Largest iPhone screens ever
   ============================================= */
@media screen and (max-width: 440px) {
  .container {
    padding: 0 var(--space-6);
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.12;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  /* Larger cards for bigger screen */
  .card-body {
    padding: var(--space-6);
  }

  .card-title {
    font-size: 1.2rem;
  }

  .card-price {
    font-size: 1.35rem;
  }

  /* Better spacing for large display */
  .section {
    padding: var(--space-16) 0;
  }

  .form-group {
    margin-bottom: var(--space-6);
  }

  /* Navigation optimized for 6.9" display */
  .nav-inner {
    height: 76px;
  }

  .nav-logo {
    font-size: 1.5rem;
  }

  /* Larger buttons */
  .btn {
    min-height: 52px;
    font-size: 1.05rem;
  }

  .btn-lg {
    min-height: 58px;
  }
}

/* =============================================
   iPhone 16 / iPhone 16 Plus / iPhone 16 Pro
   Width: 393-402px (CSS), 6.1-6.7" Display
   ============================================= */
@media screen and (min-width: 393px) and (max-width: 410px) {
  .hero-title {
    font-size: 2.35rem;
  }

  .card-body {
    padding: var(--space-5);
  }

  .nav-inner {
    height: 72px;
  }
}

/* =============================================
   iPhone 15 Pro Max / 14 Pro Max / 13 Pro Max / 12 Pro Max
   Width: 430px (CSS), 428-430 points
   6.7" Display - Largest iPhones
   ============================================= */
@media screen and (max-width: 430px) {
  .container {
    padding: 0 var(--space-5);
  }

  .hero-title {
    font-size: 2.25rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* Optimized card layout */
  .card-body {
    padding: var(--space-5);
  }

  .card-title {
    font-size: 1.15rem;
  }

  /* Better form spacing */
  .form-group {
    margin-bottom: var(--space-5);
  }
}

/* =============================================
   iPhone 15/14/13/12 & iPhone 15 Pro/14 Pro/13 Pro
   Width: 390px (CSS), 390-393 points
   6.1" Display - Standard Size
   ============================================= */
@media screen and (max-width: 393px) {
  .container {
    padding: 0 var(--space-4);
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  /* Tighter navigation */
  .nav-inner {
    height: 64px;
  }

  .nav-logo {
    font-size: 1.35rem;
  }

  /* Compact cards */
  .card-body {
    padding: var(--space-4);
  }

  .card-specs {
    gap: var(--space-3);
  }

  /* Form adjustments */
  .search-box {
    padding: var(--space-4);
  }
}

/* =============================================
   iPhone 12 mini / 13 mini
   Width: 375px (CSS), 360-375 points
   5.4" Display - Compact
   ============================================= */
@media screen and (max-width: 375px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--space-4);
  }

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

  .hero-subtitle {
    font-size: 0.95rem;
  }

  /* Smaller navigation */
  .nav-inner {
    height: 60px;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  /* Compact buttons */
  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: 0.95rem;
  }

  .btn-lg {
    padding: var(--space-4) var(--space-6);
  }

  /* Compact cards */
  .card-image {
    aspect-ratio: 16 / 9;
  }

  .card-body {
    padding: var(--space-3);
  }

  .card-title {
    font-size: 1rem;
  }

  .card-price {
    font-size: 1.1rem;
  }

  /* Tighter form spacing */
  .form-group {
    margin-bottom: var(--space-4);
  }

  .form-input {
    padding: var(--space-3);
  }

  /* Booking card */
  .booking-card {
    padding: var(--space-4);
  }

  .booking-price {
    font-size: 1.75rem;
  }

  /* Section spacing */
  .section {
    padding: var(--space-10) 0;
  }

  /* Car detail adjustments */
  .car-name {
    font-size: 1.5rem;
  }

  .car-gallery img {
    height: 240px;
  }

  .car-specs-grid {
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .spec-value {
    font-size: 1.15rem;
  }

  .spec-label {
    font-size: 0.75rem;
  }
}

/* =============================================
   iPhone 11 / XR
   Width: 414px (CSS), 414 points
   6.1" LCD Display
   ============================================= */
@media screen and (min-width: 410px) and (max-width: 420px) {
  .container {
    padding: 0 var(--space-5);
  }

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

  /* Slightly larger touch targets for LCD */
  .btn {
    min-height: 50px;
  }
}

/* =============================================
   iPhone 11 Pro / X / XS
   Width: 375px (CSS), 375 points
   5.8" OLED Display
   ============================================= */
@media screen and (min-width: 370px) and (max-width: 380px) {
  /* Same as 12 mini/13 mini above */
  .hero-title {
    font-size: 1.9rem;
  }
}

/* =============================================
   iPhone 11 Pro Max / XS Max
   Width: 414px (CSS), 414 points
   6.5" OLED Display
   ============================================= */
@media screen and (min-width: 410px) and (max-width: 420px) and (min-height: 890px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .section {
    padding: var(--space-16) 0;
  }
}

/* =============================================
   Landscape Mode - All iPhones
   ============================================= */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding-top: 80px;
    padding-bottom: var(--space-8);
    min-height: auto;
  }

  .nav-inner {
    height: 48px;
  }

  .nav-logo {
    font-size: 1.15rem;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: var(--space-6);
  }

  /* Stack search fields horizontally in landscape */
  .search-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  /* Compact hero sections */
  .section {
    padding: var(--space-8) 0;
  }

  /* Smaller cards in landscape */
  .card-image {
    aspect-ratio: 2 / 1;
  }
}

/* =============================================
   Dynamic Island Support
   iPhone 14 Pro, 14 Pro Max, 15, 15 Plus, 15 Pro, 15 Pro Max
   ============================================= */
@supports (padding-top: env(safe-area-inset-top)) {
  @media screen and (max-width: 430px) {
    /* Extra space for Dynamic Island */
    .nav {
      padding-top: max(env(safe-area-inset-top), 12px);
    }

    /* Ensure content doesn't overlap Dynamic Island */
    .hero {
      padding-top: calc(80px + max(env(safe-area-inset-top), 12px));
    }

    /* Modal positioning */
    #signInModal .modal-content {
      margin-top: max(env(safe-area-inset-top), 20px);
    }
  }
}

/* =============================================
   Dark Mode Support (iOS 13+)
   ============================================= */
@media (prefers-color-scheme: dark) {
  /* Future dark mode implementation */
  /* Currently disabled - uncomment when ready */
  /*
  :root {
    --color-white: #000000;
    --color-black: #ffffff;
    --color-gray-100: #1a1a1a;
    --color-gray-200: #2a2a2a;
    --color-gray-300: #3a3a3a;
    --color-gray-400: #6a6a6a;
    --color-gray-500: #9a9a9a;
    --color-gray-600: #bababa;
  }
  */
}

/* =============================================
   Reduced Motion (Accessibility)
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================
   High Contrast Mode
   ============================================= */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid var(--color-white);
  }

  .card {
    border-width: 2px;
  }

  .form-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.3);
  }
}

/* =============================================
   Text Size Accessibility
   Respects iOS Dynamic Type settings
   ============================================= */
@media screen and (max-width: 768px) {
  html {
    /* Allow iOS to scale text based on user preferences */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* =============================================
   PWA / Add to Home Screen Optimizations
   ============================================= */
@media all and (display-mode: standalone) {
  /* App-like feel when added to home screen */
  body {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Hide browser-specific elements */
  .nav-logo::after {
    content: none;
  }
}

/* =============================================
   iPhone Keyboard Visibility
   Adjust viewport when keyboard appears
   ============================================= */
@supports (height: 100dvh) {
  .modal-content,
  .contact-form-container {
    max-height: 100dvh;
    overflow-y: auto;
  }
}

/* =============================================
   Force GPU Acceleration for Smooth Scrolling
   ============================================= */
.card,
.btn,
.nav,
.modal-content,
.booking-card {
  will-change: transform;
}

/* =============================================
   Fix iOS Button Styling
   ============================================= */
button,
input[type="submit"],
input[type="button"] {
  -webkit-appearance: none;
  appearance: none;
}

/* =============================================
   Optimized Touch Scrolling for Lists
   ============================================= */
.plans-grid,
.contact-options,
.category-tabs {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.plans-grid > *,
.contact-options > *,
.category-tabs > * {
  scroll-snap-align: start;
}

