:root {
    --neon-blue: #2f5bff;
    --neon-purple: #9333ea;
    --neon-pink: #ec4899;
    --neon-cyan: #00ffcc;
    --neon-gold: #ffd700;
    --deep-space: #070712;
    --midnight: #0a0a1f;
    --snow: #f0f8ff;
}

body {
    margin: 0;
    padding: 0;
    padding-bottom: 100px !important;
    background: var(--deep-space);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--snow);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(47, 91, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 25%),
        url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>');
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(47, 91, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ======= КНОПКА КОРЗИНЫ - ФИКСИРОВАННАЯ ======= */
.cart-btn {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 80px !important;
    padding: 20px !important;
    margin: 0 !important;
    z-index: 1000000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, 
        var(--neon-cyan) 0%,
        var(--neon-blue) 33%,
        var(--neon-purple) 66%,
        var(--neon-pink) 100%) !important;
    border: none !important;
    box-shadow: 
        0 -10px 60px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(147, 51, 234, 0.6) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8) !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    transform: translateZ(0) !important;
}

.cart-btn::before {
    content: '🛒 ';
    font-size: 24px;
    margin-right: 10px;
    filter: drop-shadow(0 0 10px var(--neon-gold));
}

.cart-btn:hover {
    height: 85px !important;
    box-shadow: 
        0 -15px 80px rgba(0, 0, 0, 1),
        0 0 120px rgba(236, 72, 153, 0.8) !important;
}

/* ======= СНЕЖИНКИ - БЕЗОПАСНЫЕ ======= */
.snowflake {
    display: none !important;
}

#snow-container {
    display: none !important;
}

/* ======= ОСНОВНЫЕ СТИЛИ ======= */
.hidden {
    display: none !important;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(10, 10, 31, 0.95);
    box-shadow: 
        0 5px 35px rgba(147, 51, 234, 0.4),
        0 0 50px rgba(47, 91, 255, 0.2);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--neon-purple);
    position: relative;
    overflow: hidden;
    z-index: 100;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--neon-cyan), 
        var(--neon-blue), 
        var(--neon-purple), 
        var(--neon-pink), 
        transparent);
    background-size: 200% 100%;
    animation: gradientFlow 3s infinite linear;
}

.header-left {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, 
        var(--neon-cyan) 0%,
        var(--neon-blue) 25%,
        var(--neon-purple) 50%,
        var(--neon-pink) 75%,
        var(--neon-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 
        0 0 30px rgba(236, 72, 153, 0.5),
        0 0 60px rgba(147, 51, 234, 0.3);
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.tg-btn {
    padding: 12px 25px;
    border-radius: 30px;
    background: rgba(17, 27, 61, 0.9);
    color: var(--snow);
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--neon-blue);
    box-shadow: 
        0 0 20px rgba(47, 91, 255, 0.4),
        inset 0 0 15px rgba(47, 91, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.tg-btn:hover {
    background: rgba(47, 91, 255, 0.3);
    box-shadow: 
        0 0 35px rgba(47, 91, 255, 0.7),
        inset 0 0 25px rgba(47, 91, 255, 0.3);
    transform: translateY(-2px);
}

/* Категории */
.categories {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 25px;
    background: rgba(10, 10, 31, 0.8);
    margin: 20px;
    border-radius: 20px;
    border: 2px solid var(--neon-purple);
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.4),
        0 8px 35px rgba(147, 51, 234, 0.3);
}

.categories::-webkit-scrollbar {
    height: 8px;
}

.categories::-webkit-scrollbar-track {
    background: rgba(10, 10, 31, 0.9);
    border-radius: 4px;
}

.categories::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    border-radius: 4px;
}

.category-btn {
    flex: 0 0 auto;
    padding: 15px 30px;
    border-radius: 35px;
    border: 2px solid var(--neon-blue);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(15, 20, 40, 0.95);
    color: #cbd5e0;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.4);
}

.category-btn:hover {
    border-color: var(--neon-cyan);
    color: white;
    box-shadow: 
        0 0 25px rgba(0, 255, 204, 0.4),
        0 0 50px rgba(0, 255, 204, 0.2);
    transform: translateY(-3px);
}

.category-btn.active {
    background: linear-gradient(135deg, 
        var(--neon-cyan) 0%,
        var(--neon-blue) 30%,
        var(--neon-purple) 70%,
        var(--neon-pink) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 
        0 8px 40px rgba(147, 51, 234, 0.6),
        0 0 50px rgba(236, 72, 153, 0.3);
    animation: neonGlow 2s infinite alternate;
}

.category-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

@keyframes neonGlow {
    0% {
        box-shadow: 
            0 8px 40px rgba(147, 51, 234, 0.6),
            0 0 50px rgba(236, 72, 153, 0.3);
    }
    100% {
        box-shadow: 
            0 8px 50px rgba(147, 51, 234, 0.8),
            0 0 70px rgba(236, 72, 153, 0.4);
    }
}

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

/* Товары */
.products {
    padding: 0 25px 100px;
}

#page-products {
    padding-bottom: 100px !important;
}

.card-price-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.card {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(15, 20, 40, 0.95), rgba(10, 10, 31, 0.95));
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 
        0 15px 50px rgba(47, 91, 255, 0.4),
        0 0 60px rgba(147, 51, 234, 0.25);
    border: 2px solid var(--neon-purple);
    transition: all 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--neon-cyan),
        var(--neon-blue),
        var(--neon-purple),
        var(--neon-pink));
    background-size: 200% 100%;
    animation: gradientFlow 3s infinite linear;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 70px rgba(47, 91, 255, 0.6),
        0 0 90px rgba(147, 51, 234, 0.4);
}

.card-title {
    font-size: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--neon-cyan), white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cart-product-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-qty-controls {
    display: flex;
    justify-content: center;
}

.cart-product-price {
    text-align: right;
    font-weight: 800;
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.card-price {
    font-size: 24px;
    font-weight: 800;
    background: rgba(10, 10, 31, 0.7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 auto;
    text-align: center;
    padding: 10px 15px;
    border-radius: 12px;
    background-color: rgba(11, 11, 196, 0.5);
    border: 2px solid var(--neon-blue);
    display: inline-block;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 
        0 0 20px rgba(47, 91, 255, 0.3),
        inset 0 0 15px rgba(47, 91, 255, 0.1);
}

.card-btn {
    margin-top: 25px;
    padding: 20px;
    text-align: center;
    border-radius: 20px;
    background: linear-gradient(135deg, 
        var(--neon-cyan) 0%,
        var(--neon-blue) 50%,
        var(--neon-purple) 100%);
    color: white;
    font-weight: 800;
    cursor: pointer;
    border: none;
    box-shadow: 
        0 10px 40px rgba(47, 91, 255, 0.6),
        0 0 50px rgba(147, 51, 234, 0.4);
    transition: all 0.3s ease;
    font-size: 18px;
}

.card-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 15px 60px rgba(47, 91, 255, 0.8),
        0 0 80px rgba(147, 51, 234, 0.6);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 3px solid var(--neon-blue);
}

/* Корзина */
.cart-page {
    padding: 30px;
    padding-bottom: 140px;
    background: rgba(7, 7, 18, 0.98);
    min-height: 100vh;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px 30px;
    background: rgba(15, 20, 40, 0.9);
    border: 2px solid var(--neon-blue);
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-cyan);
    box-shadow: 
        0 0 25px rgba(47, 91, 255, 0.4);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(47, 91, 255, 0.3);
    border-color: var(--neon-cyan);
    color: white;
    box-shadow: 
        0 0 40px rgba(0, 255, 204, 0.5);
    transform: translateX(-5px);
}

.cart-item {
    padding: 25px;
    background: rgba(15, 20, 40, 0.95);
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 
        0 10px 40px rgba(47, 91, 255, 0.3),
        0 0 50px rgba(147, 51, 234, 0.2);
    border: 2px solid var(--neon-purple);
}

.cart-row {
    display: flex;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    padding: 15px 0;
    min-height: 60px;
    justify-content: space-between;
}

.cart-row > div:first-child {
    flex: 1;
    min-width: 120px;
    max-width: 40%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    box-sizing: border-box;
    text-align: left;
    font-weight: 600;
    color: var(--neon-cyan);
    font-size: 16px;
}

.cart-row > div:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(47, 91, 255, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    border: 1px solid var(--neon-blue);
    min-width: 120px;
    max-width: 140px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.cart-row > div:last-child {
    flex: 0 0 auto;
    text-align: right;
    font-weight: 800;
    color: var(--neon-gold);
    font-size: 18px;
    min-width: 80px;
    padding-left: 10px;
    box-sizing: border-box;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.qty-btn {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    color: white;
    font-weight: 800;
    border: none;
    box-shadow: 
        0 4px 15px rgba(0, 255, 204, 0.4);
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.qty-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 
        0 10px 30px rgba(0, 255, 204, 0.6);
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
    padding: 25px;
    background: rgba(15, 20, 40, 0.8);
    border-radius: 20px;
    border: 2px solid var(--neon-purple);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 2px solid var(--neon-blue);
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-label:hover {
    background: rgba(47, 91, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
}

.option-label input[type="radio"] {
    display: none;
}

.option-label input[type="radio"]:checked + .radio-custom {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    box-shadow: 0 0 20px var(--neon-cyan);
}

.option-label input[type="radio"]:checked ~ .option-text {
    color: var(--neon-cyan);
    font-weight: 800;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    background: rgba(15, 20, 40, 0.8);
    transition: all 0.3s ease;
}

.option-text {
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.address-block {
    margin-top: 20px;
    padding: 25px;
    background: rgba(15, 20, 40, 0.9);
    border-radius: 20px;
    border: 2px solid var(--neon-purple);
}

.address-input {
    width: 100%;
    padding: 18px;
    background: rgba(10, 10, 31, 0.8);
    border: 2px solid var(--neon-blue);
    border-radius: 15px;
    color: white;
    font-size: 16px;
    margin-top: 15px;
}

.address-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
}

.cart-summary {
    background: rgba(15, 20, 40, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    border: 2px solid var(--neon-purple);
}

.total-label {
    font-size: 20px;
    color: var(--neon-cyan);
    font-weight: 700;
    margin-bottom: 15px;
}

#cart-sum {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, 
        var(--neon-gold) 0%,
        var(--neon-cyan) 30%,
        var(--neon-pink) 70%,
        var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background-color: rgba(10, 10, 31, 0.7);
    border: 2px solid var(--neon-blue);
    margin-top: 15px;
    animation: sumPulse 2s infinite alternate;
}

@keyframes sumPulse {
    0% {
        box-shadow: 
            0 0 50px rgba(47, 91, 255, 0.5);
        transform: scale(1);
    }
    100% {
        box-shadow: 
            0 0 80px rgba(147, 51, 234, 0.7);
        transform: scale(1.03);
    }
}

.checkout-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    margin: 40px auto !important;
    width: calc(100% - 40px) !important;
    max-width: 500px !important;
    padding: 25px 20px !important;
    background: linear-gradient(135deg, 
        var(--neon-gold) 0%,
        var(--neon-cyan) 30%,
        var(--neon-blue) 70%,
        var(--neon-purple) 100%) !important;
    font-weight: 900 !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    color: white !important;
    font-size: 22px !important;
    border: none !important;
    box-shadow: 
        0 15px 60px rgba(147, 51, 234, 0.6),
        0 0 80px rgba(236, 72, 153, 0.4) !important;
    transition: all 0.3s ease !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
}

.checkout-btn:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 
        0 20px 80px rgba(147, 51, 234, 0.8),
        0 0 120px rgba(236, 72, 153, 0.6) !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 20px;
    }
    
    .header-left {
        font-size: 28px;
        text-align: center;
    }
    
    .categories {
        padding: 20px;
        margin: 15px;
    }
    
    .category-btn {
        padding: 12px 22px;
        font-size: 14px;
    }

    .cart-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cart-row > div:first-child {
        max-width: 100%;
        text-align: center;
        padding-right: 0;
    }

    .cart-row > div:nth-child(2) {
        max-width: 100%;
        margin: 0 auto;
    }

    .cart-row > div:last-child {
        text-align: center;
        padding-left: 0;
    }

    .card-price {
        font-size: 20px;
        padding: 8px;
        max-width: 90%;
        margin: 15px auto;
    }
    
    .card {
        padding: 25px;
    }
    
    .card-img {
        height: 170px;
    }
    
    .cart-btn {
        height: 70px !important;
        padding: 15px !important;
        font-size: 18px !important;
    }
    
    .checkout-btn {
        padding: 20px !important;
        font-size: 18px !important;
    }
    
    body {
        padding-bottom: 80px !important;
    }
    
    #page-products {
        padding-bottom: 80px !important;
    }
}

/* Текстовая защита */
.text-protection {
    display: inline-block;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5) !important;
}

.added-float {
    position: absolute;
    color: var(--neon-cyan);
    font-weight: 900;
    font-size: 24px;
    text-shadow: 
        0 0 15px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    animation: floatMagic 1s ease forwards;
    pointer-events: none;
}

@keyframes floatMagic {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-40px) scale(1.3);
        color: var(--neon-gold);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(1);
        color: var(--neon-pink);
    }
}