/* ========================================================
   MODERN DESIGN UPGRADE — анимации, эффекты, современный стиль
   Подключается последним, переопределяет базовые стили
======================================================== */

/* === Анимации появления при скролле === */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.fade-in.visible {
    opacity: 1;
}

/* === Карточки товаров — улучшенные === */
.product-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 16px !important;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(249,115,22,0.1) !important;
}
.product-card .product-img img {
    transition: transform 0.5s ease;
}
.product-card:hover .product-img img {
    transform: scale(1.05);
}
.product-card .btn-primary {
    transition: all 0.3s ease;
}
.product-card:hover .btn-primary {
    transform: scale(1.03);
}

/* === Кнопки — современные === */
.btn, .btn-primary, .btn-outline, .btn-outline-dark, .btn-dark {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(249,115,22,0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(249,115,22,0.45);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
}

/* Ripple effect */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-primary:active::after {
    opacity: 1;
}

/* === Хедер — улучшенный === */
.header {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03) !important;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95) !important;
}

/* === Шапка каталога === */
.brand-commercial-block {
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}

/* === Плавный скролл === */
html {
    scroll-behavior: smooth;
}

/* === Подсветка input/focus === */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15) !important;
    border-color: #f97316 !important;
    outline: none !important;
}

/* === Пульсирующая точка на кнопке Сравнение === */
.btn-compare {
    position: relative;
}
.btn-compare:not(:disabled)::before {
    content: '';
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: absolute;
    top: -4px; right: -4px;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* === Скелетон-загрузка === */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* === Градиентный текст (акценты) === */
.gradient-text {
    background: linear-gradient(135deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Стеклянные карточки (glassmorphism) === */
.glass-card {
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06) !important;
}

/* === Бейджи === */
.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

/* === Микро-взаимодействия для ссылок === */
a {
    transition: color 0.2s ease, opacity 0.2s ease;
}
.nav-menu a {
    position: relative;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f97316;
    transition: width 0.3s ease;
}
.nav-menu a:hover::after {
    width: 100%;
}

/* === Таблица характеристик (детальная страница) === */
.spec-table-full {
    border-radius: 12px;
    overflow: hidden;
}
.spec-table-full tr {
    transition: background 0.2s ease;
}
.spec-table-full tbody tr:hover {
    background: #fff7ed;
}

/* === Анимация для иконок === */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* === Адаптив для анимаций (отключаем на мобильных для производительности) === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .fade-up {
        transform: translateY(15px);
    }
}
