/* ==========================================================================
   AUTOHUB BY - Чистый, светлый современный дизайн (Airy Light / Balanced)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Чистая светлая палитра */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-raised: #f8fafc;
  
  /* Границы и разделители */
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-subtle: #f1f5f9;
  
  /* Текст */
  --text: #0f172a;          /* Глубокий slate-черный */
  --text-muted: #64748b;    /* Спокойный серый */
  --text-dim: #94a3b8;      /* Вторичные подписи */
  
  /* Акцент */
  --accent: #0f172a;
  --accent-blue: #2563eb;
  --accent-gold: #b45309;
  --accent-soft: #f1f5f9;
  
  /* Тени */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  /* Скругления */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.15s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

/* Единый контейнер для шапки и контента */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ШАПКА - Вписана в общую ширину сетки сайта */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-chip {
  font-size: 11px;
  font-weight: 700;
  background: #0f172a;
  color: #fff;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

/* Навигация */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-pill);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text);
}

.nav-tab.active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-tab i {
  font-size: 12px;
}

/* Правые действия шапки */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.city-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border);
}

.city-select-wrap select {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.active-car-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.active-car-pill:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.active-car-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
}

.btn-concierge-quick {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-concierge-quick:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Экраны */
.screen-view {
  display: none;
  padding-bottom: 80px;
  animation: fadeIn 0.15s ease-out;
}

.screen-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Подвал */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

/* Мобильные элементы шапки (по умолчанию скрыты на desktop) */
.mobile-header-actions {
  display: none;
}

.btn-mobile-menu {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-mobile-menu:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* МОБИЛЬНОЕ БОКОВОЕ МЕНЮ (OFF-CANVAS DRAWER) */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  z-index: 999;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.active {
  transform: translateX(0);
}

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

.btn-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-drawer-close:hover {
  background: #e2e8f0;
}

.mobile-drawer-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-car-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-car-card:hover {
  border-color: var(--border-hover);
  background: #f1f5f9;
}

.drawer-car-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.drawer-car-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.drawer-car-plate {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  font-family: monospace;
}

.drawer-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 4px;
}

.drawer-city-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.drawer-city-wrap select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-nav-item:hover {
  background: #f1f5f9;
}

.drawer-nav-item.active {
  background: #f8fafc;
  border-color: var(--border);
}

.drawer-nav-item.active .drawer-nav-title {
  color: #0284c7;
}

.drawer-nav-item.active .drawer-nav-icon {
  background: #eff6ff;
  color: #0284c7;
}

.drawer-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  flex-shrink: 0;
}

.drawer-nav-text {
  display: flex;
  flex-direction: column;
}

.drawer-nav-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.drawer-nav-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.drawer-footer-action {
  margin-top: auto;
  padding-top: 10px;
}

.btn-drawer-concierge {
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-drawer-concierge:hover {
  background: #1e293b;
}

/* Адаптив для шапки и контейнера */
@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    height: 58px;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  /* Скрываем громоздкие десктопные элементы на мобилке */
  .nav-tabs {
    display: none !important;
  }

  .header-actions {
    display: none !important;
  }

  /* Показываем мобильные кнопки (гараж + бургер) */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-car-pill {
    padding: 6px 12px;
    font-size: 12.5px;
  }

  .container {
    padding: 0 16px;
  }

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

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
