/* =========================
   BASE
========================= */
* {
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
    background: #f5f6f8;
    color: #0f172a;
}

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

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   HEADER (PAN-AUTO STYLE)
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-top {
    height: 72px;
}

.header-top-inner {
    display: flex;
    align-items: center;
    height: 100%;
}

/* =========================
   LOGO
========================= */

.header-logo {
    margin-right: 48px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: #0f172a;
    white-space: nowrap;
}

/* =========================
   NAV MENU
========================= */

.header-nav {
    flex: 1;
}

.header-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

  .car-meta {
      opacity: 50%;
    -webkit-line-clamp: 2;
        display: -webkit-box;
    -webkit-box-orient: vertical;
        overflow: hidden;
}

.header-menu li {
    position: relative;
}

.header-menu a {
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    padding: 8px 0;
    display: inline-block;
}

.header-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: #0f172a;
    transition: width 0.2s ease;
}

.header-menu a:hover::after {
    width: 100%;
}

/* =========================
   CONTACTS
========================= */

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

.header-phone {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.header-whatsapp {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
}

.header-btn {
    background: #0f172a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.header-btn:hover {
    background: #020617;
}

/* =========================
   BURGER
========================= */

.burger {
    display: none;
    width: 28px;
    height: 20px;
    margin-left: 18px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #0f172a;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.burger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.burger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
    position: fixed;
    inset: 0;
    background: #ffffff;
    padding: 96px 28px 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 999;
}

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

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    margin-bottom: 26px;
}

.mobile-menu-list a {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
}

.mobile-contacts {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mobile-contacts a {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .burger {
        display: flex;
    }
}

@media (max-width: 640px) {
    .header-phone,
    .header-whatsapp {
        display: none;
    }

    .header-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

.header-rates {
    display: flex;
    gap: 28px;
    align-items: center;
    font-size: 14px;
    margin-right: 48px;
}

.header-rates .label {
    color: #64748b;
    font-weight: 500;
}

.header-rates .value {
    font-weight: 600;
    color: #0f172a;
}
/* =========================
   CATALOG LAYOUT
========================= */

.catalog {
    padding: 32px 0 60px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

/* =========================
   FILTERS
========================= */

.catalog-filters {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    height: fit-content;
}

.filter-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #475569;
}

.filter-group select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}
.filter-group input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.filter-btn {
    width: 100%;
    height: 44px;
    margin-top: 12px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================
   CARS GRID
========================= */

.catalog-grid {
    display: grid;
    align-items: start;  
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-filters {
        order: 2;
    }

    .catalog-content {
        order: 1;
    }
}
/* =========================
   CAR CARD (PAN-AUTO STYLE)
========================= */

.car-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.car-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.car-card-link {
    display: block;
    height: 100%;
}

/* IMAGE */
.car-card-image {
    position: relative;
    width: 100%;
    background: #f1f5f9;
}

.car-card-image img {
    width: 100%;
    object-fit: cover;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 14px;
    color: #64748b;
}

/* BODY */
.car-card-body {
    padding: 16px 16px 18px;
}

/* TITLE */
.car-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
    color: #0f172a;
}

/* META */
.car-card-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

/* SPECS */
.car-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 13px;
    color: #334155;
}

.car-card-specs li {
    position: relative;
    padding-left: 10px;
}

.car-card-specs li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #94a3b8;
}

/* PRICE */
.car-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

/* =========================
   SINGLE CAR (PAN-AUTO)
========================= */

.car-single {
    padding: 32px 0 60px;
}

.car-single-header {
    margin-bottom: 24px;
}

.car-single-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

/* LAYOUT */
.car-single-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 32px;
    align-items: start;
}

/* GALLERY */
.car-single-gallery {
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.car-single-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.no-image {
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

/* SIDEBAR */
.car-single-sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

/* PRICE */
.car-single-price {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #0f172a;
}

/* BUTTON */
.car-single-btn {
    display: block;
    text-align: center;
    background: #0f172a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* SPECS */
.car-single-specs h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}

.car-single-specs ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.car-single-specs li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 14px;
}

.car-single-specs span {
    color: #64748b;
}

.car-single-specs strong {
    font-weight: 600;
}

/* DESCRIPTION */
.car-single-description {
    margin-top: 48px;
}

.car-single-description h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .car-single-layout {
        grid-template-columns: 1fr;
    }

    .car-single-sidebar {
        position: static;
    }
}
.car-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.car-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}

.car-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.car-slider-main img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 10px;
}

.car-slider-thumbs {
    margin-top: 12px;
}

.car-slider-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: .6;
}

.car-slider-thumbs .swiper-slide-thumb-active img {
    opacity: 1;
    outline: 2px solid #0f172a;
}

@media (max-width: 768px) {
    .car-slider-main img {
        height: 320px;
    }

    .car-slider-thumbs {
        display: none;
    }
}

/* MAIN */
.car-slider-main {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.car-slider-main img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

/* THUMBS */
.car-slider-thumbs {
    margin-top: 12px;
}

.car-slider-thumbs .swiper-slide {
    opacity: .6;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.car-slider-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    outline: 2px solid #0f172a;
}

.car-slider-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* NAV */
.swiper-button-prev,
.swiper-button-next {
    color: #ffffff;
    width: 42px;
    height: 42px;
}

/* MOBILE */
@media (max-width: 768px) {
    .car-slider-main img {
        height: 320px;
    }

    .car-slider-thumbs {
        display: none;
    }
}
.car-slider-main,
.car-slider-main .swiper-wrapper,
.car-slider-main .swiper-slide {
    width: 100%;
}

.car-slider-main .swiper-slide {
    flex-shrink: 0;
}
.swiper-wrapper {
    display: flex !important;
}

.swiper-slide {
    flex-shrink: 0;
}
.swiper {
    width: 100%;
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    display: block;
}
/* Убираем синюю подсветку при клике */
.swiper-button-prev,
.swiper-button-next,
.swiper {
    -webkit-tap-highlight-color: transparent; /* iOS / Chrome */
    outline: none;
    color: #ffffff;
}

/* Убираем focus-обводку */
.swiper-button-prev:focus,
.swiper-button-next:focus,
.swiper:focus {
    outline: none;
    box-shadow: none;
}
.swiper,
.swiper * {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    outline: none !important;
}
.car-slider-main .swiper-button-prev,
.car-slider-main .swiper-button-next {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    transition: all 0.2s ease;
}

.car-slider-main .swiper-button-prev:hover,
.car-slider-main .swiper-button-next:hover {
    opacity: 40%;
}
/* =========================================================
   SWIPER / CAR SLIDER (MAIN)
   Основной слайдер автомобиля
========================================================= */

/* Контейнер основного слайдера */
.car-slider-main {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

/* Базовая структура Swiper */
.swiper {
    width: 100%;
    overflow: hidden;
}

/* Контейнер слайдов */
.swiper-wrapper {
    display: flex;
}

/* Отдельный слайд */
.swiper-slide {
    width: 100%;
    flex-shrink: 0;
}

/* Изображения в основном слайдере */
.car-slider-main img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}

/* =========================================================
   SWIPER NAVIGATION (ARROWS)
   Стрелки навигации
========================================================= */

.swiper-button-prev,
.swiper-button-next {
    width: 42px;
    height: 42px;
    color: #ffffff;
}

/* Убираем подсветку при клике (mobile) */
.swiper,
.swiper-button-prev,
.swiper-button-next {
    -webkit-tap-highlight-color: transparent;
}

/* Убираем focus-обводку */
.swiper-button-prev:focus,
.swiper-button-next:focus,
.swiper:focus {
    outline: none;
    box-shadow: none;
}

/* =========================================================
   THUMBNAILS (PREVIEW SLIDER)
   Превью-картинки (если используешь)
========================================================= */

.car-slider-thumbs {
    margin-top: 12px;
}

/* Слайды превью */
.car-slider-thumbs .swiper-slide {
    opacity: 0.6;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

/* Активный превью-слайд */
.car-slider-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    outline: 2px solid #0f172a;
}

/* Картинки превью */
.car-slider-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}



/* =========================================================
   MOBILE ADAPTIVE
   Адаптация под мобильные устройства
========================================================= */

@media (max-width: 768px) {
    .car-slider-main img {
        height: 200px;
    }

    /* Превью скрываем на мобилках */
    .car-slider-thumbs {
        display: none;
    }
}
/* GRID */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

/* CARD */
.car-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0,0,0,.15);
}

/* IMAGE */
.car-card-image {
    position: relative;
    background: #f3f4f6;
}

.car-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* YEAR BADGE */
.car-year {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* BODY */
.car-card-body {
    padding: 18px 20px 22px;
}

/* TITLE */
.car-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #111827;
    display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;   /* максимум 2 строки */
  overflow: hidden;
}

/* PRICE */
.car-price {
    font-size: 20px;
    font-weight: 700;
    color: Black;
}
/* =========================
   PAGINATION (PAN-AUTO STYLE)
========================= */

.pagination {
    margin: 60px 0;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* кнопка */
.pagination li a,
.pagination li span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;

    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e5e7eb;

    transition: all 0.2s ease;
}

/* hover */
.pagination li a:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* активная страница */
.pagination li .current {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    cursor: default;
}

/* disabled (если вдруг появится) */
.pagination li .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* стрелки */
.pagination li:first-child a,
.pagination li:last-child a {
    font-size: 18px;
    padding: 0 16px;
}

/* ===== Mobile filter toggle ===== */
.mobile-filter-bar {
  display: none;
  margin-bottom: 28px;
}

.mobile-filter-toggle {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  color: black;
  font-weight: 700;
  font-size: 16px;
}

/* ✅ ДЕСКТОП: ничего не ломаем */
@media (min-width: 901px) {
  .mobile-filter-bar { display: none !important; }
  .catalog-filters { display: block !important; } /* фильтр слева как раньше */
}

/* ✅ МОБИЛКА: фильтр скрыт, открывается по кнопке */
@media (max-width: 900px) {

  .mobile-filter-bar { display: block; }

  /* layout в колонку (фильтр будет сверху) */
  .catalog-layout { display: block; }

  /* фильтр прячем до клика */
  .catalog-filters {
    display: none;
    margin-bottom: 12px;
  }

  .catalog-filters.is-open {
    display: block;
  }



