/* Стили для страницы каталога */

/* Основной контент каталога */
.catalog-content {
    margin-top: 60px; /* Отступ для фиксированной шапки */
    min-height: 100vh;
    padding: 50px 25px 0px 25px; /* Верхний отступ 50px, боковые 25px */
}

/* Заголовок */
.catalog-title {
    font-family: 'BodoniNova', serif;
    font-size: 33.3px;
    font-weight: 400;
    line-height: 1.2;
    color: #111111;
    margin-bottom: 30px; /* Отступ до панели фильтров */
}

/* Панель фильтров */
.catalog-filters {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    height: auto;
}

/* Категории слева */
.catalog-categories {
    width: 590px;
}

.catalog-categories-swiper {
    position: relative;
    width: 100%;
    height: 100%;
}

.swiper-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 20px;
    margin-top: 8px;
    overflow: hidden;
}

.swiper-slide {
    flex-shrink: 0;
    height: 20px;
    display: flex;
    align-items: center;
}

.swiper-slide.active .category-text,
.swiper-slide.active .category-text a {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12.7px;
    line-height: 1.57;
    color: #111111;
}

/* Подкатегории рядом с активной категорией */
/* .swiper-slide.subcat .category-text::before { content: "•"; opacity: .6; margin-right: 3px; } */
.swiper-slide.subcat .category-text a { color: #555555; }
.swiper-slide.subcat.is-current-subcat .category-text,
.swiper-slide.subcat.is-current-subcat .category-text a { font-weight: 700; color: #111111; }


.category-text,
.category-text a {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.54;
    color: #777777;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
}

.category-text:hover {
    color: #111111;
}

/* Стрелка прокрутки категорий */
.categories-arrow-right {
    position: absolute;
    right: 0px;
    top: 0px;
    width: 40px;
    height: 20px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    padding-right: 5px;
    transition: all 0.3s ease;
}

.categories-arrow-right:hover {
    opacity: 0.7;
}

.categories-arrow-right svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.categories-arrow-right.rotated svg {
    transform: rotate(180deg);
}

/* Расширенное состояние категорий */
.catalog-categories.expanded {
    width: 50% !important;
}

.catalog-categories.expanded .swiper-wrapper {
    flex-wrap: wrap !important;
    height: auto !important;
    overflow: visible !important;
    gap: 0px 10px; /* Только горизонтальный отступ */
    margin-top: 8px;
}

/* Message when no more products */
.catalog-load-more__message {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.catalog-load-more__button.is-loading { opacity: .7; pointer-events: none; }
.catalog-load-more__button.is-disabled { opacity: .5; pointer-events: none; }


.catalog-categories.expanded .swiper-slide {
    margin-bottom: 10px;
}

/* Сортировка справа */
.catalog-sorting {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 20px;
    margin-top: 8px;
}

.filters-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.08;
    color: #111111;
    cursor: pointer;
    display:none;
}

.dropdown-activator {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.catalog-sorting .dropdown-activator { flex: 0 0 auto; width: auto; }
.catalog-sorting .woocommerce-ordering { width: auto; }
.catalog-sorting .dropdown-activator .dropdown-icon { margin-left: 4px; }

.sort-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.54;
    color: #111111;
}

.dropdown-icon {
    width: 9px;
    height: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-icon svg {
    width: 9px;
    height: 6px;
}


/* WooCommerce ordering inside custom sorting */
.catalog-sorting .woocommerce-ordering { margin: 0; display: inline-flex; align-items: center; }
.catalog-sorting .woocommerce-ordering label { display: none; }
.catalog-sorting .woocommerce-ordering .orderby {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
    min-width: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.54;
    color: #111111;
    cursor: pointer;
    outline:0!important;
    width: 110px;
}
.catalog-sorting .dropdown-activator { position: static; }
.catalog-sorting .dropdown-activator .dropdown-icon {
    position: static;
    transform: none;
    pointer-events: none;
}

/* Секция с товарами */
.catalog-products {
    margin-top: 25px;
    margin-bottom: 25px; /* Отступ перед moodboard секцией */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Ряд товаров */
.catalog-products-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.search-suggest__products .catalog-products-row {
    gap: 20px;
}

/* Карточка товара */
.catalog-product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(25% - 7.5px); /* 25% ширины минус часть gap для 4 товаров в ряд */
    flex-shrink: 0;
    position: relative;
}
.search-suggest__products .catalog-product-card {
    width: calc(24% - 7.5px);
}

.catalog-product-card .add-towishlist-custom {
    position: absolute;
    z-index: 10;
    right: 15px;
    top: 15px;
    width: 25px;
}
.search-suggest__products .catalog-product-card .add-towishlist-custom {
    right: 8px;
    top: 9px;
}
.catalog-product-card .add-towishlist-custom .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-custom img, 
.catalog-product-card .add-towishlist-custom a.wishlist_products_counter.top_wishlist-custom img, 
.catalog-product-card .add-towishlist-custom span.wishlist_products_counter.top_wishlist-custom img {
    max-width: 25px;
    max-height: 23px;
}
.search-suggest__products .catalog-product-card .add-towishlist-custom .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-custom img {
    max-width: 19px;
    max-height: 17px;
}

/* Контейнер изображения */
.catalog-product-card__image {
    position: relative;
    width: 100%;
    height: 580px;
    background-color: #EFF2F9;
    border-radius: 20px;
    overflow: hidden;
}

/* Фото товара */
.catalog-product-card__photo,
.woocommerce-page .catalog-product-card__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

/* Основное изображение */
.catalog-product-card__photo--main {
    opacity: 1;
    z-index: 1;
}

/* Hover изображение */
.catalog-product-card__photo--hover {
    opacity: 0;
    z-index: 2;
}

/* Hover эффекты */
.catalog-product-card__image:hover .catalog-product-card__photo--main {
    opacity: 0;
    transform: scale(1.05);
}

.catalog-product-card__image:hover .catalog-product-card__photo--hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Дополнительные стили для плавности */
.catalog-product-card__image-link {
    display: block;
    text-decoration: none;
    width: 100%;
}

/* Бейджик NEW */
.catalog-product-card__badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #811823;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1em;
    text-align: center;
    padding: 6px 10px;
    border-radius: 5px;
    width: auto;
    height: 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* Плашка "Нет в наличии" */
.catalog-product-card__out-of-stock {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: #811823;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1em;
    text-align: center;
    padding: 6px 12px;
    border-radius: 5px;
    box-sizing: border-box;
    z-index: 3;
    white-space: nowrap;
}

/* Описание товара */
.catalog-product-card__description {
    display: flex;
    justify-content: space-between;
    align-items: start;
    height: 20px;
    gap: 20px;
}

.catalog-product-card__description {
    height: auto;
}

/* Название товара */
.catalog-product-card__title {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: normal;
    letter-spacing: 5%;
    color: #000000;
    margin: 0;
}

/* Цена товара */
.catalog-product-card__price {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 10.6px;
    line-height: normal;
    color: #222222;
}

/* Ссылка на название товара */
.catalog-product-card__title-link {
    text-decoration: none;
    color: inherit;
}

.catalog-product-card__title-link:hover {
    opacity: 0.8;
}
@media(min-width: 1201px) and (max-width:1600px) {
    .catalog-product-card__image {
        height: 440px;
    }
}

/* Адаптивные стили для контента каталога */
@media (min-width: 769px) and (max-width: 1200px) {
    .catalog-products-row {
        flex-wrap: wrap;
    }
    .catalog-product-card {
        width: calc(50% - 7.5px);
    }
    .catalog-product-card__image {
        height: 650px;
    }
}

@media (max-width: 768px) {
    .catalog-content {
        padding: 50px 20px 40px 20px;
    }

    .catalog-filters {
        flex-direction: column;
        gap: 20px;
        height: auto;
    }

    .catalog-categories {
        width: 100%;
    }

    .catalog-categories.expanded {
        width: 100% !important;
    }

    .catalog-sorting {
        justify-content: space-between;
        width: 100%;
        gap: 20px;
    }

    /* Адаптивные стили для товаров */

    .catalog-products-row {
        flex-wrap: wrap;
        gap: 15px;
    }

    .catalog-product-card {
        width: calc(50% - 7.5px); /* 2 товара в ряд на планшетах */
    }

    .catalog-product-card__image {
        height: 430px;
    }

    .swiper-wrapper {
        gap: 10px 15px;
        height: auto;
        overflow: initial;
        flex-wrap: wrap;
    }

    .catalog-product-card .add-towishlist-custom {
        right: 5px;
        top: 8px;
    }

    .catalog-product-card .add-towishlist-custom .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-custom img,
    .catalog-product-card .add-towishlist-custom a.wishlist_products_counter.top_wishlist-custom img,
    .catalog-product-card .add-towishlist-custom span.wishlist_products_counter.top_wishlist-custom img {
        max-width: 18px;
        max-height: 16px;
    }

    .catalog-product-card__out-of-stock {
        bottom: 12px;
        right: 12px;
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .catalog-content {
        padding: 30px 15px 40px 15px;
    }

    .catalog-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .swiper-wrapper {
        gap: 10px;
    }

    .catalog-sorting {
        gap: 15px;
    }

    /* Адаптивные стили для товаров на мобильных */

    .catalog-products-row {
        gap: 10px;
    }

    .catalog-product-card {
        width: calc(50% - 5px); /* 2 товара в ряд на мобильных */
    }

    .catalog-product-card__image {
        height: 280px;
        border-radius: 15px;
    }

    .catalog-product-card__title {
        font-size: 11px;
    }

    .catalog-product-card__price {
        font-size: 9px;
    }

    .catalog-product-card__badge {
        top: 10px;
        right: 10px;
        font-size: 10px;
        padding: 4px 8px;
        width: max-content;
        height: 20px;
    }

    .catalog-product-card__out-of-stock {
        bottom: 8px;
        right: 8px;
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Дополнительные товары после moodboard */
.catalog-additional-products {
    padding: 0 25px; /* Боковые отступы как у основного контента */
}
.catalog-additional-products .catalog-products {
    margin-top: 0px;
    margin-bottom: 50px;
}

/* Кнопка "Загрузить еще" */
.catalog-load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px; /* Отступ 50px от товаров */
    margin-bottom: 70px; /* Нижний отступ 70px */
    width: 100%;
}

.catalog-load-more__button {
    width: 203px;
    height: 60px;
    background-color: #811823;
    border: 1px solid #811823;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-load-more__button:hover {
    background-color: #6d1420;
    border-color: #6d1420;
}

.catalog-load-more__button:active {
    transform: translateY(1px);
}

.catalog-load-more__text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #FFFFFF;
    text-align: center;
}

/* Стили для moodboard секции на странице каталога */
.catalog-moodboard {
    padding: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.catalog-moodboard__container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 720px;
}

.catalog-moodboard__banner {
    position: relative;
    background-color: #f5f5f5;
    width: 100%;
    flex: 1;
}

/* Адаптивные стили для дополнительных товаров */
@media (max-width: 768px) {
    .catalog-additional-products {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .catalog-additional-products {
        padding: 0 15px;
    }

    /* Адаптивные стили для кнопки "Далее" на мобильных */
    .catalog-load-more__button {
        width: 180px;
        height: 50px;
    }

    .catalog-load-more__text {
        font-size: 13px;
    }
}

/* Адаптивные стили для moodboard на странице каталога */
@media (max-width: 768px) {
    .catalog-moodboard__container {
        height: 400px;
    }

    .catalog-moodboard .moodboard__title {
        font-size: 48px;
    }

    .catalog-moodboard .moodboard__hotspot {
        display: none;
    }
}
