/* ==================================================
   САЙТ «ДОСТУП.»
   АНИМАЦИЯ КНОПОК И МОБИЛЬНЫЕ КАТЕГОРИИ
   ================================================== */


/* ==================================================
   1. ОСНОВНЫЕ НАСТРОЙКИ КНОПОК
   ================================================== */

.t-btn,
.t-submit,
.t-store__card__btn,
.t-store__prod-popup__btn,
.t-catalog__card__btn,
.t-catalog__prod-popup__btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateY(0) scale(1);

    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.55s ease,
        filter 0.55s ease !important;

    -webkit-tap-highlight-color: transparent;
}


/* ==================================================
   2. МЯГКОЕ ОБВОЛАКИВАЮЩЕЕ СВЕЧЕНИЕ
   ================================================== */

.t-btn::after,
.t-submit::after,
.t-store__card__btn::after,
.t-store__prod-popup__btn::after,
.t-catalog__card__btn::after,
.t-catalog__prod-popup__btn::after {
    content: "";
    position: absolute;
    top: -80%;
    left: -70%;
    width: 110%;
    height: 260%;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    border-radius: 50%;

    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.20) 28%,
        rgba(255, 255, 255, 0.07) 52%,
        transparent 72%
    );

    filter: blur(10px);
    transform: translateX(-45%) rotate(8deg) scale(0.8);
}


/* ==================================================
   3. НАВЕДЕНИЕ НА КНОПКУ
   ================================================== */

@media (hover: hover) and (pointer: fine) {

    .t-btn:hover,
    .t-submit:hover,
    .t-store__card__btn:hover,
    .t-store__prod-popup__btn:hover,
    .t-catalog__card__btn:hover,
    .t-catalog__prod-popup__btn:hover {
        transform: translateY(-2px) scale(1.01);

        box-shadow:
            0 12px 30px rgba(201, 35, 53, 0.18),
            0 3px 10px rgba(23, 27, 31, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;

        filter: saturate(1.03) brightness(1.02);
    }

    .t-btn:hover::after,
    .t-submit:hover::after,
    .t-store__card__btn:hover::after,
    .t-store__prod-popup__btn:hover::after,
    .t-catalog__card__btn:hover::after,
    .t-catalog__prod-popup__btn:hover::after {
        animation: dostup-soft-glow 3.2s
            cubic-bezier(0.22, 1, 0.36, 1) infinite;
    }
}


/* Циклическое движение свечения */

@keyframes dostup-soft-glow {

    0% {
        opacity: 0;
        transform: translateX(-45%) rotate(8deg) scale(0.8);
    }

    12% {
        opacity: 0.42;
    }

    38% {
        opacity: 0.28;
        transform: translateX(45%) rotate(8deg) scale(1.05);
    }

    62% {
        opacity: 0;
        transform: translateX(155%) rotate(8deg) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateX(155%) rotate(8deg) scale(1.2);
    }
}


/* ==================================================
   4. НАЖАТИЕ НА КНОПКУ
   ================================================== */

.t-btn:active,
.t-submit:active,
.t-store__card__btn:active,
.t-store__prod-popup__btn:active,
.t-catalog__card__btn:active,
.t-catalog__prod-popup__btn:active {
    transform: translateY(0) scale(0.975);

    box-shadow:
        0 4px 12px rgba(201, 35, 53, 0.14),
        inset 0 2px 4px rgba(23, 27, 31, 0.10) !important;

    transition-duration: 0.1s !important;
}


/* ==================================================
   5. УПРАВЛЕНИЕ С КЛАВИАТУРЫ
   ================================================== */

.t-btn:focus-visible,
.t-submit:focus-visible,
.t-store__card__btn:focus-visible,
.t-store__prod-popup__btn:focus-visible,
.t-catalog__card__btn:focus-visible,
.t-catalog__prod-popup__btn:focus-visible {
    outline: 3px solid rgba(201, 35, 53, 0.25) !important;
    outline-offset: 3px;
}


/* ==================================================
   6. КОМПАКТНЫЕ КАТЕГОРИИ НА ТЕЛЕФОНЕ
   Две категории целиком и край следующей
   ================================================== */

@media screen and (max-width: 640px) {

    /* Полностью убираем старую подсказку */
    #rec3822134301 .t-catalog::before {
        display: none !important;
        content: none !important;
        animation: none !important;
    }

    /* Уменьшаем расстояние между категориями */
    #rec3822134301 .t-catalog__parts-above-wrapper-base {
        gap: 12px !important;
    }

    /* Размер каждой категории */
    #rec3822134301 .t-catalog__parts-above-item {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        min-height: 160px !important;
        flex: 0 0 132px !important;
    }

    /* Кнопка категории */
    #rec3822134301 .t-catalog__parts-button-base {
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        gap: 10px !important;
    }

    /* Круглая картинка категории */
    #rec3822134301 .t-catalog__parts-image-wrapper {
        width: 108px !important;
        min-width: 108px !important;
        max-width: 108px !important;
        height: 108px !important;
    }

    /* Название категории */
    #rec3822134301 .t-catalog__parts-title {
        max-width: 132px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
}


/* ==================================================
   7. НАСТРОЙКИ ДОСТУПНОСТИ
   ================================================== */

@media (prefers-reduced-motion: reduce) {

    .t-btn,
    .t-submit,
    .t-store__card__btn,
    .t-store__prod-popup__btn,
    .t-catalog__card__btn,
    .t-catalog__prod-popup__btn {
        transition: none !important;
        transform: none !important;
    }

    .t-btn::after,
    .t-submit::after,
    .t-store__card__btn::after,
    .t-store__prod-popup__btn::after,
    .t-catalog__card__btn::after,
    .t-catalog__prod-popup__btn::after {
        display: none !important;
        animation: none !important;
    }
}