html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding-top: 115px;
    /* отступ под фиксированную шапку */
    font-family: "Roboto";
}

.header {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    background-color: rgba(224, 224, 224, 0.52);
    backdrop-filter: blur(10px);
    width: calc(100% - 40px);
    max-width: 1425px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 0 30px;
    box-sizing: border-box;
}

.login-btn {
    /* Кнопка перехода в ЛК */
    background-color: white;
    border: 1px solid #222222;
    border-radius: 20px;
    color: #222222;
    font-size: 12px;
    font-weight: bold;
    padding: 1%;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.login-btn:hover {
    background-color: #222222;
    color: #ffffff;

}

.header h1 {
    padding-left: 0%;
}

h1 {
    padding-left: 2%;
}

.long-btn-container {
    display: flex;
    margin-left: 150px;
    margin-right: 150px;
    height: 50px;
    width: 1200px;
    background-color: #e6e6e6;
    display: flex;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 2%;
}

/* Стиль для Каталога: */

.cards2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    background-color: rgb(224, 224, 224, 0.5);
    /* Светло-серый фон страницы */
    padding: 30px 30px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 95%;
    max-width: 1320px;
    margin: 0 auto;
    list-style: none;
    border-radius: 20px;
}

/* Сама карточка товара */
.card1 {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 35px 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* 1. Блок с картинкой (выводим наверх) */
.card-image {
    order: 1;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 2. Заголовок товара */
.card-title {
    order: 2;
    font-size: 20px;
    font-weight: 400;
    color: #666666;
    margin: 0 0 8px 0;
}

/* 3. Описание / Цена */
.card-text {
    order: 3;
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 24px 0;
}

/* 4. Блок действий */
.card-actions {
    order: 4;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    /* Прижимает кнопку к низу, если карточки разной высоты */
}

/* Кнопка "В корзину" */
.card-buy {
    flex: 1;
    padding: 12px 16px;
    background-color: transparent;
    border: 1px solid #222222;
    border-radius: 20px;
    color: #222222;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.card-buy:hover {
    background-color: #222222;
    color: #ffffff;
}


.long-btn-container {
    /* Оформление плашки перехода по вкладкам */
    display: flex;
    margin-left: auto;
    margin-right: auto;
    height: 50px;
    width: 100%;
    margin: 95px auto 2%;
    background-color: rgb(224, 224, 224);
    display: flex;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 0px;
    /* Дистанция от верхнего элемента */
    max-width: 1425px
}

.btn-long {
    height: 50px;
    width: 400px;
    border-radius: 20px;
    outline: none;
    background-color: rgb(224, 224, 224);
    font-size: large;
    border: 2px solid rgb(224, 224, 224);
    transition: 0.3s;
    font-weight: bold;
}

.btn-long:hover {
    height: 50px;
    width: 400px;
    border-radius: 20px;
    outline: none;
    background-color: #c5c5c5;
    font-size: large;
    transition: 0.3s;
    font-weight: bold;
}

.btn-long:active {
    height: 50px;
    width: 400px;
    border-radius: 20px;
    outline: none;
    background-color: #000000;
    font-size: large;
    transition: 0.3s;
    font-weight: bold;
    color: white;
    transition: 0s;
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.floating-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background-color: rgba(170, 170, 170, 0.605);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-btn:hover {
    background-color: #77777762;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.floating-btn:active {
    background-color: #555;
    transform: scale(0.95);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 42px;
    border-radius: 20px;
    transition: 0.3s;
    border: 1px solid black;
    background-color: white;
}

.social-btn img {
    width: 40px;
    height: 40px;
    display: block;
}

/* Компактный вариант */
.contacts-block {
    max-width: 1320px;
    width: 100%;
    margin-left: 5%;
    padding: 40px 100px;
    background-color: rgba(224, 224, 224, 0.5);
    border-radius: 20px;
    box-sizing: border-box;
}

.contacts-block h1 {
    font-size: 36px;
    color: #000000;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #777;
    font-size: 18px;
    margin-bottom: 40px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
}

.contact-row:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-row .icon {
    font-size: 24px;
    min-width: 40px;
}

.contact-row .label {
    display: block;
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-row a {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
}

.contact-row a:hover {
    color: #e74c3c;
}

.contact-row span {
    display: block;
    color: #555;
}

.contacts-map {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    max-width: 750px;
}

.contacts-map iframe {
    height: 400px;
}

@media (max-width: 768px) {
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .contacts-map iframe {
        height: 300px;
    }
}

/* ===== ПОДВАЛ ===== */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 50px 20px 20px;
    margin-top: 50px;
    font-family: 'Roboto', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

/* Заголовки колонок */
.footer-title {
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-subtitle {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-text {
    font-size: 14px;
    line-height: 1.8;
    color: #aaa;
    margin-bottom: 20px;
}

/* Социальные сети */
.footer-social {
    display: flex;
    gap: 12px;
}

/* Добавляем внутренний отступ для картинки MAX, чтобы уменьшить лого внутри плашки */
.footer-social a[href*="max"] img {
    padding: 6px !important;
    box-sizing: border-box !important;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    transition: 0.3s;
}

.footer-social-link:hover {
    background: #555;
    transform: translateY(-3px);
}

.footer-social-link img {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1);
}

/* Ссылки */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Контакты в подвале */
.footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #aaa;
}

.footer-contacts a {
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
}

.footer-contacts a:hover {
    color: #fff;
    transform: translateX(4px);
}

.footer-icon {
    font-size: 18px;
    min-width: 24px;
}

/* Нижняя линия */
.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #777;
}

.footer-bottom a {
    color: #777;
    text-decoration: none;
    transition: 0.3s;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contacts li {
        justify-content: center;
    }

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

    .footer {
        padding: 30px 15px 15px;
    }
}

@media (max-width: 480px) {
    .footer-title {
        font-size: 20px;
    }

    .footer-subtitle {
        font-size: 14px;
    }

    .footer-text {
        font-size: 13px;
    }

    .footer-links a,
    .footer-contacts li {
        font-size: 13px;
    }

    .footer-social-link {
        width: 36px;
        height: 36px;
    }

    .footer-social-link img {
        width: 18px;
        height: 18px;
    }
}





/** ДИЗАЙН КНОПОЧЕК И ЦИФР СНИЗУ **/

.css-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    /** Расстояние между стрелками и списком **/
    margin-top: 20px;
    /** Отступ СВЕРХУ **/
}

.js-pagination-list {
    display: flex;
    align-items: center;
    gap: 8px;
    /** Расстояние МЕЖДУ ЦИФРАМИ **/
    list-style: none;
    padding: 0;
    margin: 0;
}

.css-pagination button,
.pagination-item {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background-color: #ffffff;
    color: #24242b;
    font-size: 18px;
    font-weight: 500;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

/** Эффекты при наведении **/
.css-pagination button:hover,
.pagination-item:hover {
    background-color: #dcdce2;
}

/** АКТИВНАЯ ЦИФРА (выбранная страница становится тёмной) **/
.pagination-item.active {
    background-color: #24242b;
    color: #ffffff;
}

.css-pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}

.first-time-container {
    display: flex;
    justify-content: right;
    margin-right: 2%;
}

.first-time {
    width: 200px;
    height: 50px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0);
    color: #ffffff;
    font-size: large;
    cursor: pointer;
    background-color: rgb(85, 85, 85);
    transition: 0.5s;
}

.first-time:hover {
    width: 200px;
    height: 50px;
    border-radius: 25px;
    border: 2px solid rgb(85, 85, 85);
    color: rgb(85, 85, 85);
    font-size: large;
    cursor: pointer;
    background-color: rgb(255, 255, 255);
    transition: 0.3s;
}

.first-time:active {
    width: 200px;
    height: 50px;
    border-radius: 25px;
    border: 2px solid rgb(85, 85, 85);
    color: rgb(255, 255, 255);
    font-size: large;
    cursor: pointer;
    background-color: rgb(167, 167, 167);
    transition: 0.3s;
}

.search {
    width: 300px;
    height: 40px;
    border-radius: 20px;
    font-size: 18px;
    padding-left: 10px;
    border: 2px solid black;
    outline: none;
}

/* ===== ОБЕРТКА ДЛЯ КАРУСЕЛИ С КНОПКАМИ ===== */
.scroll-wrapper-outer {
    position: relative;
    width: 100%;
    max-width: 1235px;
}

.scroll-wrapper-outer h1 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    color: #333;
    text-align: left;
    padding-left: 10px;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР С ПРОКРУТКОЙ ===== */
.scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 25px 40px;
    cursor: grab;
    scroll-behavior: smooth;
    border-radius: 20px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
    mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Скрываем полосу прокрутки, но оставляем возможность скроллить */
.scroll-container::-webkit-scrollbar {
    height: 5px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #bdbcbc;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.scroll-wrapper {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.scroll-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    min-width: 300px;
    height: 400px;
    border-radius: 20px;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.scroll-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    min-width: 200px;
    height: 250px;
    border-radius: 20px;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.scroll-item:hover {
    transform: scale(1.03);
}

/* ===== КРУГЛЫЕ КНОПКИ НАВИГАЦИИ ===== */
.nav-btn {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffffb8;
    backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    user-select: none;
}

.nav-btn:hover {
    background: #f0f0f073;
    border-color: rgba(255, 255, 255, 0.251);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.prev-btn {
    left: -5px;
}

.next-btn {
    right: -105px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .scroll-wrapper-outer {
        padding: 0 10px;
    }

    .scroll-container {
        padding: 15px 30px;
        -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
        mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .prev-btn {
        left: -2px;
    }

    .next-btn {
        right: -2px;
    }

    .scroll-item {
        min-width: 220px;
        height: 350px;
    }

    .scroll-item img {
        min-width: 150px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .scroll-container {
        padding: 10px 20px;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .prev-btn {
        left: 0px;
    }

    .next-btn {
        right: 0px;
    }

    .scroll-item {
        min-width: 170px;
        height: 300px;
    }

    .scroll-item img {
        min-width: 120px;
        height: 160px;
    }

    .scroll-wrapper-outer h1 {
        font-size: 1.3rem;
    }
}

.p-container p {
    padding: 0 100px;
    font-size: 20px;
    font-weight: bold;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
    /* Увеличение на 5% */
}

/* ===== ПАГИНАЦИЯ (уже есть, но можно добавить стили) ===== */
.css-pagination {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-header h1 {
        font-size: 28px;
    }

    .articles-header p {
        font-size: 16px;
    }

    .article-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .articles-page {
        padding: 20px 15px;
    }

    .article-content h2 {
        font-size: 18px;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
}

h1 a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: transform 0.3s ease;
}

h1 a:hover {
    transform: scale(1.04);
    /* Увеличение на 4% */
}

/* ===== КАРТОЧКА АВТОРИЗАЦИИ ===== */

.auth-card {
    max-width: 440px !important;
    margin: 40px auto !important;
    padding: 40px 32px !important;
    border-radius: 20px !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid #e5e5e5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    text-align: center;
}


.auth-card input,
.auth-card button,
.auth-card .btn {
    border-radius: 20px !important;
}

.auth-card h1 {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 700;
    color: #1e1e1e;
}

.auth-card .subhead {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

/* ===== БЛОК АВАТАРА ===== */
.userpic-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.greeting {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* ===== ГРУППЫ ПОЛЕЙ ===== */
.field-group {
    margin-bottom: 30px;
    text-align: left;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
    margin-left: 4px;
}

.profile-name-input,
.profile-email-input,
.profile-password-input {
    width: 100% !important;
    height: 46px;
    padding: 0 16px;
    border-radius: 20px !important;
    border: 1px solid #dcdcdc;
    background-color: #fafafa;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.profile-name-input:focus,
.profile-email-input:focus,
.profile-password-input:focus {
    border-color: #1e1e1e;
    background-color: #ffffff;
}

/* ===== КНОПКИ ===== */
.actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    width: 100% !important;
    /* Кнопки становятся пропорциональны полям */
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    border-radius: 20px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-primary {
    background: #1e1e1e;
    border: 1px solid #1e1e1e;
    color: #ffffff;
}

.btn-primary:hover {
    background: #333333;
    border-color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    color: #1e1e1e;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}


/* ===== РАЗДЕЛИТЕЛЬ ===== */
.divider {
    font-size: 13px;
    color: #888;
    margin: 4px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d8d8d8;
}

/* ===== ССЫЛКА НА ВХОД ===== */
.switch-action {
    text-align: center;
    font-size: 14px;
    color: #3b3b3b;
    margin-top: 24px;
    line-height: 1.5;
}

.switch-action a {
    color: #1e1e1e;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed #b0b0b0;
    transition: border-color 0.2s ease;
}

.switch-action a:hover {
    border-bottom: 1px solid #1e1e1e;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 18px;
        border-radius: 24px;
    }

    .auth-card h1 {
        font-size: 24px;
    }

    .btn {
        padding: 12px;
        font-size: 15px;
    }

    .field-group input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ КЛАССЫ ДЛЯ СОСТОЯНИЙ ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 8px;
}

.mb-8 {
    margin-bottom: 8px;
}





/** МОДАЛЬНОЕ ОКНО **/

main .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.0);
    z-index: 95;
    display: none;
    transition: background-color .2s;

}

main .overlay.active {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

.popup {
    position: fixed;
    top: 0;
    right: -400px;
    /* right: 0; */
    width: 400px;
    min-height: 100vh;
    max-height: 100vh;
    background-color: var(--color-third);
    transition: right .2s ease-in-out;
    z-index: 95;
    overflow-y: auto;
}

.popup.active {
    right: 0;
}

.popup .popup-container {
    padding: 50px 0;
}

.popup .popup-empty-container,
.popup .popup-order-container {
    width: 350px;
}












/** ==========================================================================
   ОБЩАЯ СЕТКА СТРАНИЦЫ КОРЗИНЫ
   ========================================================================== */

.cart-page {
    padding: 30px 0 60px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    background-color: rgb(224, 224, 224, 0.5);
    width: 100%;
    max-width: 1320px;
    border-radius: 20px;
    margin-left: 5%;
    margin-left: auto !important;
    margin-right: auto !important;
}

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

.cart-page__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/** ==========================================================================
   ЛЕВАЯ ЧАСТЬ: ТОВАРЫ И УПРАВЛЕНИЕ
   ========================================================================== */

/* Шапка над списком (Выбрать все / Удалить выбранные) */
.cart-content__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.cart-content__delete-btn {
    background: none;
    border: none;
    color: #b22222;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.cart-content__delete-btn:hover {
    text-decoration: underline;
}

/* Список товаров */
.cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: white;
    border: 30px solid white;
    border-radius: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 90px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item__image-wrap {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item__article {
    font-size: 12px;
    color: #888888;
}

.cart-item__title {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.cart-item__remove-btn {
    background: none;
    border: none;
    color: #333333;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    text-align: left;
}

.cart-item__remove-btn:hover {
    color: #b22222;
}

/* Блок цен */
.cart-item__price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.cart-item__old-price {
    font-size: 12px;
    color: #888888;
    text-decoration: line-through;
}

.cart-item__current-price {
    font-size: 16px;
    font-weight: 700;
    background-color: #9ac3ff;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Счётчик (- 1 +) */
.cart-counter {
    display: flex;
    align-items: center;
    border: 1px solid #dcdce2;
    border-radius: 4px;
    overflow: hidden;
}

.cart-counter__btn {
    width: 30px;
    height: 32px;
    background: #ffffff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

.cart-counter__btn:hover {
    background: #f5f5f5;
}


.cart-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cart-checkbox__input {
    width: 18px;
    height: 18px;
    accent-color: #1a1a1a;
    /* Цвет галочки */
    cursor: pointer;
}

.cart-checkbox__text {
    font-size: 14px;
}

/** ==========================================================================
   ПРАВАЯ ЧАСТЬ: КАРТОЧКА ИТОГОВ
   ========================================================================== */

.cart-summary__card {
    background-color: white;
    /* Светло-серый фон плашки */
    border-radius: 12px;
    padding: 20px;
}

.cart-summary__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555555;
}

.cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.cart-summary__total-label {
    font-size: 18px;
    font-weight: 700;
}

.cart-summary__total-price {
    font-size: 22px;
    font-weight: 700;
}

/* Кнопка оформления */
.cart-summary__submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #24292e;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-summary__submit-btn:hover {
    background-color: #3f474f;
}

.cart-summary__note {
    font-size: 11px;
    color: #888888;
    line-height: 1.4;
    margin-top: 12px;
    margin-bottom: 0;
}

/** ==========================================================================
   АДАПТИВНОСТЬ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА (Пока закоментировать (платное))
   ========================================================================== */

/* @media (max-width: 868px) { 
 /   .cart-layout {
 /       grid-template-columns: 1fr; /

 /   .cart-item {
/       grid-template-columns: auto 70px 1fr;
/  }

/   .cart-item__price-block,
/   .cart-counter {
/        grid-column: span 3;
/    }
} */


/* Блок с числом внутри счетчика */
.cart-counter__value {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 100%;

    font-size: 14px;
    font-weight: 500;
    user-select: none;
}



.cart-counter__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   СТИЛЬ ДЛЯ ИЕРАРХИЧЕСКОЙ СТРУКТУРЫ КАТАЛОГА
   ============================================================ */

/* ---------- ОБЩИЙ КОНТЕЙНЕР ---------- */
.catalog-container {
    max-width: 1255px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem 2rem;
    background-color: rgba(224, 224, 224, 0.637);
    border-radius: 20px;
}

/* ---------- ГРУППА КАТЕГОРИЙ (ОСНОВНОЙ РАЗДЕЛ) ---------- */
.category-group {
    margin-bottom: 3rem;
}

.category-group:last-child {
    margin-bottom: 0;
}

/* Заголовок группы */
.group-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #000000;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.group-title .group-number {
    background: #000000;
    color: white;
    font-size: 1rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- ОБЁРТКА ДЛЯ ПОДГРУППЫ ---------- */
.subgroup-wrapper {
    margin-bottom: 2.5rem;
}

.subgroup-wrapper:last-child {
    margin-bottom: 0;
}

.subgroup-label {
    font-weight: 600;
    color: #000000;
    margin-left: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* ---------- СЕТКА ПОДКАТЕГОРИЙ ---------- */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ---------- ПОЛНАЯ ШИРИНА ДЛЯ ВЛОЖЕННЫХ ГРУПП ---------- */
.subgroup-full-width {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.sub-subgroup-label {
    font-weight: 500;
    color: #5f6b7a;
    margin-left: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    padding-top: 0.5rem;
}

/* ---------- ВЛОЖЕННАЯ СЕТКА (третий уровень) ---------- */
.sub-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem 2rem;
    margin-left: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    border-left: 2px dashed #b0b0b0;
}

/* ============================================================
   КАРТОЧКИ ПЛИТОК С ИЗОБРАЖЕНИЯМИ
   ============================================================ */

/* ---------- ОСНОВНОЙ СТИЛЬ КАРТОЧКИ ---------- */
.category-tile {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: 0.3s ease;
    border: 1px solid #edeae3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    cursor: pointer;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    min-height: 200px;
    aspect-ratio: 1 / 1;
}

/* Фоновая подложка для карточек без изображений */
.category-tile:not(:has(img)) {
    background: #e8e8e8;
}

.category-tile:not(:has(img)) .cat-name {
    color: #1e1e1e;
    text-shadow: none;
}

.category-tile:not(:has(img)) .cat-sub {
    color: #5f6b7a;
    text-shadow: none;
}

.category-tile:not(:has(img)) .tile-number {
    color: #95a5a6;
    text-shadow: none;
}

.category-tile:not(:has(img))::before {
    display: none;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* ---------- КОНТЕЙНЕР ИЗОБРАЖЕНИЯ (занимает всю плитку) ---------- */
.category-tile .cat-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    font-size: 0;
    line-height: 0;
    background: #f5f5f5;
}

.category-tile .cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    transition: transform 0.4s ease;
}

.category-tile:hover .cat-icon img {
    transform: scale(1.08);
}

/* ---------- ГРАДИЕНТ ДЛЯ ЧИТАЕМОСТИ ТЕКСТА ---------- */
.category-tile::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    border-radius: 20px;
    pointer-events: none;
    transition: height 0.3s ease;
}

.category-tile:hover::before {
    height: 75%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- ТЕКСТ ПОВЕРХ ИЗОБРАЖЕНИЯ ---------- */
.category-tile .cat-name {
    position: relative;
    z-index: 3;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.category-tile .cat-sub {
    position: relative;
    z-index: 3;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.2rem;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.category-tile .tile-number {
    position: relative;
    z-index: 3;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-top: 0.1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ---------- ТЕГИ (в наличии, под заказ, скидки) ---------- */
.category-tile .tag {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    background: rgba(255, 255, 255, 0.95);
    color: #1e1e1e;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.category-tile .tag.order {
    background: #f39c12;
    color: white;
}

.category-tile .tag.sale {
    background: #e74c3c;
    color: white;
    animation: pulse-sale 2s infinite;
}

@keyframes pulse-sale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ---------- РАЗНЫЕ УРОВНИ ---------- */
.category-tile.level-1,
.category-tile.level-2,
.category-tile.level-3 {
    background: #e8e8e8;
    /* Серая подложка для всех карточек */
}

/* Для карточек с изображениями переопределяем фон на прозрачный */
.category-tile.level-1:has(img),
.category-tile.level-2:has(img),
.category-tile.level-3:has(img) {
    background: transparent;
}

/* ---------- СПЕЦИАЛЬНЫЙ СТИЛЬ ДЛЯ РАСПРОДАЖИ ---------- */
.category-tile.sale-tile {
    border: 2px solid #e74c3c;
}

.category-tile.sale-tile:not(:has(img)) {
    background: #ffebee;
}

.category-tile.sale-tile::after {
    content: '🔥';
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    font-size: 1.5rem;
    animation: fire 1.5s ease-in-out infinite;
}

@keyframes fire {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(-10deg);
    }
}

/* ---------- КАРТОЧКИ С ЭМОДЗИ (для уровней без фото) ---------- */
.category-tile .cat-icon:not(:has(img)) {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
}

.category-tile .cat-icon:not(:has(img)) .cat-icon {
    position: relative;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

/* Планшеты */
@media (max-width: 992px) {
    .catalog-container {
        padding: 1rem 1.5rem;
    }

    .group-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        margin-left: 0.5rem;
        gap: 1.5rem;
    }

    .sub-subcategory-grid {
        margin-left: 0.5rem;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.2rem 1.5rem;
        padding-left: 0.8rem;
    }

    .subgroup-wrapper {
        margin-bottom: 2rem;
    }

    .category-tile {
        min-height: 170px;
    }
}

/* Телефоны */
@media (max-width: 576px) {
    .catalog-container {
        padding: 0.8rem 1rem;
        border-radius: 12px;
    }

    .group-title {
        font-size: 1.2rem;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        margin-left: 0;
        gap: 1rem;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        gap: 1rem 1.2rem;
        margin-top: 0.8rem;
    }

    .subgroup-label {
        margin-left: 0;
        margin-bottom: 0.6rem;
    }

    .sub-subgroup-label {
        margin-left: 0;
        margin-bottom: 0.6rem;
        font-size: 0.85rem;
    }

    .subgroup-wrapper {
        margin-bottom: 1.5rem;
    }

    .subgroup-full-width {
        margin-top: 0.8rem;
    }

    .category-tile {
        min-height: 140px;
        padding: 0.7rem;
        border-radius: 14px;
    }

    /* Серая подложка для телефонов */
    .category-tile.level-1,
    .category-tile.level-2,
    .category-tile.level-3 {
        background: #e8e8e8;
    }

    .category-tile.level-1:has(img),
    .category-tile.level-2:has(img),
    .category-tile.level-3:has(img) {
        background: transparent;
    }

    .category-tile .cat-name {
        font-size: 0.85rem;
    }

    .category-tile .tag {
        font-size: 0.55rem;
        padding: 0.15rem 0.5rem;
        top: 8px;
        right: 8px;
    }

    .category-tile.sale-tile::after {
        font-size: 1.2rem;
        top: 8px;
        left: 8px;
    }

    .category-tile .cat-icon:not(:has(img)) {
        font-size: 2.8rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 400px) {
    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .category-tile {
        min-height: 120px;
        padding: 0.5rem;
        border-radius: 12px;
    }

    .category-tile .cat-name {
        font-size: 0.75rem;
    }
}

/* ---------- МЕТКИ СТАТУСА ---------- */
.tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #27ae60;
    color: #ffffff;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    margin-top: 0.3rem;
}

.tag.order {
    background: #000000;
}

.tag.sale {
    background: #e74c3c;
}

/* Особая плитка "Распродажа" */
.sale-tile {
    background: #fff6f3;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 768px) {
    .catalog-container {
        padding: 1rem;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        margin-left: 0.5rem;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        margin-left: 0.5rem;
        border-left: none;
        padding-left: 0;
    }

    .group-title {
        font-size: 1.4rem;
    }

    .cat-icon {
        font-size: 2rem;
    }

    .category-tile {
        min-height: 120px;
        padding: 0.8rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.7rem;
        margin-left: 0.2rem;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
        margin-left: 0.2rem;
    }

    .category-tile {
        min-height: 100px;
        padding: 0.6rem 0.4rem;
    }

    .cat-name {
        font-size: 0.8rem;
    }

    .cat-icon {
        font-size: 1.6rem;
    }

    .group-title {
        font-size: 1.2rem;
    }

    .subgroup-label {
        font-size: 0.85rem;
    }

    .sub-subgroup-label {
        font-size: 0.8rem;
    }
}


.js-checkout-btn:disabled {
    background-color: #e0e0e0 !important;
    color: #858383 !important;
    cursor: not-allowed;
    pointer-events: none;
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.cart-empty-text {
    font-size: 16px;
    color: #1a1a1a;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    color: #1a1a1a;
    background-color: transparent;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ============================================================
   КАРТОЧКА ОРГАНИЗАЦИИ
   ============================================================ */

/* Контейнер карточки */
.org-card {
    background: rgba(224, 224, 224, 0.5);
    border-radius: 20px;
    padding: 35px 40px;
    margin-top: 50px;
    transition: box-shadow 0.3s ease;
}

/* Заголовок карточки */
.org-card h2 {
    color: #1a2332;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 28px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid #000000;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.org-card h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #eeeeee, transparent);
    margin-left: 15px;
}

/* Сетка для информации */
.org-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 40px;
}

/* Элемент строки */
.org-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
    align-items: flex-start;
    border-radius: 20px;
    transition: 0.3s;
}

/* Строка на всю ширину */
.org-item.full-width {
    grid-column: 1 / -1;
}

/* Метка (название поля) */
.org-label {
    font-weight: 600;
    color: #535454;
    min-width: 220px;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* Значение поля */
.org-value {
    color: #010102;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    flex: 1;
    padding-left: 5px;
}

/* Ссылки внутри значений */
.org-value a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.org-value a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* Выделение важной информации (ИНН, ОГРН, счета) */
.org-item:has(.org-label:contains("ОГРН")) .org-value,
.org-item:has(.org-label:contains("ИНН")) .org-value,
.org-item:has(.org-label:contains("Расчетный счет")) .org-value,
.org-item:has(.org-label:contains("Корреспондентский счет")) .org-value,
.org-item:has(.org-label:contains("Код БИК")) .org-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1a3a5c;
    letter-spacing: 0.5px;
    background: #fefefe;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

/* Планшеты */
@media (max-width: 992px) {
    .org-card {
        padding: 30px 25px;
        margin-top: 40px;
    }

    .org-card h2 {
        font-size: 22px;
    }

    .org-grid {
        gap: 4px 25px;
    }

    .org-label {
        min-width: 180px;
        font-size: 13px;
    }

    .org-value {
        font-size: 13px;
    }
}

/* Телефоны (горизонтальные) */
@media (max-width: 768px) {
    .org-card {
        padding: 25px 20px;
        border-radius: 12px;
        margin-top: 30px;
    }

    .org-card h2 {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .org-card h2::after {
        display: none;
    }

    .org-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .org-item {
        flex-direction: column;
        padding: 10px 0;
        border-bottom: 1px solid #f0f2f5;
    }

    .org-item:hover {
        margin: 0 -5px;
        padding: 10px 5px;
    }

    .org-label {
        min-width: auto;
        font-size: 12px;
        color: #6c7a8a;
        margin-bottom: 3px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .org-value {
        font-size: 14px;
        padding-left: 2px;
    }

    .org-item.full-width {
        grid-column: 1;
    }

    /* Убираем монопространственный шрифт на мобильных */
    .org-item:has(.org-label:contains("ОГРН")) .org-value,
    .org-item:has(.org-label:contains("ИНН")) .org-value,
    .org-item:has(.org-label:contains("Расчетный счет")) .org-value,
    .org-item:has(.org-label:contains("Корреспондентский счет")) .org-value,
    .org-item:has(.org-label:contains("Код БИК")) .org-value {
        font-family: inherit;
        background: #f4f7fc;
        padding: 3px 10px;
        display: inline-block;
        width: auto;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .org-card {
        padding: 18px 15px;
        border-radius: 10px;
        margin-top: 25px;
    }

    .org-card h2 {
        font-size: 18px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .org-item {
        padding: 8px 0;
    }

    .org-value {
        font-size: 13px;
    }

    .org-label {
        font-size: 11px;
    }

    .org-item:has(.org-label:contains("ОГРН")) .org-value,
    .org-item:has(.org-label:contains("ИНН")) .org-value,
    .org-item:has(.org-label:contains("Расчетный счет")) .org-value,
    .org-item:has(.org-label:contains("Корреспондентский счет")) .org-value,
    .org-item:has(.org-label:contains("Код БИК")) .org-value {
        font-size: 12px;
        padding: 2px 8px;
    }
}

/* ============================================================
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   ============================================================ */

/* Затемнение фона для важных секций */
.org-item:first-child {
    border-top: 2px solid #e8ecf1;
    padding-top: 16px;
}

/* Группировка секций (визуальный разделитель) */
.org-item:has(.org-label:contains("Юридический адрес")) {
    border-top: 2px solid #e8ecf1;
    margin-top: 6px;
    padding-top: 16px;
}

.org-item:has(.org-label:contains("Дата создания")) {
    border-top: 2px solid #e8ecf1;
    margin-top: 6px;
    padding-top: 16px;
}

/* Иконка перед заголовком */
.org-card h2::before {
    content: '🏢';
    font-size: 28px;
    margin-right: 8px;
}

/* Стиль для пустых значений (веб-сайт) */
.org-value:empty::before,
.org-value:has(span:empty) {
    content: '—';
    color: #adb5bd;
}

/* Анимация при загрузке */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.org-card {
    animation: fadeInUp 0.6s ease-out;
}


/* КОРЗИНА */
.cart-widget {
    position: relative;
    display: inline-flex;
}

/* Овальная кнопка корзины */
.cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    /* Ширина  */
    height: 45px;
    /* Высота */
    border: 1px solid #1a1a1a;
    border-radius: 21px;
    background-color: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Наведение на кнопку: инверсия цветов */
.cart-btn:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

/* Счетчик */
.cart-badge {
    position: absolute;
    top: -6px;
    /* Сдвиг наверх */
    right: -7px;
    /* Сдвиг вправо */
    width: 22px;
    height: 22px;
    background-color: #d9383a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 50%;

    /* Центрируем цифру */
    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #ffffff;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

#entrance {
    scroll-margin-top: 100px;
    /* отступ сверху при прокрутке к якорю */
}

#interior {
    scroll-margin-top: 100px;
    /* отступ сверху при прокрутке к якорю */
}

#sale {
    scroll-margin-top: 100px;
    /* отступ сверху при прокрутке к якорю */
}

#other {
    scroll-margin-top: 100px;
    /* отступ сверху при прокрутке к якорю */
}

#info {
    scroll-margin-top: 90px;
    /* отступ сверху при прокрутке к якорю */
}

/* Стили для фото-карусели */
.photo-carousel .scroll-wrapper {
    display: flex !important;
    gap: 20px
}

.photo-carousel .scroll-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    height: 400px !important;
    padding: 0 !important;
    background: #e0e0e0 !important;
    box-shadow: none !important;
    position: relative !important;
    transition: none !important;
    /* Отключаем анимацию */
    transform: none !important;
    /* Отключаем трансформацию */
}

.photo-carousel .scroll-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .photo-carousel .scroll-item {
        height: 250px !important;
    }

    .photo-carousel .slide-caption {
        font-size: 14px !important;
        padding: 8px 16px !important;
        bottom: 20px !important;
        white-space: normal !important;
    }
}

@media (max-width: 480px) {
    .photo-carousel .scroll-item {
        height: 180px !important;
    }
}

/* ===== СТИЛИ ДЛЯ БЛОКА ОПИСАНИЯ ===== */
.brand-description {
    max-width: 1320px;
    margin: auto;
    padding: 50px 60px;
    background-color: rgba(224, 224, 224, 0.637);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.brand-description .desc-header {
    text-align: center;
    margin-bottom: 35px;
}

.brand-description .desc-header h2 {
    font-size: 34px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.brand-description .desc-header .desc-sub {
    font-size: 18px;
    color: #555;
    font-weight: 300;
    margin: 0;
}

.brand-description .desc-intro {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
    text-align: center;
    max-width: 850px;
    margin: 0 auto 40px;
}

.brand-description .desc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.brand-description .desc-grid .desc-item {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    padding: 18px 16px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-weight: 500;
    font-size: 15px;
    color: #1a1a1a;
}

.brand-description .desc-grid .desc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

.brand-description .desc-grid .desc-item .desc-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
}

.brand-description .desc-grid .desc-item .desc-label {
    display: block;
}

.brand-description .desc-grid .desc-item .desc-label small {
    font-weight: 400;
    font-size: 13px;
    color: #666;
    display: block;
    margin-top: 3px;
}

.brand-description .desc-feature {
    background: #1a2a3a;
    color: #fff;
    border-radius: 16px;
    padding: 30px 35px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.brand-description .desc-feature .feature-text {
    flex: 1;
    min-width: 200px;
}

.brand-description .desc-feature .feature-text strong {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.brand-description .desc-feature .feature-text span {
    font-size: 15px;
    opacity: 0.8;
}

.brand-description .desc-feature .feature-badge {
    background: #c9a84c;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 28px;
    border-radius: 40px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .brand-description {
        padding: 30px 20px;
        margin: 40px 12px;
    }

    .brand-description .desc-header h2 {
        font-size: 26px;
    }

    .brand-description .desc-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .brand-description .desc-feature {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .brand-description .desc-feature .feature-badge {
        white-space: normal;
    }
}

/* ============================================================
   АДАПТИВНЫЕ СТИЛИ ТОЛЬКО ДЛЯ .header И ЕГО ДОЧЕРНИХ ЭЛЕМЕНТОВ
   ============================================================ */

/* ---------- Планшеты и маленькие ноутбуки (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .header {
        gap: 12px;
        /* уменьшаем расстояние между элементами */
        padding: 0 18px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .header p {
        font-size: 0.8rem;
    }
}

/* ---------- Телефоны и узкие экраны (≤ 768px) ---------- */
@media (max-width: 768px) {
    .header {
        height: 60px;
        /* уменьшаем высоту */
        padding: 0 12px;
        gap: 8px;
        top: 8px;
        width: calc(100% - 16px);
        /* чуть меньше отступы по бокам */
        border-radius: 16px;
    }

    /* Логотип */
    .logo-link h1 {
        font-size: 1rem;
        margin: 0;
        padding-left: 0;
    }

    /* Слоган – скрываем, чтобы сэкономить место */
    .header p {
        display: none;
    }

    /* ===== ТЕЛЕФОН → ИКОНКА ТРУБКИ ===== */
    .header a[href^="tel:"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 42px;
        font-size: 0;
        /* прячем текст номера */
        background: rgb(255, 255, 255);
        border-radius: 20px;
        border: 1px solid black;
        text-decoration: none;
        transition: background 0.3s;
        flex-shrink: 0;
    }

    .header a[href^="tel:"]::before {
        content: "📞";
        font-size: 20px;
        line-height: 1;
    }

    .header a[href^="tel:"]:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: none;
    }

    /* ===== ЛИЧНЫЙ КАБИНЕТ → КРУГЛАЯ КНОПКА «ЛК» ===== */
    .login-btn {
        width: 50px;
        height: 45px;
        padding: 0;
        border-radius: 20px;
        font-size: 0;
        /* скрываем оригинальный текст */
        background: #ffffff;
        border: 1px solid #222222;
        color: #222222;
        cursor: pointer;
        position: relative;
        transition: background 0.2s, color 0.2s;
        flex-shrink: 0;
        letter-spacing: normal;
        text-transform: none;
        font-weight: normal;
    }

    .login-btn::after {
        content: "ЛК";
        font-size: 13px;
        font-weight: 700;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-btn:hover {
        background: #222222;
        color: #ffffff;
    }

    .login-btn:hover::after {
        color: #ffffff;
        /* цвет текста при ховере */
    }

    /* ===== ПОИСК ===== */
    .search {
        width: 100%;
        order: 10;
        /* переносим на новую строку */
        margin-top: 4px;
        box-sizing: border-box;
        padding: 6px 10px;
        font-size: 0.85rem;
        border-radius: 12px;
        border: 1px solid #aaa;
        background: rgba(255, 255, 255, 0.7);
    }

    /* ===== КОРЗИНА ===== */
    .cart-widget {
        margin-left: auto;
        /* прижимаем к правому краю */
        display: flex;
        align-items: center;
    }

    .cart-icon {
        width: 20px;
        height: 20px;
    }

    .cart-badge {
        font-size: 0.8rem;
        margin-left: 2px;
        background: #ff4444;
        color: #fff;
        border-radius: 50%;
        padding: 0 6px;
        min-width: 18px;
        text-align: center;
    }
}

/* ---------- Очень маленькие телефоны (≤ 480px) ---------- */
@media (max-width: 480px) {
    .header {
        height: 50px;
        padding: 0 8px;
        gap: 5px;
        top: 5px;
        width: calc(100% - 10px);
        border-radius: 12px;
    }

    .logo-link h1 {
        font-size: 0.85rem;
    }

    .header a[href^="tel:"] {
        width: 30px;
        height: 30px;
    }

    .header a[href^="tel:"]::before {
        font-size: 16px;
    }

    .login-btn {
        width: 30px;
        height: 30px;
    }

    .login-btn::after {
        font-size: 11px;
    }

    .search {
        font-size: 0.75rem;
        padding: 4px 8px;
        margin-top: 2px;
        border-radius: 8px;
    }

    .cart-icon {
        width: 16px;
        height: 16px;
    }

    .cart-badge {
        font-size: 0.65rem;
        min-width: 14px;
        padding: 0 4px;
    }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ЗАКАЗА ===== */
.order-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: 'Roboto', sans-serif;
}

.order-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #222;
    border-left: 5px solid #e30613;
    padding-left: 15px;
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

/* Левая колонка — товары */
.order-cart {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.order-cart h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 18px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.cart-items-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 15px;
}

.cart-items-list li:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
    margin-right: 15px;
}

.item-price {
    font-weight: 500;
    color: #222;
    white-space: nowrap;
}

.item-total {
    font-weight: 700;
    color: #e30613;
    white-space: nowrap;
    margin-left: 15px;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid #ddd;
    margin-top: 5px;
}

.cart-summary .total-price {
    color: #e30613;
    font-size: 22px;
}

.empty-cart-msg {
    color: #888;
    text-align: center;
    padding: 30px 0;
    font-size: 16px;
}

/* Правая колонка — форма */
.order-form-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.order-form-wrapper h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #444;
    margin-bottom: 5px;
}

.form-group label .required {
    color: #e30613;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.form-checkbox input {
    width: auto;
    margin: 0;
    transform: scale(1.1);
}

.form-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: #555;
    margin: 0;
}

.form-checkbox label a {
    color: #e30613;
    text-decoration: none;
}

.form-checkbox label a:hover {
    text-decoration: underline;
}

.order-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-order {
    background: #e30613;
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.1s;
    flex: 1;
    min-width: 180px;
}

.btn-order:hover {
    background: #b8050f;
}

.btn-order:active {
    transform: scale(0.97);
}

.btn-order:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-back:hover {
    background: #e4e4e4;
}

/* уведомление об успехе */
.order-success {
    display: none;
    background: #e8f5e9;
    border-left: 5px solid #2e7d32;
    padding: 20px 25px;
    border-radius: 8px;
    margin-top: 20px;
    color: #1e5a24;
    font-weight: 500;
}

.order-success.show {
    display: block;
}

.order-background {
    background-color: rgb(224, 224, 224, 0.5);
    width: 100%;
    max-width: 1290px;
    border-radius: 20px;
    margin-left: 5%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 1%;
}


/* АРТИКУЛ */
.card1 {
    position: relative;
}


.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-article {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 10px;
    color: #8d8d8d;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.card-title {
    padding-right: 70px;
    margin-top: 10px;
}

.card-link:hover .card-title {
    color: #0056b3;
}

.card-title {
    text-align: center;
    padding: 0 15px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 18px;
}

.background {
    max-width: 1320px;
    margin: 0 auto 60px auto;
    background: rgba(224, 224, 224, 0.637);
    border-radius: 20px;
    padding: 40px 30px;
    box-sizing: border-box;
}

/* --- DETAILS (фотки слева) --- */
/*СБРОС БАЗОВЫХ СТИЛЕЙ ДЛЯ БЛОКА */
.v-product-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Roboto;
}

/* 1. БАЗОВАЯ СЕТКА */
.v-product-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.v-grid-top {
    display: grid;
    grid-template-columns: 55% 40%;
    gap: 5%;
    align-items: start;
    margin-bottom: 40px;
}

/* 3. ГАЛЕРЕЯ (ОСНОВНОЙ КОНТЕЙНЕР) */
.v-gallery {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

/* 4. БЛОК С МИНИАТЮРАМИ И СТРЕЛКАМИ */
.v-thumbs-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    flex-shrink: 0;
}

/* Сами миниатюры */
.v-thumbs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
    /* Чтобы лежали ПОД кнопками */
}

.v-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-thumb.v-active {
    border: 2px solid #008cff;
    /* Желтая рамка */
}

.v-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 5. КНОПКИ-СТРЕЛКИ */
.v-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    /* Кнопка ПОВЕРХ картинок */
    position: relative;
    transition: all 0.2s ease;
    outline: none;
}

/* Идеально симметричный нахлест на картинки (ровно наполовину кнопки) */
.v-arrow-up {
    margin-bottom: -13px;
}

.v-arrow-down {
    margin-top: -13px;
}

/* Эффект инверсии (черный круг, белая галочка) */
.v-arrow:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* 6. ГЛАВНОЕ ИЗОБРАЖЕНИЕ */
.v-main-photo {
    flex: 1;
    /* Берет все оставшееся место */
    min-width: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    border-radius: 20px;

}

.v-main-photo img {
    width: 100%;
    max-width: 400px;
    max-height: 450px;
    height: auto;
    object-fit: contain;
}

/* 7. ЗАГЛУШКИ ДЛЯ БУДУЩЕГО (Серые, пунктирные) */
.v-placeholder {
    background: #f8f8f8;
    border: 2px dashed #cccccc;
    border-radius: 8px;
    padding: 30px;
    color: #666;
}

.v-placeholder h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.v-grid-bottom {
    width: 100%;
}





/* --- САМА КАРТОЧКА (Эффект Liquid Glass) --- */
.v-product-info-card {
    background: rgba(255, 255, 255, 0.65);
    /* Полупрозрачный белый */
    backdrop-filter: blur(20px);
    /* Размытие заднего фона (эффект стекла) */
    -webkit-backdrop-filter: blur(20px);
    /* Поддержка Safari */
    border: 1px solid rgba(220, 220, 225, 0.4);
    /* Очень тонкая полупрозрачная граница */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    /* Мягкая, широкая "эпловская" тень */
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

/* --- АРТИКУЛ --- */
.v-product-article {
    font-size: 13px;
    color: #86868b;
    /* Серый цвет из палитры Apple */
    margin-bottom: 8px;
    font-weight: 400;
}

/* --- НАЗВАНИЕ --- */
.v-product-title {
    font-size: 26px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 28px;
    line-height: 1.2;
}

/* --- ВАРИАНТЫ ТОВАРОВ --- */
.v-variants-section {
    margin-bottom: 32px;
}

.v-variants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.v-variant-btn {
    padding: 10px 18px;
    border: 1px solid #d2d2d7;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 14px;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.v-variant-btn:hover {
    border-color: #86868b;
    background: rgba(255, 255, 255, 0.9);
}

/* Активная кнопка варианта (с черной обводкой для минимализма) */
.v-variant-btn.v-active {
    border: 2px solid #1d1d1f;
    padding: 9px 17px;
    /* Компенсация толщины border, чтобы кнопка не прыгала */
    background: #ffffff;
    font-weight: 600;
}

/* --- ЦЕНА --- */
.v-product-price {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    /* Приятный, не "вырвиглазный" красный */
    margin-bottom: 28px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.v-price-suffix {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
    /* Делаем /шт чуть бледнее, чтобы цена читалась первой */
}

/* --- КНОПКА "В КОРЗИНУ" --- */
.v-add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background-color: #1d1d1f;
    /* Темно-графитовый, почти черный */
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.v-add-to-cart-btn:hover {
    background-color: #000000;
}

.v-add-to-cart-btn:active {
    transform: scale(0.98);
    /* Эффект физического нажатия */
}

/* --- НИЖНИЙ БЛОК (Контейнер) --- */
.v-product-bottom-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
}

/* --- КНОПКИ ВКЛАДОК (APPLE TABS) --- */
.v-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.v-tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.877);
    border: 1px solid rgba(175, 175, 175, 0.5);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #86868b;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    outline: none;
}

.v-tab-btn:hover {
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(200, 200, 205, 0.8);
}

.v-tab-btn.v-active {
    background: #1d1d1f;
    color: #ffffff;
    border-color: #1d1d1f;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}


/* --- КАРТОЧКА С КОНТЕНТОМ --- */
.v-tabs-card {
    display: none;
    /* Изначально скрываем карточку! */
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 220, 225, 0.6);
    /* Чуть усилил общую рамку */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.219);
    border-radius: 24px;
    padding: 36px;
    margin-top: 10px;
}

/* --- РАМКА ДЛЯ ХАРАКТЕРИСТИК (Новое) --- */
.v-specs-frame {
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Тонкая серая рамка */
    border-radius: 16px;
    padding: 0 24px;
    background: #ffffff;
    /* Белый фон для контраста */
    max-width: 800px;
}

.v-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    /* Чуть увеличил отступы */
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 15px;
}

.v-spec-row:last-child {
    border-bottom: none;
    /* У последней строки убираем полоску */
}

.v-spec-name {
    color: #86868b;
    font-weight: 400;
}

.v-spec-value {
    color: #1d1d1f;
    font-weight: 500;
    text-align: right;
}

/* --- ПЕРЕКЛЮЧЕНИЕ И АНИМАЦИЯ --- */
.v-tab-content {
    display: none;
}

.v-tab-content.v-active {
    display: block;
    animation: vFadeIn 0.3s ease;
}

@keyframes vFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ТЕКСТОВЫЙ КОНТЕНТ --- */
.v-content-title {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.v-text-p {
    font-size: 16px;
    line-height: 1.6;
    color: #424245;
    margin-bottom: 16px;
    max-width: 800px;
}

.v-text-p:last-child {
    margin-bottom: 0;
}

/* --- ХАРАКТЕРИСТИКИ --- */
.v-specs-list {
    display: flex;
    flex-direction: column;
    max-width: 800px;
}

.v-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(228, 17, 17, 0.06);
    font-size: 15px;
}

.v-spec-row:last-child {
    border-bottom: none;
}

.v-spec-name {
    color: #86868b;
    font-weight: 400;
}

.v-spec-value {
    color: #1d1d1f;
    font-weight: 500;
    text-align: right;
}

/* --- КНОПКА В БЕСПЛАТНОМ ЗАМЕРЕ --- */
.v-cta-btn {
    margin-top: 20px;
    padding: 14px 28px;
    background: #1d1d1f;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.v-cta-btn:hover {
    background: #000000;
}

.v-cta-btn:active {
    transform: scale(0.98);
}

/* ===== ФИКС ВЫХОДА КАРУСЕЛИ ВПРАВО ===== */
.scroll-wrapper-outer {
    max-width: 1320px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 10px !important;
}

.scroll-container {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
}

.scroll-wrapper-outer .prev-btn {
    left: 10px !important;
}

.scroll-wrapper-outer .next-btn {
    right: 10px !important;
}

@media (max-width: 768px) {
    .photo-carousel .scroll-item {
        height: 250px !important;
    }

    .photo-carousel .slide-caption {
        font-size: 14px;
        padding: 8px 16px;
        bottom: 20px;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .photo-carousel .scroll-item {
        height: 180px !important;
    }
}

/* --- Прячем "дедовскую" скролл-полоску --- */
.scroll-container {
    -ms-overflow-style: none;
    /* для IE и Edge */
    scrollbar-width: none;
    /* для Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none;
    /* для Chrome, Safari и Opera */
}

/* --- Стили для новой кнопки "В корзину" --- */
.v-cart-btn {
    background-color: #fefefe9f;
    /* Изначально белый фон */
    color: #000000;
    /* Изначально черный текст */
    border: 2px solid #000000;
    /* Черная рамка */
    padding: 13px 15px;
    margin-top: 10px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    width: 80%;
    transition: all 0.3s ease;
    /* Плавная инверсия цветов */
}

.v-cart-btn:hover {
    background-color: #000000;
    /* Черный фон при наведении */
    color: #ffffff;
    /* Белый текст при наведении */
}


.scroll-wrapper {
    display: flex;
    gap: 20px;
    /* Отступ между карточками. Можешь поставить свой */
}

.scroll-item {
    /* Считаем ширину: 100% / 4 = 25%. 
       Если gap = 20px, то между 4 карточками 3 пробела (60px). 60 / 4 = 15px.
       Значит, отнимаем 15px от 25%, чтобы всё влезло идеально: */
    flex: 0 0 calc(25% - 15px);
    box-sizing: border-box;
    scroll-snap-align: start;
    /* Карточки будут примагничиваться ровно к началу контейнера */
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;

    scroll-snap-type: x mandatory;
    /* Включаем "магнитный" скролл */
    scroll-behavior: smooth;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Активная миниатюра */
.v-thumb {
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.v-thumb.v-active {
    border: 2px solid #007bff;
    /* Цвет синей рамки выделения */
    border-radius: 6px;
}

/* Главное фото */
.v-main-photo img {
    cursor: zoom-in;
    /* Курсор-лупа при наведении */
}

/* Полноэкранный Lightbox */
.v-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.v-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.v-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    user-select: none;
}



/* Общие группы параметров */
.v-options-group {
    margin-bottom: 18px;
}

.v-options-label {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-bottom: 8px;
    font-weight: 400;
}

/* Ряд кнопок выбора цвета */
.v-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Кнопки-таблетки (закругление 20px) */
.v-pill-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    color: #111111;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.v-pill-btn:hover {
    border-color: #111111;
}

.v-pill-btn.v-active {
    border: 2px solid #111111;
    font-weight: 600;
}

/* Закругленный выпадающий список (закругление 20px) */
.v-select-wrapper {
    position: relative;
    width: 100%;
}

.v-pill-select {
    width: 100%;
    padding: 11px 40px 11px 20px;
    border-radius: 20px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    color: #111111;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-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='%23111' 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: 14px;
    transition: border-color 0.2s;
}

.v-pill-select:focus,
.v-pill-select:hover {
    border-color: #111111;
}

/* Поля кастомных размеров */
.v-custom-size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.v-sub-label {
    display: block;
    font-size: 11px;
    color: #999999;
    margin-bottom: 4px;
    padding-left: 8px;
}

.v-pill-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    font-size: 13px;
    color: #111111;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.v-pill-input:focus {
    border-color: #111111;
}




/* Отступы для секции выбора */
.v-package-section {
    margin-bottom: 24px;
}

/* Контейнер для кнопок */
.v-radio-group {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* Обертка для каждой кнопки */
.v-radio-label {
    cursor: pointer;
    flex: 1;
    /* Кнопки занимают одинаковую ширину */
}

/* Прячем стандартный кружок радио-кнопки */
.v-radio-label input[type="radio"] {
    display: none;
}

/* Внешний вид самой кнопки */
.v-radio-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #bebebe;
    border-radius: 20px;
    /* Закругление в стиле твоих других инпутов */
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    transition: all 0.2s ease;
    /* Плавная анимация смены цвета */
}

/* Состояние, когда кнопка ВЫБРАНА (checked) */
.v-radio-label input[type="radio"]:checked+.v-radio-button {
    border-color: #222;
    /* Темная рамка */
    background-color: #222;
    /* Темный фон */
    color: #fff;
    /* Белый текст */
}

/* Ховер-эффект при наведении (только для невыбранных) */
.v-radio-label:hover .v-radio-button {
    border-color: #999;
}

.v-radio-label input[type="radio"]:checked+.v-radio-button:hover {
    border-color: #222;
    /* Чтобы наведение не сбивало цвет активной кнопки */
}



/* Главный контейнер одного товара (li) */
.cart-item {
    display: flex;
    align-items: center;
    /* Выравнивание по центру по вертикали */
    width: 100%;
    /* margin-bottom или border-bottom добавь по своему вкусу */
}

/* Чекбоксу строго запрещаем сжиматься */
.cart-item__checkbox {
    flex-shrink: 0;
    margin-right: 15px;
    /* Отступ от чекбокса до картинки */
}

/* Обертке картинки тоже строго запрещаем сжиматься */
.cart-item__image-wrap {
    flex-shrink: 0;
    /* width: 80px; - раскомментируй и впиши свои размеры, если нужно */
    /* height: 80px; */
}

/* Картинка внутри обертки */
.cart-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    /* Если нужно скругление */
}

/* Центральный блок с артикулом, названием и кнопкой удаления */
.cart-item__details {
    flex-grow: 1;
    /* Забирает всё свободное место */
    flex-shrink: 1;
    /* Разрешаем блоку сжиматься, если места мало */
    min-width: 0;
    /* МАГИЯ! Именно это свойство не дает длинному тексту распирать блок */
    padding: 0 20px;
    /* Отступы по бокам, чтобы текст не прилипал к картинке и цене */
}

/* Само длинное название */
.cart-item__title {
    white-space: normal;
    /* Разрешаем тексту переноситься на новые строки */
    word-wrap: break-word;
    /* Разрываем слишком длинные слова, если они не влезают */
    overflow-wrap: break-word;
    margin: 4px 0;
    /* Небольшие отступы сверху/снизу */
    line-height: 1.4;
    /* Чтобы строки читались комфортно */
}

/* Кнопка "Удалить" */
.cart-item__remove-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.cart-item__remove-btn:hover {
    color: #ff4d4f;
    /* Красный при наведении */
}

/* Блок с ценой */
.cart-item__price-block {
    width: 110px;
    /* Фиксированная ширина колонки с ценой */
    flex-shrink: 0;
    /* Строго запрещаем цене сжиматься */
    text-align: center;
    /* Судя по твоему скрину, цена по центру синего блока */
    margin-right: 20px;
    /* Отступ от цены до счетчика */
}

/* Блок счетчика (- 1 +) */
.cart-counter {
    flex-shrink: 0;
    /* Запрещаем счетчику сжиматься и деформироваться */
    display: flex;
    align-items: center;
}

.page-title {
    max-width: 1319px;
    /* Если всё равно криво, посмотри точную ширину серого блока в DevTools и впиши сюда */
    margin: 0 auto;
    /* Центрируем сам блок */
    margin-bottom: 25px;
    /* Отодвигаем заголовок от серого блока вниз (можешь сделать больше/меньше) */
    padding-left: 0;
    /* Убираем внутренний отступ, чтобы текст встал ровно по краю */
    padding-right: 0;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .page-title {
        padding-left: 20px;
        /* Возвращаем отступ только для телефонов/планшетов */
        padding-right: 20px;
    }
}

/* Основной контейнер контента (добавлен margin-top: 120px, чтобы опустить контент из-под хедера) */
.b2b-containerS {
    flex: 1;
    max-width: 1200px;
    margin: 40px auto 40px auto;
    /* 120px сверху отодвигает блок от header */
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
}

/* Элементы внутри основного контента */
.partner-barS {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid #e2e8f0;
}

.partner-infoS {
    display: flex;
    align-items: center;
    gap: 12px;
}

.b2b-badgeS {
    display: inline-block;
    background: #e6f0fa;
    color: #0056b3;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.auth-action-btnS {
    background-color: #2d3748;
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-action-btnS:hover {
    background-color: #1a202c;
    transform: translateY(-1px);
}

.page-titleS {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.brand-cardS {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-cardS:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.brand-headerS {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
    transition: background 0.2s ease;
}

.brand-headerS:hover {
    background: #f8fafc;
}

.brand-leftS {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logoS {
    width: 110px;
    height: 48px;
    background: #1e293b;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.brand-detailsS {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-nameS {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
}

.brand-countS {
    font-size: 13px;
    color: #64748b;
}

.brand-toggle-btnS {
    background: #2d3748;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.3s ease;
}

.brand-headerS:hover .brand-toggle-btnS {
    background: #1a202c;
}

.brand-cardS.open .arrow-iconS {
    transform: rotate(180deg);
}

.arrow-iconS {
    transition: transform 0.3s ease;
}

.brand-contentS {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    border-top: 1px solid transparent;
}

.brand-cardS.open .brand-contentS {
    border-top-color: #e2e8f0;
}

.brand-inner-paddingS {
    padding: 20px;
}

.wholesale-gridS {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.wholesale-cardS {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wholesale-cardS:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #a0aec0;
}

.card-top-barS {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.badge-statusS {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-statusS.in-stockS {
    background: #e6f4ea;
    color: #137333;
}

.badge-statusS.out-stockS {
    background: #fce8e6;
    color: #c5221f;
}

.card-articleS {
    font-size: 11px;
    color: #a0aec0;
    font-weight: 500;
}

.img-wrapperS {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.img-wrapperS img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-nameS {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px 0;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

.stock-badgeS {
    font-size: 11px;
    color: #718096;
    margin-bottom: 8px;
}

.stock-badgeS b {
    color: #27ae60;
}

.price-blockS {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}

.price-tagS {
    font-size: 17px;
    font-weight: 800;
    color: #1a202c;
}

.old-priceS {
    font-size: 11px;
    color: #a0aec0;
    text-decoration: line-through;
}

.card-actionsS {
    display: flex;
    gap: 6px;
}

.card-quantityS {
    width: 44px;
    padding: 6px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
}

.card-quantityS:focus {
    border-color: #2d3748;
}

.buy-b2b-btnS {
    flex: 1;
    background-color: #2d3748;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    transition: background 0.2s ease, transform 0.1s ease;
}

.buy-b2b-btnS:hover {
    background-color: #1a202c;
}

.buy-b2b-btnS:active {
    transform: scale(0.98);
}

/* Красный цвет для числа остатка, если 0 шт. */
.stock-badgeS b.out-stock-countS {
    color: #c5221f;
}

/* Краткое описание под названием товара */
.card-descriptionS {
    font-size: 14px;
    color: black;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Ограничение в 2 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .container,
    .wrapper,
    .section,
    .row,
    .col,
    .block,
    .box {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        float: none !important;
        display: block !important;
        clear: both !important;
    }

    img,
    video,
    iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* фикс для таблиц */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 768px) {
    .header {
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        height: 56px !important;
        padding: 0 12px !important;
    }

    body {
        padding-top: 70px !important;
        /* чтобы контент не уходил под шапку */
    }

    .floating-btn {
        bottom: 16px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
    }
}

@media (max-width: 768px) {

    .flex-row,
    .flex-wrap,
    .grid,
    .cards,
    .list {
        flex-wrap: wrap !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .grid>*,
    .flex-wrap>* {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {

    .title,
    .name,
    .description,
    .text {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
}

@media (max-width: 768px) {

    .popup,
    .modal,
    .overlay-content {
        width: 90% !important;
        max-height: 90vh !important;
        left: 5% !important;
        right: 5% !important;
        top: 5% !important;
        bottom: auto !important;
        transform: none !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    .popup.active,
    .modal.active {
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 768px) {
    .scroll-wrapper-outer {
        padding: 0 !important;
        overflow: visible !important;
    }

    .scroll-container {
        padding: 10px 0 !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    .nav-btn {
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    .prev-btn {
        left: 4px !important;
    }

    .next-btn {
        right: 4px !important;
    }
}

@media (max-width: 768px) {

    input,
    select,
    textarea,
    button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .search {
        width: 100% !important;
    }
}


/* =========================================
   1. КНОПКА ФИЛЬТРОВ И ШАПКА КАТАЛОГА
========================================= */
/* Раскидываем заголовок и кнопку по краям */
.catalog-header-wrapper {
    display: flex;
    justify-content: space-between;
    /* Заголовок строго влево, кнопка строго вправо */
    align-items: center;
    /* Идеальное выравнивание по одной линии по вертикали */
    /* Ширина должна 1 в 1 совпадать с серой подложкой */
    width: 100%;
    max-width: 1320px;
    /* Если у серого блока другая ширина, впиши ее сюда */

    margin: 0 auto 20px auto;
    padding: 0;
    /* ВАЖНО: убрали padding, чтобы края встали ровно по границе серого фона */
    box-sizing: border-box;
}

/* Убираем скрытые отступы у заголовка, чтобы он стоял на одном уровне с кнопкой */
.catalog-header-wrapper .page-title {
    margin: 0;
    line-height: 1;
}

/* Блокировка скролла страницы */
body.no-scroll {
    overflow: hidden;
}

.btn-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filters:hover {
    background-color: #e2e2e2;
}

/* =========================================
   2. СТАРАЯ МОДАЛКА (КОРЗИНА)
   (Оставил по центру, но починил z-index)
========================================= */
.js-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99998;
    /* Огромный z-index, чтобы перекрыть шапку */
}

.js-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 99999;
}

.js-overlay.active,
.js-popup.active {
    display: block;
}

/* =========================================
   3. НОВАЯ МОДАЛКА ФИЛЬТРОВ (ВЫЕЗЖАЕТ СПРАВА)
========================================= */
.js-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    /* Перекрывает всё */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Сама боковая панель */
.js-filter-popup {
    position: fixed;
    top: 0;
    right: -100%;
    /* Прячем панель за правым краем экрана */
    width: 100%;
    max-width: 400px;
    /* Ширина панели */
    height: 100vh;
    /* На всю высоту экрана */
    background-color: rgba(237, 237, 237, 0.722);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    /* Тень слева */
    padding: 20px;
    box-sizing: border-box;
    z-index: 99999;
    overflow-y: auto;
    /* Если фильтров много - появится скролл внутри панели */
    transition: right 0.3s ease-in-out;
    /* Плавный выезд */
}

/* Крестик закрытия */
.popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
}

.popup-close-btn::before,
.popup-close-btn::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 2px;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.popup-close-btn::before {
    transform: rotate(45deg);
}

.popup-close-btn::after {
    transform: rotate(-45deg);
}

/* ==== АКТИВНЫЙ КЛАСС (Появление фильтров) ==== */
.js-filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.js-filter-popup.active {
    right: 0;
    /* Прилипает к правому краю */
}

@media (max-width: 768px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .container,
    .wrapper,
    .section,
    .row,
    .col,
    .block,
    .box {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        float: none !important;
        display: block !important;
        clear: both !important;
    }

    img,
    video,
    iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* фикс для таблиц */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 768px) {
    .header {
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        height: 56px !important;
        padding: 0 12px !important;
    }

    body {
        padding-top: 70px !important;
        /* чтобы контент не уходил под шапку */
    }

    .floating-btn {
        bottom: 16px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
    }
}

@media (max-width: 768px) {

    .flex-row,
    .flex-wrap,
    .grid,
    .cards,
    .list {
        flex-wrap: wrap !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .grid>*,
    .flex-wrap>* {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {

    .title,
    .name,
    .description,
    .text {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
}

@media (max-width: 768px) {

    .popup,
    .modal,
    .overlay-content {
        width: 90% !important;
        max-height: 90vh !important;
        left: 5% !important;
        right: 5% !important;
        top: 5% !important;
        bottom: auto !important;
        transform: none !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    .popup.active,
    .modal.active {
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 768px) {
    .scroll-wrapper-outer {
        padding: 0 !important;
        overflow: visible !important;
    }

    .scroll-container {
        padding: 10px 0 !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    .nav-btn {
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    .prev-btn {
        left: 4px !important;
    }

    .next-btn {
        right: 4px !important;
    }
}

@media (max-width: 768px) {

    input,
    select,
    textarea,
    button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .search {
        width: 100% !important;
    }
}

/* ===== МОБИЛЬНАЯ ШАПКА (до 768px) — ТЕЛЕФОН В ДВЕ СТРОКИ ===== */
@media (max-width: 768px) {
    body {
        padding-top: 60px !important;
    }

    .header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 12px !important;
        min-height: 56px !important;
        height: auto !important;
        background-color: rgba(224, 224, 224, 0.52) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        border-radius: 20px !important;
        gap: 5px !important;
        /* чуть уменьшили промежутки */
    }

    /* Логотип — сжимается, если не хватает места */
    .logo-link {
        flex: 0 1 auto !important;
        margin-right: 4px !important;
        overflow: hidden !important;
    }

    .logo-link h1 {
        font-size: 1.1rem !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    /* Скрываем слоган */
    .header p {
        display: none !important;
    }

    /* ===== ТЕЛЕФОН: НОМЕР СВЕРХУ, ВРЕМЯ СНИЗУ ===== */
    .header h1:has(a[href^="tel:"]) {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        white-space: normal !important;
        flex-shrink: 1 !important;
        background: none !important;
        border: none !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        font-family: Arial, sans-serif !important;
        line-height: 1.2 !important;
    }

    .header h1:has(a[href^="tel:"]) a {
        font-size: inherit !important;
        color: #1a1a1a !important;
        text-decoration: none !important;
        letter-spacing: 0.5px !important;
        display: inline-block !important;
    }

    .header h1:has(a[href^="tel:"]) span {
        display: block !important;
        font-size: 11px !important;
        font-weight: 400 !important;
        color: #888 !important;
        letter-spacing: 0.3px !important;
        white-space: nowrap !important;
    }

    /* Убираем псевдоэлемент, если был */
    .header h1:has(a[href^="tel:"])::before {
        content: none !important;
    }

    

    /* ЛК — круглая иконка с текстом "ЛК" (УМЕНЬШЕНА) */
    .header .login-btn {
        width: 36px !important;
        /* было 40px */
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        background: #fff !important;
        border: 1px solid #222 !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }

    .header .login-btn::after {
        content: "ЛК" !important;
        font-size: 12px !important;
        /* было 13px */
        font-weight: 700 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #222 !important;
    }

    .header .login-btn:hover::after {
        color: #fff !important;
    }

    /* Корзина — УМЕНЬШЕНА */
    .cart-widget {
        flex-shrink: 0 !important;
    }

    .cart-btn {
        width: 36px !important;
        /* было 40px */
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: #fff !important;
        border: 1px solid #222 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .cart-icon {
        width: 16px !important;
        /* было 18px */
        height: 16px !important;
    }

    .cart-badge {
        font-size: 0.65rem !important;
        /* было 0.7rem */
        min-width: 16px !important;
        /* было 18px */
        height: 16px !important;
        top: -3px !important;
        /* скорректировано под меньший размер */
        right: -3px !important;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px) ===== */
@media (max-width: 480px) {
    body {
        padding-top: 52px !important;
    }

    .header {
        min-height: 48px !important;
        padding: 4px 8px !important;
        gap: 2px !important;
    }

    .logo-link h1 {
        font-size: 0.95rem !important;
    }

    .header h1:has(a[href^="tel:"]) {
        font-size: 14px !important;
        gap: 1px !important;
    }

    .header h1:has(a[href^="tel:"]) span {
        font-size: 10px !important;
    }

    /* Ещё меньше кнопки */
    .header .login-btn {
        width: 35px !important;
        /* было 34px */
        height: 35px !important;
    }

    .header .login-btn::after {
        font-size: 10px !important;
        /* было 11px */
    }

    .cart-btn {
        width: 35px !important;
        /* было 34px */
        height: 35px !important;
    }

    .cart-icon {
        width: 14px !important;
        height: 14px !important;
    }

    .cart-badge {
        font-size: 0.55rem !important;
        min-width: 14px !important;
        height: 14px !important;
        top: -2px !important;
        right: -2px !important;
    }
}

/* ---------- Телефоны (≤ 768px) ---------- */
@media (max-width: 768px) {

    /* --- Общие контейнеры, уже есть в начале, но продублируем для переопределения --- */
    .container,
    .wrapper,
    .section,
    .row,
    .col,
    .block,
    .box {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        float: none !important;
        display: block !important;
        clear: both !important;
    }

    img,
    video,
    iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .flex-row,
    .flex-wrap,
    .grid,
    .cards,
    .list {
        flex-wrap: wrap !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .grid>*,
    .flex-wrap>* {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .title,
    .name,
    .description,
    .text {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* --- Кнопка "Наверх" --- */
    .floating-btn {
        bottom: 16px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }

    /* --- Навигация (long-btn-container) --- */
    .long-btn-container {
        height: 44px !important;
        margin: 10px 6px 15px 6px !important;
        border-radius: 14px !important;
        background: rgba(224, 224, 224, 0.7) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        max-width: 100% !important;
        width: auto !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding: 0 4px !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .btn-long {
        height: 38px !important;
        width: auto !important;
        padding: 0 16px !important;
        font-size: 13px !important;
        border-radius: 14px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        background: transparent !important;
        border: none !important;
        font-weight: 600 !important;
        color: #333 !important;
    }

    .btn-long:hover,
    .btn-long:active {
        width: auto !important;
        background: rgba(0, 0, 0, 0.05) !important;
    }

    /* --- Заголовок страницы --- */
    .page-title {
        font-size: 24px !important;
        padding: 0 15px !important;
        margin: 10px 0 15px 0 !important;
    }

    /* --- Блок описания (brand-description) --- */
    .brand-description {
        padding: 20px 16px !important;
        margin: 0 6px 25px 6px !important;
        border-radius: 14px !important;
    }

    .brand-description .desc-header h2 {
        font-size: 22px !important;
    }

    .brand-description .desc-header .desc-sub {
        font-size: 16px !important;
    }

    .brand-description .desc-intro {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }

    .brand-description .desc-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .brand-description .desc-feature {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
    }

    .brand-description .desc-feature .feature-badge {
        white-space: normal !important;
    }

    /* --- Карусели (товары и фото) --- */
    .scroll-wrapper-outer {
        padding: 0 6px !important;
        margin-bottom: 30px !important;
    }

    .scroll-wrapper-outer h1 {
        font-size: 1.4rem !important;
        margin: 0 0 12px 6px !important;
        padding-left: 0 !important;
    }

    .scroll-container {
        padding: 10px 12px !important;
        -webkit-mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent) !important;
        mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent) !important;
        border-radius: 14px !important;
    }

    .photo-carousel .scroll-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        height: 220px !important;
        padding: 0 !important;
        background: #e0e0e0 !important;
        box-shadow: none !important;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    .photo-carousel .scroll-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 14px !important;
    }

    .photo-carousel .scroll-container {
        padding: 0 !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    .photo-carousel .slide-caption {
        font-size: 14px !important;
        padding: 8px 16px !important;
        bottom: 20px !important;
        white-space: normal !important;
    }

    .scroll-item {
        flex: 0 0 calc(50% - 10px) !important;
        min-width: 140px !important;
        height: 280px !important;
        padding: 12px !important;
        border-radius: 14px !important;
        background: #f5f5f5 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    .scroll-item img {
        width: 100% !important;
        height: 150px !important;
        object-fit: contain !important;
        border-radius: 10px !important;
        min-width: auto !important;
        box-shadow: none !important;
    }

    .scroll-item h3 {
        font-size: 14px !important;
        margin: 4px 0 !important;
        text-align: center !important;
    }

    .scroll-item p {
        font-size: 13px !important;
        text-align: center !important;
        margin: 0 !important;
        color: #555 !important;
    }

    .scroll-item .v-cart-btn,
    .scroll-item button {
        padding: 8px 16px !important;
        font-size: 12px !important;
        border-radius: 14px !important;
        width: 80% !important;
        margin-top: 4px !important;
        background: #1a1a1a !important;
        color: #fff !important;
        border: none !important;
        cursor: pointer !important;
    }

    .nav-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(4px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .prev-btn {
        left: 4px !important;
    }

    .next-btn {
        right: 4px !important;
    }

    /* --- Карточки товаров на главной (cards2) --- */
    .cards2 {
        grid-template-columns: 1fr !important;
        padding: 20px 15px !important;
        gap: 20px !important;
    }

    .card1 {
        padding: 20px 15px !important;
    }

    .card-image {
        height: 200px !important;
    }

    .card-title {
        font-size: 18px !important;
    }

    .card-text {
        font-size: 15px !important;
    }

    /* --- Страница каталога (иерархия) --- */
    .catalog-container {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    .group-title {
        font-size: 1.4rem !important;
        flex-wrap: wrap !important;
        margin-bottom: 1rem !important;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        margin-left: 0 !important;
        gap: 1rem !important;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        margin-left: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
        gap: 1rem 1.2rem !important;
        margin-top: 0.8rem !important;
    }

    .subgroup-label {
        margin-left: 0 !important;
        margin-bottom: 0.6rem !important;
    }

    .sub-subgroup-label {
        margin-left: 0 !important;
        margin-bottom: 0.6rem !important;
        font-size: 0.85rem !important;
    }

    .subgroup-wrapper {
        margin-bottom: 1.5rem !important;
    }

    .subgroup-full-width {
        margin-top: 0.8rem !important;
    }

    .category-tile {
        min-height: 140px !important;
        padding: 0.7rem !important;
        border-radius: 14px !important;
    }

    .category-tile.level-1,
    .category-tile.level-2,
    .category-tile.level-3 {
        background: #e8e8e8 !important;
    }

    .category-tile.level-1:has(img),
    .category-tile.level-2:has(img),
    .category-tile.level-3:has(img) {
        background: transparent !important;
    }

    .category-tile .cat-name {
        font-size: 0.85rem !important;
    }

    .category-tile .tag {
        font-size: 0.55rem !important;
        padding: 0.15rem 0.5rem !important;
        top: 8px !important;
        right: 8px !important;
    }

    .category-tile.sale-tile::after {
        font-size: 1.2rem !important;
        top: 8px !important;
        left: 8px !important;
    }

    .category-tile .cat-icon:not(:has(img)) {
        font-size: 2.8rem !important;
    }

    /* --- Детальная страница товара (v-product) --- */
    .v-product-wrapper {
        padding: 0 10px !important;
    }

    .v-grid-top {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .v-gallery {
        flex-direction: column-reverse !important;
        align-items: center !important;
    }

    .v-thumbs-wrap {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: center !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    .v-thumbs-list {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .v-thumb {
        width: 60px !important;
        height: 60px !important;
    }

    .v-arrow-up,
    .v-arrow-down {
        display: none !important;
        /* стрелки не нужны при горизонтальных миниатюрах */
    }

    .v-main-photo {
        min-height: 250px !important;
    }

    .v-main-photo img {
        max-height: 300px !important;
    }

    .v-product-info-card {
        padding: 20px !important;
    }

    .v-product-title {
        font-size: 22px !important;
    }

    .v-product-price {
        font-size: 26px !important;
    }

    .v-tabs-nav {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 6px !important;
        padding-bottom: 8px !important;
    }

    .v-tab-btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .v-tabs-card {
        padding: 20px !important;
    }

    .v-specs-frame {
        padding: 0 16px !important;
    }

    .v-spec-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 12px 0 !important;
    }

    .v-spec-value {
        text-align: left !important;
    }

    .v-options-group {
        margin-bottom: 14px !important;
    }

    .v-custom-size-grid {
        grid-template-columns: 1fr !important;
    }

    /* --- Корзина --- */
    .cart-page {
        padding: 20px 10px !important;
        border-radius: 12px !important;
    }

    .cart-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .cart-item {
        grid-template-columns: auto 70px 1fr !important;
        gap: 10px !important;
        padding: 12px 0 !important;
    }

    .cart-item__image-wrap {
        width: 60px !important;
        height: 60px !important;
    }

    .cart-item__details {
        padding: 0 10px !important;
    }

    .cart-item__title {
        font-size: 13px !important;
    }

    .cart-item__price-block {
        width: auto !important;
        margin-right: 10px !important;
        text-align: right !important;
    }

    .cart-item__current-price {
        font-size: 14px !important;
    }

    .cart-counter {
        flex-shrink: 0 !important;
    }

    .cart-counter__btn {
        width: 26px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    .cart-counter__value {
        width: 26px !important;
        font-size: 12px !important;
    }

    .cart-summary__card {
        padding: 16px !important;
    }

    .cart-summary__total-price {
        font-size: 20px !important;
    }

    .cart-summary__submit-btn {
        padding: 12px !important;
        font-size: 14px !important;
    }

    /* --- Страница заказа --- */
    .order-container {
        padding: 0 10px !important;
    }

    .order-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .order-cart,
    .order-form-wrapper {
        padding: 16px !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

    .order-actions {
        flex-direction: column !important;
    }

    .btn-order,
    .btn-back {
        width: 100% !important;
        min-width: auto !important;
    }

    /* --- Контакты --- */
    .contacts-block {
        padding: 20px 15px !important;
        margin: 0 6px !important;
        border-radius: 14px !important;
    }

    .contacts-block h1 {
        font-size: 28px !important;
    }

    .contacts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .contacts-map iframe {
        height: 250px !important;
    }

    /* --- Авторизация --- */
    .auth-card {
        max-width: 100% !important;
        margin: 20px 10px !important;
        padding: 24px 18px !important;
    }

    .auth-card h1 {
        font-size: 24px !important;
    }

    /* --- Организация (org-card) --- */
    .org-card {
        padding: 20px 15px !important;
        margin: 20px 10px !important;
        border-radius: 12px !important;
    }

    .org-card h2 {
        font-size: 20px !important;
    }

    .org-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .org-item {
        flex-direction: column !important;
        padding: 10px 0 !important;
    }

    .org-label {
        min-width: auto !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
    }

    .org-value {
        font-size: 14px !important;
        padding-left: 0 !important;
    }

    /* --- B2B-страница --- */
    .b2b-containerS {
        padding: 0 10px !important;
        margin: 20px auto !important;
    }

    .partner-barS {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .partner-infoS {
        justify-content: center !important;
    }

    .wholesale-gridS {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .wholesale-cardS {
        padding: 10px !important;
    }

    .img-wrapperS {
        height: 120px !important;
    }

    .card-nameS {
        font-size: 14px !important;
    }

    .price-tagS {
        font-size: 15px !important;
    }

    /* --- Pagination --- */
    .css-pagination {
        gap: 4px !important;
        flex-wrap: wrap !important;
    }

    .css-pagination button,
    .pagination-item {
        width: 36px !important;
        height: 36px !important;
        font-size: 15px !important;
    }

    /* --- Модалки/попапы --- */
    .popup,
    .modal,
    .overlay-content {
        width: 90% !important;
        max-height: 90vh !important;
        left: 5% !important;
        right: 5% !important;
        top: 5% !important;
        bottom: auto !important;
        transform: none !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    .popup.active,
    .modal.active {
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
}

/* ---------- Очень маленькие телефоны (≤ 480px) ---------- */
@media (max-width: 480px) {

    /* --- Общие --- */
    body {
        padding-top: 52px !important;
    }

    .floating-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        bottom: 12px !important;
        right: 12px !important;
    }

    /* --- Заголовки --- */
    .page-title {
        font-size: 20px !important;
        padding: 0 10px !important;
    }

    /* --- Навигация --- */
    .long-btn-container {
        height: 38px !important;
        margin: 6px 4px 10px 4px !important;
    }

    .btn-long {
        height: 32px !important;
        font-size: 12px !important;
        padding: 0 12px !important;
    }

    /* --- Бренд-описание --- */
    .brand-description {
        padding: 16px 12px !important;
        margin: 0 4px 20px 4px !important;
    }

    .brand-description .desc-header h2 {
        font-size: 18px !important;
    }

    .brand-description .desc-header .desc-sub {
        font-size: 14px !important;
    }

    .brand-description .desc-intro {
        font-size: 14px !important;
    }

    .brand-description .desc-grid {
        grid-template-columns: 1fr !important;
    }

    /* --- Карусели --- */
    .photo-carousel .scroll-item {
        height: 180px !important;
    }

    .scroll-item {
        flex: 0 0 100% !important;
        min-width: 120px !important;
        height: 240px !important;
    }

    .scroll-item img {
        height: 120px !important;
    }

    .scroll-item h3 {
        font-size: 13px !important;
    }

    .scroll-item p {
        font-size: 12px !important;
    }

    .nav-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    /* --- Карточки товаров --- */
    .cards2 {
        padding: 15px 10px !important;
        gap: 15px !important;
    }

    .card-image {
        height: 160px !important;
    }

    .card-title {
        font-size: 16px !important;
    }

    .card-text {
        font-size: 14px !important;
    }

    /* --- Каталог --- */
    .catalog-container {
        padding: 0.6rem !important;
    }

    .group-title {
        font-size: 1.2rem !important;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 0.7rem !important;
        margin-left: 0 !important;
    }

    .sub-subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 0.6rem !important;
        margin-left: 0 !important;
    }

    .category-tile {
        min-height: 120px !important;
        padding: 0.5rem !important;
        border-radius: 12px !important;
    }

    .category-tile .cat-name {
        font-size: 0.75rem !important;
    }

    .category-tile .cat-icon:not(:has(img)) {
        font-size: 2.2rem !important;
    }

    /* --- Детальная товара --- */
    .v-main-photo {
        min-height: 200px !important;
    }

    .v-main-photo img {
        max-height: 240px !important;
    }

    .v-thumb {
        width: 50px !important;
        height: 50px !important;
    }

    .v-product-title {
        font-size: 19px !important;
    }

    .v-product-price {
        font-size: 22px !important;
    }

    .v-add-to-cart-btn {
        padding: 14px !important;
        font-size: 15px !important;
    }

    .v-tab-btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    /* --- Корзина --- */
    .cart-item {
        grid-template-columns: auto 50px 1fr !important;
        gap: 8px !important;
    }

    .cart-item__image-wrap {
        width: 50px !important;
        height: 50px !important;
    }

    .cart-item__title {
        font-size: 12px !important;
    }

    .cart-item__price-block {
        margin-right: 6px !important;
    }

    .cart-item__current-price {
        font-size: 12px !important;
    }

    .cart-counter__btn {
        width: 22px !important;
        height: 24px !important;
        font-size: 10px !important;
    }

    .cart-counter__value {
        width: 22px !important;
        font-size: 10px !important;
    }

    .cart-summary__total-price {
        font-size: 18px !important;
    }

    /* --- Страница заказа --- */
    .order-title {
        font-size: 22px !important;
    }

    .btn-order {
        font-size: 16px !important;
        padding: 12px !important;
    }

    .btn-back {
        font-size: 14px !important;
        padding: 12px !important;
    }

    /* --- Контакты --- */
    .contacts-block h1 {
        font-size: 24px !important;
    }

    .subtitle {
        font-size: 15px !important;
    }

    .contact-row {
        padding: 12px !important;
    }

    /* --- Авторизация --- */
    .auth-card {
        padding: 20px 14px !important;
    }

    .auth-card h1 {
        font-size: 20px !important;
    }

    /* --- Организация --- */
    .org-card h2 {
        font-size: 18px !important;
    }

    .org-item {
        padding: 8px 0 !important;
    }

    .org-value {
        font-size: 13px !important;
    }

    .org-label {
        font-size: 11px !important;
    }

    /* --- B2B --- */
    .wholesale-gridS {
        grid-template-columns: 1fr !important;
    }

    .img-wrapperS {
        height: 100px !important;
    }

    /* --- Pagination --- */
    .css-pagination button,
    .pagination-item {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }

    /* --- Подвал (уже есть, но продублируем для уверенности) --- */
    .footer {
        padding: 20px 10px 10px !important;
    }

    .footer-title {
        font-size: 18px !important;
    }

    .footer-text {
        font-size: 13px !important;
    }

    .footer-links a,
    .footer-contacts li {
        font-size: 13px !important;
    }

    .footer-social-link {
        width: 36px !important;
        height: 36px !important;
    }

    .footer-social-link img {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ===== ИДЕАЛЬНОЕ ВЫРАВНИВАНИЕ ШАПКИ ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    /* Равномерный отступ между всеми элементами */
    padding: 15px 30px;
    box-sizing: border-box;
}

/* Поиск гибко забирает свободное пространство по центру */
.header .search {
    flex: 1;
    max-width: 380px;
    /* Сбалансированная ширина поиска */
    height: 42px;
    padding: 0 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

/* Предотвращаем сжатие элементов справа */
.header .login-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.header .cart-widget {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ===== ФИКС НАВИГАЦИИ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .long-btn-container {
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
    }

    .btn-long {
        min-height: 44px !important;
        /* Минимальный размер для удобного тапа */
        min-width: 80px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        user-select: none !important;
    }

    /* Убираем возможные наложения */
    .btn-long:active {
        background: rgba(0, 0, 0, 0.1) !important;
        transform: scale(0.96);
    }
}

/* ===== КОРРЕКТНАЯ ПРОКРУТКА К ЯКОРЯМ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {

    #entrance,
    #interior,
    #sale,
    #other {
        scroll-margin-top: 70px !important;
        /* Высота шапки + небольшой запас */
    }
}

@media (max-width: 480px) {

    #entrance,
    #interior,
    #sale,
    #other {
        scroll-margin-top: 60px !important;
    }
}

/* ===== АДАПТИВ ДЛЯ ПЛИТОК КАТАЛОГА НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .category-tile {
        min-height: 120px !important;
        padding: 0.6rem !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }

    .category-tile .cat-name {
        font-size: 0.85rem !important;
    }

    .category-tile .cat-sub {
        font-size: 0.7rem !important;
    }
}

/* ============================================================
   ФИНАЛЬНАЯ МОБИЛЬНАЯ ШАПКА (без конфликтов)
   ============================================================ */

/* ---------- Телефоны (до 768px) ---------- */
@media (max-width: 768px) {
    body {
        padding-top: 70px !important;
    }

    .header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 12px !important;
        min-height: 56px !important;
        height: auto !important;
        background-color: rgba(224, 224, 224, 0.52) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        border-radius: 0 !important;
        /* убираем скругление на телефонах */
        gap: 0px !important;
    }

    /* Логотип */
    .logo-link {
        flex: 0 1 auto !important;
        margin-right: 4px !important;
        overflow: hidden !important;
    }

    .logo-link h1 {
        font-size: 1.1rem !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    /* Скрываем слоган */
    .header p {
        display: none !important;
    }

    /* ===== ТЕЛЕФОН — ТОЛЬКО ТЕКСТОМ (номер + время в одну строку) ===== */
    .header h1:has(a[href^="tel:"]) {
        display: flex !important;
        align-items: baseline !important;
        gap: 6px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        flex-shrink: 1 !important;
        background: none !important;
        border: none !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        font-family: Arial, sans-serif !important;
        line-height: 1.2 !important;
    }

    .header h1:has(a[href^="tel:"]) a {
        font-size: inherit !important;
        color: #1a1a1a !important;
        text-decoration: none !important;
        letter-spacing: 0.5px !important;
        display: inline-block !important;
    }

    .header h1:has(a[href^="tel:"]) span {
        display: inline !important;
        font-size: 11px !important;
        font-weight: 400 !important;
        color: #888 !important;
        letter-spacing: 0.3px !important;
        white-space: nowrap !important;
    }

    /* Убираем все псевдоэлементы, которые могли появиться от других стилей */
    .header h1:has(a[href^="tel:"])::before,
    .header a[href^="tel:"]::before {
        content: none !important;
    }

    /* Телефонная иконка (круг) — отключаем полностью */
    .header a[href^="tel:"] {
        width: auto !important;
        height: auto !important;
        font-size: inherit !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        display: inline !important;
    }

    

    /* ЛК — круглая иконка с текстом "ЛК" */
    .header .login-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        background: #fff !important;
        border: 1px solid #222 !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }

    .header .login-btn::after {
        content: "ЛК" !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #222 !important;
    }

    .header .login-btn:hover::after {
        color: #fff !important;
    }

    /* Корзина */
    .cart-widget {
        flex-shrink: 0 !important;
    }

    .cart-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: #fff !important;
        border: 1px solid #222 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .cart-icon {
        width: 16px !important;
        height: 16px !important;
    }

    .cart-badge {
        font-size: 0.65rem !important;
        min-width: 16px !important;
        height: 16px !important;
        top: -3px !important;
        right: -3px !important;
    }
}

/* ---------- Очень маленькие телефоны (до 480px) ---------- */
@media (max-width: 480px) {
    body {
        padding-top: 60px !important;
    }

    .header {
        min-height: 48px !important;
        padding: 4px 8px !important;
        gap: 2px !important;
    }

    .logo-link h1 {
        font-size: 0.95rem !important;
    }

    .header h1:has(a[href^="tel:"]) {
        font-size: 14px !important;
        gap: 4px !important;
    }

    .header h1:has(a[href^="tel:"]) span {
        font-size: 10px !important;
    }

    .header .login-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .header .login-btn::after {
        font-size: 10px !important;
    }

    .cart-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .cart-icon {
        width: 14px !important;
        height: 14px !important;
    }

    .cart-badge {
        font-size: 0.55rem !important;
        min-width: 14px !important;
        height: 14px !important;
        top: -2px !important;
        right: -2px !important;
    }
}

/* ===== КНОПКА "СРАВНЕНИЕ" (стиль как у "Наверх") ===== */
.compare-btn {
    bottom: 100px;
    /* чуть выше кнопки "Наверх" (у неё bottom: 30px) */
    background-color: rgba(170, 170, 170, 0.605);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 0;
    /* скрываем текст, если будет */
    right: 100px;
    /* отступ справа, чтобы разместиться левее кнопки "Наверх" */
    bottom: 30px;
    /* точно на одной высоте с кнопкой "Наверх" */
    width: 125px;
    height: 55px;
    border-radius: 25px;
}

.compare-btn:hover {
    background-color: #77777762;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.compare-btn:active {
    background-color: #555;
    transform: scale(0.95);
}

/* Бейджик с количеством */
.compare-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    pointer-events: none;
    line-height: 1;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .compare-btn {
        bottom: 90px;
        width: 48px;
        height: 48px;
    }

    .compare-btn span {
        font-size: 22px;
    }

    .compare-badge {
        font-size: 11px;
        min-width: 20px;
        height: 20px;
        top: -5px;
        right: -5px;
    }
}

@media (max-width: 480px) {
    .compare-btn {
        bottom: 80px;
        width: 44px;
        height: 44px;
    }

    .compare-btn span {
        font-size: 18px;
    }

    .compare-badge {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        top: -4px;
        right: -4px;
    }
}

/* ===== КНОПКА СРАВНЕНИЯ ===== */
.btn-compare {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.btn-compare.active {
    background: #2d3748;
    color: #fff;
    border-color: #2d3748;
}

.btn-compare:hover {
    background: #f0f0f0;
}

.btn-compare.active:hover {
    background: #1a202c;
}

/* ===== ДОПОЛНИТЕЛЬНЫЙ АДАПТИВ ДЛЯ СТРАНИЦЫ СРАВНЕНИЯ ===== */

/* Планшеты и маленькие ноутбуки (до 1024px) */
@media (max-width: 1024px) {
    .compare-wrapper {
        padding: 0 15px 30px;
    }

    .compare-table {
        font-size: 13px;
        min-width: 500px;
    }

    .compare-table th,
    .compare-table td {
        padding: 10px 12px;
    }

    .compare-table .product-cell {
        min-width: 140px;
        max-width: 180px;
    }

    .compare-table .product-cell img {
        max-width: 100px;
    }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
    .compare-wrapper {
        padding: 0 8px 20px;
    }

    .compare-table {
        font-size: 12px;
        min-width: 400px;
    }

    .compare-table th,
    .compare-table td {
        padding: 6px 8px;
    }

    .compare-table .product-cell {
        min-width: 120px;
        max-width: 150px;
    }

    .compare-table .product-cell img {
        max-width: 70px;
    }

    .compare-table .product-name {
        font-size: 12px;
    }

    .compare-table .remove-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .compare-empty {
        font-size: 16px;
        padding: 40px 15px;
    }

    /* Кнопка "Сравнить" на карточках товаров */
    .btn-compare {
        font-size: 11px;
        padding: 6px 12px;
        margin-top: 6px;
    }

    .btn-compare .compare-icon {
        font-size: 12px;
    }
}

/* Очень маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .compare-wrapper {
        padding: 0 4px 16px;
    }

    .compare-table {
        font-size: 11px;
        min-width: 320px;
    }

    .compare-table th,
    .compare-table td {
        padding: 4px 6px;
    }

    .compare-table .product-cell {
        min-width: 100px;
        max-width: 130px;
    }

    .compare-table .product-cell img {
        max-width: 60px;
    }

    .compare-table .product-name {
        font-size: 11px;
    }

    .compare-table .remove-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .compare-empty {
        font-size: 14px;
        padding: 30px 10px;
    }

    .compare-empty a {
        font-size: 14px;
    }

    .btn-compare {
        font-size: 10px;
        padding: 4px 10px;
        border-radius: 16px;
    }

    .btn-compare .compare-icon {
        font-size: 11px;
    }
}

/* ===== УЛУЧШЕННЫЙ АДАПТИВ ДЛЯ СТРАНИЦЫ СРАВНЕНИЯ ===== */

/* Планшеты и маленькие ноутбуки (до 1024px) */
@media (max-width: 1024px) {
    .compare-table {
        font-size: 13px;
        min-width: 500px;
    }

    .compare-table th,
    .compare-table td {
        padding: 10px 12px;
    }

    .compare-table .product-cell img {
        max-width: 100px;
    }

    .compare-table .product-name {
        font-size: 14px;
    }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
    .compare-wrapper {
        padding: 0 8px 20px;
    }

    .compare-table {
        font-size: 12px;
        min-width: 400px;
    }

    .compare-table th,
    .compare-table td {
        padding: 6px 8px;
        border-width: 1px;
    }

    .compare-table .feature-name {
        font-size: 11px;
        white-space: normal;
        word-break: break-word;
    }

    .compare-table .product-cell {
        min-width: 120px;
        max-width: 160px;
    }

    .compare-table .product-cell img {
        max-width: 70px;
        margin-bottom: 4px;
    }

    .compare-table .product-name {
        font-size: 12px;
    }

    .compare-table .remove-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .compare-empty {
        font-size: 16px;
        padding: 40px 15px;
    }
}

/* Очень маленькие телефоны (до 480px) — переключаемся на карточки */
@media (max-width: 480px) {
    .compare-wrapper {
        padding: 0 6px 15px;
    }

    /* Скрываем таблицу, показываем карточки */
    .compare-table {
        display: none !important;
    }

    /* Контейнер для карточек (генерируется JS) */
    .compare-cards {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 4px;
    }

    .compare-card {
        background: #fff;
        border-radius: 12px;
        padding: 12px 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .compare-card .card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: space-between;
    }

    .compare-card .card-header img {
        width: 60px;
        height: auto;
        object-fit: contain;
    }

    .compare-card .card-header .card-title {
        font-weight: 600;
        font-size: 14px;
        flex: 1;
    }

    .compare-card .card-header .remove-btn {
        background: #e74c3c;
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        font-size: 16px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .compare-card .card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        font-size: 13px;
    }

    .compare-card .card-body .spec-label {
        color: #888;
        font-weight: 500;
    }

    .compare-card .card-body .spec-value {
        text-align: right;
        font-weight: 500;
    }
}

/* Стили для карточек (по умолчанию скрыты) */
.compare-cards {
    display: none;
}

/* =========================================
   СОДЕРЖИМОЕ ПАНЕЛИ ФИЛЬТРОВ
========================================= */

.filter-main-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
}

/* --- Фильтр цены --- */
.filter-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-price-inputs input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-price-inputs input:focus {
    border-color: #333;
}

.price-separator {
    color: #888;
    font-weight: bold;
}

/* Убираем стрелочки в инпутах типа number */
.filter-price-inputs input::-webkit-outer-spin-button,
.filter-price-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Кнопки внизу --- */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 40px;
}

.filter-actions button {
    flex: 1;
    /* Кнопки займут равное пространство */
    padding: 12px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s;
}

.btn-filter-reset {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
}

.btn-filter-reset:hover {
    background-color: #e8e8e8;
}

.btn-filter-apply {
    background-color: #333;
    border: 1px solid #333;
    color: #fff;
}

.btn-filter-apply:hover {
    background-color: #000;
}

/* =========================================
   ГРУППЫ ФИЛЬТРОВ И ЗАГОЛОВКИ
========================================= */
.filter-group {
    margin-bottom: 25px;
    /* Отступ между блоками (Бренд, Цвет и т.д.) */
}

.filter-group-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

/* =========================================
   КАСТОМНЫЕ ЧЕКБОКСЫ
========================================= */
.custom-checkbox {
    display: flex;
    /* Делает элементы блочными, чтобы они шли в столбик */
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    /* Чтобы текст не выделялся синим при быстром клике */
}

/* 1. Прячем дефолтный браузерный чекбокс */
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. Рисуем свой аккуратный квадратик */
.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    /* Легкое скругление, будет круто смотреться с твоими инпутами */
    margin-right: 12px;
    transition: all 0.2s ease;
}

/* 3. Эффект при наведении мышкой */
.custom-checkbox:hover input~.checkmark {
    border-color: #999;
}

/* 4. Закрашиваем, когда чекбокс нажат */
.custom-checkbox input:checked~.checkmark {
    background-color: #333;
    border-color: #333;
}

/* 5. Рисуем белую галочку внутри (изначально скрыта) */

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    /* Двинули чуть правее */
    top: 3px;
    /* Двинули чуть ниже */
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 6. Показываем галочку при клике */
.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.checkbox-label {
    font-size: 15px;
    color: #444;
}

/* Планшеты и маленькие ноутбуки (до 1024px) */
@media (max-width: 1024px) {
  .b2b-containerS {
    padding: 0 15px !important;
    margin: 30px auto !important;
  }
  .partner-barS {
    padding: 12px 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .brand-cardS .brand-headerS {
    padding: 14px 16px !important;
  }
  .brand-logoS {
    width: 80px !important;
    height: 40px !important;
    font-size: 13px !important;
  }
  .brand-nameS {
    font-size: 16px !important;
  }
  .brand-countS {
    font-size: 12px !important;
  }
  .wholesale-gridS {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 14px !important;
  }
  .wholesale-cardS {
    padding: 10px !important;
  }
  .img-wrapperS {
    height: 120px !important;
  }
  .card-nameS {
    font-size: 14px !important;
    height: 30px !important;
  }
  .price-tagS {
    font-size: 15px !important;
  }
  .buy-b2b-btnS {
    font-size: 11px !important;
    padding: 6px 0 !important;
  }
  .card-quantityS {
    width: 36px !important;
    font-size: 12px !important;
  }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
  .b2b-containerS {
    padding: 0 10px !important;
    margin: 20px auto !important;
  }

  /* Верхняя панель — перестраиваем вертикально */
  .partner-barS {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 10px !important;
    border-radius: 12px !important;
  }
  .partner-infoS {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .partner-infoS h2 {
    font-size: 14px !important;
    text-align: center !important;
  }
  .partner-infoS #userEmailS {
    font-size: 12px !important;
    text-align: center !important;
  }
  .b2b-badgeS {
    font-size: 10px !important;
    padding: 3px 10px !important;
  }
  .auth-action-btnS {
    width: 100% !important;
    padding: 12px !important;
    font-size: 14px !important;
    text-align: center !important;
  }

  /* Заголовок страницы */
  .page-titleS {
    font-size: 18px !important;
    margin-bottom: 16px !important;
    text-align: center !important;
  }

  /* Карточки брендов */
  .brand-cardS {
    border-radius: 12px !important;
    margin-bottom: 16px !important;
  }
  .brand-headerS {
    padding: 12px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .brand-leftS {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 10px !important;
  }
  .brand-logoS {
    width: 60px !important;
    height: 36px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }
  .brand-detailsS {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .brand-nameS {
    font-size: 15px !important;
    margin-bottom: 2px !important;
  }
  .brand-countS {
    font-size: 11px !important;
  }
  .brand-toggle-btnS {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }
  .brand-toggle-btnS svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Содержимое бренда */
  .brand-inner-paddingS {
    padding: 14px !important;
  }

  /* Сетка товаров — 2 колонки на планшетах и телефонах */
  .wholesale-gridS {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Карточка товара */
  .wholesale-cardS {
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .img-wrapperS {
    height: 100px !important;
    border-radius: 6px !important;
  }
  .card-top-barS {
    margin-bottom: 6px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .badge-statusS {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
  .card-articleS {
    font-size: 10px !important;
  }
  .card-nameS {
    font-size: 13px !important;
    height: 28px !important;
    margin-bottom: 4px !important;
  }
  .stock-badgeS {
    font-size: 10px !important;
    margin-bottom: 6px !important;
  }
  .price-blockS {
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }
  .price-tagS {
    font-size: 14px !important;
  }
  .old-priceS {
    font-size: 10px !important;
  }
  .card-actionsS {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .card-quantityS {
    width: 40px !important;
    height: 34px !important;
    font-size: 13px !important;
    padding: 4px !important;
    border-radius: 6px !important;
  }
  .buy-b2b-btnS {
    flex: 1 !important;
    padding: 8px 0 !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    min-height: 34px !important;
  }
}

/* Очень маленькие телефоны (до 480px) */
@media (max-width: 480px) {
  .b2b-containerS {
    padding: 0 6px !important;
    margin: 14px auto !important;
  }

  .partner-barS {
    padding: 12px 12px !important;
  }
  .partner-infoS h2 {
    font-size: 13px !important;
  }
  .partner-infoS #userEmailS {
    font-size: 11px !important;
  }
  .auth-action-btnS {
    font-size: 13px !important;
    padding: 10px !important;
  }

  .page-titleS {
    font-size: 16px !important;
    margin-bottom: 12px !important;
  }

  .brand-headerS {
    padding: 10px 12px !important;
  }
  .brand-logoS {
    width: 50px !important;
    height: 30px !important;
    font-size: 10px !important;
  }
  .brand-nameS {
    font-size: 14px !important;
  }
  .brand-countS {
    font-size: 10px !important;
  }
  .brand-toggle-btnS {
    width: 30px !important;
    height: 30px !important;
  }
  .brand-toggle-btnS svg {
    width: 16px !important;
    height: 16px !important;
  }

  .brand-inner-paddingS {
    padding: 10px !important;
  }

  /* Сетка товаров — 1 колонка на самых маленьких */
  .wholesale-gridS {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .wholesale-cardS {
    padding: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
  }
  /* В карточке товара на очень маленьких экранах делаем горизонтальную компоновку:
     слева изображение (маленькое), справа — информация и кнопки */
  .wholesale-cardS .img-wrapperS {
    flex: 0 0 70px !important;
    height: 70px !important;
    margin-bottom: 0 !important;
  }
  .wholesale-cardS .card-bodyS {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .wholesale-cardS .card-top-barS {
    margin-bottom: 2px !important;
  }
  .wholesale-cardS .card-nameS {
    font-size: 12px !important;
    height: auto !important;
    margin-bottom: 2px !important;
  }
  .wholesale-cardS .stock-badgeS {
    font-size: 9px !important;
    margin-bottom: 2px !important;
  }
  .wholesale-cardS .price-blockS {
    margin-bottom: 4px !important;
  }
  .wholesale-cardS .price-tagS {
    font-size: 13px !important;
  }
  .wholesale-cardS .old-priceS {
    font-size: 9px !important;
  }
  .wholesale-cardS .card-actionsS {
    flex: 0 0 100% !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }
  .wholesale-cardS .card-quantityS {
    width: 36px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
  .wholesale-cardS .buy-b2b-btnS {
    font-size: 11px !important;
    padding: 6px 0 !important;
    min-height: 30px !important;
  }
}

/* ===== ОБНОВЛЕННАЯ СЕТКА И КАРТОЧКИ ===== */
.wholesale-gridS {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.wholesale-cardS {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wholesale-cardS:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.img-wrapperS {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.img-wrapperS img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.card-nameS {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #1e293b;
    line-height: 1.3;
}

/* Расширенное и более читаемое описание */
.card-descS {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 38px; /* Держит ровную высоту карточки */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Отображает до 3 строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-bodyS {
    padding: 4px 0;
}

.price-blockS {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
}

.price-tagS {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.old-priceS {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.card-actionsS {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.card-quantityS {
    width: 48px;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.buy-b2b-btnS {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.buy-b2b-btnS:hover {
    background-color: #1d4ed8;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (Smartphones & Tablets) ===== */
@media (max-width: 768px) {
    .wholesale-gridS {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на смартфонах */
        gap: 10px;
    }

    .wholesale-cardS {
        padding: 10px;
        border-radius: 8px;
    }

    .img-wrapperS {
        height: 120px;
        margin-bottom: 6px;
    }

    .card-nameS {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .card-descS {
        font-size: 11px;
        line-height: 1.3;
        min-height: 28px;
        -webkit-line-clamp: 2; /* На мобилках 2 строки, чтобы не перегружать экран */
        margin-bottom: 6px;
    }

    .price-blockS {
        gap: 4px;
        flex-wrap: wrap;
    }

    .price-tagS {
        font-size: 14px;
    }

    .old-priceS {
        font-size: 11px;
    }

    .card-actionsS {
        gap: 6px;
        margin-top: 8px;
    }

    .card-quantityS {
        width: 38px;
        padding: 4px 2px;
        font-size: 12px;
    }

    .buy-b2b-btnS {
        padding: 6px 4px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    /* Если экран совсем узкий */
    .wholesale-gridS {
        gap: 6px;
    }
    
    .wholesale-cardS {
        padding: 8px;
    }
}

/* ===== МОБИЛЬНЫЙ ГОРИЗОНТАЛЬНЫЙ СЛАЙДЕР ДЛЯ ДВЕРЕЙ ===== */
@media (max-width: 768px) {
    /* Превращаем сетку в горизонтальную скролл-ленту */
    .wholesale-gridS {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory; /* Магнитная фиксация карточки при скролле */
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 10px; /* Отступ под полосу скролла */
        padding-left: 2px;
        padding-right: 2px;
    }

    /* Делаем сами карточки аккуратными и компактными */
    .wholesale-cardS {
        flex: 0 0 165px; /* Зафиксированная аккуратная ширина */
        width: 165px;
        scroll-snap-align: start;
        padding: 8px;
        border-radius: 8px;
    }

    /* Уменьшаем картинку, чтобы не занимала пол-экрана */
    .img-wrapperS {
        height: 100px;
        margin-bottom: 6px;
    }

    .badge-statusS, .card-articleS {
        font-size: 10px;
    }

    .card-nameS {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 2px;
        line-height: 1.25;
    }

    /* Описание в 2 компактные строчки */
    .card-descS {
        font-size: 10px;
        line-height: 1.2;
        min-height: 24px;
        -webkit-line-clamp: 2;
        margin-bottom: 4px;
        color: #64748b;
    }

    .stock-badgeS {
        font-size: 10px;
    }

    /* Блок цены в столбик, если скидка */
    .price-blockS {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 4px;
    }

    .price-tagS {
        font-size: 14px;
    }

    .old-priceS {
        font-size: 10px;
    }

    /* Компактные кнопки покупки */
    .card-actionsS {
        gap: 4px;
        margin-top: 8px;
    }

    .card-quantityS {
        width: 34px;
        padding: 3px 2px;
        font-size: 11px;
    }

    .buy-b2b-btnS {
        padding: 5px 2px;
        font-size: 11px;
    }

    /* Тонкая аккуратная полоса прокрутки */
    .wholesale-gridS::-webkit-scrollbar {
        height: 4px;
    }
    .wholesale-gridS::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }
    .wholesale-gridS::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
}

/* ===== ГОРИЗОНТАЛЬНАЯ ЛЕНТА ТОВАРОВ (ПК И МОБИЛЬНЫЕ) ===== */
.wholesale-gridS {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* Запрещает перенос карточек вниз */
    overflow-x: auto;  /* Включает горизонтальный скролл */
    overflow-y: hidden;
    scroll-snap-type: x mandatory; /* Магнитная фиксация карточки */
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 6px 2px 12px 2px; /* Отступ снизу под скроллбар */
}

/* Красивый и явный скроллбар для ПК */
.wholesale-gridS::-webkit-scrollbar {
    height: 8px;
}
.wholesale-gridS::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}
.wholesale-gridS::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
    transition: background 0.2s ease;
}
.wholesale-gridS::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Карточка товара на ПК */
.wholesale-cardS {
    flex: 0 0 220px; /* Фиксированная ширина карточки (не сжимается) */
    width: 220px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wholesale-cardS:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.img-wrapperS {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
}

.img-wrapperS img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.card-nameS {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1e293b;
    line-height: 1.3;
}

.card-descS {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.35;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-blockS {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 4px;
}

.price-tagS {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.old-priceS {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.card-actionsS {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.card-quantityS {
    width: 42px;
    padding: 4px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

.buy-b2b-btnS {
    flex: 1;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background-color: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.buy-b2b-btnS:hover {
    background-color: #1d4ed8;
}

/* ===== КОМПАКТНЫЙ ВИД ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .wholesale-gridS {
        gap: 10px;
        padding-bottom: 8px;
    }

    .wholesale-cardS {
        flex: 0 0 160px; /* Аккуратная компактная ширина под мобилки */
        width: 160px;
        padding: 8px;
        border-radius: 8px;
    }

    .img-wrapperS {
        height: 100px;
        margin-bottom: 6px;
    }

    .card-nameS {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .card-descS {
        font-size: 10px;
        line-height: 1.25;
        min-height: 25px;
        margin-bottom: 4px;
    }

    .price-blockS {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .price-tagS {
        font-size: 14px;
    }

    .old-priceS {
        font-size: 11px;
    }

    .card-actionsS {
        gap: 4px;
        margin-top: 8px;
    }

    .card-quantityS {
        width: 36px;
        padding: 4px 2px;
        font-size: 11px;
    }

    .buy-b2b-btnS {
        padding: 5px 2px;
        font-size: 11px;
    }
}

/* 1. Сдвиг меню навигации вправо */
.long-btn-container {
    display: flex;
    justify-content: flex-end; /* Прижимает кнопки к правому краю */
}

/* 2. Только для мобилок: гарантируем показ строки поиска, чтобы она не сжималась */
@media (max-width: 768px) {
    .search {
        display: block !important;
        width: 100%;
        margin-top: 8px;
    }
}

/* ===== 1. ФИКС НАВИГАЦИИ (Убираем пустую дыру слева) ===== */
.long-btn-container {
    display: flex !important;
    justify-content: space-between !important; /* Равномерно распределяет кнопки по всей длине */
    align-items: center !important;
    gap: 8px !important;
}

.btn-long {
    flex: 1 !important; /* Каждая кнопка получает равную ширину */
    text-align: center !important;
}


/* ===== 2. АДАПТАЦИЯ ХЕДЕРА ПОД МОБИЛЬНЫЕ УСТРОЙСТВА ===== */
@media (max-width: 768px) {
    /* Основной контейнер шапки */
    .header {
        display: flex !important;
        flex-wrap: wrap !important; /* Позволяет поиску уйти на 2-ю строчку */
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        padding: 8px 10px !important;
    }

    /* Компактный размер шрифтов верхнего ряда */
    .header h1, 
    .header-phone a {
        font-size: 13px !important;
        margin: 0 !important;
    }

    .header p,
    .header-phone span {
        font-size: 10px !important;
    }

    /* Кнопка ЛК смещается вправо, ближе к корзине */
    .login-btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* Строка "Поиск по каталогу" — встает аккуратной 2-й строчкой на всю ширину */
    .search {
        display: block !important;
        order: 10 !important; /* Опускает поиск строго вниз */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 36px !important;
        margin-top: 4px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    /* Компактная навигация на телефонах */
    .long-btn-container {
        padding: 6px 6px !important;
    }

    .btn-long {
        font-size: 12px !important;
        padding: 6px 2px !important;
        white-space: nowrap !important;
    }
}

.search {
    order: 1 !important; 
}

.login-btn {
    order: 2 !important; 
}

.cart-widget {
    order: 3 !important; 
}
/* =========================================
   СОДЕРЖИМОЕ ПАНЕЛИ ФИЛЬТРОВ
========================================= */

.filter-main-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
}

/* --- Фильтр цены --- */
.filter-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-price-inputs input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-price-inputs input:focus {
    border-color: #333;
}

.price-separator {
    color: #888;
    font-weight: bold;
}

/* Убираем стрелочки в инпутах типа number */
.filter-price-inputs input::-webkit-outer-spin-button,
.filter-price-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Кнопки внизу --- */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 40px;
}

.filter-actions button {
    flex: 1;
    /* Кнопки займут равное пространство */
    padding: 12px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s;
}

.btn-filter-reset {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
}

.btn-filter-reset:hover {
    background-color: #e8e8e8;
}

.btn-filter-apply {
    background-color: #333;
    border: 1px solid #333;
    color: #fff;
}

.btn-filter-apply:hover {
    background-color: #000;
}

/* =========================================
   ГРУППЫ ФИЛЬТРОВ И ЗАГОЛОВКИ
========================================= */
.filter-group {
    margin-bottom: 25px;
    /* Отступ между блоками (Бренд, Цвет и т.д.) */
}

.filter-group-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
}

/* =========================================
   КАСТОМНЫЕ ЧЕКБОКСЫ
========================================= */
.custom-checkbox {
    display: flex;
    /* Делает элементы блочными, чтобы они шли в столбик */
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    /* Чтобы текст не выделялся синим при быстром клике */
}

/* 1. Прячем дефолтный браузерный чекбокс */
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. Рисуем свой аккуратный квадратик */
.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    /* Легкое скругление, будет круто смотреться с твоими инпутами */
    margin-right: 12px;
    transition: all 0.2s ease;
}

/* 3. Эффект при наведении мышкой */
.custom-checkbox:hover input~.checkmark {
    border-color: #999;
}

/* 4. Закрашиваем, когда чекбокс нажат */
.custom-checkbox input:checked~.checkmark {
    background-color: #333;
    border-color: #333;
}

/* 5. Рисуем белую галочку внутри (изначально скрыта) */

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    /* Двинули чуть правее */
    top: 3px;
    /* Двинули чуть ниже */
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 6. Показываем галочку при клике */
.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.checkbox-label {
    font-size: 15px;
    color: #444;
}



.opening-direction-wrapper {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.opening-label {
    font-size: 14px;
    color: #666; /* Цвет как у подписей "Ширина (мм)" */
}

.opening-toggle-group {
    display: flex;
    gap: 8px;
}

.opening-radio input[type="radio"] {
    display: none; /* Прячем стандартный кружок */
}

.opening-radio .radio-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Состояние, когда кнопка выбрана */
.opening-radio input[type="radio"]:checked + .radio-btn {
    background-color: #222; /* Темный цвет, как у кнопки "В корзину" */
    color: #fff;
    border-color: #222;
}

/* Ховер-эффект для красоты */
.opening-radio:hover .radio-btn {
    border-color: #999;
}

/* =========================================
   1. КНОПКА ФИЛЬТРОВ И ШАПКА КАТАЛОГА
========================================= */
/* Раскидываем заголовок и кнопку по краям */
.catalog-header-wrapper {
    display: flex;
    justify-content: space-between;
    /* Заголовок строго влево, кнопка строго вправо */
    align-items: center;
    /* Идеальное выравнивание по одной линии по вертикали */
    /* Ширина должна 1 в 1 совпадать с серой подложкой */
    width: 100%;
    max-width: 1320px;
    /* Если у серого блока другая ширина, впиши ее сюда */

    margin: 0 auto 20px auto;
    padding: 0;
    /* ВАЖНО: убрали padding, чтобы края встали ровно по границе серого фона */
    box-sizing: border-box;
}

/* Убираем скрытые отступы у заголовка, чтобы он стоял на одном уровне с кнопкой */
.catalog-header-wrapper .page-title {
    margin: 0;
    line-height: 1;
}

/* Блокировка скролла страницы */
body.no-scroll {
    overflow: hidden;
}

.btn-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filters:hover {
    background-color: #e2e2e2;
}

/* =========================================
   2. СТАРАЯ МОДАЛКА (КОРЗИНА)
   (Оставил по центру, но починил z-index)
========================================= */
.js-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99998;
    /* Огромный z-index, чтобы перекрыть шапку */
}

.js-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 99999;
}

.js-overlay.active,
.js-popup.active {
    display: block;
}

/* =========================================
   3. НОВАЯ МОДАЛКА ФИЛЬТРОВ (ВЫЕЗЖАЕТ СПРАВА)
========================================= */
.js-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 99998;
    /* Перекрывает всё */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Сама боковая панель */
.js-filter-popup {
    position: fixed;
    top: 0;
    right: -100%;
    /* Прячем панель за правым краем экрана */
    width: 100%;
    max-width: 400px;
    /* Ширина панели */
    height: 100vh;
    /* На всю высоту экрана */
    background-color: rgba(237, 237, 237, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    /* Тень слева */
    padding: 20px;
    box-sizing: border-box;
    z-index: 99999;
    overflow-y: auto;
    /* Если фильтров много - появится скролл внутри панели */
    transition: right 0.3s ease-in-out;
    /* Плавный выезд */
    border-radius: 20px;
}

/* Крестик закрытия */
.popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
}

.popup-close-btn::before,
.popup-close-btn::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 2px;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.popup-close-btn::before {
    transform: rotate(45deg);
}

.popup-close-btn::after {
    transform: rotate(-45deg);
}

/* ==== АКТИВНЫЙ КЛАСС (Появление фильтров) ==== */
.js-filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.js-filter-popup.active {
    right: 0;
    /* Прилипает к правому краю */
}