*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#080808;color:#f7f7f7;font-family:Inter,Arial,sans-serif;padding-bottom:84px}.top{height:68px;display:flex;align-items:center;padding:10px 18px;gap:12px;position:sticky;top:0;z-index:20;background:rgba(8,8,8,.92);backdrop-filter:blur(14px);border-bottom:1px solid #222}.logo{width:48px;height:48px;object-fit:cover;border-radius:12px}.top div{display:flex;flex-direction:column;flex:1}.top b{font-size:17px}.top span{font-size:11px;color:#888}.heart{border:0;background:#181818;color:#fff;width:38px;height:38px;border-radius:50%;font-size:23px}.hero{padding:46px 20px 32px;background:radial-gradient(circle at 90% 0,#4a0808 0,transparent 38%)}.eyebrow{font-size:11px;letter-spacing:2px;color:#e43131;font-weight:800;margin:0 0 10px}.hero h1{font-size:38px;line-height:1.02;margin:0;letter-spacing:-1.5px}.hero h1 em{font-style:normal;color:#ef3030}.hero>p:not(.eyebrow){color:#aaa;max-width:390px;line-height:1.5}.primary{background:#e52525;color:white;border:0;border-radius:14px;padding:16px 20px;font-weight:800;font-size:15px;width:100%;max-width:390px}.trust{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#242424;border-block:1px solid #242424}.trust div{background:#101010;padding:18px 10px;text-align:center}.trust b{display:block;font-size:14px}.trust span{font-size:10px;color:#777}.catalog,.how{padding:34px 16px}.section-title{display:flex;justify-content:space-between;align-items:end}.section-title h2,.how h2{margin:0;font-size:28px}.section-title>span{font-size:12px;color:#777}.chips{display:flex;gap:8px;overflow:auto;padding:18px 0 14px}.chip{white-space:nowrap;background:#151515;border:1px solid #292929;color:#aaa;border-radius:999px;padding:9px 13px}.chip.active{background:#e52525;border-color:#e52525;color:#fff}.cards{display:grid;gap:16px}.card{background:#121212;border:1px solid #232323;border-radius:20px;overflow:hidden}.photo{height:230px;background:#222 center/cover no-repeat;position:relative}.badge{position:absolute;left:12px;top:12px;padding:7px 10px;border-radius:9px;background:rgba(0,0,0,.78);font-size:10px;font-weight:800}.badge.stock{background:#148348}.card-body{padding:16px}.card h3{margin:0 0 5px;font-size:21px}.sub{color:#888;font-size:12px}.price{font-size:23px;font-weight:900;margin:16px 0 4px}.price-note{font-size:11px;color:#777}.specs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.specs span{background:#191919;padding:10px;border-radius:10px;font-size:12px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.secondary,.outline{padding:13px;border-radius:12px;font-weight:700}.secondary{border:0;background:#e52525;color:#fff}.outline{border:1px solid #333;background:transparent;color:#fff}.how{background:#0d0d0d}.steps{display:grid;gap:10px;margin-top:18px}.steps div{padding:16px;background:#151515;border-radius:14px;display:grid;grid-template-columns:34px 1fr;column-gap:10px}.steps i{grid-row:1/3;width:30px;height:30px;background:#e52525;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:bold}.steps span{color:#888;font-size:12px;margin-top:4px}.bottom{position:fixed;z-index:30;bottom:0;left:0;right:0;height:72px;background:rgba(12,12,12,.96);backdrop-filter:blur(15px);display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #252525;padding-bottom:env(safe-area-inset-bottom)}.bottom button{background:none;border:0;color:#777;font-size:19px}.bottom span{display:block;font-size:9px;margin-top:3px}.bottom .active{color:#ef3030}.sheet{position:fixed;inset:0;z-index:50;background:#0b0b0b;overflow:auto;padding-bottom:30px}.hidden{display:none}.sheet-head{position:sticky;top:0;z-index:2;padding:12px 16px;background:rgba(8,8,8,.9);display:flex;justify-content:space-between;align-items:center}.close{background:#222;color:#fff;border:0;border-radius:50%;width:38px;height:38px;font-size:20px}.gallery{height:330px;background:#222 center/cover no-repeat}.detail-body{padding:20px}.detail-body h2{font-size:30px;margin:4px 0}.detail-body .price{font-size:28px}.feature-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}.feature-list div{padding:12px;background:#161616;border-radius:12px;font-size:12px}.terms{padding:16px;background:#151515;border-left:3px solid #e52525;border-radius:10px;color:#bbb;font-size:13px;line-height:1.55}.form{padding:20px}.form h2{font-size:28px}.form label{display:block;color:#aaa;font-size:12px;margin:16px 0 6px}.form input,.form select,.form textarea{width:100%;padding:14px;border-radius:12px;border:1px solid #333;background:#151515;color:#fff;font-size:15px}.form textarea{min-height:90px}.success{padding:50px 20px;text-align:center}.success b{font-size:26px}.success p{color:#999;line-height:1.5}@media(min-width:700px){main{max-width:900px;margin:auto}.cards{grid-template-columns:repeat(2,1fr)}.top{padding-inline:max(18px,calc((100% - 900px)/2))}.bottom{left:50%;width:520px;transform:translateX(-50%);border:1px solid #292929;border-radius:18px 18px 0 0}.sheet{left:50%;width:520px;transform:translateX(-50%);box-shadow:0 0 0 100vw rgba(0,0,0,.65)}.hero{border-radius:0 0 24px 24px}}

/* Сохраняем переносы строк в описании автомобиля */
.detail-body .sub {
    white-space: pre-line;
    overflow-wrap: anywhere;
}


/* StepAuto gallery */
.stepauto-gallery {
    position: relative;
    overflow: hidden;
    background-image: none !important;
}

.stepauto-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.65);
    color: white;
    border: 0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Скрываем устаревшие фильтры */
.chips, #saFilterButton, #saFilterOverlay, .sa-filter-panel { display: none !important; }

/* Отступ между фильтрами и автомобилями */
#saToolbarFields { margin-bottom: 28px !important; }

/* Полное отображение фото автомобилей */
.card .photo { background-size: contain !important; background-repeat: no-repeat !important; }

/* Единый формат фотографий в каталоге */
.card .photo { height: auto !important; aspect-ratio: 16 / 9; background-size: contain !important; background-position: center !important; }

/* Формат фотографий StepAuto */
.card .photo { aspect-ratio: 3 / 2 !important; }

/* Возвращаем исходный формат карточек */
.card .photo { height: 230px !important; aspect-ratio: auto !important; background-size: cover !important; background-position: center !important; }

.badge.china{background:#C92828;color:#fff}
.badge.korea{background:#2457B8;color:#fff}
.badge.uae{background:#986322;color:#fff}
.badge.kyrgyzstan{background:#A63370;color:#fff}

/* StepAuto: счётчик автомобилей */
.sa-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #222;
    border: 1px solid #383838;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* StepAuto: положение и яркость счётчика */
.catalog .section-title {
    justify-content: flex-start;
    gap: 18px;
}

.catalog .sa-count-badge,
.catalog .sa-count-badge #count {
    color: #ffffff;
    opacity: 1;
}

.catalog .sa-count-badge {
    margin-left: 0;
    font-size: 14px;
}

/* Отступ между заголовком каталога и фильтрами */
.catalog .section-title {
    margin-bottom: 20px;
}
