.catalog__content {
    /*display: flex;*/
    gap: 30px;
}

.catalog__filters {
    width: 250px;
    flex-shrink: 0;
}

.catalog__catalog {
    flex-grow: 1;
}

/* Кнопка мобильного меню фильтров */
/*.catalog__filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.catalog__filters-toggle svg {
    width: 24px;
    height: 24px;
}*/

/* Группы фильтров */
.filter-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin: 0;
}

.filter-title.active {
    color: #2c3e50;
}

.collapse-icon {
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}

.filter-item {
    margin-bottom: 8px;
}

.filter-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-item input {
    margin-right: 8px;
}

.filter-item input:checked + span {
    font-weight: bold;
    color: #2c3e50;
}

/* Кнопки фильтров */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-button {
    flex: 1;
    padding: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.filter-button.reset {
    background: #e74c3c;
}

.filter-button:hover {
    opacity: 0.9;
}

.reset-filter {
    color: #999;
    font-size: 13px;
    text-decoration: none;
}

.reset-filter:hover {
    text-decoration: underline;
}

/* Состояния загрузки */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Сообщения об ошибках */
.error-message {
    padding: 20px;
    text-align: center;
    color: #d63638;
    background: #f8ebea;
    border: 1px solid #d63638;
    border-radius: 4px;
    margin: 20px;
}

/* Мобильные стили */
@media (max-width: 768px) {
    /*.catalog__filters-toggle {
        display: flex;
    }*/

    /* Затемнение экрана */
    .filters-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 800;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.4s;
    }

    .filters-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .filters-wrapper {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 84%;
        height: calc(100% - 74px);
        background: white;
        z-index: 900;
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .filters-wrapper.active {
        transform: translateX(0);
    }

    .catalog__filters {
        width: 100%;
    }
}

/* Пагинация */
.catalog-pagination {
    margin-top: 30px;
}

.page-numbers {
    display: flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #2c3e50;
}

.page-numbers .current {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.page-numbers a:hover {
    background: #f5f5f5;
}

.products-container {
    position: relative;
    min-height: 300px; /* Чтобы избежать "прыжков" при загрузке */
}

.catalog__wrap {
    transition: opacity 0.3s ease;
}

.loading {
    text-align: center;
    font-size: 18px;
    color: #666;
    font-size: 1.2em;
}

.products-container .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    /*height: 200px;*/
    font-size: 18px;
    color: #666;
}

.catalog-pagination .page-numbers {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.catalog-pagination .page-numbers li {
    margin: 0 5px;
}

.catalog-pagination .page-numbers a,
.catalog-pagination .page-numbers span {
    display: block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
}

.catalog-pagination .page-numbers .current {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Стили для кнопки "Повторить последний заказ" */
.reorder-last-order {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reorder-last-button {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.reorder-last-button:hover {
    background: #218838 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.reorder-last-button:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.reorder-hint {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .reorder-last-order {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .reorder-last-button {
        justify-content: center;
    }
}

/* Скрываем уведомления "Корзина обновлена" */
.woocommerce-message:contains("Корзина обновлена"),
.woocommerce-message:contains("Cart updated") {
    display: none !important;
}

/* Альтернативный способ скрытия через CSS */
.woocommerce-message {
    display: none;
}

.woocommerce-message:not(:contains("Корзина обновлена")):not(:contains("Cart updated")) {
    display: block;
}

/* Предотвращаем прокрутку к уведомлениям */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    scroll-margin-top: 0 !important;
    scroll-margin-bottom: 0 !important;
}

/* Отключаем автоматическую прокрутку */
html {
    scroll-behavior: auto !important;
}

/* Скрываем уведомления полностью */
.woocommerce-message:contains("Корзина обновлена"),
.woocommerce-message:contains("Cart updated"),
.woocommerce-message:contains("корзина обновлена"),
.woocommerce-message:contains("cart updated") {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

html {
    scroll-behavior: smooth;
}

/* Стили для строки поиска в каталоге */
.catalog__search-form {
    margin: 20px 0;
    max-width: 400px;
}

.search-form__group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form__input {
    width: 100%;
    padding: 10px 50px 10px 16px;
    border: 2px solid #444;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.search-form__input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* Подсветка поисковой фразы */
.search-form__input.has-search {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.search-form__input.has-search:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25);
}

.search-form__input::placeholder {
    color: #999;
}

.search-form__clear {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffc107;
    border: none;
    color: #856404;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.search-form__clear:hover {
    background-color: #e0a800;
    color: #6f5a23;
    transform: translateY(-50%) scale(1.1);
}

.search-form__clear:active {
    transform: translateY(-50%) scale(0.95);
}

.search-form__clear svg {
    width: 12px;
    height: 12px;
}

.search-form__button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #f16543;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.search-form__button:hover {
    background-color: #f8f9fa;
    color: #f16543;
}

.search-form__button svg {
    width: 24px;
    height: 24px;
}

/* Мобильные стили для поиска */
@media (max-width: 768px) {
    .catalog__search-form {
        max-width: 100%;
        margin: 15px 0;
    }
    
    .search-form__input {
        padding: 10px 45px 10px 14px;
        font-size: 14px;
    }
    
    .search-form__button {
        padding: 6px;
    }
    
    .search-form__button svg {
        width: 18px;
        height: 18px;
    }
}

/* Стили для блока сортировки */
.sort-filter-group {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.sort-filter-title {
    padding: 15px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.sort-filter-title:hover {
    background: #e9ecef;
}

.sort-filter-title.active {
    background: #007cba;
    color: #fff;
}

.sort-filter-list {
    padding: 15px 20px;
    margin: 0;
    list-style: none;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.sort-filter-item {
    margin-bottom: 10px;
}

.sort-filter-item:last-child {
    margin-bottom: 0;
}

.sort-filter-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.3s ease;
}

.sort-filter-item label:hover {
    color: #007cba;
}

.sort-filter-item input[type="radio"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #007cba;
}

.sort-filter-item input[type="radio"]:checked + span {
    color: #007cba;
    font-weight: 600;
}

.sort-filter-reset {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sort-filter-reset:hover {
    background: #e9ecef;
    color: #333;
    text-decoration: none;
}

.sort-filter-reset.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sort-filter-reset.disabled:hover {
    background: #f8f9fa;
    color: #666;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .sort-filter-title {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .sort-filter-list {
        padding: 12px 15px;
    }
    
    .sort-filter-item label {
        font-size: 13px;
    }
    
    .sort-filter-item input[type="radio"] {
        width: 14px;
        height: 14px;
    }
}