/* ========================================
   EWINNERY SHOP - АХУЕННЫЕ СТИЛИ V2.0
   ======================================== */

/* ========== ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ ========== */
:root {
    /* Цвета - ТЕМНЕЕ */
    --bg-dark: #050a12;
    --bg-darker: #020408;
    --bg-card: rgba(10, 15, 25, 0.8);
    --bg-card-hover: rgba(15, 20, 35, 0.95);
    
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #1e40af;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --border: rgba(59, 130, 246, 0.2);
    --border-hover: rgba(59, 130, 246, 0.5);
    
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 12px 48px rgba(59, 130, 246, 0.3);
    
    /* Анимация */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Плавное появление для контента */
.section, .content, .container {
    opacity: 0;
    animation: fadeInPage 0.8s ease-out forwards;
}

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

/* ========== АНИМИРОВАННЫЙ ФОН С ЛИНИЯМИ ========== */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, 
        #020408 0%, 
        #050a12 25%,
        #0a0f1a 50%,
        #050a12 75%,
        #020408 100%
    );
}

/* Сетка линий - СТАТИЧНАЯ */
.background-grid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: gridColorPulse 3s ease-in-out infinite;
}

/* Акцентные линии */
.background-grid::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px);
    background-size: 160px 160px;
    animation: gridColorPulse 3s ease-in-out infinite reverse;
}

@keyframes gridColorPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Светящиеся пятна */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    opacity: 0.3;
    filter: blur(100px);
    animation: glowPulse 15s ease-in-out infinite;
}

.background-glow::before,
.background-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.background-glow::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: 20%;
    left: 10%;
    animation: float 20s ease-in-out infinite;
}

.background-glow::after {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #1e40af 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ========== НАВБАР (УЛУЧШЕННЫЙ) ========== */
.header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 20px;
    pointer-events: none;
    transition: var(--transition);
}

.header.scrolled {
    top: 10px;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(10, 15, 25, 0.9);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    pointer-events: auto;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Статичная обводка */

.navbar:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Лого с иконкой */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.logo-text {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Навигация */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

/* Правая часть навбара */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Профиль в навбаре */
.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-nav:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-username {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== МОДАЛКА ПРОФИЛЯ (УЛУЧШЕННАЯ) ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

/* Модалка логина - ВСЕГДА ПОВЕРХ ВСЕГО */
#login-required-modal,
#google-login-modal {
    z-index: 9999 !important;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    color: #ef4444;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

/* Профиль хедер */
.profile-header {
    text-align: center;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.profile-badge {
    position: absolute;
    bottom: 0;
    right: -10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.profile-badge.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-username {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.profile-id {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Статистика */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
    color: var(--primary);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Действия профиля */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========== КНОПКИ ========== */
.btn {
    padding: 14px 28px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ========== КАРТОЧКИ ТОВАРОВ ========== */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
    padding: 20px 0;
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: var(--transition-slow);
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-image-wrapper {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 768px) {
    .navbar {
        height: 60px;
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .user-profile-nav {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .nav-avatar {
        width: 32px;
        height: 32px;
    }
    
    .nav-username {
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 32px 24px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}

/* Десктоп - горизонтальный скролл товаров */
@media (min-width: 769px) {
    .shop-grid {
        display: flex;
        gap: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding: 20px 10px;
        scroll-behavior: smooth;
    }
    
    .shop-grid::-webkit-scrollbar {
        height: 8px;
    }
    
    .shop-grid::-webkit-scrollbar-track {
        background: rgba(59, 130, 246, 0.1);
        border-radius: 10px;
    }
    
    .shop-grid::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        border-radius: 10px;
    }
    
    .shop-grid::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(90deg, var(--primary-hover), var(--primary));
    }
    
    .product-card {
        min-width: 320px;
        max-width: 320px;
        aspect-ratio: 1 / 1;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    
    .product-image-wrapper {
        height: 140px;
    }
}

/* Ultra Wide */
@media (min-width: 1920px) {
    .product-card {
        min-width: 380px;
        max-width: 380px;
    }
    
    .product-image-wrapper {
        height: 160px;
    }
}

/* ========== ПРЕЛОАДЕР ========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== СОВМЕСТИМОСТЬ СО СТАРЫМИ КЛАССАМИ ========== */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    position: relative;
    flex: 1;
}

.section.active {
    display: flex;
}

.content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    z-index: 1;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 50px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-hover);
}

.title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 24px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
}

.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== HELP PAGE ========== */
.help-page .section {
    display: flex;
    min-height: 100vh;
    padding: 140px 20px 80px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.contact-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--primary);
    object-fit: cover;
}

.contact-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-contact:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* FAQ Section */
.faq-section {
    margin-top: 60px;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-question.active::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 25px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive Help Page */
@media (max-width: 768px) {
    .help-page .section {
        padding: 120px 15px 60px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-card {
        padding: 20px 15px;
    }
    
    .faq-question {
        padding: 16px 20px;
        font-size: 1rem;
    }
}

/* Футер */
.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    align-items: start;
}

.footer-section {
    text-align: left;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: var(--transition);
    padding: 4px 0;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.footer-text.small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Payment страница */
.payment-page {
    max-width: 800px;
}

/* ========== СТРАНИЦА ТОВАРА ========== */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
    text-align: left;
}

/* Левая часть - картинка */
.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(139, 35, 50, 0.3), rgba(237, 100, 27, 0.3));
    border: 2px solid rgba(237, 100, 27, 0.5);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.product-main-image img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: var(--transition-slow);
}

.product-main-image:hover img {
    transform: scale(1.05);
}

/* Миниатюры */
.product-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Правая часть - описание */
.product-details {
    padding: 20px 0;
}

.product-header {
    margin-bottom: 24px;
}

.product-title-page {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 4px;
    color: #fbbf24;
    font-size: 1.1rem;
}

.review-count {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.product-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.product-badge-tag {
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
}

.product-badge-tag.status {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.product-pricing {
    margin-bottom: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.product-price-main {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-price-old {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 16px;
}

.product-stock {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.product-description {
    margin-bottom: 32px;
}

.product-description h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-buy {
    padding: 18px 40px;
    background: linear-gradient(135deg, #78716c, #57534e);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(120, 113, 108, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(120, 113, 108, 0.6);
}

/* Способы оплаты */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.payment-method-btn {
    padding: 14px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-method-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--border-hover);
}

.payment-method-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

/* Адаптив для модального окна товара */
@media (max-width: 968px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-title-page {
        font-size: 1.6rem;
    }
    
    .product-price-main {
        font-size: 2rem;
    }
    
    .product-main-image {
        aspect-ratio: 1;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .modal-content {
        padding: 20px 16px !important;
        max-width: 95% !important;
    }
    
    .product-container {
        gap: 16px;
    }
    
    /* Уменьшаем картинку */
    .product-main-image {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        aspect-ratio: 1;
    }
    
    .product-gallery {
        display: flex;
        justify-content: center;
    }
    
    .product-title-page {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .product-price-main {
        font-size: 1.6rem;
    }
    
    .product-price-old {
        font-size: 1.1rem;
    }
    
    .product-badges {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .product-badge-tag {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
    
    .product-rating {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .stars {
        font-size: 0.9rem;
    }
    
    .review-count {
        font-size: 0.85rem;
    }
    
    .product-pricing {
        padding: 16px 0;
        margin-bottom: 20px;
    }
    
    .product-stock {
        font-size: 0.85rem;
    }
    
    .product-description h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .product-description p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .payment-method-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ЛОГИНА (SHOP) ========== */
.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    animation: iconPulse 2s ease infinite;
}

@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6); 
    }
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-product-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
}

.modal-product-info strong {
    color: var(--primary-hover);
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.modal-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .modal-buttons {
        flex-direction: column;
    }
}

/* Input поля */
.form-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    margin-bottom: 16px;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ========== LOGIN PAGE ========== */
.login-container {
    max-width: 450px;
    width: 90%;
    padding: 60px 40px;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.login-logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.login-btn {
    padding: 16px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.login-btn:hover:not(.disabled) {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.login-btn.telegram {
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    border: none;
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
}

.login-btn.telegram:hover {
    box-shadow: 0 6px 20px rgba(42, 171, 238, 0.5);
}

.login-btn.google {
    background: linear-gradient(135deg, #EA4335, #DB4437);
    border: none;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.login-btn.google:hover {
    box-shadow: 0 6px 20px rgba(234, 67, 53, 0.5);
}

.login-btn.disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.login-btn i {
    font-size: 1.3rem;
}

.coming-soon {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 6px;
    font-size: 0.7rem;
    color: #fbbf24;
    margin-left: 8px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 15px;
}

.guest-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.guest-link:hover {
    color: var(--primary-hover);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.info-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 30px;
    line-height: 1.5;
}

/* Telegram Widget Container */
#telegram-login-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    margin: 20px 0;
}

.widget-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Login page body layout */
body.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.login-page .login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
}

body.login-page .footer {
    margin-top: auto;
}

@media (max-width: 480px) {
    .login-container {
        padding: 40px 30px;
    }
}

/* ========== BASIC UI ELEMENTS ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.8) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Container and content layout */
.container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

.content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
}

.section[style*="display: flex"] {
    display: flex;
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

/* Desktop: 3 колонки */
@media (min-width: 1200px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Средние экраны: 2 колонки */
@media (min-width: 769px) and (max-width: 1199px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Планшеты: 2 колонки */
@media (min-width: 600px) and (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 30px 0;
    }
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.product-content {
    text-align: center;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Login modal поверх product modal */
#login-required-modal {
    z-index: 10001 !important;
}

#login-required-modal .modal-content {
    z-index: 10002 !important;
    max-width: 480px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    max-width: 1000px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

/* Activation modal - компактный */
#activation-modal .modal-content {
    max-width: 500px;
}

/* Admin login modal - компактный */
#admin-login-modal .modal-content {
    max-width: 450px;
}

/* Language modal - компактный */
#language-modal .modal-content {
    max-width: 400px;
}

/* Telegram login modal - компактный */
#telegram-login-modal .modal-content {
    max-width: 450px;
}

/* Google login modal - компактный */
#google-login-modal .modal-content {
    max-width: 450px;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========== PRODUCT MODAL STYLES ========== */
.product-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-container-single {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
}

.product-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-gallery {
    display: flex;
    justify-content: center;
}

.product-main-image {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    border-radius: 16px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding: 0 10px;
}

.product-header {
    margin-bottom: 0;
}

.product-header {
    margin-bottom: 30px;
}

.product-title-page {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.product-rating-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

.stars i {
    margin-right: 2px;
}

.review-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-badge-tag {
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.product-pricing {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.product-pricing-simple {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}

.product-price-main {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
    margin-bottom: 10px;
}

.product-stock {
    color: var(--text-secondary);
    font-size: 1rem;
}

.product-actions {
    margin-bottom: 30px;
}

.product-actions h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.payment-methods-simple {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-method-btn {
    padding: 15px 20px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.payment-method-btn:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.payment-method-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.product-description {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-top: 0;
}

.product-description-simple {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.description-content.expandable {
    max-height: 100px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.description-content.expandable.expanded {
    max-height: 1000px;
}

.expand-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.expand-btn:hover {
    color: var(--primary-hover);
}

.expand-btn i {
    transition: transform 0.3s ease;
}

.product-description h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ========== RESPONSIVE MODAL STYLES ========== */
/* Мобильные устройства: 1 колонка */
@media (max-width: 599px) {
    .shop-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
        margin: 30px 0;
    }
    
    .product-card {
        padding: 15px;
        width: 100%;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        width: 95%;
        padding: 20px;
        margin: 10px;
        border-radius: 16px;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    /* Одна колонка для модального окна на мобильных */
    .product-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .product-left,
    .product-right {
        gap: 20px;
    }

    .product-main-image {
        max-width: 280px;
        margin: 0 auto;
    }

    .product-title-page {
        font-size: 1.5rem;
        text-align: center;
    }

    .product-rating,
    .product-rating-simple {
        justify-content: center;
        flex-wrap: wrap;
    }

    .product-badges {
        justify-content: center;
    }

    .product-price-main {
        font-size: 2rem;
        text-align: center;
    }

    .product-pricing,
    .product-pricing-simple {
        padding: 20px;
        text-align: center;
    }

    .payment-methods,
    .payment-methods-simple {
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }

    .payment-method-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        flex: 1;
        min-width: 0;
    }

    .product-description,
    .product-description-simple {
        padding: 20px;
    }

    .product-description h4,
    .product-description-simple h4 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    /* Payment адаптация */
    .payment-card {
        padding: 25px 20px;
        margin: 15px 0;
    }
    
    .payment-title {
        font-size: 1.5rem;
    }
    
    .payment-amount {
        font-size: 2.2rem;
    }
    
    .payment-instructions {
        padding: 20px;
    }
    
    .product-key-display {
        font-size: 1.1rem;
        padding: 15px;
    }
    
    /* Purchase card адаптация */
    .purchase-card {
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .purchase-card h3 {
        font-size: 1.3rem;
    }
    
    .purchase-info {
        padding: 15px;
    }
    
    .join-channel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        width: 100%;
        padding: 15px;
        margin: 0;
        border-radius: 0;
    }

    .product-title-page {
        font-size: 1.3rem;
    }

    .product-price-main {
        font-size: 1.8rem;
    }

    .payment-method-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .product-description,
    .product-description-simple {
        padding: 15px;
    }
}

/* ========== PAYMENT & CHECKOUT STYLES ========== */
.payment-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.payment-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.payment-header {
    margin-bottom: 30px;
    text-align: center;
}

.payment-id {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.payment-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.payment-amount {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin: 20px 0;
}

.payment-method {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    margin: 20px 0;
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.status-approved {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.payment-instructions {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.payment-instructions h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-instructions ol {
    margin-left: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.payment-instructions li {
    margin-bottom: 10px;
}

.payment-link {
    display: block;
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition);
    margin: 20px 0;
}

.payment-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.payment-link i {
    margin-right: 8px;
}

.payment-note {
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 20px 0;
}

.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.product-key-display {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    font-family: monospace;
    font-size: 1.3rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
    word-break: break-all;
}

.copy-key-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.copy-key-btn:hover {
    background: var(--primary);
    color: white;
}

/* Компактная карточка для Your Purchase */
.purchase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    text-align: center;
}

.purchase-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.purchase-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.purchase-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.purchase-info-item:last-child {
    margin-bottom: 0;
}

.purchase-info-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 2px;
}

.purchase-info-item div {
    flex: 1;
}

.purchase-info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.purchase-info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.join-channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    margin-top: 10px;
}

.join-channel-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* Product Delivery Styles */
.product-delivery {
    margin-top: 30px;
}

.product-delivery h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.delivery-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.delivery-item h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.delivery-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.activation-key {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    word-break: break-all;
}

.activation-key:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.invite-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    margin-top: 10px;
}

.invite-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.download-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.file-details h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.file-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* ========== LOGIN MODAL STYLES ========== */
.modal-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.modal-product-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-primary {
    background: var(--primary);
    color: white;
}

.modal-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.modal-btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.modal-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Custom scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Loading animation for images */
.product-image {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== LOADING & PRELOADER ========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.preloader-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading overlay for purchases */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}


/* Legal Pages */
.legal-page .legal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(10px);
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-page h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin: 32px 0 16px;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.legal-page h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.legal-page ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-page ul li {
    margin-bottom: 8px;
}

.legal-page p {
    margin-bottom: 16px;
}

.legal-page a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.legal-page a:hover {
    text-decoration: underline;
}