@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&display=swap');

.catalog-container {
    margin: 0 auto;
    width: 100%;
}

.product-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    /*grid-template-columns: 450px 1fr;*/
    padding-bottom: 50px;
    gap: 80px;
}

.product-container {
    width: 100%;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 80px;
}

.filters {
    margin: 0;
    min-width: none;
}

.product-wrapper {
    width: 100%;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
    padding: 50px 65px;
}

.product-title__section {
    font-size: 48px;
    font-weight: 500;
}
.product-title__section h1 {
    font-family: 'Didact Gothic', sans-serif;
    font-weight: 500;
    font-size: 1.7rem;
}


.product-count-sort__section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    color: #7a8a8f;
}


.goods-count {
    display: flex;
    flex-grow: 0; /* Если не хотите, чтобы этот блок растягивался */
    margin-right: 20px; /* Добавьте отступ, если нужно разделить блоки */
}

.product-sort__section {
    display: flex;
    flex-grow: 1; /* Этот блок будет растягиваться, чтобы занять оставшееся место */
    justify-content: flex-end; /* Размещает элементы справа */
    align-items: center; /* Выравнивание по вертикали */
}

.sort-text {
    align-items: center;
    display: flex;
    margin-right: 16px;
}

.sort-text__item {
    margin-right: 12px;
}

.sort-option {
    position: relative;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    min-width: 235px; /* Мінімальна ширина */
}

.arrow-container {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    flex-shrink: 0;
}

.view-options {
    display: flex;
    align-items: center;
    border-left: 1px solid #E9ECEF;
}

/* Вимкнення стандартної стрілки Bootstrap */
.dropdown-toggle::after {
    display: none;
}

.btn-group .btn-secondary {
    background-color: transparent !important;
    border: none;
    color: #1E8194;
}

.view-options__icon {
    margin-left: 15px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    padding: 0;
}

.view-options__icon svg path {
    fill: #90CDD8;
}

.view-options__icon:hover svg path {
    fill: #1E8194;
}

.view-options__icon.active svg path {
    fill: #1E8194;
}



/* ========================
   Dropdown Styles
========================= */

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    z-index: 1000;
    min-width: 100%;
    opacity: 1;
    visibility: visible;
    transform: translateY(-10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    width: 100%;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}

/* Контейнер для кнопок шагов */
.step-buttons-container {
    display: flex;
    gap: 10px;                   
    justify-content: center;
    align-items: center;         
    margin-top: 70px;
}

.catalog-container .pagination {
    display: flex;
    gap: 10px;                   
    justify-content: center;
    align-items: center;         
    margin-top: 70px;
}

/* Стили для кнопок шагов */
.step-button {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    border: none;
    background-color: #f0f0f0;
    color: #8D8D8D;
    font-size: 24px;
    font-weight: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;             
    transition: background-color 0.3s ease;
}

.pagination li > a, .pagination li > span {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    border: none;
    background-color: #f0f0f0;
    color: #8D8D8D;
    font-size: 24px;
    font-weight: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;             
    transition: background-color 0.3s ease;
}

/* Эффект при наведении */
.step-button:hover {
    background-color: #FFFFFF; 
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

.pagination li > a:hover, .pagination li > span:hover {
    background-color: #FFFFFF; 
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* Стиль для активной кнопки */
.step-button.active {
    background-color: #1E8194;
    color: #FFFFFF;
}

.pagination li.active > span {
    background-color: #1E8194;
    color: #FFFFFF;
}

.no-scroll {
    overflow: hidden;
    height: 100%;
}


@media (max-width: 1280px){

    .product-header {
        gap: 20px;
    }

    .product-container {
        gap: 20px;
        justify-content: space-between;
    }
    .product-wrapper {
        gap: 30px;
        padding: 20px;
    }
}

@media (max-width: 1100px) and (min-width: 1025px) {
    .product-card {
        height: 500px;
    }
}

@media (max-width: 1024px) {
    .catalog-container {
        margin-top: 50px;
        padding: 0 12px;
    }

    .product-container, .product-header {
        grid-template-columns: 220px 1fr;
        justify-content: space-between;
        gap: 20px;
    }

    .product-card {
        height: auto;
    }

    .product-wrapper {
        grid-template-columns: repeat(2, 1fr);
        background-color: transparent;
        padding: 0;
    }
    .sort-text__item {
        display: none;
    }
}

.filters-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden; 
    transition: opacity 1s ease, visibility 1s ease;
}


.filters-backdrop.visible {
    opacity: 1; 
    visibility: visible;
}

.filters.visible {
    left: 0;
    transition: opacity 1s ease, visibility 1s ease;
}

.filter-toggle {
    display: none;
    background-color: #1E8194;
    color: #fff;
    font-weight: 500;
    border-radius: 12px;
    width: 80px;
    height: auto;
    border: none;
    padding: 5px 7px;
    font-size: 14px;
    cursor: pointer;
}

.filter-toggle:hover {
    background-color: #595959;
}

.goods-count__container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    /*margin-bottom: 16px;*/
}


@media (max-width: 768px) {
    .sort-text {
        margin: 0;
    }
    .sort-option {
        font-size: 14px;
    }
    .filters {
        visibility: visible;
            position: fixed;
            top: 0;
            left: -100%;
            width: 300px;
            height: 100%;
            background-color: #fff;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
            overflow-y: auto;
            transition: left 0.5s ease;
            z-index: 1050;
        }
    
        .filters.visible {
            left: 0;
            display: block;
            padding: 30px;
            transition: left 0.5s ease;
        }
    
        .filter-toggle {
            display: block;
        }
    
        .product-container {
            grid-template-columns: 1fr;
        }
    
        .product-wrapper {
            grid-template-columns: repeat(2, 1fr);
            background-color: transparent;
        }
    
        .product-header {
            grid-template-columns: 1fr;
            padding-bottom: 20px;
        }
    
        .product-wrapper {
            padding: 0;
        }
    
        .product-count-sort__section {
            flex-direction: column;
            align-items: flex-start;
        }
        .product-sort__section {
            display: grid;
            width: 100%;
            grid-template-columns: 1fr;
            grid-template-rows: auto;
        }
    
        .sort-text {
            grid-row: 1;
            grid-column: 1;
            justify-self: start;
        }
    
        .view-options {
            grid-row: 1;
            grid-column: 1;
            justify-self: end;
            border-left: none;
        }
    
        .sort-option {
            min-width: unset;
        }
}

@media (max-width: 480px) {

    .product-wrapper {
        padding: 0;
        background-color: transparent;
        gap: 8px;
    }

    .btn-group .btn {
        padding: 4px;
    }

    .product-card {
        width: 100%; /* Карточки растягиваются по ширине */
        min-width: 0; /* Предотвращаем минимальную ширину */
    }

    .product-header {
        padding-bottom: 20px;
        gap: 10px;
    }
    .catalog-container {
        margin-top: 40px;
    }

}