/* Стили для всех пунктов меню */
.t-menu__link-item {
    transition: color 0.3s ease; /* Плавный переход для цвета */
    opacity: 1 !important; /* Гарантируем полную непрозрачность */
}

/* Hover-эффект */
.t-menu__link-item:hover {
    color: #ff5c00 !important; /* Оранжевый при наведении */
}

/* Стили для активного пункта меню */
.t-menu__link-item--active,
.t-menu__link-item.t-active {
    color: #ff5c00 !important; /* Оранжевый для активного пункта */
    opacity: 1 !important; /* Полная непрозрачность */
}

/* Переопределяем любые дефолтные стили Tilda для активного состояния */
.t-menu__link-item--active[style],
.t-menu__link-item.t-active[style],
.t-menu__link-item[href="/"][style] {
    opacity: 1 !important; /* Убираем прозрачность, если Tilda добавляет inline-стили */
}

/* Общие стили для контейнеров картинок с эффектом затемнения */
.t912__imgwrapper,
.t509__imgwrapper,
.t-store__card__imgwrapper {
    position: relative !important; /* Для позиционирования оверлея */
    overflow: hidden !important; /* Предотвращаем вылезание содержимого */
    border-radius: 20px !important; /* Скругленные углы */
    height: 100% !important; /* Устанавливаем высоту контейнера */
    pointer-events: auto !important; /* Разрешаем события наведения */
    cursor: auto !important; /* Дефолтный курсор */
}

.t754__imgwrapper {
    position: relative !important; /* Для позиционирования оверлея */
    overflow: hidden !important; /* Предотвращаем вылезание содержимого */
    border-radius: 20px !important; /* Скругленные углы */
    pointer-events: auto !important; /* Разрешаем события наведения */
    cursor: auto !important; /* Дефолтный курсор */
}

/* Общие стили для картинок */
.t754__bgimg, 
.t912__img,
.t509__blockimg,
.t-store__card__bgimg {
    transition: transform 0.4s ease !important; /* Плавное масштабирование */
    display: block !important;
    width: 100% !important;
    height: 100% !important; /* Заполняем контейнер */
    background-size: cover !important; /* Для фоновых изображений */
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 20px !important; /* Скругленные углы */
}

/* Эффект увеличения при наведении */
.t754__imgwrapper:hover .t754__bgimg,
.t912__imgwrapper:hover .t912__img,
.t509__imgwrapper:hover .t509__blockimg,
.t-store__card__imgwrapper:hover .t-store__card__bgimg {
    transform: scale(1.08) !important; /* Увеличение на 8% */
}

/* Общий слой (оверлей) */
.t754__imgwrapper::after,
.t912__imgwrapper::after,
.t509__imgwrapper::after,
.t-store__card__imgwrapper::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.3) !important; /* Затемнение */
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important; /* Скрыт по умолчанию */
    transition: opacity 0.5s ease !important; /* Плавный переход */
    border-radius: 20px !important; /* Скругленные углы */
    pointer-events: none !important; /* Оверлей не мешает наведению */
    z-index: 2 !important; /* Оверлей выше изображения */
}

/* При наведении появляется оверлей */
.t754__imgwrapper:hover::after,
.t912__imgwrapper:hover::after,
.t509__imgwrapper:hover::after,
.t-store__card__imgwrapper:hover::after {
    opacity: 1 !important; /* Показываем оверлей */
}

/* Специфические стили для t509 */
.t509__imgwrapper {
    max-width: 700px !important; /* Ограничение ширины */
}

/* Специфические стили для t509 оверлея */
.t509__imgwrapper::after {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

@media (min-width: 961px) {
    /* Общий контейнер для поиска и сортировки */
    .t-store__filter__search-and-sort {
        display: flex !important;
        justify-content: space-between !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 24px 0 !important;
        font-family: 'Montserrat', sans-serif !important;
        align-items: center !important;
    }

    /* Поиск */
    .t-store__filter__search {
        flex: 1 1 auto !important;
        max-width: 420px !important;
    }
    .t-store__search-wrapper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        background: #fff !important;
        border-radius: 15px !important;
        border: 1px solid #e8e8e8 !important;
        padding: 12px 14px !important;
        height: 48px !important;
        box-sizing: border-box !important;
        transition: border-color 0.4s ease, box-shadow 0.4s ease !important;
    }
    .t-store__filter__input {
        border: none !important;
        outline: none !important;
        width: 100% !important;
        padding: 0 44px 0 0 !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        font-family: 'Montserrat', sans-serif !important;
        color: #1a1a1a !important;
        background: transparent !important;
        line-height: 24px !important;
        transition: color 0.3s ease !important;
    }
    .t-store__filter__input::placeholder {
        color: #888 !important;
        font-style: italic !important;
        opacity: 1 !important;
        transition: opacity 0.4s ease, transform 0.4s ease !important;
    }
    .t-store__filter__input:focus::placeholder {
        opacity: 0.6 !important;
        transform: translateX(5px) !important;
    }
    .t-store__filter__input:focus {
        color: #ff5c00 !important;
        border-color: #ff5c00 !important;
    }
    .t-store__search-icon {
        position: absolute !important;
        right: 14px !important;
        width: 22px !important;
        height: 22px !important;
        fill: #ff5c00 !important;
        transition: transform 0.4s ease, fill 0.4s ease !important;
    }
    .t-store__search-icon:hover {
        transform: scale(1.1) !important;
        fill: #e64d00 !important;
    }
    .t-store__search-close-icon {
        position: absolute !important;
        right: 40px !important;
        width: 18px !important;
        height: 18px !important;
        fill: #888 !important;
        cursor: pointer !important;
        transition: fill 0.4s ease, transform 0.4s ease !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    .t-store__search-wrapper:not(:empty) .t-store__search-close-icon {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .t-store__search-close-icon:hover {
        fill: #ff5c00 !important;
        transform: rotate(90deg) !important;
    }

    /* Сортировка */
    .t-store__filter__sort {
        flex: 0 0 280px !important;
        min-width: 280px !important;
        text-align: right !important;
    }
    .t-store__sort-select-wrapper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
    }
    .t-store__sort-select {
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        width: 100% !important;
        padding: 12px 40px 12px 16px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        font-family: 'Montserrat', sans-serif !important;
        color: #1a1a1a !important;
        /*text-align: left !important;*/
        background: linear-gradient(145deg, #ffffff, #f9f9f9) !important;
        border: 1px solid #d0d0d0 !important;
        border-radius: 15px !important;
        cursor: pointer !important;
        height: 48px !important;
        line-height: 24px !important;
        box-sizing: border-box !important;
        transition: all 0.3s ease !important;
    }
    .t-store__sort-select:hover,
    .t-store__sort-select:focus,
    .t-store__search-wrapper:hover,
    .t-store__search-wrapper:focus {
        border-color: #ff5c00 !important;
        color: #ff5c00 !important;
    }
    .t-store__sort-select:focus {
        outline: none !important;
    }
    .t-store__sort-select option {
        font-size: 14px !important;
        font-weight: 500 !important;
        font-family: 'Montserrat', sans-serif !important;
        color: #1a1a1a !important;
        background: #fff !important;
        line-height: 1.5 !important;
    }
    .t-store__sort-select option:hover,
    .t-store__sort-select option:focus,
    .t-store__sort-select option:checked {
        background: #fef5f0 !important;
        color: #ff5c00 !important;
    }

    .t-store__sort-select:hover + .t-store__sort-select-wrapper::after,
    .t-store__sort-select:focus + .t-store__sort-select-wrapper::after {
        transform: translateY(-50%) rotate(180deg) !important;
    }
}

/* Отключаем интерактивность и курсор для карточек и кнопок, кроме imgwrapper */
.t-store__product-card,
.t-store__product-card a,
.t-store__product-card .t-btn,
.t-store__card__more,
.t-store__card__more-link,
.js-product,
.t-store__card {
    pointer-events: none !important;
    cursor: auto !important;
}

/* Скрываем popup и связанные элементы */
.t-popup,
.t-popup.t-popup_show,
.t-popup__container,
.t-popup__block,
.t-store__product-popup,
.t-store__card__popup,
.t-popup__close,
.t-popup__container-static,
.t-store__prod-popup__container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Удаляем классы блокировки из body */
body.t-body_popupshowed,
body.t-body_scroll-locked,
body.t-body_overflow-hidden {
    overflow: auto !important;
}




/* Контейнер фильтров */
.t-store__parts-switch-wrapper {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* ровно 4 колонки */
    gap: 12px !important;
    max-width: 100% !important;
    padding: 20px 0 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Кнопки */
.t-store__parts-switch-btn {
    width: 100% !important; /* каждая занимает 1 фракцию сетки */
    padding: 14px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1a1a1a !important;
    background: linear-gradient(145deg, #ffffff, #f9f9f9) !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 15px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important; /* перенос длинных слов */
}

/* Hover */
.t-store__parts-switch-btn:hover {
    border-color: #ff5c00 !important;
    color: #ff5c00 !important;
    background: #fef5f0 !important;
}

/* Active */
.t-store__parts-switch-btn.t-active,
.t-store__parts-switch-btn.t-active[style] {
    background: #ff5c00 !important;
    color: #fff !important;
    border-color: #ff5c00 !important;
}

/* 2 в ряд на планшетах */
@media (max-width: 1023px) {
    .t-store__parts-switch-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 1 в ряд на телефонах */
@media (max-width: 767px) {
    .t-store__parts-switch-btn:first-child {
        display: none !important;
    }
}



/* --- FD401 Hover Effect (как у всех карточек) --- */

/* Контейнер с изображением */
.t-feed__post-imgwrapper {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 20px 20px 0 0 !important;
    pointer-events: auto !important;
}

/* Картинка */
.t-feed__post-bgimg {
    transition: transform 0.4s ease !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 20px 20px 0 0 !important;
}

/* Увеличение при наведении */
.t-feed__post-imgwrapper:hover .t-feed__post-bgimg {
    transform: scale(1.08) !important;
}

/* Оверлей */
.t-feed__post-imgwrapper::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 20px 20px 0 0 !important;
    opacity: 0 !important;
    transition: opacity 0.5s ease !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* Появление затемнения */
.t-feed__post-imgwrapper:hover::after {
    opacity: 1 !important;
}

/* Полное отключение переходов и popup */
.js-feed-post-link {
    pointer-events: none !important;
    cursor: default !important;
}

/* Но при необходимости допускаем эффекты наведения на картинке */
.t-feed__post-imgwrapper {
    pointer-events: auto !important;
}







/* Адаптив для экранов меньше 1200px (3 ряда по 4 кнопки) */
@media (max-width: 1199px) {
    .t-store__parts-switch-btn {
        flex: 1 1 calc(33.333% - 12px) !important; /* 3 колонки (33.333%) */
        min-width: 120px !important;
        font-size: 13px !important;
        padding: 10px 14px !important;
    }
}

/* Адаптив для экранов меньше 960px (2 ряда по 6 кнопок, если поместятся) */
@media (max-width: 959px) {
    .t-store__parts-switch-btn {
        flex: 1 1 calc(50% - 12px) !important; /* 2 колонки (50%) для 2x6 */
        min-width: 100px !important; /* Меньшая ширина для мобильных */
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}
/* Адаптив для очень маленьких экранов (скрываем кнопки, показываем select) */
@media (max-width: 568px) {
    .t-store__parts-switch-wrapper {
        display: none !important; /* Скрываем кнопки */
    }
}







