/* Fonts are loaded once, via <link> tags in index.html's <head> (faster than @import,
   which blocks CSSOM construction until fetched). Keeping both here and in the HTML was
   loading Inter/Montserrat twice over the network. */

/* ==========================================
   DESIGN SYSTEM TOKENS & VARIABLES
   ========================================== */
:root {
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Colors - Quiet Luxury Palette */
  --color-white: #FFFFFF;
  --color-offwhite: #F8F9FA;
  --color-gray-100: #F1F3F5;
  --color-gray-200: #E0E2E5;
  --color-gray-300: #C2C5CA;
  --color-gray-500: #9E9E9E;
  --color-text-black: #212121;
  --color-text-gray: #757575;
  --color-text-light: #9E9E9E;
  
  /* Absolute Action Red */
  --color-accent-red: #D32F2F;
  --color-accent-red-hover: #B71C1C;
  --color-accent-red-light: rgba(211, 47, 47, 0.08);

  /* Status Colors */
  --color-success: #2E7D32;
  --color-success-bg: #E8F5E9;
  
  /* Shadow & Radii */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Spacing */
  --spacing-container: 1600px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================
   BASE STYLES & RESET
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-white);
  color: var(--color-text-black);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

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

.container {
  width: 100%;
  max-width: var(--spacing-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.text-muted {
  color: var(--color-text-gray);
}

.price-main {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-accent-red);
  font-size: 1.5rem;
}

/* ==========================================
   BUTTONS & CONTROLS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  gap: 8px;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--color-accent-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  border: 1px solid var(--color-gray-200);
  background-color: var(--color-offwhite);
  color: var(--color-text-black);
}

.btn-secondary:hover {
  background-color: var(--color-gray-100);
  border-color: var(--color-gray-300);
}

.btn-ghost {
  border: 1px solid transparent;
  color: var(--color-text-black);
}

.btn-ghost:hover {
  background-color: var(--color-offwhite);
  border-color: var(--color-gray-200);
}

/* The quiet second button next to a red one: the same size, a thin dark outline. */
.btn-outline-dark {
  background-color: var(--color-white);
  border: 1.5px solid var(--color-gray-300);
  color: var(--color-text-black);
}

.btn-outline-dark:hover {
  border-color: var(--color-text-black);
  background-color: var(--color-offwhite);
}

.btn-outline-red {
  background-color: var(--color-white);
  border: 1.5px solid var(--color-accent-red);
  color: var(--color-accent-red);
}

.btn-outline-red:hover {
  background-color: var(--color-accent-red);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.25);
}

/* Form Elements */
.input-field {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.input-field:focus {
  border-color: var(--color-accent-red);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.select-field {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-field:focus {
  border-color: var(--color-accent-red);
  background-color: var(--color-white);
}

/* Custom Checkbox */

/* Custom Toggle Switch */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.toggle-label input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: var(--color-gray-200);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-white);
  top: 3px;
  left: 3px;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-label input:checked + .toggle-switch {
  background-color: var(--color-accent-red);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

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

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 20px;
}

.brand-block {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--color-text-black);
}

.logo-main span {
  color: var(--color-accent-red);
}

.logo-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-gray);
  font-weight: 500;
  margin-top: 2px;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.tab-btn {
  position: relative;
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-gray);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  white-space: nowrap; /* "Авто из Японии" must not wrap onto two lines */
}

/* Laptop widths: the nav competes with the address and phone blocks, so tighten it
   instead of letting the tab labels break. */
@media (min-width: 1025px) and (max-width: 1320px) {
  .header-top { gap: 12px; }
  .header-nav { gap: 2px; }
  .tab-btn { padding: 8px 12px; font-size: 0.88rem; }
}

.tab-btn:hover {
  color: var(--color-text-black);
  background-color: var(--color-gray-100);
}

.tab-btn.active {
  color: var(--color-accent-red);
  background-color: var(--color-accent-red-light);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background-color: var(--color-accent-red);
  border-radius: var(--radius-full);
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.contact-item span.icon {
  color: var(--color-accent-red);
}

.contact-phone {
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-gray);
  transition: var(--transition-smooth);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-btn:hover {
  background-color: var(--color-accent-red);
  border-color: var(--color-accent-red);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
}

/* Rates Widget */
.header-rates {
  background-color: var(--color-offwhite);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-gray);
}

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

.rates-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.rate-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rate-item span.val {
  font-weight: 600;
  color: var(--color-accent-red);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
  position: relative;
  min-height: 560px;
  height: auto;
  padding: 0;
  background-color: #0B0F19;
  color: var(--color-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 90%;
  opacity: 0.85;
  filter: none;
  transition: transform 8s ease;
}

.hero-section:hover .hero-bg-image {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 15, 25, 0.94) 0%, rgba(11, 15, 25, 0.78) 55%, rgba(11, 15, 25, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 720px;
}

.hero-title {
  font-size: 3.3rem;
  line-height: 1.08;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #CBD5E1;
  margin-bottom: 28px;
  font-weight: 400;
  line-height: 1.5;
}

/* The headline block is centred in the hero; the reassurance list sits under the buttons. */
.hero-section > .container {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-checks {
  display: flex;
  flex-wrap: wrap;
  width: max-content;   /* a little wider than the 720px text column, so the three items stay in one row */
  max-width: calc(100vw - 48px);
  gap: 10px 30px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #E4E9EE;
}

/* A plain check mark in the site's red, no circle. */
.hero-check {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--color-accent-red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* ==========================================
   FILTER PANEL
   ========================================== */

.filter-wrapper {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-200);
  padding: 32px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

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

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-gray);
}

.input-range-container {
  display: flex;
  gap: 8px;
}

.input-range-container input {
  width: 50%;
}

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-gray-100);
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 20px;
}

/* Budget Slider Styling */
.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent-red);
  cursor: pointer;
  transition: transform 0.1s;
}

.slider-control::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Autocomplete suggestion container */

/* ==========================================
   POPULAR MODELS (MVP)
   ========================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.section-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-black);
}

/* ==========================================
   MAIN CATALOG SECTION
   ========================================== */
.catalog-grid, .popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.car-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  animation: cardFadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.car-card:hover {
  border-color: var(--color-gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

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

/* Card SPA Switch Panel */

/* Small checkbox styles for card services */

/* ==========================================
   COMPLETED ORDERS SECTION
   ========================================== */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.order-card {
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.order-img-wrapper {
  position: relative;
  aspect-ratio: 3/2;
  background-color: var(--color-gray-100);
}

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

.order-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(46, 125, 50, 0.15);
}

.order-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.order-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.order-user-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.order-desc {
  font-size: 0.85rem;
  color: var(--color-text-gray);
  margin-bottom: 16px;
  flex-grow: 1;
}

.order-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-gray-200);
  padding-top: 12px;
}

.order-price-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-gray);
}

.order-price-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

/* ==========================================
   ABOUT & LOCATION SECTION
   ========================================== */

.about-text {
  font-size: 1rem;
  color: var(--color-text-gray);
  line-height: 1.7;
}

.process-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

/* Seven steps: four in a row, the last three centred under them; the row edges are the container edges. */
.process-card {
  flex: 0 0 calc((100% - 72px) / 4);
  max-width: none;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition-smooth);
}

.process-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-red);
}

.process-step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent-red);
  line-height: 1;
}

.process-step-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-black);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.process-step-desc {
  font-size: 0.9rem;
  color: var(--color-text-gray);
  line-height: 1.5;
}

.contact-action-flex {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
/* Darker than the closing banner above it, so the two do not merge into one black field. */
.site-footer {
  background-color: #171717;
  color: var(--color-white);
  padding: 48px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.1fr 1.3fr 1.2fr;
  gap: 36px;
  margin-bottom: 50px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-white);
}

.footer-logo span {
  color: var(--color-accent-red);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--color-gray-300);
  line-height: 1.6;
  margin-top: 12px;
}

.footer-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--color-accent-red);
  width: fit-content;
  padding-bottom: 6px;
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-gray-300);
}

.footer-links a:hover {
  color: var(--color-white);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-gray-300);
}

.footer-contact-item span.icon {
  color: var(--color-accent-red);
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Map Container in footer */
.footer-map-container {
  height: 250px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #333333;
  position: relative;
  background-color: #1a1a1a;
}

/* ==========================================
   DETAIL / CALCULATION POPUP
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(33, 33, 33, 0.6);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 900px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;   /* a comfortable touch target */
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background-color: var(--color-gray-100);
  transform: rotate(90deg);
}

.modal-body {
  padding: 40px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-title-row {
  margin-bottom: 24px;
  padding-right: 56px;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-gray);
  margin-top: 4px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.modal-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-black);
}

.calc-total-box {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-gray-200);
}

.calc-total-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.calc-total-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--color-accent-red);
}

.calc-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.calc-breakdown-table tr {
  border-bottom: 1px solid var(--color-gray-100);
}

.calc-breakdown-table tr:last-child {
  border-bottom: none;
}

.calc-breakdown-table td {
  padding: 10px 0;
}

.calc-breakdown-table td.label {
  color: var(--color-text-gray);
}

.calc-breakdown-table td.val {
  text-align: right;
  font-weight: 600;
  color: var(--color-text-black);
}

.lead-submit-btn {
  width: 100%;
}

/* Success State in Modal */
.modal-success-screen {
  text-align: center;
  padding: 60px 40px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-success-bg);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.success-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.success-desc {
  color: var(--color-text-gray);
  max-width: 450px;
  line-height: 1.6;
}

/* ==========================================
   TRACKING PAGE VIEW
   ========================================== */
.tracking-view {
  padding: 56px 0 72px;
}

.tracking-search-box {
  max-width: 600px;
  margin: 0 auto 24px;
  text-align: center;
}

.tracking-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
  font-weight: 800;
}

.tracking-desc {
  color: var(--color-text-gray);
  margin-bottom: 24px;
}

.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input-group input {
  flex-grow: 1;
}

/* Stepper Status Bar */
.tracking-results-panel {
  display: none; /* Shown after search */
  animation: fadeIn 0.4s ease-out;
}

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

.timeline-stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 40px 0 60px;
  position: relative;
}

.timeline-line {
  position: absolute;
  height: 3px;
  background-color: var(--color-gray-200);
  top: 20px;
  left: 40px;
  right: 40px;
  z-index: 1;
}

.timeline-line-fill {
  position: absolute;
  height: 100%;
  background-color: var(--color-accent-red);
  width: 0%; /* Dynamic fill via JS */
  transition: width 0.8s ease;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.step-node {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-white);
  border: 3px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
  color: var(--color-text-light);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 130px;
  color: var(--color-text-light);
  transition: var(--transition-smooth);
}

.timeline-step.active .step-node {
  border-color: var(--color-accent-red);
  color: var(--color-accent-red);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(211, 47, 47, 0.2);
}

.timeline-step.active .step-label {
  color: var(--color-text-black);
}

.timeline-step.completed .step-node {
  border-color: var(--color-accent-red);
  background-color: var(--color-accent-red);
  color: var(--color-white);
}

.timeline-step.completed .step-label {
  color: var(--color-text-black);
}

/* Tracking Details Grid */
.tracking-info-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-top: 40px;
}

.tracking-status-card {
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.status-card-header {
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.status-badge-current {
  display: inline-block;
  background-color: var(--color-accent-red);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.status-update-time {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.status-detail-desc {
  font-size: 0.95rem;
  color: var(--color-text-black);
  line-height: 1.7;
}

.status-details-table {
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid var(--color-gray-200);
  padding-top: 16px;
}

.status-details-table td {
  padding: 8px 0;
  font-size: 0.85rem;
}

.status-details-table td.label {
  color: var(--color-text-gray);
}

.status-details-table td.val {
  font-weight: 600;
  text-align: right;
}

.tracking-map-container {
  height: 350px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  position: relative;
  background-color: var(--color-offwhite);
}

.tracking-map-loader {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  z-index: 10;
}

/* ==========================================
   UTILITY & SPA SWITCHING STYLES
   ========================================== */
.catalog-view {
  display: block;
}

.catalog-view.hidden {
  display: none;
}

.hidden-element {
  display: none;
}

/* Material Outline icon configuration overrides */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================
   RESPONSIVE DESIGN (MOBILE-FIRST BREAKPOINTS)
   ========================================== */

/* Up to 1024px (Tablets / Laptops) */
@media (max-width: 1024px) {
  .catalog-grid, .popular-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .orders-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* Up to 768px (Small Tablets & Large Phones) */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 50px 0;
  }

  /* Header on a phone: the logo, a call button and the burger; the sections are in the menu (js/menu.js).
     A one-row header (about 56px) can stay fixed at the top, so the phone is always at hand. */
  .site-header {
    position: sticky;
    top: 0;
    max-height: none;
    padding: 0;
  }

  .header-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    gap: 8px;
  }

  .brand-block {
    align-items: flex-start;
    text-align: left;
    min-width: 0;
  }

  .brand-block .logo-sub {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .mobile-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-menu:not([hidden]) {
    display: block;
  }

  .header-contacts {
    display: none;
  }

  .social-links {
    display: none;
  }

  /* Rates Widget Mobile */
  .header-rates {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-rates::-webkit-scrollbar {
    display: none;
  }

  .rates-container {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 16px;
    min-width: max-content;
  }

  .rates-list {
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 14px;
  }

  /* Hero Section Mobile */
  .hero-section {
    min-height: 480px;
    height: auto;
    padding: 0;
  }

  .hero-section > .container {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 22px;
  }

  /* Reassurance list on a phone: one item per line */
  .hero-checks {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .hero-checks li {
    font-size: 0.86rem;
  }
  /* Filter Panel Mobile */
  

  .filter-wrapper {
    padding: 20px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  /* Carousel */
  

  /* Catalog Grid Mobile */
  .catalog-grid, .popular-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Orders Grid Mobile */
  .orders-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* About Grid Mobile */
  

  

  /* Modal Mobile */
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-close-btn {
    top: 12px;
    right: 12px;
  }

  /* Tracking Mobile */
  .timeline-stepper {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    margin: 30px 0;
  }

  .timeline-line {
    width: 3px;
    height: calc(100% - 40px);
    left: 20px;
    top: 20px;
    right: auto;
  }

  .timeline-line-fill {
    width: 100%;
    height: 0%; /* Filled heightwise in mobile vertical */
    transition: height 0.8s ease;
  }

  .timeline-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
  }

  .step-node {
    margin-bottom: 0;
  }

  .step-label {
    max-width: none;
  }

  .tracking-info-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Up to 480px (Strictly Smartphones) */
@media (max-width: 480px) {
  .catalog-grid, .popular-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

/* ==========================================
   PAGINATION STYLING
   ========================================== */
/* Контейнер пагинации */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Базовый стиль для всех кнопок */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #333333;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

/* Эффект при наведении на обычную кнопку */
.pagination-btn:hover:not(.active):not(.disabled) {
  border-color: #d32f2f;
  color: #d32f2f;
  background-color: #f0f7ff;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

/* Эффект при клике (активное нажатие) */
.pagination-btn:active:not(.active):not(.disabled) {
  transform: scale(0.96);
}

/* Стили для текущей (активной) страницы */
.pagination-btn.active {
  background-color: #d32f2f;
  border-color: #d32f2f;
  color: #ffffff;
  cursor: default;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

/* Стили для заблокированных кнопок (стрелочек) */
.pagination-btn.disabled {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  color: #bbbbbb;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Немного увеличим размер стрелочек «вперед/назад» для лучшей читаемости */
.pagination-btn[title] {
  font-size: 18px;
  font-weight: bold;
}

/* ==========================================
   PHOTO GALLERY & DOTS STYLING
   ========================================== */

/* Dots overlay */
.photo-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  pointer-events: none;
}

.photo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.photo-dot.active {
  background-color: var(--color-white);
  transform: scale(1.3);
}

/* Navigation buttons */
.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--color-text-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 10;
  border: 1px solid var(--color-gray-200);
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.pop-card-img-wrap:hover .photo-nav {
  opacity: 1;
}

.photo-nav:hover {
  background-color: var(--color-white);
}

.photo-prev {
  left: 8px;
}

.photo-next {
  right: 8px;
}

/* ==========================================
   PAGE AND CARD TRANSITION ANIMATIONS
   ========================================== */
.view-fade-in {
  animation: viewFadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

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

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

/* ==========================================
   FRONTEND REFACTORING NEW STYLES
   ========================================== */

/* 1. Horizontal Catalog Cards (hcar-card) */

/* Horizontal Catalog Specifications Layout (Branch 3) */

/* 2. Popular Models Card Styles (.pop-card) */
.pop-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.pop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gray-300);
}

.pop-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--color-gray-100);
}

.pop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.pop-card:hover .pop-card-img {
  transform: scale(1.04);
}

.pop-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pop-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-black);
  margin-bottom: 12px;
}

.pop-card-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.pop-card-spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--color-gray-100);
  padding-bottom: 4px;
}

.pop-card-spec-item .label {
  color: var(--color-text-gray);
}

.pop-card-spec-item .val {
  color: var(--color-text-black);
  font-weight: 600;
}

.pop-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--color-gray-200);
  margin-bottom: 12px;
}

.pop-card-price-row .price-label-group {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pop-card-price-row .price-val-group {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-accent-red);
  white-space: nowrap;
}

/* 3. Detailed Calculation Modal Layout & General Lead Form styles */
.modal-content-wide {
  max-width: 1000px;
  width: 90%;
}

.modal-grid-new {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.modal-col-breakdown {
  display: flex;
  flex-direction: column;
}

.modal-col-lead {
  display: flex;
  flex-direction: column;
}

.lead-form-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.lead-form-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-black);
  margin-bottom: 8px;
}

.lead-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* 4. Responsive adjustments */
@media (max-width: 992px) {
  
  
  
  
  
  
  .modal-grid-new {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.btn-view-all {
  border: 1.5px solid var(--color-accent-red);
  color: var(--color-accent-red);
  background-color: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 36px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
}

.btn-view-all:hover {
  border-color: var(--color-accent-red);   /* .btn-secondary:hover would make it grey */
  background-color: var(--color-accent-red);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

/* ==========================================
   LEGAL & COMPLIANCE STYLING (ФЗ-152 & ст. 437 ГК РФ)
   ========================================== */
.footer-requisites {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--color-gray-300);
  line-height: 1.6;
  border-left: 2px solid var(--color-accent-red);
  padding-left: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-top: 6px;
  padding-bottom: 6px;
}

.footer-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.footer-doc-link:hover {
  color: var(--color-white);
  transform: translateX(3px);
}

.footer-legal-disclaimer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 35px;
  font-size: 0.82rem;
  color: var(--color-gray-300);
  line-height: 1.65;
  text-align: justify;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-legal-disclaimer strong {
  color: var(--color-white);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 4px;
}

.catalog-legal-disclaimer {
  margin-top: 36px;
  padding: 18px 24px;
  background-color: var(--color-offwhite);
  border: 1px solid var(--color-gray-200);
  border-left: 4px solid var(--color-accent-red);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--color-text-gray);
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.catalog-legal-disclaimer strong {
  color: var(--color-text-black);
  font-weight: 700;
}

/* Checkbox and Consent Formatting */
.lead-consent-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 16px;
  font-size: 0.78rem;
  color: var(--color-text-gray);
  line-height: 1.4;
  text-align: left;
  user-select: none;
}

.lead-consent-box input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-gray-300);
  border-radius: 4px;
  outline: none;
  background-color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: var(--transition-smooth);
}

.lead-consent-box input[type="checkbox"]:checked {
  background-color: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.lead-consent-box input[type="checkbox"]:checked::before {
  content: "";
  width: 5px;
  height: 9px;
  border: 2px solid var(--color-white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

.lead-consent-box label {
  cursor: pointer;
}

.lead-consent-box a {
  color: var(--color-accent-red);
  text-decoration: underline;
  font-weight: 600;
}

.lead-consent-box a:hover {
  color: var(--color-accent-red-hover);
}

/* ==========================================
   COOKIE CONSENT BANNER (GLASSMORPHISM & DARK MODE)
   ========================================== */
.cookie-banner {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(160%);
  z-index: 9999;
  width: calc(100% - 48px);
  max-width: 960px;
  background: rgba(28, 28, 28, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cookie-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: cookie-bounce 3s infinite ease-in-out;
}

@keyframes cookie-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(12deg); }
}

.cookie-text {
  font-size: 0.86rem;
  color: var(--color-gray-300);
  line-height: 1.55;
}

.cookie-text strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--color-white);
  display: block;
  margin-bottom: 4px;
}

.cookie-text a {
  color: var(--color-accent-red);
  text-decoration: underline;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.cookie-text a:hover {
  color: var(--color-white);
}

.cookie-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cookie-accept {
  padding: 12px 30px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.35);
}

/* "Принять" is the main button: solid red. "Отклонить" is a quiet outline, so it does not outweigh it. */
.btn-cookie-decline {
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  white-space: nowrap;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--color-gray-300);
}

.btn-cookie-decline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 10px;
    width: calc(100% - 20px);
    padding: 14px 16px;
    gap: 14px;
  }
  .cookie-banner-content {
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-icon {
    font-size: 2rem;
  }
  .cookie-text strong {
    font-size: 0.88rem;
  }
  .cookie-text {
    font-size: 0.78rem;
  }
  .btn-cookie-accept {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
  }
}

/* ==========================================
   ENHANCEMENTS (CRO & ACCESSIBILITY)
   ========================================== */
body.modal-open {
  overflow: hidden;
}
body.modal-open .cookie-banner {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.calc-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.calc-label-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-gray, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-display, "Montserrat", sans-serif);
}
.calc-label-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-red, #D32F2F);
  background: var(--color-accent-red-light, rgba(211, 47, 47, 0.08));
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(211, 47, 47, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.calc-chips-group {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}
.calc-chips-group.country-grid {
  grid-template-columns: repeat(3, 1fr);
}
.calc-chips-group.budget-grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 520px) {
  .calc-chips-group.country-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .calc-chips-group.budget-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.calc-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--color-gray-200, #E0E2E5);
  border-radius: 10px;
  color: var(--color-text-black, #212121);
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-align: center;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}
.calc-chip:hover {
  border-color: var(--color-accent-red, #D32F2F);
  background: #FFF9F9;
  color: var(--color-accent-red, #D32F2F);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(211, 47, 47, 0.12);
}
.calc-chip:active {
  transform: translateY(0);
}
.calc-chip.active {
  background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
  border-color: #B71C1C;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(211, 47, 47, 0.35);
  transform: translateY(-1px);
}
.calc-chip .chip-flag {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.calc-chip.active .chip-flag circle[stroke] {
  stroke: rgba(255, 255, 255, 0.7);
}
.calc-chip.active svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.calc-chip .chip-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracking-demo-box {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  background: rgba(211, 47, 47, 0.06);
  border: 1px solid rgba(211, 47, 47, 0.15);
  padding: 8px 16px;
  border-radius: 20px;
}
.btn-demo-link {
  background: none;
  border: none;
  color: var(--color-accent-red, #D32F2F);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}
.btn-demo-link:hover {
  color: #b71c1c;
}

.mobile-sticky-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 8px 12px;
    gap: 10px;
    z-index: 999;
  }
  .mobile-sticky-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
  }
  .mobile-sticky-call {
    background: var(--color-text-black);
    color: #fff;
  }
  .mobile-sticky-calc {
    background: var(--color-accent-red, #D32F2F);
    color: #fff;
  }
  body {
    padding-bottom: 60px;
  }
  .cookie-banner {
    bottom: 68px;
    padding: 12px 14px;
    width: calc(100% - 16px);
  }
}

/* ==========================================================================
   Car cards, catalog states, modal modes, map markers (moved here from inline styles in the scripts)
   ========================================================================== */
.card-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-black);
}

/* What the lot is: "Продан на аукционе" (Japan, auction statistics) / "Объявление" (China, used-car ads).
   Same pill as the country flag, on the other corner; dark, so it reads as a note, not as a sale offer. */
.card-sale-note {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: calc(100% - 120px);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(11, 15, 25, 0.78);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.card-calc-btn {
  width: 100%;
  margin-top: 8px;
}

.catalog-empty {
  grid-column: 1 / -1;
  width: 100%;
  padding: 45px;
  text-align: center;
  border: 1px dashed var(--color-gray-200);
  border-radius: var(--radius-lg);
  background-color: var(--color-offwhite);
}

.catalog-empty-icon.material-symbols-outlined {
  font-size: 48px;
  color: var(--color-text-light);
}

.catalog-empty-title {
  margin-top: 12px;
  font-size: 1.1rem;
  font-family: var(--font-display);
  color: var(--color-text-black);
}

.catalog-empty-text {
  margin-top: 4px;
  font-size: 0.9rem;
}

.catalog-error {
  grid-column: 1 / -1;
  padding: 45px;
  text-align: center;
}

.form-error-phone {
  color: inherit;
  font-weight: 700;
  white-space: nowrap;
}

/* Callback / quote request: the window has only the form column. */
.modal-grid-new.modal-grid-single {
  grid-template-columns: 1fr;
  max-width: 550px;
  margin: 0 auto;
}

.modal-grid-new.modal-grid-calc {
  max-width: 580px;
}

/* The collection window stays under #detail-modal, so "Детальный расчёт" opens on top of it. */
.quiz-submit {
  width: 100%;
  margin-top: 12px;
}

/* Honeypot input for bots: invisible and unreachable for people (not display:none, which bots skip). */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.map-marker.material-symbols-outlined {
  font-weight: bold;
  background: white;
  border-radius: 50%;
}

.map-marker.map-marker-start {
  color: var(--color-text-black);
  font-size: 24px;
  border: 2px solid var(--color-text-black);
  padding: 2px;
}

.map-marker.map-marker-stop {
  color: var(--color-accent-red);
  font-size: 28px;
  border: 2px solid var(--color-accent-red);
  padding: 2px;
}

.map-marker.map-marker-car {
  color: #FF8F00;
  font-size: 26px;
  border: 2.5px solid #FF8F00;
  padding: 3px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Page sections and elements of index.html (moved here from style="" attributes)
   ========================================================================== */
.hdr-contacts {
  align-items: center;
}

.hdr-address-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.hdr-address-line {
  font-size: 0.8rem;
  margin: 2px 0 0 0;
  line-height: 1.2;
}

.hdr-hours {
  font-size: 0.7rem;
  margin: 2px 0 0 0;
  opacity: 0.8;
}

.hdr-phone-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hdr-phone-item {
  gap: 6px;
}

.hdr-phone-icon {
  font-size: 22px;
  color: var(--color-accent-red);
  vertical-align: middle;
}

/* The phone is the main contact of this business: bigger than the address next to it. */
.hdr-phone-link {
  white-space: nowrap;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hdr-callback-btn {
  white-space: nowrap;
  padding: 7px 16px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(211,47,47,0.3);
}

.icon-16 {
  font-size: 16px;
}

.icon-18 {
  font-size: 18px;
}

.popular-section-first {
  padding-top: 60px;
  padding-bottom: 40px;
}

.view-all-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.popular-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.popular-section-last {
  padding-top: 40px;
  padding-bottom: 60px;
}

.section-offwhite {
  background-color: var(--color-offwhite);
  padding: 80px 0;
}

.about-section {
  padding: 80px 0;
}

.about-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-title {
  margin-bottom: 24px;
}

.about-lead {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-gray);
  margin-bottom: 40px;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
}

.about-feature {
  flex: 1 1 200px;
  max-width: 250px;
  text-align: center;
}

.about-feature-icon {
  font-size: 36px;
  color: var(--color-accent-red);   /* one accent for the page: red; green stays for "done / safe" marks */
  margin-bottom: 12px;
}

.about-feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-feature-text {
  font-size: 0.9rem;
  color: var(--color-text-gray);
}

.contact-actions-center {
  justify-content: center;
}

/* "Написать нам" + "Заказать звонок": two buttons of one size, side by side (stacked on a phone). */
.about-actions {
  gap: 14px;
}

.about-actions .btn {
  min-width: 280px;   /* wide enough for the longer label "Задать вопрос эксперту": both buttons stay one size */
  min-height: 52px;
  padding: 14px 28px;
}

@media (max-width: 520px) {
  .about-actions .btn {
    flex: 1 1 100%;
  }
}

.section-header-center {
  margin-bottom: 50px;
  text-align: center;
}

.section-subtitle {
  margin-top: 8px;
}

.catalog-hero {
  padding-top: 60px;
  padding-bottom: 20px;
}

.catalog-title {
  margin-bottom: 8px;
}

.catalog-filters-section {
  padding-bottom: 40px;
}

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

.catalog-results-section {
  padding-bottom: 80px;
}

.catalog-count {
  font-size: 0.9rem;
  font-weight: 500;
}

.korea-card {
  text-align: center;
  padding: 50px 30px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  background-color: var(--color-offwhite);
  max-width: 860px;
  margin: 20px auto;
}

.korea-icon {
  font-size: 56px;
  color: var(--color-accent-red);
  margin-bottom: 16px;
}

.korea-title {
  margin-top: 8px;
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--color-text-black);
  font-weight: 700;
}

.korea-text {
  font-size: 1.05rem;
  margin-top: 10px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.korea-cta {
  margin-top: 28px;
  margin-bottom: 32px;
}

.korea-cta-btn {
  padding: 14px 32px;
  font-size: 1rem;
}

.korea-channels {
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-200);
}

.korea-channels-title {
  font-size: 0.95rem;
  color: var(--color-text-gray);
  margin-bottom: 16px;
  font-weight: 500;
}

.korea-channels-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-telegram {
  background-color: #0088cc;
  border-color: #0088cc;
}

.telegram-icon {
  width: 20px;
  height: 20px;
  fill: white;
  margin-right: 6px;
}

.korea-alt-btn {
  border-color: var(--color-gray-300);
  background: white;
}

.korea-alt-icon {
  color: var(--color-accent-red);
  font-size: 22px;
}

.tracking-input {
  font-size: 1.1rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tracking-error {
  color: var(--color-accent-red);
  margin-top: 12px;
  font-weight: 500;
  display: none;
}

.tracking-demo-label {
  color: var(--color-text-gray);
}

.tracking-map-canvas {
  width: 100%;
  height: 100%;
}

.footer-note {
  margin-top: 6px;
}

.footer-strong {
  color: var(--color-white);
  font-weight: 600;
}

.social-links-gap {
  margin-top: 14px;
}

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

.map-frame {
  border:0;
}

.map-open {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #212121;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-bottom-center {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-legal {
  color: var(--color-gray-500);
  font-size: 0.78rem;
}

.modal-box-title-gap {
  margin-top:20px;
}

/* blocks.css (loaded later) makes .sold-banner flex: the start state needs the extra class to win */
.sold-banner.start-hidden {
  display: none;
}

.lead-form-subtitle {
  font-size:0.85rem;
  color:var(--color-text-light);
  margin-bottom:12px;
}

.lead-calc-options {
  display: none;
  margin-bottom: 20px;
  text-align: left;
}

.calc-group {
  margin-bottom: 16px;
}

.calc-section-label-tight {
  margin-bottom: 6px;
}

.calc-optional-hint {
  font-size: 0.72rem;
  color: var(--color-text-light, #9ca3af);
}

.lead-wishes-input {
  font-size: 0.88rem;
  padding: 10px 14px;
}

.form-error {
  color: var(--color-accent-red);
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  margin-top: -4px;
  margin-bottom: 8px;
}

.full-width-btn {
  width:100%;
}

.success-close-gap {
  margin-top: 10px;
}

/* ---- Car window: lot actions, rate note ---- */
.modal-car-actions { margin-top: 12px; }
.modal-car-actions-hint { font-size: .8rem; color: var(--color-text-light); margin: 6px 0 10px; }
.modal-car-actions [hidden] { display: none; }   /* .btn sets its own display, which beats the attribute */
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--color-text-light); text-decoration: underline; cursor: pointer; }
.btn-link:hover { color: var(--color-text-black); }
.breakdown-rate-note { font-size: .8rem; color: var(--color-text-light); margin-top: 10px; }

/* Car window (breakdown + form) is compact so that it fits one screen without scrolling on a desktop;
   a short or narrow screen still scrolls inside .modal-body. */
@media (min-width: 993px) {
  .modal-content.modal-car { max-width: 1080px; max-height: 94vh; }
  .modal-content.modal-car .modal-body { padding: 24px 32px; }
  .modal-car .modal-title-row { margin-bottom: 14px; }
  .modal-car .modal-title { font-size: 1.4rem; }
  .modal-car .modal-grid-new { grid-template-columns: 1fr 1fr; gap: 28px; }
  .modal-car #lead-form-subtitle { display: none; }
  .modal-car .calc-total-box { padding-bottom: 12px; }
  .modal-car .modal-box-title-gap { margin: 14px 0 8px; }
  .modal-car .calc-breakdown-table td { padding-top: 7px; padding-bottom: 7px; }
  .modal-car .lead-form-box { gap: 8px; padding: 16px 18px; }
  .modal-car .lead-form-title { font-size: 1.05rem; margin-bottom: 0; }
  .modal-car .lead-form-fields { gap: 8px; margin-top: 4px; }
  .modal-car .lead-form-fields .input-field { padding-top: 9px; padding-bottom: 9px; }
  .modal-car .modal-car-actions { margin-top: 4px; }
  .modal-car .modal-car-actions-hint { margin: 4px 0 6px; }
  .modal-car .sold-banner { padding: 9px 12px; font-size: .85rem; }
  .modal-car .lead-consent-box { font-size: .75rem; }
}

/* ---- Catalog: counter with the sort selector ---- */
.catalog-count-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.catalog-sort { width: auto; min-width: 170px; padding: 6px 10px; font-size: .9rem; }

/* ---- Calculation examples ---- */
.example-title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 6px; }
.example-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 10px 0 12px; }
.example-table td { padding: 5px 0; border-bottom: 1px solid var(--color-gray-200); vertical-align: top; }
.example-table td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }

/* Tablets and small laptops (769-1100px): the brand, the nav, the address and the phone do not fit in one row.
   The nav moves to its own row, the social buttons (also in the footer) are hidden. */
@media (min-width: 769px) and (max-width: 1100px) {
  .header-top { flex-wrap: wrap; row-gap: 8px; }
  .header-nav { order: 3; width: 100%; justify-content: center; }
  .header-top .social-links { display: none; }
}
@media (min-width: 769px) and (max-width: 900px) {
  .site-header { position: static; }   /* a three-row header would cover a fifth of the screen */
}

/* ==========================================================================
   Design audit pass (Oct 2026): phone menu, short lead forms, request windows on a phone, footer, touch targets
   ========================================================================== */

/* ---- Phone header: call button and the burger (visible under 769px, see the media query above) ---- */
@media (min-width: 769px) {
  .mobile-head-actions,
  .mobile-menu { display: none; }
}

.mobile-phone-btn,
.burger-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-phone-btn {
  background: var(--color-accent-red);
  color: var(--color-white);
}

.mobile-phone-btn .material-symbols-outlined { font-size: 22px; }

.burger-btn {
  flex-direction: column;
  gap: 5px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
}

.burger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text-black);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.mm-link {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 0;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-gray-100);
}

.mm-phone {
  display: block;
  padding: 16px 0 4px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-black);
}

.mm-address {
  padding-bottom: 14px;
  font-size: 0.85rem;
  color: var(--color-text-gray);
}

.mm-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
}

.mm-actions .btn { flex: 1; min-height: 44px; }
.mobile-menu .social-links { display: flex; }   /* the phone media query hides .social-links elsewhere */

/* ---- Short lead forms in the page (js/inline-lead.js) ---- */
.inline-lead { width: 100%; }

.inline-lead-row { display: flex; gap: 10px; }

.inline-lead-phone {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  font-size: 1rem;
}

.inline-lead-btn { flex-shrink: 0; padding: 14px 24px; white-space: nowrap; }

.inline-lead .lead-consent-box { margin: 12px 0 0; }

.inline-lead-error {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent-red);
}

.inline-lead-error[hidden] { display: none; }
.inline-lead-error a { color: inherit; font-weight: 700; white-space: nowrap; }

.inline-lead-done {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-success-bg);
  color: #1B5E20;
  font-size: 0.92rem;
  line-height: 1.45;
}

.inline-lead .input-field.has-error { border-color: var(--color-accent-red); }

.inline-lead--dark .input-field { background: var(--color-white); border-color: transparent; color: var(--color-text-black); }
.inline-lead--dark .lead-consent-box { color: rgba(255, 255, 255, 0.72); }
.inline-lead--dark .lead-consent-box a,
.inline-lead--dark .inline-lead-error { color: #FF8A80; }

@media (max-width: 520px) {
  .inline-lead-row { flex-direction: column; }
  .inline-lead-btn { width: 100%; }
}

/* ---- Consent check box: larger, and a clear mark when it was forgotten ---- */
.lead-consent-box { font-size: 0.82rem; }

.lead-consent-box input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 0;
}

.lead-consent-box input[type="checkbox"]:checked::before {
  width: 6px;
  height: 11px;
}

.lead-consent-box.has-error {
  outline: 2px solid var(--color-accent-red);
  outline-offset: 6px;
  border-radius: 6px;
}

.lead-consent-box.has-error input[type="checkbox"] { border-color: var(--color-accent-red); }

/* ---- Callback window: only the form, without a second frame and heading ---- */
.lead-form-box.lead-form-box--flat {
  background: none;
  border: 0;
  padding: 0;
}

.lead-form-box.lead-form-box--flat .lead-form-fields { margin-top: 4px; }

/* ---- Request windows (callback, calculation): nothing may be wider than the window ---- */
.modal-grid-new.modal-grid-single { grid-template-columns: minmax(0, 1fr); }
.modal-col-lead,
.lead-form-box,
.lead-calc-options,
.calc-group,
.calc-chip { min-width: 0; }

@media (max-width: 520px) {
  .modal-overlay { padding: 12px; }
  .modal-content-wide { width: 100%; max-height: 94vh; }
  .modal-body { padding: 20px 16px; }
  .modal-title-row { margin-bottom: 14px; }
  .modal-title { font-size: 1.3rem; line-height: 1.2; }
  .modal-subtitle { font-size: 0.85rem; }
  .lead-form-box { padding: 16px 14px; }
  .lead-form-title { font-size: 1.05rem; }

  .calc-section-label { flex-wrap: wrap; gap: 6px; }
  .calc-label-title { font-size: 0.7rem; letter-spacing: 0.02em; }
  .calc-optional-hint { white-space: nowrap; }

  /* Three countries in a row: the flag over the name, so the three fit the narrow window */
  .calc-chips-group.country-grid .calc-chip {
    flex-direction: column;
    gap: 4px;
    min-height: 58px;
    padding: 8px 4px;
    font-size: 0.82rem;
  }

  .calc-chips-group.budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-chips-group.budget-grid .calc-chip { padding: 10px 6px; font-size: 0.84rem; }
}

/* ---- Footer: the legal text folds, the footer links are easy to tap ---- */
.footer-legal-disclaimer {
  padding: 0;
  margin-bottom: 28px;
  text-align: left;
  font-size: 0.82rem;
}

.footer-legal-disclaimer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-white);
}

.footer-legal-disclaimer summary::-webkit-details-marker { display: none; }

.footer-legal-disclaimer summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--color-accent-red);
  border-bottom: 2px solid var(--color-accent-red);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.footer-legal-disclaimer[open] summary::after { transform: rotate(-135deg); }
.footer-legal-disclaimer .footer-note { margin: 0; padding: 0 20px 18px; text-align: justify; }

/* ---- Seven delivery steps: fewer per row on narrower screens ---- */
@media (max-width: 1100px) {
  .process-card { flex-basis: calc((100% - 48px) / 3); }
}

@media (max-width: 760px) {
  .process-card { flex-basis: 100%; }
}

/* ---- Phone: popular models as a swipe strip, bigger touch targets ---- */
@media (max-width: 768px) {
  #home-view .popular-grid {
    display: flex;
    gap: 14px;
    margin: 0 -16px;
    padding: 4px 16px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #home-view .popular-grid::-webkit-scrollbar { display: none; }

  #home-view .popular-grid > * {
    flex: 0 0 80%;
    max-width: 330px;
    scroll-snap-align: start;
  }

  .footer-links { gap: 0; }

  .footer-links a,
  .footer-doc-link,
  .footer-contact-item a.contact-phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .social-btn { width: 44px; height: 44px; }
  .map-open { padding: 10px 14px; font-size: 0.78rem; }
}
