* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #BDFF00;
    --secondary: #8c00ff;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --gray: #777;
    --success: #27ae60;
}

body {
    overflow-x: hidden;
    background-color: #f9f9f9;
    color: #333;
}

/* Главный экран с видео */

.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.video-fallback {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: 0;
}

.logo {
    width: 220px;
    margin-bottom: 30px;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn {
    padding: 15px 40px;
    background-color: var(--primary);
    color: var(--dark);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    background-color: #a5e000;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 20px;
}

.nav-logo {
    height: 40px;
}

.nav-cart {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary);
    color: var(--dark);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Секция магазина */
.shop-section {
    display: none;
    padding: 100px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-gallery-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-price {
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background-color: #a5e000;
}

/* Модальное окно галереи товара */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.gallery-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh; /* Ограничиваем высоту контейнера */
    position: relative;
    padding: 20px 0; /* Добавляем вертикальный отступ, чтобы не слипалось с краями */
}

.gallery-main-image {
    width: 100%;
    max-height: 75vh; /* Обеспечивает, что изображение не закрывает управляющие элементы */
    object-fit: contain; /* Сохраняет пропорции и помещает целиком */
    border-radius: 10px;
    margin-bottom: 20px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gallery-thumbnail:hover, .gallery-thumbnail.active {
    opacity: 1;
}

.gallery-close {
    position: absolute;
    /* Размещаем крестик вверху справа от .gallery-modal (за оверлеем) */
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001; /* Поверх всего */
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-prev {
    left: -70px;
}

.gallery-next {
    right: -70px;
}

/* Корзина */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cart-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--gray);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #eee;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.cart-summary {
    padding: 15px 0;
    border-top: 2px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--secondary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.checkout-btn {
    padding: 15px;
    background-color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background-color: #a5e000;
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Уведомление */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--success);
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 2000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}
/* Бейдж скидки на картинке */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary); /* Ваш неоновый #BDFF00 */
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 0 15px rgba(189, 255, 0, 0.5);
    text-transform: uppercase;
}

/* Контейнер для цен */
.product-price-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

/* Старая цена (зачеркнутая) */
.product-price-old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Новая цена */
.product-price-new {
    font-weight: bold;
    color: var(--secondary); /* Ваш фиолетовый или красный для акцента */
    font-size: 1.4rem;
}

/* Если скидки нет, обычная цена выглядит так же */
.product-price {
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .logo {
        width: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-prev {
        left: -50px;
    }
    
    .gallery-next {
        right: -50px;
    }
    
    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .shop-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        padding: 20px;
    }
    
    .gallery-content {
        width: 95%;
    }
    
    .gallery-nav {
        position: static;
        transform: none;
        margin: 10px;
    }
    
    .gallery-thumbnails {
        flex-wrap: wrap;
    }
}

/* Специфические стили для iOS */
@supports (-webkit-touch-callout: none) {
    .video-background {
        display: none;
    }
    
    .video-fallback {
        display: block;
    }
    
    .btn, .add-to-cart, .cart-btn, .checkout-btn, .quantity-btn {
        -webkit-appearance: none;
    }
    
    input {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}