/* --- ОБЩИЕ СТИЛИ И ШРИФТЫ --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 100px; /* Отступ для фиксированной навигации */
    position: relative; /* Для позиционирования сетки */
}

/* Стили для динамичного заднего фона сеткой */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 40px 40px; /* Размер ячейки сетки */
    z-index: -1; /* Помещаем под остальным контентом */
    animation: pan-grid 60s linear infinite; /* Медленное движение сетки */
    opacity: 0.1; /* Прозрачность сетки */
}

@keyframes pan-grid {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 4000px 4000px; /* Движение на большое расстояние */
    }
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- ХЕДЕР И НАВИГАЦИЯ --- */
header {
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    transition: all 0.4s ease;
}

header.scrolled .logo {
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #a3a3a3;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- СЕКЦИЯ HERO --- */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero p {
    font-size: 1.2rem;
    color: #a3a3a3;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-button {
    background: transparent;
    color: #ffffff;
    border: 1px solid #444444;
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.cta-button:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

.gradient-text {
    background: -webkit-linear-gradient(90deg, #667eea, #764ba2); /* Фиолетовый к голубому */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- СЕКЦИЯ С ТОВАРАМИ --- */
.products {
    padding: 6rem 0;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.product-image {
    width: 100%;
    height: 220px;
    background-color: #1a1a1a;
}

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

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #a3a3a3;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.add-to-cart {
    width: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
}

/* Галерея внутри карточки (упрощенный стиль) */
.gallery-container {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    padding-bottom: 5px;
    overflow-x: auto;
}
.gallery-container::-webkit-scrollbar { height: 4px; }
.gallery-container::-webkit-scrollbar-track { background: #1a1a1a; }
.gallery-container::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.gallery-item {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative; /* Для иконки видео */
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* --- ФУТЕР --- */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #666666;
    font-size: 0.9rem;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    body { padding-top: 80px; }
    .container, .header-content { padding: 0 1.5rem; }
    .hero h1 { font-size: 3rem; }
    .section-title { font-size: 2.2rem; }
    .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 576px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.active { display: flex; }
    .nav-link { padding: 1rem 1.5rem; }
    .nav-link::after { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-content { text-align: center; }
}


.gallery-item-video {
    position: relative;
    cursor: pointer;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Чтобы клик проходил на родительский элемент */
    transition: transform 0.2s ease;
}

.gallery-item-video:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.2);
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent white;
    margin-left: 3px;
}


/* --- НОВЫЕ СТИЛИ: Всплывающее окно (Лайтбокс) --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.lightbox-content-wrapper {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-content iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    max-width: 1100px; /* Ограничение ширины для видео */
}

/* --- КЛАСС ДЛЯ ТРИГГЕРОВ ЛАЙТБОКСА --- */
.lightbox-trigger {
    cursor: pointer;
}

.payment-section {
    padding: 6rem 0;
    text-align: center;
}

.payment-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(6px);
}

.payment-box input[type="text"] {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #111;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.payment-box input[type="text"]:focus {
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(118, 75, 162, 0.3);
}

.pay-button {
    width: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.4);
}