/* ==========================================
   CATALOG PAGE STYLES
   ========================================== */

/* Catalog Section */

.catalog {
    width: 100%;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 1;
}

@media (max-width: 1199px) {
    .catalog {
        padding: 24px 12px;
        gap: 24px;
    }
}

/* Catalog Header */

.catalog_header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.catalog_title {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 18px;
    color: #181818;
}

@media (max-width: 1199px) {
    .catalog_title {
        font-size: 18px;
        line-height: 14px;
    }
}

/* Catalog Content Layout */

.catalog_content {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 32px;
}

@media (max-width: 1199px) {
    .catalog_content {
        flex-direction: column;
        gap: 16px;
    }
}

/* ==========================================
   SIDEBAR & FILTERS
   ========================================== */

.catalog_sidebar {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 1199px) {
    .catalog_sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        max-height: -webkit-fill-available;
        z-index: 999;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 0;
        gap: 0;
        display: none;
        overflow: hidden;
    }

    .catalog_sidebar.is-open {
        display: flex;
    }
}

.catalog_filters {
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background-color: #FFFFFF;
    border-radius: 24px 24px 12px 12px;
    box-shadow: inset 0 0 0 1px #EFEFEF;
}

@media (max-width: 1199px) {
    .catalog_filters {
        flex: 1;
        min-height: 0;
        max-height: 100%;
        width: 100%;
        max-width: 100%;
        padding: 0;
        gap: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

/* Filters Header */

.filters_header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.filters_title {
    font-family: 'Mulish', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 14px;
    color: #181818;
}

.filters_close {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: 12px;
    color: #181818;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.filters_close svg {
    width: 24px;
    height: 24px;
}

.filters_close:hover {
    background-color: #F8F8F8;
    color: #FF2469;
}

@media (max-width: 1199px) {
    .filters_header {
        padding: 24px;
        border-bottom: 1px solid #EFEFEF;
        flex-shrink: 0;
    }

    .filters_close {
        display: flex;
    }

    .filters_title {
        font-size: 18px;
        line-height: 14px;
    }
}

/* Filters Body */

.filters_body {
    display: contents;
}

@media (max-width: 1199px) {
    .filters_body {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Filter Group */

.filter_group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter_label {
    font-size: 14px;
    font-weight: 600;
    line-height: 10px;
    color: #555555;
}

/* Filter Select */

/* Custom Select - Base */
.custom-select {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.custom-select__trigger {
    width: 100%;
    min-height: 48px;
    max-height: 72px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #F8F8F8;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease,
                box-shadow 0.2s ease,
                border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.custom-select__trigger:hover {
    background-color: #EFEFEF;
}

.custom-select.is-open .custom-select__trigger {
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #FFADC7;
    border-radius: 12px 12px 0 0;
}

.custom-select__value {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25em;
    color: #AAAAAA;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
}

.custom-select__value.is-selected {
    color: #181818;
}

.custom-select__arrow {
    flex-shrink: 0;
    align-self: center;
    width: 14px;
    height: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select__arrow path {
    transition: stroke 0.2s ease;
}

.custom-select.is-open .custom-select__arrow path {
    stroke: #FF2469;
}

/* Custom Select Dropdown */
.custom-select__dropdown {
    position: absolute;
    top: 100%; 
    left: 0; 
    right: 0;
    max-width: 100%;
    max-height: 280px;
    background-color: #FFFFFF;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s;
}

.custom-select.is-open .custom-select__dropdown {
    opacity: 1;
    visibility: visible;
}

/* Custom Select Option */
.custom-select__option {
    min-height: 48px; padding: 0 16px;
    display: flex; align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #555555;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.custom-select__option:hover {
    background-color: #FFF5F8;
    color: #181818;
}

.custom-select__option.is-active {
    background-color: #FFADC7;
    color: #FFFFFF;
    font-weight: 700;
}

.custom-select__option.is-active:hover {
    background-color: #FF9EBF;
}

.custom-select__option:last-child {
    border-radius: 0 0 12px 12px;
}

/* Custom Select Hidden Input */
.custom-select__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom Select Filter Modifier */
.custom-select_filter .custom-select__trigger {
    min-height: 56px;
}

@media (max-width: 1199px) {
    .custom-select_filter .custom-select__trigger {
        min-height: 48px;
    }
    
    .custom-select_filter .custom-select__value {
        font-size: 14px;
    }
    
    .custom-select_filter .custom-select__option {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Custom Select Toolbar Modifier */
.custom-select_toolbar .custom-select__trigger {
    min-width: 250px;
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #EFEFEF;
}

.custom-select_toolbar .custom-select__trigger:hover {
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.custom-select_toolbar.is-open .custom-select__trigger {
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.custom-select_toolbar .custom-select__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(8%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(98%) contrast(88%);
}

.custom-select_toolbar .custom-select__option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-select__option-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(38%) sepia(0%) saturate(0%) hue-rotate(214deg) brightness(94%) contrast(87%);
}

.custom-select__option:hover .custom-select__option-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(98%) contrast(88%);
}

.custom-select__option.is-active .custom-select__option-icon {
    filter: brightness(0) saturate(100%) invert(8%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(98%) contrast(88%);
}

@media (max-width: 1199px) {
    .custom-select_toolbar .custom-select__trigger {
        width: 100%;
        min-width: 0;
    }
}

/* Price Filter */

.filter_price {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.filter_price_input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 12px;
    color: #181818;
    background-color: #F8F8F8;
    border: none;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px #F4F4F4;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 1199px) {
    .filter_price_input {
        font-size: 14px;
    }
}

.filter_price_input::placeholder {
    color: #AAAAAA;
}

.filter_price_input:hover {
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.filter_price_input:focus {
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.filter_price_divider {
    width: 16px;
    height: 1px;
    background-color: #555555;
}

/* Filter Actions */

.catalog_filter_actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 1199px) {
    .catalog_filter_actions {
        flex-shrink: 0;
        flex-direction: row;
        gap: 12px;
        padding: 24px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        background-color: #FFFFFF;
        border-top: 1px solid #EFEFEF;
    }
}

.filter_action_btn {
    width: 100%;
    height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
}

@media (max-width: 1199px) {
    .filter_action_btn {
        flex: 1;
        height: 48px;
        font-size: 14px;
    }
}

.filter_action_reset {
    background-color: #FFFFFF;
    color: #555555;
    box-shadow: inset 0 0 0 1px #EFEFEF;
    border-radius: 12px;
}

.filter_action_reset:hover {
    border-radius: 24px;
    color: #181818;
    box-shadow: inset 0 0 0 1px #FFADC7;
}

@media (max-width: 1199px) {
    .filter_action_reset {
        border-radius: 12px;
    }

    .filter_action_reset:hover {
        border-radius: 12px;
    }
}

.filter_action_apply {
    background-color: #FF2469;
    color: #FFFFFF !important;
    border-radius: 12px 12px 24px 24px;
}

@media (max-width: 1199px) {
    .filter_action_apply {
        border-radius: 12px;
    }
}

.filter_action_apply:hover {
    background-color: #FF0050;
    border-radius: 24px;
}

@media (max-width: 1199px) {
    .filter_action_apply:hover {
        border-radius: 12px;
    }
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */

.catalog_main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (max-width: 1199px) {
    .catalog_main {
        gap: 16px;
    }
}

/* ==========================================
   TOOLBAR (Sort & Filter)
   ========================================== */

.catalog_toolbar {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1199px) {
    .catalog_toolbar {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}

.toolbar_sort {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 1199px) {
    .toolbar_sort {
        width: 100%;
    }
}

.toolbar_label {
    font-size: 14px;
    font-weight: 600;
    line-height: 10px;
    color: #555555;
}

@media (max-width: 1199px) {
    .toolbar_label {
        display: none;
    }
}

/* Mobile Filter Toggle */

.toolbar_filter_toggle {
    display: none;
    height: 48px;
    padding: 0 24px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #FF2469;
    color: #FFFFFF !important;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 12px;
    transition: background-color 0.25s ease, border-radius 0.25s ease;
}

@media (max-width: 1199px) {
    .toolbar_filter_toggle {
        display: flex;
        width: 100%;
        font-size: 14px;
    }
}

.toolbar_filter_toggle:hover {
    background-color: #FF0050;
    border-radius: 24px;
}

.toolbar_filter_toggle svg {
    width: 24px;
    height: 24px;
}

/* ==========================================
   PRODUCTS GRID
   ========================================== */

.catalog_products {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

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

@media (max-width: 1069px) {
    .catalog_products {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 799px) {
    .catalog_products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Catalog Product Item */

.catalog_product {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #EFEFEF;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catalog_product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.catalog_product:hover .product_image img {
    transform: scale(1.05);
}

/* Product Image */

.product_image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product_image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.2s ease;
}

/* Product Content */

.product_content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1199px) {
    .product_content {
        gap: 12px;
        padding: 8px;
    }
}

/* ==========================================
   PAGINATION
   ========================================== */

.catalog_pagination {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 1199px) {
    .catalog_pagination {
        justify-content: center;
    }
}

.pagination_btn {
    min-width: 48px; height: 48px; padding: 0 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 16px; font-weight: 600; line-height: 12px; color: #181818;
    background-color: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

.pagination_btn:hover {
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.pagination_btn_active {
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #EFEFEF;
}

.pagination_btn_next {
    background-color: #FFFFFF;
    color: #181818;
    box-shadow: inset 0 0 0 1px #EFEFEF;
}

.pagination_btn_next:hover {
    border-radius: 24px;
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px #FFADC7;
}

.pagination_btn_next img {width: 14px; height: 14px;}

.pagination_btn_next_text {
    display: inline;
}

@media (max-width: 1199px) {
    .pagination_btn_next {width: 48px; height: 48px;}
    
    .pagination_btn_next_text {
        display: none;
    }
    
    .pagination_btn_next img {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================
   MOBILE FILTER OVERLAY ANIMATIONS
   ========================================== */

@media (max-width: 1199px) {
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }

    .catalog_sidebar.is-open {
        animation: fadeIn 0.3s ease;
    }

    .catalog_sidebar.is-open .catalog_filters {
        animation: slideInRight 0.3s ease;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Класс no-scroll перенесён в mobile-fixes.css для глобального использования */

/* ==========================================
   MOBILE NAVIGATION
   ========================================== */
/* Стили мобильной навигации вынесены в mobile-fixes.css для централизованного управления */

