/* ============================================
   Анимации для главной страницы
   ============================================ */

/* Базовые классы для анимаций */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Для баннеров на главной — видны сразу, анимация только движение/зум */
.banner-section .banner-single.animate-on-scroll {
    opacity: 1;
}

/* Сбрасываем стартовые трансформации для баннеров,
   чтобы они не уезжали/не скрывались до анимации */
.banner-section .banner-single.slide-in-left,
.banner-section .banner-single.slide-in-right,
.banner-section .banner-single.slide-in-bottom,
.banner-section .banner-single.zoom-in {
    transform: none;
}
.banner-section .banner-single.zoom-in {
    opacity: 1;
}

/* Fade In эффект */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In слева */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In справа */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In снизу */
.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-bottom.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Zoom In эффект */
.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.zoom-in.animated {
    opacity: 1;
    transform: scale(1);
}

/* Rotate In эффект */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.rotate-in.animated {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Задержки для последовательного появления */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

/* Анимации для категорий */
.product-catagory-section .product-catagory-single {
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
    border-radius: 8px;
    overflow: hidden;
}

.product-catagory-section .product-catagory-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(234, 28, 38, 0) 0%, rgba(234, 28, 38, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.product-catagory-section .product-catagory-single:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.product-catagory-section .product-catagory-single:hover::before {
    opacity: 1;
}

.product-catagory-section .product-catagory-img {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.product-catagory-section .product-catagory-img img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    height: auto;
    display: block;
}

.product-catagory-section .product-catagory-single:hover .product-catagory-img img {
    transform: scale(1.08);
}

.product-catagory-section .product-catagory-content {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.product-catagory-section .product-catagory-single:hover .product-catagory-content {
    transform: translateY(-2px);
}

.product-catagory-section .product-catagory-title {
    transition: color 0.3s ease;
}

.product-catagory-section .product-catagory-single:hover .product-catagory-title {
    color: #ea1c26;
}

/* Анимации для баннеров */
.banner-section .banner-single {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 8px;
}

.banner-section .banner-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
    border-radius: 8px;
}

.banner-section .banner-single:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.banner-section .banner-single:hover::before {
    opacity: 1;
}

.banner-section .banner-img-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.banner-section .banner-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    height: auto;
    display: block;
}

.banner-section .banner-single:hover .banner-img {
    transform: scale(1.08);
}

.banner-section .banner-content {
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.banner-section .banner-single:hover .banner-content {
    transform: translateY(-3px);
}

/* Анимации для товаров */
.product-default-single {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.product-default-single:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.product-default-single .product-img-warp {
    position: relative;
}

.product-default-single .product-default-img-link {
    overflow: hidden;
    display: block;
}

.product-default-single .product-default-img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-default-single:hover .product-default-img {
    transform: scale(1.1);
}

.product-default-single .product-action-icon-link {
    transition: all 0.3s ease;
}

.product-default-single:hover .product-action-icon-link {
    opacity: 1;
    visibility: visible;
}

/* Анимации для заголовков секций */
.section-title {
    position: relative;
    display: inline-block;
    transition: all 0.4s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ea1c26, #ff6b6b);
    transition: width 0.6s ease;
}

.section-title.animated::after {
    width: 100%;
}

/* Легкая анимация для вкладок - без скрытия элементов */
.product-tab-btn,
.tablist {
    opacity: 1 !important;
    visibility: visible !important;
}

.product-tab-btn .nav-link,
.tablist .nav-link {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Легкое начальное смещение для плавного появления */
    transform: translateY(0);
    animation: tabFadeIn 0.6s ease-out forwards;
}

/* Легкая анимация появления для каждой вкладки с задержкой */
.product-tab-btn .nav-link:nth-child(1) {
    animation-delay: 0.1s;
}

.product-tab-btn .nav-link:nth-child(2) {
    animation-delay: 0.2s;
}

.product-tab-btn .nav-link:nth-child(3) {
    animation-delay: 0.3s;
}

.product-tab-btn .nav-link:nth-child(4) {
    animation-delay: 0.4s;
}

.product-tab-btn .nav-link:nth-child(5) {
    animation-delay: 0.5s;
}

/* Keyframes для плавного появления без скрытия */
@keyframes tabFadeIn {
    0% {
        opacity: 1;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-tab-btn .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ea1c26;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.product-tab-btn .nav-link:hover {
    transform: translateY(-2px);
    color: #ea1c26;
}

.product-tab-btn .nav-link:hover::before,
.product-tab-btn .nav-link.active::before {
    width: 80%;
}

/* Убеждаемся, что анимационные классы не скрывают элементы */
.product-tab-btn.fade-in,
.tablist.fade-in,
.product-tab-btn .nav-link.fade-in,
.tablist .nav-link.fade-in,
.product-tab-btn.animate-on-scroll,
.tablist.animate-on-scroll,
.product-tab-btn .nav-link.animate-on-scroll,
.tablist .nav-link.animate-on-scroll {
    opacity: 1 !important;
    visibility: visible !important;
}

.product-tab-btn.fade-in.animated,
.tablist.fade-in.animated,
.product-tab-btn .nav-link.fade-in.animated,
.tablist .nav-link.fade-in.animated {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Анимации для логотипов компаний */
.company-logo-single {
    transition: all 0.4s ease;
    filter: grayscale(100%);
    opacity: 0.7;
}

.company-logo-single:hover {
    transform: scale(1.1);
    filter: grayscale(0%);
    opacity: 1;
}

.company-logo-image {
    transition: all 0.4s ease;
}

/* Убраны эффекты pulse и wave - заменены на более элегантные градиентные overlay */

/* Плавное появление сообщений */
.alert {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Убрана анимация cardFloat - заменена на плавное появление */

/* Элегантный эффект для товаров */
.product-default-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(234, 28, 38, 0) 0%, rgba(234, 28, 38, 0.05) 100%);
    border-radius: 4px;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-default-single:hover::before {
    opacity: 1;
}

/* Параллакс эффект для больших баннеров */
.banner-img-big {
    transition: transform 0.3s ease-out;
}

/* Адаптивность анимаций */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .slide-in-bottom,
    .zoom-in,
    .rotate-in {
        transition: none;
        animation: none;
    }
    
    .animate-on-scroll.animated {
        opacity: 1;
        transform: none;
    }
}

/* Оптимизация производительности */
.product-catagory-single,
.banner-single,
.product-default-single {
    will-change: transform;
}

.product-catagory-single.animated,
.banner-single.animated,
.product-default-single.animated {
    will-change: auto;
}

