<?php

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");

/**
 * @global CMain $APPLICATION
 */

$APPLICATION->SetTitle("");
?>/* ============================================================ */
/* КАТАЛОГ: ПОЛНЫЙ ФАЙЛ СТИЛЕЙ (без фильтра)                    */
/* ============================================================ */

/* ============================================================ */
/* 1. БАЗОВЫЕ СТИЛИ КАТАЛОГА                                    */
/* ============================================================ */

.catalog-section {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================================ */
/* 2. ОБЁРТКА: ФИЛЬТР СЛЕВА, КОНТЕНТ СПРАВА (FLEX)             */
/* ============================================================ */

.catalog-filter-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 16px 0 40px;
}

/* ===== ФИЛЬТР (СЛЕВА) ===== */
.catalog-filter-sidebar {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    overflow: hidden;
}

/* ===== КОНТЕНТ (СПРАВА) ===== */
.catalog-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ============================================================ */
/* 3. БЛОКИ В КОНТЕНТЕ                                           */
/* ============================================================ */

.catalog-gifts,
.catalog-subsections,
.catalog-compare,
.catalog-products,
.catalog-bigdata {
    margin-bottom: 24px;
}

.catalog-gifts:last-child,
.catalog-subsections:last-child,
.catalog-compare:last-child,
.catalog-products:last-child,
.catalog-bigdata:last-child {
    margin-bottom: 0;
}

.catalog-block-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

/* ============================================================ */
/* 4. ОПИСАНИЕ РАЗДЕЛА                                           */
/* ============================================================ */

.catalog-section-desc {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.catalog-section-desc p {
    margin: 0;
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.6;
}

/* ============================================================ */
/* 5. ПОДРАЗДЕЛЫ (GRID)                                         */
/* ============================================================ */

.catalog-subsections .catalog-section-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.catalog-subsections .catalog-section-item {
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.catalog-subsections .catalog-section-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.catalog-subsections .catalog-section-item a {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.catalog-subsections .catalog-section-item a:hover {
    color: #007de3;
}

/* ============================================================ */
/* 6. СЕТКА ТОВАРОВ (GRID)                                      */
/* ============================================================ */

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

/* ============================================================ */
/* 7. КАРТОЧКА ТОВАРА                                           */
/* ============================================================ */

.catalog-product {
    position: relative;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "image" 
        "buy" 
        "title" 
        "voblers" 
        "stat" 
        "specs" 
        "avails";
    grid-template-rows: 347px 44px auto auto 28px auto 36px;
    overflow: hidden;
    padding: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.catalog-product:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ============================================================ */
/* 7.1 ИЗОБРАЖЕНИЕ                                               */
/* ============================================================ */

.catalog-product__image {
    grid-area: image;
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-product__image-link {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-product__image-link img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.catalog-product__image-link:hover img {
    transform: scale(1.03);
}

.catalog-product__image-picture-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.catalog-product__image-dots-wrapper {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.catalog-product__image-dots {
    display: flex;
    gap: 6px;
}

.catalog-product__image-dots-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.3s ease;
}

.catalog-product__image-dots-dot_active {
    background: #0055cc;
    transform: scale(1.2);
}

.catalog-product__image-dots-dot:hover {
    background: #0055cc;
}

/* ============================================================ */
/* 7.2 БЕЙДЖИ / ВОБЛЕРЫ                                          */
/* ============================================================ */

.catalog-product__additional-voblers {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.additional-vobler {
    display: flex;
    align-items: center;
    justify-content: center;
}

.additional-vobler img {
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.catalog-product__discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff544b;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
}

/* ============================================================ */
/* 7.3 ЦЕНА И КНОПКИ                                             */
/* ============================================================ */

.catalog-product__buy {
    grid-area: buy;
    padding: 0 12px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-buy__price-wrap {
    display: flex;
    flex-direction: column;
}

.product-buy__price {
    font-size: 20px;
    font-weight: 700;
    color: #333333;
}

.product-buy__price-old {
    font-size: 14px;
    color: #bbbbbb;
    text-decoration: line-through;
}

.product-buy__sub {
    font-size: 12px;
    color: #7d7c7c;
}

/* КНОПКИ */
.button-ui {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
    white-space: nowrap;
    min-height: 40px;
}

.button-ui:active {
    transform: scale(0.96);
}

.button-ui_grey {
    background: #f7f7f7;
    color: #333333;
}

.button-ui_grey:hover {
    background: #eeeeee;
}

.button-ui_white {
    background: #ffffff;
    color: #333333;
    border: 1px solid #d2d1d1;
}

.button-ui_white:hover {
    border-color: #a7a5a5;
    background: #f7f7f7;
}

.button-ui_orange {
    background: #ffa218;
    color: #ffffff;
}

.button-ui_orange:hover {
    background: #fc8507;
}

.button-ui_disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.button-ui_md {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 40px;
}

.button-ui_icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.buy-btn__mobile-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.buy-btn__mobile-icon_cart {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H4.38197C5.04482 2.25 5.65078 2.6245 5.94721 3.21738L6.46353 4.25H20.1384C21.0982 4.25 21.6999 5.28685 21.2237 6.12017L17.9391 11.8682C17.6275 12.4135 17.0477 12.75 16.4197 12.75H8.91567L7.59225 14.8675C7.48818 15.034 7.60789 15.25 7.80425 15.25H19C19.4142 15.25 19.75 15.5858 19.75 16C19.75 16.4142 19.4142 16.75 19 16.75H7.80425C6.42974 16.75 5.59176 15.2381 6.32025 14.0725L7.67159 11.9103L5.30898 5.295L4.60557 3.8882C4.56322 3.8035 4.47666 3.75 4.38197 3.75H3C2.58579 3.75 2.25 3.41421 2.25 3Z" fill="%23333"/></svg>') no-repeat center;
    background-size: contain;
}

.buy-btn__text {
    display: inline;
    margin-left: 4px;
}

.wishlist-btn_empty {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 18" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.25 6.36912C0.25 3.07041 2.65767 0.25 5.79925 0.25C7.49913 0.25 8.99404 1.08608 10 2.36847C11.0059 1.08613 12.5006 0.25 14.1996 0.25C17.3423 0.25 19.75 3.07167 19.75 6.36912C19.75 7.69532 19.2489 8.97129 18.5251 10.1284C17.7997 11.2883 16.8229 12.3733 15.8015 13.3326C13.7592 15.2508 11.4589 16.7397 10.3901 17.3906C10.1504 17.5365 9.84927 17.5365 9.60965 17.3904C8.54109 16.7391 6.24079 15.2501 4.19851 13.3322C3.17709 12.3729 2.20033 11.288 1.47488 10.1283C0.751138 8.97123 0.25 7.69533 0.25 6.36912Z" fill="none" stroke="%23a7a5a5" stroke-width="1.5"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

.wishlist-btn_empty:hover {
    border-color: #a7a5a5;
    background-color: #f7f7f7;
}

/* ============================================================ */
/* 7.4 НАЗВАНИЕ                                                  */
/* ============================================================ */

.catalog-product__name-wrapper {
    grid-area: title;
    padding: 8px 12px 4px;
}

.catalog-product__name {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 40px;
    transition: color 0.2s ease;
}

.catalog-product__name:hover {
    color: #007de3;
}

.catalog-product__short-specs {
    color: #7d7c7c;
    font-weight: 400;
}

/* ============================================================ */
/* 7.5 ВОБЛЕРЫ                                                   */
/* ============================================================ */

.catalog-product__voblers {
    grid-area: voblers;
    padding: 0 12px 4px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 24px;
}

/* ============================================================ */
/* 7.6 ХАРАКТЕРИСТИКИ                                             */
/* ============================================================ */

.catalog-product__specs {
    grid-area: specs;
    padding: 4px 12px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.catalog-product__spec {
    display: flex;
    gap: 4px;
    font-size: 12px;
    color: #7d7c7c;
}

.catalog-product__spec-label {
    color: #bbbbbb;
}

.catalog-product__spec-value {
    color: #333333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* ============================================================ */
/* 7.7 СТАТИСТИКА                                                */
/* ============================================================ */

.catalog-product__stat {
    grid-area: stat;
    padding: 0 12px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7d7c7c;
    flex-wrap: wrap;
}

.compare-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ui-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.ui-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.catalog-product__rating,
.catalog-product__comment,
.catalog-product__service-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #7d7c7c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.catalog-product__rating:hover,
.catalog-product__comment:hover,
.catalog-product__service-rating:hover {
    color: #007de3;
}

.catalog-product__rating b {
    color: #333333;
}

.catalog-product__comment-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%237d7c7c"><path d="M12 2C6.48 2 2 6.04 2 10.5c0 2.33 1.14 4.43 3 5.87V20l3.24-1.87C9.17 18.64 10.57 19 12 19c5.52 0 10-4.04 10-8.5S17.52 2 12 2z"/></svg>') no-repeat center;
    background-size: contain;
}

.catalog-product__service-rating-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.catalog-product__service-rating-icon_high {
    background: #00be70;
}

.catalog-product__service-rating-icon_medium {
    background: #ffa218;
}

.catalog-product__service-rating-icon_low {
    background: #ff544b;
}

/* ============================================================ */
/* 7.8 НАЛИЧИЕ И ДОСТАВКА                                        */
/* ============================================================ */

.catalog-product__avails {
    grid-area: avails;
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.available {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.available-hard {
    color: #00be70;
}

.available-hard::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00be70;
    flex-shrink: 0;
}

.available-soft {
    color: #ffa218;
}

.available-soft::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffa218;
    flex-shrink: 0;
}

.available-out {
    color: #ff544b;
}

.available-out::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff544b;
    flex-shrink: 0;
}

.order-avail-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.order-avail-wrap__link {
    color: #007de3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.order-avail-wrap__link:hover {
    color: #0055cc;
    text-decoration: underline;
}

.delivery-info-widget {
    display: flex;
    align-items: center;
    gap: 4px;
}

.delivery-info-widget__text {
    color: #7d7c7c;
}

.delivery-info-widget__button {
    color: #007de3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.delivery-info-widget__button:hover {
    color: #0055cc;
    text-decoration: underline;
}

/* ============================================================ */
/* 8. ПАГИНАЦИЯ                                                  */
/* ============================================================ */

.catalog-pagination-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.catalog-pagination-wrapper .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-pagination-wrapper .pagination li {
    display: inline-block;
}

.catalog-pagination-wrapper .pagination li a,
.catalog-pagination-wrapper .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d2d1d1;
    border-radius: 8px;
    font-size: 14px;
    color: #333333;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catalog-pagination-wrapper .pagination li a:hover {
    background: #f7f7f7;
    border-color: #a7a5a5;
}

.catalog-pagination-wrapper .pagination li.active span {
    background: #0055cc;
    border-color: #0055cc;
    color: #ffffff;
}

.catalog-pagination-wrapper .pagination li.disabled span {
    color: #bbbbbb;
    cursor: not-allowed;
}

.catalog-pagination-wrapper .pagination li.disabled span:hover {
    background: transparent;
    border-color: #d2d1d1;
}

/* ============================================================ */
/* 9. LAZY LOAD                                                  */
/* ============================================================ */

.catalog-lazy-load {
    text-align: center;
    padding: 20px 0 40px;
}

.catalog-lazy-load__btn {
    display: inline-block;
    padding: 12px 40px;
    background: #ffffff;
    border: 1px solid #d2d1d1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.catalog-lazy-load__btn:hover {
    background: #f7f7f7;
    border-color: #a7a5a5;
}

/* ============================================================ */
/* 10. ПУСТОЙ РАЗДЕЛ                                             */
/* ============================================================ */

.catalog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #7d7c7c;
    font-size: 16px;
}

.catalog-empty p {
    margin: 0;
}

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

/* Планшеты (769px - 992px) */
@media (max-width: 992px) {
    .catalog-filter-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .catalog-filter-sidebar {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        position: static;
    }
    
    .catalog-content {
        flex: 1;
        width: 100%;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .catalog-product {
        grid-template-rows: 280px 44px auto auto auto auto 36px;
    }
    
    .catalog-subsections .catalog-section-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Мобильные (портрет) — до 768px */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .catalog-product {
        grid-template-rows: 220px 44px auto auto auto auto 36px;
        border-radius: 12px;
    }
    
    .product-buy__price {
        font-size: 17px;
    }
    
    .catalog-product__name {
        font-size: 13px;
        min-height: 36px;
    }
    
    .catalog-product__specs {
        display: none;
    }
    
    .catalog-pagination-wrapper .pagination li a,
    .catalog-pagination-wrapper .pagination li span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
        border-radius: 6px;
    }
    
    .catalog-pagination-wrapper {
        padding: 12px 0;
    }
    
    .buy-btn__text {
        display: none;
    }
    
    .catalog-block-header {
        font-size: 16px;
    }
    
    .catalog-subsections .catalog-section-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .catalog-subsections .catalog-section-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Мобильные (маленькие) — до 480px */
@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }
    
    .catalog-product {
        grid-template-rows: 180px 40px auto auto auto auto 32px;
        border-radius: 8px;
    }
    
    .product-buy__price {
        font-size: 15px;
    }
    
    .button-ui_md {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 34px;
    }
    
    .button-ui_icon {
        width: 34px;
        height: 34px;
    }
    
    .catalog-product__name {
        font-size: 12px;
        min-height: 32px;
    }
    
    .catalog-product__stat {
        font-size: 11px;
        gap: 4px;
    }
    
    .catalog-product__avails {
        font-size: 12px;
    }
    
    .catalog-pagination-wrapper .pagination li a,
    .catalog-pagination-wrapper .pagination li span {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 0 6px;
        border-radius: 4px;
    }
    
    .catalog-lazy-load__btn {
        padding: 10px 24px;
        font-size: 12px;
    }
    
    .catalog-section {
        padding: 0 8px;
    }
    
    .catalog-filter-wrapper {
        padding: 8px 0 20px;
        gap: 12px;
    }
    
    .catalog-subsections .catalog-section-list {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .catalog-subsections .catalog-section-item {
        padding: 8px 10px;
        font-size: 12px;
    }
}