/* =========================================================
   AUTODONE — styles.css
   Colors: #7A1A12 (primary), #C9C9C9 (secondary), #ffffff
   ========================================================= */

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

:root {
  --primary: #7A1A12;
  --primary-dark: #5c1309;
  --primary-light: #9e2219;
  --secondary: #C9C9C9;
  --white: #ffffff;
  --bg: #f7f7f7;
  --card-bg: #ffffff;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-light: #999999;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

ul, ol { list-style: none; }

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

/* ---------- Utilities ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.text-primary { color: var(--primary); }
.full-width { width: 100%; }
.subtitle { color: var(--text-muted); font-size: 0.875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem;
  padding: 10px 20px; border-radius: var(--radius);
  border: none; cursor: pointer; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-text { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.875rem; display: inline-flex; align-items: center; gap: 4px; }
.btn-text:hover { color: var(--primary); }
.btn-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--text-muted); padding: 4px; line-height: 1; }
.btn-close:hover { color: var(--text); }

/* ---------- HEADER ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }

.header-top { background: var(--primary); color: var(--white); font-size: 0.78rem; padding: 5px 0; }
.header-top-inner { display: flex; justify-content: space-between; align-items: center; }
.header-top a { color: var(--white); }

.header-main { padding: 12px 0; }
.header-main-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.logo-img { height: 44px; object-fit: contain; }

.header-search { flex: 1; display: flex; gap: 0; max-width: 480px; }
.search-input {
  flex: 1; border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 8px 14px; font-size: 0.875rem; outline: none;
  font-family: var(--font-body);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
  background: var(--primary); color: white; border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 8px 16px; cursor: pointer; font-size: 1rem;
}
.search-btn:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.action-link {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  padding: 6px 10px; border-radius: 8px; transition: background 0.15s;
}
.action-link:hover { background: var(--bg); color: var(--primary); }

.burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

.main-nav { border-top: 1px solid var(--border); background: var(--white); }
.main-nav-inner { display: flex; gap: 4px; overflow-x: auto; }
.main-nav-inner a {
  padding: 10px 16px; font-size: 0.85rem; font-weight: 600;
  font-family: var(--font-heading); color: var(--text-muted);
  white-space: nowrap; transition: color 0.15s; border-bottom: 2px solid transparent;
}
.main-nav-inner a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 540px; display: flex; align-items: center;
  background: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1600&q=80') center/cover no-repeat;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.2) 100%); }
.hero-content { position: relative; z-index: 1; max-width: 560px; padding: 60px 0; }
.hero-label { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.hero-label span { font-size: 0.7rem; font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); background: rgba(122,26,18,0.15); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(122,26,18,0.3); }
.hero-content h1 { font-size: clamp(1.8rem, 4vw, 3rem); color: white; margin-bottom: 16px; }
.hero-content p { color: rgba(255,255,255,0.75); font-size: 1rem; margin-bottom: 28px; line-height: 1.7; }

/* ---------- VEHICLE SELECTOR ---------- */
.vehicle-selector-section { padding: 24px 0; overflow: visible; }
.vehicle-selector-box {
  background: #f0f0f0; border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  /* CRITICAL: do NOT clip native <select> dropdowns */
  overflow: visible;
  position: relative;
  z-index: 10;
}
.vs-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.vs-icon { font-size: 1.4rem; background: rgba(122,26,18,0.1); width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vs-header h2 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.vs-header p { font-size: 0.8rem; color: var(--text-muted); }
.vs-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; overflow: visible; }
.vs-field { flex: 1; min-width: 160px; position: relative; z-index: 10; overflow: visible; }
.vs-field label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
.vs-field select {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; font-size: 0.875rem; background: var(--white); outline: none; cursor: pointer;
  position: relative; z-index: 10;
  /* Ensure dropdown is not clipped by any ancestor */
  -webkit-appearance: auto; appearance: auto;
}
.vs-field select:focus { border-color: var(--primary); }
.vs-arrow { color: var(--border); font-size: 1.4rem; padding-bottom: 6px; display: none; }

/* ---------- TRUST BAR ---------- */
.trust-bar { padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.trust-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-item { display: flex; align-items: flex-start; gap: 12px; }
.trust-item span { font-size: 1.4rem; }
.trust-item strong { display: block; font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; }
.trust-item small { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- SECTIONS ---------- */
.section-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; }
.categories-section, .featured-section { padding: 40px 0; }

/* ---------- CATEGORIES GRID ---------- */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.category-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; text-align: center; cursor: pointer; transition: all 0.3s ease;
  display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit;
}
.category-card:hover { border-color: #7A1A12; box-shadow: 0 8px 24px rgba(122,26,18,0.12); transform: translateY(-4px); }
.category-card-img-wrap { width: 100%; height: 130px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; }
.category-card-img { max-width: 100%; max-height: 130px; object-fit: contain; transition: transform 0.3s ease; }
.category-card:hover .category-card-img { transform: scale(1.05); }
.category-card-name { font-family: var(--font-heading); font-size: 0.82rem; font-weight: 700; color: var(--text); }
.category-card-count { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- PRODUCTS GRID ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card-img { width: 100%; height: 180px; object-fit: contain; background: var(--bg); padding: 12px; }
.product-card-img-placeholder { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 3rem; }
.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card-brand { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.product-card-name { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.product-card-old-price { font-size: 0.78rem; color: var(--text-light); text-decoration: line-through; margin-left: 6px; }
.product-card-stock { font-size: 0.72rem; font-weight: 600; }
.stock-in { color: var(--success); }
.stock-out { color: var(--warning); }
.product-card-actions { padding: 0 14px 14px; display: flex; gap: 8px; }
.btn-fav { background: none; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.15s; }
.btn-fav:hover, .btn-fav.active { border-color: var(--primary); background: rgba(122,26,18,0.06); }
.btn-cart { flex: 1; background: var(--primary); color: white; border: none; border-radius: 8px; padding: 9px 12px; font-size: 0.8rem; font-weight: 700; font-family: var(--font-heading); cursor: pointer; transition: background 0.15s; }
.btn-cart:hover { background: var(--primary-dark); }

/* ---------- CATALOG PAGE ---------- */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding-top: 32px; padding-bottom: 48px; overflow: visible; }
.catalog-main { overflow: visible; min-width: 0; }
.catalog-sidebar { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; height: fit-content; position: sticky; top: 120px; overflow: visible; }
.catalog-sidebar h3 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 800; margin-bottom: 16px; }
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group select, .filter-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 0.875rem; outline: none; background: var(--white);
}
.filter-group select:focus, .filter-input:focus { border-color: var(--primary); }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; cursor: pointer; }
.catalog-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.catalog-header h2 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; }
.catalog-count { font-size: 0.875rem; color: var(--text-muted); }

/* ---------- PRODUCT PAGE ---------- */
.breadcrumb { padding: 16px 0 8px; font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); } .breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 20px 0 60px; }
.product-detail-img { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; display: flex; align-items: center; justify-content: center; min-height: 320px; overflow: hidden; }
.product-detail-img img { width: 100%; height: 380px; object-fit: contain; padding: 20px; }
.product-detail-info { display: flex; flex-direction: column; gap: 14px; }
.product-detail-brand { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--primary); }
.product-detail-name { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; }
.product-detail-sku { font-size: 0.78rem; color: var(--text-muted); }
.product-detail-price { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--primary); }
.product-detail-old-price { font-size: 1rem; color: var(--text-light); text-decoration: line-through; margin-left: 10px; }
.product-detail-stock { font-size: 0.875rem; font-weight: 600; }
.product-detail-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.product-detail-actions { display: flex; gap: 10px; margin-top: 8px; }
.product-specs { background: var(--bg); border-radius: 10px; padding: 16px; }
.product-specs h4 { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; margin-bottom: 10px; }
.spec-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-muted); }
.compat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; }

/* ---------- CART PAGE ---------- */
.cart-container { padding: 32px 0 60px; }
.cart-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.cart-item-img { width: 72px; height: 72px; object-fit: contain; background: var(--bg); border-radius: 8px; padding: 4px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.cart-item-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { width: 28px; height: 28px; border: 1.5px solid var(--border); border-radius: 6px; background: var(--white); cursor: pointer; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cart-qty button:hover { border-color: var(--primary); color: var(--primary); }
.cart-qty span { font-weight: 700; width: 28px; text-align: center; }
.cart-remove { background: none; border: none; cursor: pointer; color: var(--text-light); font-size: 1.1rem; padding: 6px; }
.cart-remove:hover { color: var(--danger); }
.cart-summary { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; }
.cart-total-value { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: var(--primary); }

/* ---------- CHECKOUT ---------- */
.checkout-wrap { max-width: 680px; margin: 0 auto; padding: 32px 0 60px; }
.checkout-wrap h1 { font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: 28px; }
.form-section { margin-bottom: 28px; }
.form-section h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1/-1; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input, .form-group select, .form-group textarea {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 0.875rem; font-family: var(--font-body);
  outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.radio-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.radio-label { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; font-size: 0.875rem; transition: border-color 0.15s; }
.radio-label:hover { border-color: var(--primary); }
.radio-label input { accent-color: var(--primary); }
.order-summary { background: var(--bg); border-radius: var(--radius); padding: 16px; }
.order-summary h3 { border: none; }
.order-summary-item { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 4px 0; }
.order-summary-total { display: flex; justify-content: space-between; font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 8px; }
.checkout-success { text-align: center; padding: 48px 0; }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.checkout-success h2 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 8px; }
.checkout-success p { color: var(--text-muted); margin-bottom: 24px; }

/* ---------- GARAGE ---------- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-family: var(--font-heading); font-size: 1.6rem; }
.add-car-form { margin-bottom: 20px; }
.form-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; overflow: visible; }
.form-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.form-card-header h3 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.garage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.garage-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.garage-card-img { position: relative; height: 160px; }
.garage-card-img img { width: 100%; height: 100%; object-fit: cover; }
.garage-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%); }
.garage-card-title { position: absolute; bottom: 10px; left: 12px; }
.garage-card-title strong { display: block; color: white; font-family: var(--font-heading); font-size: 1rem; font-weight: 800; }
.garage-card-title span { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.garage-card-del { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.4); border: none; border-radius: 8px; color: white; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.garage-card-del:hover { background: rgba(220,38,38,0.8); }
.garage-card-body { padding: 14px; }
.garage-card-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.garage-quick-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.garage-cat-btn { border: 1.5px solid var(--border); border-radius: 8px; padding: 7px 6px; font-size: 0.72rem; font-weight: 600; background: white; cursor: pointer; text-align: center; transition: all 0.15s; }
.garage-cat-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(122,26,18,0.04); }
.garage-add-btn { border: 2px dashed var(--border); border-radius: var(--radius); min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; background: none; width: 100%; }
.garage-add-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(122,26,18,0.03); }

/* ---------- FAVORITES ---------- */
.favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; }

/* ---------- INFO PAGES ---------- */
.page-content { max-width: 760px; margin: 0 auto; padding: 36px 0 60px; }
.page-content h1 { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 20px; }
.page-content h2 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin-top: 24px; margin-bottom: 10px; }
.page-content p { color: var(--text-muted); margin-bottom: 12px; line-height: 1.7; }
.page-content ul, .page-content ol { padding-left: 20px; color: var(--text-muted); margin-bottom: 12px; }
.page-content ul { list-style: disc; } .page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 6px; line-height: 1.6; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.value-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.value-icon { font-size: 2rem; margin-bottom: 10px; }
.value-card h3 { font-family: var(--font-heading); font-size: 0.9rem; margin-bottom: 6px; }
.value-card p { font-size: 0.82rem; color: var(--text-muted); }
.contact-box { background: var(--bg); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.contact-box h3 { font-family: var(--font-heading); margin-bottom: 10px; }
.contact-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.contact-box a { color: var(--primary); }

/* ---------- EMPTY STATES ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { color: var(--text-muted); margin-bottom: 16px; }

/* ---------- FOOTER ---------- */
.site-footer { background: #1a1a1a; color: rgba(255,255,255,0.75); margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-logo { height: 40px; margin-bottom: 10px; object-fit: contain; }
.footer-col p { font-size: 0.85rem; margin-top: 8px; }
.footer-col h4 { color: white; font-family: var(--font-heading); font-size: 0.875rem; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; font-size: 0.8rem; text-align: center; color: rgba(255,255,255,0.4); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #1a1a1a; color: white; padding: 12px 20px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px); transition: all 0.3s;
  pointer-events: none; max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- MODAL ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; }
.modal-backdrop.show { display: block; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 201; background: var(--white); border-radius: 16px;
  box-shadow: var(--shadow-lg); max-width: 600px; width: calc(100% - 32px); max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: white; z-index: 1; }
.modal-header h2 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; position: sticky; bottom: 0; background: white; }

/* ---------- ADMIN STYLES ---------- */
.admin-body { background: #f5f5f5; }

.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f0f0f0; padding: 16px; }
.login-card { background: white; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 36px; width: 100%; max-width: 380px; }
.login-logo { height: 60px; object-fit: contain; margin: 0 auto 16px; }
.login-card h1 { font-family: var(--font-heading); font-size: 1.3rem; text-align: center; margin-bottom: 4px; }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 0.82rem; margin-bottom: 24px; }
.login-error { color: var(--danger); font-size: 0.8rem; margin-bottom: 8px; }
.password-group { position: relative; }
.toggle-pass { position: absolute; right: 0; bottom: 0; background: none; border: none; cursor: pointer; height: 38px; padding: 0 10px; color: var(--text-muted); }

.admin-header { background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.admin-header-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-logo { height: 36px; object-fit: contain; }
.admin-divider { width: 1px; height: 20px; background: var(--border); }
.admin-label { font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.admin-header-right { display: flex; align-items: center; gap: 12px; }
.admin-tabs { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; border-top: 1px solid var(--border); }
.admin-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 16px; font-family: var(--font-heading); font-size: 0.875rem; font-weight: 600; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; gap: 6px; transition: color 0.15s; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-tab:hover { color: var(--primary); }

.admin-content { max-width: 1280px; margin: 0 auto; padding: 28px 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card .stat-value { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.admin-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-card-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.admin-card-header h2 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 10px 16px; background: #f9f9f9; border-bottom: 1px solid var(--border); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table tr:last-child td { border-bottom: none; }
.product-thumb { width: 40px; height: 40px; object-fit: contain; background: var(--bg); border-radius: 6px; padding: 3px; }
.product-thumb-ph { width: 40px; height: 40px; background: var(--bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-amber { background: #fef3c7; color: #d97706; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-red { background: #fee2e2; color: #dc2626; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.table-actions { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn { width: 30px; height: 30px; border: none; border-radius: 6px; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: background 0.15s; }
.icon-btn:hover { background: var(--bg); }
.icon-btn.danger:hover { background: #fee2e2; }

.admin-modal { max-width: 640px; }
.confirm-modal { max-width: 380px; padding: 28px; text-align: center; }
.confirm-modal h3 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 8px; }
.confirm-modal p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

.orders-filters select { border: 1.5px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.875rem; outline: none; }
.orders-filters select:focus { border-color: var(--primary); }

/* ---------- AUTH PAGES ---------- */
.auth-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 36px; width: 100%; max-width: 420px; }
.auth-title { font-family: var(--font-heading); font-size: 1.4rem; text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.82rem; margin-bottom: 24px; }
.auth-error { background: #fee2e2; color: var(--danger); border-radius: 8px; padding: 10px 14px; font-size: 0.82rem; margin-bottom: 12px; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: 0.8rem; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content:''; position:absolute; top:50%; width:38%; height:1px; background:var(--border); }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }

/* ---------- ACCOUNT PAGE ---------- */
.account-hero { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.account-avatar { width: 60px; height: 60px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-family: var(--font-heading); font-weight: 800; flex-shrink: 0; }
.account-name { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; }
.account-email { color: var(--text-muted); font-size: 0.875rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 3px; }

/* ---------- PROGRESS BAR ---------- */
.progress-bar-wrap { background: var(--border); border-radius: 20px; height: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 20px; transition: width 0.3s ease; }

/* ---------- ADMIN SEARCH ---------- */
.admin-search-wrap { position: relative; }
.admin-search-input { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 7px 32px 7px 12px; font-size: 0.85rem; outline: none; width: 260px; font-family: var(--font-body); }
.admin-search-input:focus { border-color: var(--primary); }
.admin-search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 0.85rem; pointer-events: none; }

/* ---------- NEW ORDERS BADGE ---------- */
.orders-badge { background: var(--danger); color: white; border-radius: 20px; font-size: 0.68rem; font-weight: 800; padding: 2px 7px; min-width: 20px; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; }

/* ---------- STATUS SELECT ---------- */
.status-select { border: none; border-radius: 20px; padding: 3px 8px; font-size: 0.7rem; font-weight: 700; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; }

/* ---------- CATALOG CONTACT BLOCK ---------- */
.catalog-contact-block { margin-top: 40px; padding: 32px 24px; background: #f0f4f8; border: 1px solid #d1dce8; border-radius: 16px; text-align: center; }
.catalog-contact-inner p { font-size: 1rem; color: var(--text); font-weight: 500; margin-bottom: 10px; line-height: 1.6; }
.catalog-contact-phone { display: block; font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.catalog-contact-phone:hover { text-decoration: underline; }

/* ---------- SORT BUTTONS ---------- */
.sort-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  padding: 0; font-family: var(--font-heading);
  display: inline-flex; align-items: center; gap: 2px;
  white-space: nowrap; transition: color 0.15s;
}
.sort-btn:hover { color: var(--primary); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .trust-items { grid-template-columns: repeat(2, 1fr); }
  .burger { display: block; }
  .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
  .header-main-inner { flex-wrap: wrap; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav-inner { flex-direction: column; gap: 0; }
  .main-nav-inner a { padding: 12px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { min-height: 340px; }
  .trust-items { grid-template-columns: 1fr 1fr; }
  .vs-arrow { display: none; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ======================================================
   MOBILE IMPROVEMENTS
   ====================================================== */

/* Prevent zoom on input focus (iOS) */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Header mobile layout */
  .header-top { display: none; }
  .header-main { padding: 10px 0; }
  .header-main-inner { gap: 8px; }
  .logo-img { height: 36px; }
  .header-actions { gap: 6px; }
  .action-link { padding: 6px 8px; font-size: 0.8rem; }
  .btn-sm { padding: 7px 12px; font-size: 0.78rem; }
  .header-search { order: 3; flex-basis: 100%; max-width: 100%; margin-top: 4px; }
  .burger { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; }

  /* Mobile nav */
  .main-nav { display: none; }
  .main-nav.open { display: block; border-top: 1px solid var(--border); }
  .main-nav-inner { flex-direction: column; gap: 0; }
  .main-nav-inner a { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; border-bottom-width: 2px; }
  .main-nav-inner a:last-child { border-bottom: none; }

  /* Mobile hero */
  .hero { min-height: 300px; }
  .hero-content { padding: 40px 0; }
  .hero-content h1 { font-size: 1.6rem; }

  /* Vehicle selector mobile — no clipping, proper stacking */
  .vs-fields { flex-direction: column; gap: 10px; overflow: visible; }
  .vs-field { min-width: 100%; overflow: visible; }
  /* Stack fields so top dropdowns appear above lower ones */
  .vs-field:nth-child(1) { z-index: 50; }
  .vs-field:nth-child(2) { z-index: 49; }
  .vs-field:nth-child(3) { z-index: 48; }
  .vs-field:nth-child(4) { z-index: 47; }
  .vs-field:nth-child(5) { z-index: 46; }
  .vs-field:nth-child(6) { z-index: 45; }
  .vehicle-selector-box { overflow: visible; }
  .vehicle-selector-section { overflow: visible; }

  /* Trust bar */
  .trust-items { grid-template-columns: 1fr 1fr; gap: 12px; }
  .trust-item { flex-direction: column; align-items: center; text-align: center; gap: 6px; }

  /* Products grid: 2 columns */
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card-img { height: 140px; }
  .product-card-img-placeholder { height: 140px; font-size: 2rem; }
  .product-card-body { padding: 10px; gap: 4px; }
  .product-card-name { font-size: 0.8rem; }
  .product-card-price { font-size: 0.95rem; }
  .product-card-actions { padding: 0 10px 10px; gap: 6px; }
  .btn-cart { font-size: 0.75rem; padding: 8px 6px; }

  /* Cart mobile */
  .cart-item { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .cart-item-img { width: 56px; height: 56px; }
  .cart-item-info { flex: 1; min-width: 120px; }
  .cart-item-name { font-size: 0.85rem; }
  .cart-qty button { width: 36px; height: 36px; font-size: 1.1rem; }
  .cart-remove { width: 36px; height: 36px; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
  .cart-summary { padding: 16px; }

  /* Auth pages */
  .auth-card { padding: 24px 20px; border-radius: 12px; }
  .auth-title { font-size: 1.2rem; }
  .form-group input, .form-group select, .form-group textarea { padding: 12px; border-radius: 8px; }

  /* Checkout */
  .checkout-wrap { padding: 20px 0 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .radio-label { padding: 14px 12px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 20px; }
  .site-footer { margin-top: 40px; }

  /* Catalog layout */
  .catalog-layout { grid-template-columns: 1fr; padding-top: 20px; }
  .catalog-sidebar { position: static; display: none; }
  .catalog-sidebar.open { display: block; margin-bottom: 16px; }
  .catalog-header { flex-wrap: wrap; gap: 8px; }

  /* Product detail */
  .product-detail { grid-template-columns: 1fr; gap: 20px; padding: 16px 0 40px; }
  .product-detail-img img { height: 260px; }
  .product-detail-name { font-size: 1.2rem; }
  .product-detail-price { font-size: 1.5rem; }
  .product-detail-actions { flex-direction: column; }
  .product-detail-actions .btn { width: 100%; justify-content: center; }

  /* Garage */
  .garage-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }

  /* Account */
  .account-hero { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Admin panel mobile */
  .admin-header-inner { flex-wrap: wrap; gap: 8px; }
  .admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-tab { white-space: nowrap; padding: 10px 12px; font-size: 0.8rem; }
  .admin-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-search-input { width: 100%; }
  .stats-grid, .daily-stats { grid-template-columns: 1fr 1fr; }

  /* Admin table: horizontal scroll */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Buttons min touch size */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .icon-btn { width: 40px; height: 40px; }
  .cart-qty button { min-width: 40px; min-height: 40px; }

  /* Modal full-screen on mobile */
  .modal { max-width: 100%; width: 100%; bottom: 0; top: auto; left: 0; right: 0; transform: none; border-radius: 16px 16px 0 0; max-height: 92vh; }

  /* Login card */
  .login-card { padding: 28px 20px; }

  /* Toast */
  .toast { bottom: 12px; right: 12px; left: 12px; max-width: calc(100% - 24px); }
}

@media (max-width: 375px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card-img { height: 120px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .category-card { padding: 10px 8px; }
  .category-card-img-wrap { height: 90px; margin-bottom: 6px; }
  .category-card-img { max-height: 90px; }
  .category-card-name { font-size: 0.72rem; }
  .vs-field select { font-size: 16px !important; } /* keep ≥16px to prevent iOS zoom */
}

/* Mobile catalog filter toggle button */
.catalog-filter-toggle {
  display: none;
  width: 100%;
  margin-bottom: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
}
@media (max-width: 768px) {
  .catalog-filter-toggle { display: block; }
}

/* Sticky checkout button on mobile */
@media (max-width: 768px) {
  .cart-sticky-footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white; border-top: 1px solid var(--border);
    padding: 12px 16px; z-index: 99;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  }
  body.has-cart-footer { padding-bottom: 80px; }
}