.products-grid {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 0 0;
    /* justify-content: space-between; */
}

/* Модификатор: список (1 товар в строку) */
.products-grid.products-grid--list {
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.products-grid.products-grid--list .products__item {
    width: 100%;
    min-width: 100%;
}
.products-grid.products-grid--list .products__item-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr minmax(240px, 320px);
    align-items: start;
    gap: 6px 24px;
    margin: 0; /* убираем боковые поля, чтобы занять всю ширину */
    width: 100%;
    grid-auto-rows: min-content;
}
@media (max-width: 1000px) {
    .products-grid.products-grid--list .products__item-wrapper {
        grid-template-columns: 160px 1fr minmax(200px, 260px);
    }
}
@media (max-width: 600px) {
    .products-grid.products-grid--list .products__item-wrapper {
        grid-template-columns: 120px 1fr;
        align-items: start;
    }
}
.products-grid.products-grid--list .products__item-image { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.products-grid.products-grid--list .products__item-slider-nav { grid-column: 1; grid-row: 3; align-self: end; z-index: 1; }
.products-grid.products-grid--list .products__item-info { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 6px; }
.products-grid.products-grid--list .products__item-price { grid-column: 3; grid-row: 1; justify-self: end; align-self: start; }
.products-grid.products-grid--list .products__item-buy { grid-column: 3; grid-row: 2; justify-self: end; align-self: start; margin-top: 8px; }
@media (max-width: 1000px) {
    .products-grid.products-grid--list .products__item-price { grid-column: 2; justify-self: start; }
    .products-grid.products-grid--list .products__item-buy { grid-column: 2; justify-self: start; }
}

/* Стили для товаров в products-grid */
.products-grid .products__item {
    width: 25%;
    min-width: 25%;
}

@media screen and (max-width: 1000px) {
    .products-grid .products__item {
        width: calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
}

@media screen and (max-width: 600px) {
    .products-grid .products__item {
        width: 100%;
        min-width: 100%;
    }
}

.products-grid .products__item-wrapper {
    margin: 0 12px;
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.3s;
}



/* Стили для детальной страницы товара */

i.icon-copy,
i.icon-copy--name,
i.icon-copy--sku {
    background-image: url(../img/icon_copy.png);
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    left: 0; top: -16px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
    @media screen and (max-width: 768px) {
        i.icon-copy,
        i.icon-copy--name,
        i.icon-copy--sku {
            left: 0; top: 0;
        }
    }

i.icon-copy:hover,
i.icon-copy--name:hover,
i.icon-copy--sku:hover {
    opacity: 0.7;
}

i.icon-copy--sku {
    left: 4px; top: 2px;
}

.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 58px;
    margin: 0 0 64px 0;
    justify-content: space-between;
    align-items: start;
}
    .product-detail__left-side {
        display: flex;
        justify-content: space-between;
        flex: 1;
        gap: 58px;
    }
    @media screen and (max-width: 768px) {
        .product-detail__left-side {
            flex-direction: column;
        }
    }

.product-detail__gallery {
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 54.5%;
}
    @media screen and (max-width: 768px) {
        .product-detail__gallery {
            position: inherit;
            width: 100%;
        }
    }

    .product-detail__image {
        width: 100%;
        margin: 0 auto 16px auto;
    }

    .product-detail__image img {
        width: 100%;
        height: auto;
    }


.product-detail__tech-info {
    width: 45.5%;
}
    @media screen and (max-width: 768px) {
        .product-detail__tech-info {
            width: 100%;
        }
    }
    .product-detail__tech-info h3 {
        font-weight: 600;
        margin-bottom: 12px;
    }
    .product-detail__tech-info a.products__spec-link {
        font-size: 14px;
        text-decoration: underline;
    }

.product-detail__info {
    max-width: 472px;
    width: 100%;
    border: 1px solid #D0D0D0;    
    border-radius: 20px;
    overflow: hidden;
}
    .product-detail__info-login {
        font-size: 14px; text-align: center;
        background-color: #F7F7EC;
        padding: 10px 10px;
        margin-bottom: 35px;
    }
        .product-detail__info-login a {text-decoration: underline;}

.product-detail__info-delivery {
    font-size: 14px;
    padding: 22px 30px;
    border-top: 1px dashed #B3B3B3;
}
    @media screen and (max-width: 768px) {
        .product-detail__info-delivery {
            padding: 16px 20px;
        }
    }
    .product-detail__info-delivery-1 {
        background: url(../img/ico_delivery_1.png) no-repeat left center;
        background-size: 19px auto;
        padding: 0 0 0 29px;
        margin-bottom: 12px;
    }
    .product-detail__info-delivery-2 {
        background: url(../img/ico_delivery_2.png) no-repeat left center;
        background-size: 19px auto;
        padding: 0 0 0 29px;
    }
        @media screen and (max-width: 768px) {
            .product-detail__info-delivery-1,
            .product-detail__info-delivery-2 {background-position: 0 3px; line-height: 1.3;}
                .product-detail__info-delivery-1 b,
                .product-detail__info-delivery-2 b {display: block;}
        }


.product-detail__sku {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.product-detail__title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.product-detail__price-block {
    margin: 0 30px 12px 30px;
}

.product-detail__price {
    font-size: 26px;
    font-weight: 700;
}


.product-detail__info-personal-price-and-stock {
    display: flex; flex-wrap: wrap;
    align-items: center;
    margin: 0 30px 3px 30px;
    gap: 16px;
}
    @media screen and (max-width: 768px) {
        .product-detail__info-personal-price-and-stock {
            gap: 12px; margin: 0 20px 3px 20px;
        }
    }
    .product-detail__info-personal-price {
        font-size: 12px;
        color: #3DAA3B;
        background-color: #ECF7EC;
        border-radius: 5px;
        padding: 1px 8px;
    }
    .product-detail__info-stock {
        font-size: 14px;
        background: url(../img/ico_instock.png) no-repeat 0 54%;
        background-size: 9px auto;
        padding: 0 0 0 16px;
    }

    .product-detail__stock--available {}
    .product-detail__stock--unavailable {color: var(--main-orange);}

.product-detail__info-credit {
    font-size: 14px; line-height: 19px;
    margin: 0 0 30px 0;
    border-top: 1px dashed #B3B3B3;
    border-bottom: 1px dashed #B3B3B3;
    padding: 24px 30px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}
    @media screen and (max-width: 768px) {
        .product-detail__info-credit {
            padding: 16px 20px;
            flex-direction: column;
        }
    }
    .product-detail__info-credit a {text-decoration: underline;}
    .product-detail__info-credit-1 {
        background: url(../img/ico_credit_1.png) no-repeat 0 5px;
        background-size: 22px auto;
        padding: 0 0 0 38px;
    }
    .product-detail__info-credit-2 {
        background: url(../img/ico_credit_2.png) no-repeat 0 5px;
        background-size: 19px auto;
        padding: 0 0 0 38px;
    }


.product-detail__actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 0 30px 16px 30px;
}
    @media screen and (max-width: 768px) {
        .product-detail__actions {
            margin: 0 20px 16px 20px;
        }
    }
    .product-detail__actions .quantity-selector {
        border: 0; 
        border-radius: 10px;
    }
    .product-detail__actions .quantity-input {
        background-color: var(--main-grey);
        font-size: 18px;
        font-weight: 600;
        height: 48px;
        -moz-appearance: textfield;
    }
        .product-detail__actions .quantity-input::-webkit-inner-spin-button,
        .product-detail__actions .quantity-input::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
    .product-detail__actions .quantity-btn {
        background-color: var(--main-grey);
        font-size: 18px;
        font-weight: 600;
        height: 48px;
    }

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    transition: background 0.3s ease;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    outline: none;
}

.product-detail__actions-buy-now {
    display: block;
    text-align: center;
    font-size: 14px;
    background-color: var(--main-grey);
    margin: 0 30px 37px 30px;
    padding: 7px 24px;
    border-radius: 10px;
}
    @media screen and (max-width: 768px) {
        .product-detail__actions-buy-now {
            margin: 0 20px 16px 20px;
        }
    }
.btn--large.btn--primary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}
    .product-detail__secondary-actions-left-sku {
        font-size: 14px;
    }
    .product-detail__secondary-actions-left-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
        .product-detail__secondary-actions-left-actions a {
            font-size: 12px;
            border-radius: 5px;
            padding: 8px 20px 8px 44px;
            transition: all 0.3s ease;
        }
            @media screen and (max-width: 768px) {
                .product-detail__secondary-actions-left-actions a {
                    text-indent: -9999;
                    padding: 8px 20px 8px 33px;
                }
            }
        .product-detail__secondary-actions-left-actions a:hover,
        .product-detail__secondary-actions-left-actions a.active {
            background-color: var(--main-grey);
        }
        a.product-detail__secondary-actions-left-actions-favorite {
             background-image: url(../img/ico_favorites.svg);
             background-repeat: no-repeat;
             background-position: 20px 50%;
             background-size: 16px auto;
        }
            .product-detail__secondary-actions-left-actions a.product-detail__secondary-actions-left-actions-favorite.active,
            a.products__item-favorites--active {
                background-image: url(../img/ico_favorites_active.svg);
            }
        a.product-detail__secondary-actions-left-actions-compare {
            background-image: url(../img/ico_compare.svg);
            background-repeat: no-repeat;
            background-position: 20px 50%;
            background-size: 15px auto;
        }
        a.product-detail__secondary-actions-left-actions-print {
            background-image: url(../img/ico_print.svg);
            background-repeat: no-repeat;
            background-position: 20px 50%;
            background-size: 16px auto;
        }
        a.product-detail__secondary-actions-left-actions-share {
            background-image: url(../img/ico_share.svg);
            background-repeat: no-repeat;
            background-position: 20px 50%;
            background-size: 16px auto;
        }

.product-detail__secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 58px;
    margin-bottom: 36px;
    align-items: center;
}
    @media screen and (max-width: 1024px) {
        .product-detail__secondary-actions {
            flex-direction: column;
        }
    }

.product-detail__secondary-actions-left {
    flex: 1;
    display: flex; flex-wrap: wrap;
    gap: 10px 28px;
    align-items: center;
}

.product-detail__secondary-actions-right {
    max-width: 472px;
    width: 100%;
    display: flex;
    gap: 10px 40px;
    align-items: center;
}
    .product-detail__secondary-actions-right img {
        max-width: 135px;
        height: auto;
        max-height: 55px;
    }
    .product-detail__secondary-actions-right a {
        font-size: 14px;
        text-decoration: underline;
    }

.btn--icon-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
}

.btn--icon-text img {
    width: 16px;
    height: 16px;
}


.product-detail__description {
    display: flex;
    flex-wrap: wrap;
    gap: 96px;
    justify-content: space-between;
}
    .product-detail__left-column {
        flex: 1;
    }
    .product-detail__right-column {
        width: 45.5%;
        max-width: 472px;
    }
    @media screen and (max-width: 1024px) {
        .product-detail__right-column {
            width: 100%;
            max-width: 100%;
        }
    }
    .product-detail__right-block--questions {
        background-color: var(--main-grey);
        border-radius: 20px;
        margin-bottom: 60px;
        padding: 30px;
    }
        .product-detail__description .product-detail__right-block--questions h3 {font-size: 24px; margin: 0 0 24px 0;}
        @media screen and (max-width: 768px) {
            .product-detail__description .product-detail__right-block--questions h3 {font-size: 18px; margin: 0 0 16px 0;}
        }
        .product-detail__right-block--questions .product-detail__right-list--contacts {
            display: flex; flex-wrap: wrap;
            gap: 10px;
        }
            .product-detail__right-block--questions .product-detail__right-list--contacts a {
                font-size: 12px;
                color: #1C1C1C;
                background-color: #fff;
                border-radius: 5px;
                padding: 5px 15px 5px 40px;
            }
            @media screen and (max-width: 768px) {
                .product-detail__right-block--questions .product-detail__right-list--contacts a {
                    width: 100%;
                }
            }
            .product-detail__right-block--questions .product-detail__right-list--contacts a.product-detail__right-link--whatsapp {
                background-image: url(../img/ask_wa.png);
                background-repeat: no-repeat;
                background-position: 10px 50%;
                background-size: 15px auto;
            }
            .product-detail__right-block--questions .product-detail__right-list--contacts a.product-detail__right-link--telegram {
                background-image: url(../img/ask_tg.png);
                background-repeat: no-repeat;
                background-position: 10px 50%;
                background-size: 18px auto;
            }
            .product-detail__right-block--questions .product-detail__right-list--contacts a.product-detail__right-link--phone {
                background-image: url(../img/ask_call.png);
                background-repeat: no-repeat;
                background-position: 10px 50%;
                background-size: 18px auto;
            }
    .product-detail__right-block--docs {
        margin-bottom: 60px;
        padding: 0 30px;
    }
        .product-detail__description .product-detail__right-block--docs h3 {font-size: 18px; margin: 0 0 24px 0;}
            .product-detail__right-block--docs .product-detail__right-list--docs a {
                display: block;
                background-image: url(../img/ico_download.png);
                background-repeat: no-repeat;
                background-position: 0 50%;
                background-size: 17px auto;
                padding: 0 0 0 31px;
                font-size: 14px; text-decoration: underline;
                margin-bottom: 10px;
            }
    .product-detail__right-block--services {
        background-color: #F7F7EC;
        background-image: url(../img/bg_services.png);
        background-size: 120px auto;
        background-repeat: no-repeat;
        background-position: 98% 5px;
        border-radius: 20px;
        padding: 30px;
    }
        .product-detail__description .product-detail__right-block--services h3 {font-size: 24px; margin: 0 0 24px 0;}
        .product-detail__right-block--services-list {
            font-size: 14px;
            line-height: 1.6;
            color: #666;
        }
            .product-detail__right-block--services-list-item {
                margin-bottom: 12px;
            }
            .product-detail__right-block--services-list a {text-decoration: underline;}

.product-detail__description {
    margin-top: 64px;
}

.product-detail__description h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
}

.description-content {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.product-additional {
    padding-top: 60px;
}
    h3.characteristics-title {
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 40px;
    }

.product-tabs__nav {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--main-orange);
}



/* Стили для характеристик в детальной карточке товара */
.product-detail__tech-info .products__spec {
    font-size: 16px;
    margin-bottom: 10px;
}

/* Стили для характеристик в полном блоке характеристик */
.product-additional .products__spec {
    font-size: 16px;
    margin-bottom: 10px;
}

/* Характеристики в 2 столбца в блоке product-additional */
.characteristics-category {
    margin-bottom: 16px;
}
h4.characteristics-category__title {
    margin-bottom: 16px;
    font-size: 18px;
}
.product-additional .products__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 96px;
}

/* Адаптивность - на мобильных устройствах в 1 столбец */
@media (max-width: 768px) {
    .product-additional .products__specs {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
}

.characteristics-table td {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.characteristics-table td:first-child {
    font-weight: 500;
    color: #333;
    width: 30%;
}

.characteristics-table td:last-child {
    color: #666;
}



/* Стили для корзины */
.cart-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-table th {
    background: #f8f9fa;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.cart-table td {
    padding: 20px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-item__image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

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

.cart-item__name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
}

.cart-item__name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item__name a:hover {
    color: var(--main-orange);
}

.cart-item__sku {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.cart-item__warning {
    font-size: 12px;
    color: #dc3545;
    background: #f8d7da;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.cart-item__price {
    font-size: 16px;
    font-weight: 600;
    color: var(--main-orange);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 50px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    outline: none;
}

.cart-item__subtotal {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.cart-item__remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    transition: all 0.3s ease;
}

.cart-item__remove:hover {
    background: #dc3545;
    color: white;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-summary__actions {
    display: flex;
    gap: 15px;
}

.cart-summary__totals {
    text-align: right;
}

.cart-total {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-total__label {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.cart-total__amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--main-orange);
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 8px;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
}

.empty-cart__icon {
    color: #ccc;
    margin-bottom: 20px;
}

.empty-cart__title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.empty-cart__text {
    color: #666;
    margin-bottom: 30px;
}

/* Toast уведомления */
.toast-container {
    position: fixed;
    top: 150px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid var(--main-orange);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.success {
    border-left-color: #28a745;
}

/* Компактный контент тоста с товаром */
.toast-product {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-column-gap: 12px;
    align-items: center;
}

.toast-product__media {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.toast-product__content {
    min-width: 0;
}

.toast-product__title {
    font-weight: 600;
    margin: 0 0 2px;
    color: #111;
}

.toast-product__name {
    display: block;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    margin: 0 0 4px;
}

.toast-product__name:hover {
    text-decoration: underline;
}

.toast-product__price {
    font-weight: 700;
    color: #111;
    font-size: 14px;
}

/* Стили для цен распродажи */
.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.price-sale {
    /* color: #dc3545; */
    font-weight: 700;
    font-size: 18px;
}

.discount-badge {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: 600;
}

.discount-badge-large {
    background: #dc3545;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 5px 0;
    display: inline-block;
    font-weight: 600;
}

.savings-amount {
    color: #28a745;
    font-size: 14px;
    font-weight: 600;
    margin-top: 5px;
}

/* Стили для карточек товаров в распродаже */
.product-card__price .price-old {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.product-card__price .price-sale {
    display: block;
    font-size: 18px;
    color: #dc3545;
}

.product-card__price .discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.product-card__image {
    position: relative;
}

/* Стили для детальной страницы товара */
.product-detail__price .price-old {
    font-size: 14px;
    text-decoration: line-through;
    font-weight: 400;
}

.product-detail__price .price-sale {
    font-size: 26px;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    .product-detail__price .price-sale {
        font-size: 24px;
    }
    
    .savings-amount {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .product-card__price .price-sale {
        font-size: 16px;
    }
    
    .product-card__price .price-old {
        font-size: 12px;
    }
    
    .discount-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Стили для подкатегорий */
.subcategories {
    margin: 30px 0 100px 0;
    padding-bottom: 50px;
    border-bottom: 1px solid #d0d0d0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 52px 21px;
}

.subcategory-section {
    margin-bottom: 0;
}

.subcategory-image {
    height: 190px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--main-grey);
    border-radius: 10px;
    background-size: auto 140px;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
    overflow: hidden;
}

.subcategory-image__img {
    width: auto;
    height: 140px;
    transition: all 0.3s ease;
}

.subcategory-section:hover .subcategory-image {
    background-size: auto 145px;
}

.subcategory-section:hover .subcategory-image__img {
    transform: scale(1.05);
}

/* Fallback стили для категорий без изображений в БД */
/* .category-1 .subcategory-image {background-image: url(../img/cat-1.png);}
.category-8 .subcategory-image {background-image: url(../img/cat-2.png);}
.category-9 .subcategory-image {background-image: url(../img/cat-3.png);}
.category-10 .subcategory-image {background-image: url(../img/cat-4.png);}
.category-11 .subcategory-image {background-image: url(../img/cat-5.png);}
.category-12 .subcategory-image {background-image: url(../img/cat-6.png);}
.category-13 .subcategory-image {background-image: url(../img/cat-7.png);} */

.subcategory-main-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.subcategory-main-title a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
}

.subcategory-main-title a:hover {
    color: var(--main-orange);
}
.subcategory-count {
    font-weight: 400;
    color: #666;
}

.subcategory-children {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory-child {
}

.subcategory-child a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: block;
    transition: color 0.3s ease;
}

.subcategory-child a:hover {
    color: var(--main-orange);
}

/* Скрытие лишних пунктов подкатегорий на каталоге */
.subcategory-child--hidden {display:none;}

@media (max-width: 1024px) {
    .subcategories {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 16px;
    }
}

@media (max-width: 768px) {
    .subcategories {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 12px;
    }
    
    .subcategory-main-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .subcategory-child a {
        font-size: 13px;
    }
    
    .subcategory-child {
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .subcategories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .subcategory-main-title {
        font-size: 16px;
    }
    
    .subcategory-section {
        margin-bottom: 0;
    }
}

/* Стили для пагинации */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 60px 0 40px;
}

.pagination-nav {
    display: flex;
    align-items: center;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: none;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-btn:hover {
    color: var(--main-orange);
}

.pagination-btn--active {
    background: #333;
    color: white;
    cursor: default;
}

.pagination-btn--active:hover {
    background: #333;
    color: white;
}

.pagination-btn--disabled {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
}

.pagination-btn--disabled:hover {
    background: #f8f9fa;
    color: #ccc;
}

.pagination-btn--dots {
    background: none;
    color: #999;
    cursor: default;
}

.pagination-btn--dots:hover {
    background: none;
    color: #999;
}

.pagination-arrow {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.pagination-btn--prev .pagination-arrow {
    margin-right: 2px;
}

.pagination-btn--next .pagination-arrow {
    margin-left: 2px;
}

.pagination-btn--disabled .pagination-arrow {
    opacity: 0.3;
}

/* Адаптивность для пагинации */
@media (max-width: 768px) {
    .pagination-container {
        margin: 40px 0 30px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .pagination-buttons {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 12px;
    }
    
    .pagination-buttons {
        gap: 4px;
    }
    
    .pagination-arrow {
        width: 10px;
        height: 10px;
    }
}

/* Стили для избранного */
#guest-favorites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 0;
}
.header__icon-link--favorites {
    position: relative;
}

.header__compare-badge,
.header__favorites-badge {
    position: absolute;
    top: -14px;
    right: -13px;
    background: var(--main-orange);
    color: var(--white);
    font-size: 10px;
    font-family: var(--main-font);
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.products__item-favorites--active,
.products__item-compare--active {
    background-color: var(--main-grey);
}

.products__item-favorites--active:before {
}

/* Стили для страницы избранного */
.favorites-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.compare-actions .btn-outline-danger,
.favorites-actions .btn-outline-danger,
.cart-summary .btn--secondary {
    padding: 10px 20px;
    border: 0;
    background-color: var(--main-grey);
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.favorites-count {}

.favorites-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.favorites-empty__content img {
    margin-bottom: 20px;
    opacity: 0.3;
}

.favorites-empty__content h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.favorites-empty__content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
    max-width: 400px;
}

.favorites-empty .btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* ===== СТИЛИ СТРАНИЦЫ СРАВНЕНИЯ ТОВАРОВ ===== */

.compare-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.compare-table {
    display: table;
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.compare-row {
    display: table-row;
    border-bottom: 1px solid #eee;
}

.compare-row:hover {
    background-color: #f9f9f9;
}

.compare-cell {
    display: table-cell;
    padding: 15px 10px;
    vertical-align: top;
    border-right: 1px solid #eee;
}

.compare-cell:last-child {
    border-right: none;
}

.compare-label {
    background-color: #f5f5f5;
    font-weight: 600;
    width: 200px;
    min-width: 200px;
    position: sticky;
    left: 0;
    z-index: 10;
}

.compare-header {
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}

.compare-header .compare-label {
    background-color: #f5f5f5;
}

.compare-product {
    width: 250px;
    min-width: 250px;
}

.compare-product-card {
    text-align: center;
}

.compare-product-image {
    margin-bottom: 10px;
}

.compare-product-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 4px;
}

.compare-product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.compare-product-name a {
    color: #333;
    text-decoration: none;
}

.compare-product-name a:hover {
    color: var(--main-orange);
}

.compare-product-price {
    margin-bottom: 15px;
}

.compare-product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Стили кнопок в сравнении - аналогично основным кнопкам сайта */
.compare-product-actions .btn {
    padding: 12px 16px;
    border: none;
    border-radius: var(--main-radius, 4px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.compare-product-actions .btn-primary {
    background: linear-gradient(85.88deg, rgba(153, 19, 0, 0.2) 0%, rgba(223, 89, 49, 0.2) 71.49%, rgba(248, 165, 48, 0.2) 93.31%), var(--main-orange);
    color: white;
}

.compare-product-actions .btn-primary:hover {
    background: var(--main-orange);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(223, 89, 49, 0.3);
}

.compare-product-actions .btn-outline-danger {
    background: none;
}

.compare-product-actions .btn-outline-danger:hover {
}

.compare-actions {
    margin-bottom: 20px;
}

.compare-actions .btn-outline-danger {
    padding: 12px 24px;
    border: none;
    background: var(--main-grey, #f5f5f5);
    color: #666;
    border-radius: var(--main-radius, 4px);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Базовые стили для всех кнопок */
.btn--primary, a.btn--primary {
    background: var(--main-orange);
    color: white;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--main-radius, 4px);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn--primary:hover {
    background: #c44521;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(223, 89, 49, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .compare-table {
        min-width: 600px;
    }
    
    .compare-label {
        width: 150px;
        min-width: 150px;
    }
    
    .compare-product {
        width: 200px;
        min-width: 200px;
    }
    
    .compare-product-image img {
        width: 100px;
        height: 100px;
    }
    
    .compare-product-actions .btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Стили пустого состояния */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
}

.empty-state__content {
    max-width: 400px;
}

.empty-state__content img {
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state__content h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}

.empty-state__content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* ===== КАТАЛОГОВЫЙ LAYOUT ===== */
.catalog-layout {
    display: flex;
    gap: 43px;
    margin-top: 30px;
    position: relative;
}

.catalog-sidebar {
    flex: 0 0 347px;
    max-width: 347px;
    align-self: flex-start;
    height: fit-content;
}

.catalog-content {
    flex: 1;
    min-width: 0; /* Позволяет flex элементу сжиматься */
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section--breadcrumbs {
    margin-bottom: 50px;
}

/* Адаптация сетки товаров для двухколоночного layout-а */
.catalog-layout .products-grid .products__item {
    width: calc(33.333% - 8px);
    min-width: calc(33.333% - 8px);
}

@media screen and (max-width: 1200px) {
    .catalog-layout .products-grid .products__item {
        width: calc(50% - 6px);
        min-width: calc(50% - 6px);
    }
}

@media screen and (max-width: 768px) {
    .catalog-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .catalog-sidebar {
        flex: none;
        max-width: none;
        position: static;
    }
    
    .catalog-layout .products-grid .products__item {
        width: calc(50% - 6px);
        min-width: calc(50% - 6px);
    }
}

@media screen and (max-width: 600px) {
    .catalog-layout .products-grid .products__item {
        width: 100%;
        min-width: 100%;
    }
}

/* ===== СТИЛИ ЛЕВОГО СТОЛБЦА КАТАЛОГА ===== */
.sidebar-title {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.category-path {
    display: flex;
    flex-direction: column;
}

.category-path-item {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 4px;
}

.category-path-item a {
    background-image: url(../img/arrow-right-small.png);
    background-size: auto 14px;
    background-position: 0 50%;
    background-repeat: no-repeat;
    padding: 4px 8px 4px 16px;
    border-radius: 4px;
}
    .category-path .category-path-item:nth-child(1) a {background: none; padding-left: 0;}
    .category-path .category-path-item:nth-child(2) a {padding-left: 31px; background-position: 15px 50%;}
    .category-path .category-path-item:nth-child(3) a {padding-left: 46px; background-position: 30px 50%;}
    .category-path .category-path-item:nth-child(4) a {padding-left: 61px; background-position: 45px 50%;}
    .category-path .category-path-item:nth-child(5) a {padding-left: 76px; background-position: 60px 50%;}
    .category-path .category-path-item:nth-child(6) a {padding-left: 91px; background-position: 75px 50%;}

.category-path-item--current span {
    background-color: var(--main-grey);
    background-image: url(../img/arrow-right-small.png);
    background-size: auto 14px;
    background-position: 0 50%;
    background-repeat: no-repeat;
    padding: 4px 8px 4px 16px;
    border-radius: 4px;
    display: block; width: 100%;
}
    .category-path .category-path-item--current:nth-child(1) span {padding-left: 31px; background-position: 15px 50%;}
    .category-path .category-path-item--current:nth-child(2) span {padding-left: 31px; background-position: 15px 50%;}
    .category-path .category-path-item--current:nth-child(3) span {padding-left: 46px; background-position: 30px 50%;}
    .category-path .category-path-item--current:nth-child(4) span {padding-left: 61px; background-position: 45px 50%;}
    .category-path .category-path-item--current:nth-child(5) span {padding-left: 76px; background-position: 60px 50%;}
    .category-path .category-path-item--current:nth-child(6) span {padding-left: 91px; background-position: 75px 50%;}

.category-path-item--current::before {
    color: var(--main-orange);
}

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ КАТАЛОГОМ ===== */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.catalog-toolbar__sort {
    display: flex;
    align-items: center;
}

.catalog-toolbar__sort .form-select {
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    min-width: 200px;
}

.catalog-toolbar__count {
    display: flex;
    align-items: center;
}

.products-count {
    padding: 3px 16px;
    background: #F7F7EC;
    border-radius: 5px;
    font-size: 14px;
    color: var(--black);
}

/* Переключатель режима отображения (плитка/список) */
.catalog-toolbar__view {
    display: flex;
    align-items: center;
    margin-left: 32px; /* расстояние от счетчика */
}
.view-toggle { display: inline-flex; align-items: center; gap: 16px; }
.view-toggle__btn {
    appearance: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 18px; /* ширина авто, высота 18px */
    width: 28px; height: 28px; /* кликабельная зона */
    border: 0;
    padding: 0;
    cursor: pointer;
    opacity: .3; /* неактивная */
}
.view-toggle__btn.is-active { opacity: 1; }
.view-toggle__btn--grid { background-image: url(../img/view-grid.png); }
.view-toggle__btn--list { background-image: url(../img/view-list.png); }

@media (max-width: 768px) {
    .catalog-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .catalog-toolbar__sort .form-select {
        min-width: 100%;
    }
    
    .catalog-toolbar__count {
        justify-content: center;
    }
}

/* ===== Корректировки режима СПИСКОМ (поверх специфики catalog-layout) ===== */
.catalog-layout .products-grid.products-grid--list { flex-direction: column; }
.catalog-layout .products-grid.products-grid--list .products__item { width: 100% !important; min-width: 100% !important; flex: 0 0 100% !important; align-self: stretch; }
.products-grid.products-grid--list .products__item-wrapper { margin: 0; }

/* Описание категории */
.category-description {
    margin-top: 45px;
}
    .category-description p {}

/* ===== ФИЛЬТРЫ КАТАЛОГА ===== */

.sidebar-section--filters {
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    padding: 16px 20px 44px 20px;
}

.filter-group {
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: 1px solid #E5E5E5;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-title {
    margin: 4px 0 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #333;
    position: relative;
}

.filter-title--non-collapsible {
    cursor: default;
    font-weight: 600;
    color: #333;
}

.filter-title--non-collapsible::after {
    display: none;
}

.filter-title::after {
    content: '';
    width: 10px;
    height: 10px;
    background-image: url('../img/arrow-left-small.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
    transform: rotate(90deg); /* Поворот влево -> вверх для открытого состояния */
}
    .filter-title--collapsed::after {
        transform: rotate(-90deg); /* Поворот влево -> вниз для закрытого состояния */
    }

.filter-content {
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
}

.filter-content--collapsed {
    height: 0;
    opacity: 0;
}

.filter-content--expanded {
    opacity: 1;
    margin: 14px 0 20px 0;
}

/* Фильтр по цене */
.price-filter {
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.price-range-inputs input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: var(--main-grey);
    width: 40%;
}

.price-range-inputs span {
    color: #666;
}

.price-range-slider {
    position: relative;
    height: 20px;
    margin: 10px 0;
}

.price-range-slider::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 1px;
    background: #E5E5E5;
    z-index: 0;
}

/* Активная область между ползунками */
.price-range-slider::after {
    content: '';
    position: absolute;
    top: 10px;
    left: var(--range-start, 0%);
    width: var(--range-width, 100%);
    height: 1px;
    background: var(--main-black);
    z-index: 1;
    transition: all 0.1s ease;
}

.price-slider {
    position: absolute;
    top: 7px;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    z-index: 2;
}

.price-slider::-webkit-slider-thumb {
    pointer-events: all;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    pointer-events: all;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

#price_range_from {
    z-index: 2;
}

#price_range_to {
    z-index: 3;
}

.price-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    border: 1px solid var(--main-black);
}

.price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--main-orange);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.price-slider::-webkit-slider-track {
    height: 6px;
    border-radius: 3px;
    background: #E5E5E5;
}

.price-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #E5E5E5;
    border: none;
}

/* Фильтры по характеристикам */
.characteristic-filter {
    /* margin-top теперь управляется через filter-content */
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    background: white;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--main-orange);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--main-orange);
    border-color: var(--main-orange);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
    line-height: 1;
}

.checkbox-label--hidden {
    display: none;
}

.show-all-toggle {
    background: none;
    border: none;
    color: var(--main-orange);
    font-size: 14px;
    cursor: pointer;
    padding: 0 0 24px 0;
    text-decoration: underline;
    margin-top: 4px;
}
.subcategories .show-all-toggle {
    color: #797979;
    text-decoration: none;
    border-bottom: 1px dashed #797979;
    padding-bottom: 2px;
    margin-top: 20px;
}

.show-all-toggle:hover {
    color: #e67e22;
    text-decoration: none;
}

/* Кнопки управления фильтрами */
.filter-actions {
    margin-top: 25px;
    padding-top: 20px;
}

/* Недоступные опции фильтров */
.checkbox-label.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}
.checkbox-label.is-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn--primary {
    background: var(--main-orange);
    color: white;
    border: 1px solid var(--main-orange);
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn--primary:hover {
    background: #e67e22;
    border-color: #e67e22;
}

.btn--secondary {
    background: transparent;
    color: #666;
    border: none;
    padding: 18px 20px 0 20px;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
    .catalog-sidebar {
        order: 2;
    }
    
    .catalog-content {
        order: 1;
    }
    
    .filter-group {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .price-range-inputs input[type="text"] {
        padding: 10px;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .filter-actions {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10;
        padding: 15px 0;
        margin: 20px -15px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .btn--block {
        margin-bottom: 8px;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* ===== КАТАЛОГОВЫЙ LAYOUT ===== */


/* Стили для автодополнения поиска */
.header__search-wrapper {
    position: relative;
    flex: 1;
}

.header__search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-dropdown-section {
    padding: 10px 0;
}

.search-dropdown-section:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.search-dropdown-title {
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
    background-color: #f8f9fa;
}

.search-dropdown-item-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
}

.search-dropdown-item-icon img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
}

.search-dropdown-item-content {
    flex: 1;
    min-width: 0;
}

.search-dropdown-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.search-dropdown-item-price {
    font-size: 14px;
    color: #DF5931;
    font-weight: 600;
}

.search-dropdown-item-old-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}

.search-dropdown-empty {
    padding: 20px 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-loading {
    padding: 15px;
    text-align: center;
    color: #666;
}

/* Двухколоночный layout для выпадающего поиска */
.search-dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.search-dropdown-col--left {
    border-right: 1px solid #eee;
}

@media (max-width: 768px) {
    .search-dropdown-grid {
        grid-template-columns: 1fr;
    }
    .search-dropdown-col--left {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* Сетка логотипов брендов в выпадающем поиске */
.search-brands-grid {
    padding: 8px 12px 4px 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.search-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    background: #f8f9fa;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 6px;
}

.search-brand-item img {
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .search-brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header__search-wrapper {
        max-width: none;
    }
    
    .header__search-dropdown {
        max-height: 300px;
    }
}

/* ===== СТИЛИ ДЛЯ ОФОРМЛЕНИЯ ЗАКАЗОВ ===== */

.checkout-form {
    background: white;
    border-radius: 12px;
}

.checkout-form h2 {
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.checkout-form .form-group {
    margin-bottom: 20px;
}

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--main-orange);
    box-shadow: 0 0 0 3px rgba(223, 89, 49, 0.1);
}

.checkout-form textarea {
    resize: vertical;
    min-height: 100px;
}

.checkout-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-form .btn--primary {
    background: var(--main-orange);
    color: white;
}

.checkout-form .btn--primary:hover {
    background: #c44521;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(223, 89, 49, 0.3);
}

.order-summary {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.order-summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--main-orange);
}

.order-summary-item-info {
    flex: 1;
}

.order-summary-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.order-summary-item-details {
    font-size: 12px;
    color: #666;
}

.order-summary-item-price {
    font-weight: 600;
    color: var(--main-orange);
}

.order-success {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 40px 0;
}

.order-success-icon {
    width: 80px;
    height: 80px;
    background: var(--main-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    font-size: 40px;
}

.order-success h1 {
    color: #333;
    margin-bottom: 15px;
}

.order-success p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.order-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.order-details h3 {
    margin-bottom: 20px;
    color: #333;
}

.order-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-details-label {
    font-weight: 600;
    color: #333;
}

.order-details-value {
    color: #666;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.order-items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.order-items-table .item-total {
    font-weight: 700;
    background: #f8f9fa;
}

.checkout-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f1aeb5;
}

.checkout-error ul {
    margin: 0;
    padding-left: 20px;
}

/* Адаптивность для оформления заказов */
@media (max-width: 768px) {
    .checkout-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .checkout-form,
    .order-summary {
        padding: 20px;
    }
    
    .order-summary {
        position: static;
    }
    
    .order-success {
        padding: 30px 20px;
    }
    
    .order-details {
        padding: 20px;
    }
    
    .order-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* Карточка бренда */
.brand-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 50px;
    margin-bottom: 48px;
}
    @media (max-width: 768px) {
        .brand-header {
            flex-direction: column;
        }
    }
.brand-header__logo {
    max-width: 347px;
}
    .brand-header__logo img {
        width: 100%;
        height: auto;
    }
    @media (max-width: 768px) {
        .brand-header__logo {
            max-width: 50%;
        }
    }
.brand-header__content {
    flex: 1;
    min-width: 0;
}

/* Стили для фильтра брендов */
.brand-filter {
    /* Стили для контейнера фильтра брендов */
}

/* Секция брендов в категориях */
.category-brands {
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 36px;
    border: 1px solid #D0D0D0;
    display: flex;
    gap: 20px 52px;
    align-items: center;
}

.category-brands__title {
    font-size: 16px;
}

.category-brands__list {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    align-items: center;
}

.category-brands__item {
}

.category-brands__link {
    display: flex;
    text-decoration: none;
    outline: none;
}

.category-brands__logo {
    height: 35px; width: auto;
    max-width: 120px;
}

/* Каталог: секция брендов */
.catalog-brands {
    margin-bottom: 150px;
}
.catalog-brands__header {
    display: flex;
    align-items: center;
    gap: 20px 52px;
    margin-bottom: 50px;
}
h2#catalog-brands-title {
    font-size: 40px;
}
.catalog-brands__search input[type="search"] {
    width: 305px;
    max-width: 100%;
    height: 48px;
    padding: 0 18px 0 18px;
    border-radius: 5px;
    border: none;
    font-size: 15px;
    background: #F3F5F7;
    font-family: var(--main-font);
    background-image: url(../img/search.png);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    background-size: 14px auto;
}
.catalog-brands__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
}
.catalog-brands__item {
    display: inline-flex;
}
.catalog-brands__item.is-hidden { display: none; }
.catalog-brands__logo {
    height: 48px;
    width: auto;
}
@media (max-width: 768px) {
    .catalog-brands__header { flex-direction: column; align-items: stretch; }
    .catalog-brands__search input[type="search"] { width: 100%; }
}

/* Адаптивность для секции брендов */
@media (max-width: 768px) {
    .category-brands {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .category-brands__title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .category-brands__list {
        gap: 10px;
    }
    
    .category-brands__item {
        padding: 8px 12px;
    }
    
    .category-brands__logo {
        height: 32px;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .category-brands__list {
        gap: 8px;
    }
    
    .category-brands__item {
        padding: 6px 10px;
    }
    
    .category-brands__logo {
        height: 28px;
        max-width: 80px;
    }
}

/* Стили для кнопки "Показать еще" */
.load-more-container {
    display: flex;
    justify-content: center;
}

.load-more-btn {
    width: 100%;
    background: #F3F5F7;
    border: 0;
    color: #000;
    border-radius: 5px;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 15px; 
    font-weight: 600;
}
    .load-more-btn:disabled {}

.load-more-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Лайтбокс изображений товара */
@media (min-width: 801px) {
    .product-lightbox {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        padding: 40px;
        cursor: zoom-out;
    }
    .product-lightbox.active { display: flex; }
    .product-lightbox__img {
        max-width: 90vw;
        max-height: 90vh;
        object-fit: contain;
        box-shadow: 0 8px 30px rgba(0,0,0,0.5);
        cursor: default;
    }
    .product-lightbox__close {
        position: absolute;
        top: 16px;
        right: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255,255,255,0.9);
        color: #000;
        border: 0;
        font-size: 28px;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
    }
    .product-lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(255,255,255,0.9);
        color: #000;
        border: 0;
        font-size: 32px;
        line-height: 48px;
        text-align: center;
        cursor: pointer;
        user-select: none;
    }
    .product-lightbox__prev { left: 20px; }
    .product-lightbox__next { right: 20px; }
}

/* Курсор увеличения на главном изображении галереи */
@media (min-width: 801px) {
    .product-detail__image img { cursor: zoom-in; }
}

/* ===== МОДАЛЬНОЕ ОКНО (универсальные стили) ===== */
.modal {position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1100;}
.modal.modal--open {display: flex;}
.modal__backdrop {position: absolute; inset: 0; background: rgba(0,0,0,.6);} 
.modal__dialog {position: relative; z-index: 1; background: #fff; border-radius: 16px; width: 90%; max-width: 520px; padding: 24px 24px 28px 24px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);} 
.modal__close {position: absolute; top: 10px; right: 14px; background: transparent; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #333;}
.modal__title {margin: 0 0 16px 0; font-size: 28px; font-weight: 700; color: #1C1C1C;}
.modal__description {margin: 0 0 20px 0; font-size: 14px; color: #666; line-height: 1.4;}
.modal__submit {width: 100%; margin-top: 10px;}
.modal__policy {margin-top: 14px; font-size: 12px; color: #777;}
.modal__policy a {color: inherit; text-decoration: underline;}
.modal__success {margin-top: 12px; padding: 14px 16px; border-radius: 10px; background: #ECF7EC; color: #2f8a2f; font-size: 14px;}
.modal__thanks-title {margin: 0 0 8px 0; font-size: 22px; font-weight: 700; color: #1C1C1C;}

/* Состояние после успешной отправки: показываем только сообщение */
.callback-form--sent .form-group,
.callback-form--sent fieldset,
.callback-form--sent .modal__submit,
.callback-form--sent .modal__policy {display: none;}
.callback-form--sent .modal__success {display: block !important;}

.cheaper-form--sent .form-group,
.cheaper-form--sent .modal__submit,
.cheaper-form--sent .modal__policy {display: none;}
.cheaper-form--sent .modal__success {display: block !important;}

/* Формы внутри модалки наследуют стили сайта */
.callback-form .form-group, .cheaper-form .form-group {margin-bottom: 14px;}
.callback-form label, .cheaper-form label {display: block; margin-bottom: 6px; font-weight: 600; color: #333;}
.callback-form input[type="text"],
.callback-form input[type="tel"],
.cheaper-form input[type="text"],
.cheaper-form input[type="tel"],
.cheaper-form input[type="url"] {width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 10px; font-size: 16px; background: var(--main-grey, #F3F5F7);} 
.callback-form input[type="text"]:focus,
.callback-form input[type="tel"]:focus,
.cheaper-form input[type="text"]:focus,
.cheaper-form input[type="tel"]:focus,
.cheaper-form input[type="url"]:focus {outline: none; border-color: var(--main-orange); box-shadow: 0 0 0 3px rgba(223,89,49,0.1);} 
.callback-form .form-error, .cheaper-form .form-error {margin-top: 6px; color: #dc3545; font-size: 12px;}

/* Стили для поля загрузки файлов */
.cheaper-form .file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cheaper-form .file-select-btn {
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    background: var(--main-grey, #F3F5F7) !important;
    color: #333 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cheaper-form .file-select-btn:hover {
    border-color: var(--main-orange) !important;
    background: #fff !important;
}

.cheaper-form .file-name {
    font-size: 14px;
    color: #666;
    font-style: italic;
    word-break: break-all;
}

.cheaper-form .file-name:not(:empty):before {
    content: "Выбран файл: ";
    color: #333;
    font-style: normal;
    font-weight: 600;
}

.cheaper-form .form-help {
    margin-top: 4px; 
    font-size: 11px; 
    color: #888; 
    line-height: 1.3;
    width: 100%;
}

.fieldset-title {font-weight: 600; color: #333; margin: 8px 0 10px 0;}
.form-group--contact {border: none; padding: 0; margin: 0 0 8px 0;}
.radio-group {display: flex; gap: 16px;}
.radio-label {display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; padding-left: 28px; position: relative;}
.radio-label input[type="radio"] {accent-color: var(--main-orange);} 
.radio-group--icons .radio-label::before {content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; background-size: 18px auto; background-repeat: no-repeat; background-position: center;}
.radio-label--whatsapp::before {background-image: url(../img/ask_wa.png);} 
.radio-label--telegram::before {background-image: url(../img/ask_tg.png);} 
.radio-label--phone::before {background-image: url(../img/ask_call.png);} 


/* Promo-banner */
.promo-banner {
    margin-bottom: 60px;
}
.promo-banner__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 52px 21px;
}
    @media (max-width: 768px) {
        .promo-banner__grid {
            display: flex; flex-direction: column;
        }
    }
.promo-banner__main {
    grid-column: span 3;
}
    img.promo-banner__img {
        width: 100%;
        height: auto;
    }
.promo-banner__side {
}
    img.promo-banner__side-img {
        width: 100%;
        height: auto;
    }
}