* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: #ff3333;
    background: #0d0d0d;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    width: 200%;
    height: 200%;
    background: 
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,51,51,0.03) 50px, rgba(255,51,51,0.03) 51px),
        repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,51,51,0.03) 50px, rgba(255,51,51,0.03) 51px);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: rgba(20,0,0,0.95);
    border-right: 3px solid #ff3333;
    box-shadow: 5px 0 30px rgba(255,51,51,0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 40px 20px;
    border-bottom: 2px solid #ff3333;
    text-align: center;
}

.logo {
    font-size: 32px;
    font-weight: 900;
    color: #ff3333;
    text-decoration: none;
    line-height: 1.2;
    display: block;
    text-shadow: 
        0 0 10px #ff3333,
        0 0 20px #ff3333,
        0 0 30px #ff3333;
    animation: logoFlicker 3s infinite;
}

@keyframes logoFlicker {
    0%, 100% { opacity: 1; }
    45%, 55% { opacity: 0.8; }
    50% { opacity: 0.6; }
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    color: #ff3333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    text-shadow: 0 0 5px #ff3333;
}

.nav-item:hover {
    background: rgba(255,51,51,0.1);
    border-left-color: #ff3333;
    text-shadow: 0 0 15px #ff3333, 0 0 30px #ff3333;
}

.nav-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 5px #ff3333);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Hero Section */
.hero-with-image {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 80px 0;
    margin-bottom: 100px;
    border-bottom: 2px solid rgba(255,51,51,0.3);
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.1;
    color: #ff3333;
    text-shadow: 0 0 20px #ff3333;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 18px;
    color: #ff6666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-btn {
    display: inline-block;
    padding: 18px 50px;
    background: transparent;
    color: #ff3333;
    text-decoration: none;
    border: 3px solid #ff3333;
    font-weight: 900;
    font-size: 18px;
    transition: all 0.3s;
    text-shadow: 0 0 10px #ff3333;
    box-shadow: 0 0 20px rgba(255,51,51,0.3);
    position: relative;
    overflow: hidden;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,51,51,0.2);
    transition: left 0.3s;
}

.hero-btn:hover::before {
    left: 0;
}

.hero-btn:hover {
    background: rgba(255,51,51,0.1);
    box-shadow: 0 0 40px rgba(255,51,51,0.6);
    transform: translateY(-2px);
}

.hero-image {
    width: 100%;
    height: 500px;
    background: rgba(20,0,0,0.5);
    border: 3px solid #ff3333;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255,51,51,0.4);
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,51,51,0.1), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.2);
}

/* Section Titles */
h2 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 40px;
    color: #ff3333;
    text-shadow: 0 0 20px #ff3333;
    letter-spacing: -1px;
    border-bottom: 3px solid #ff3333;
    padding-bottom: 20px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 100px;
}

.product-card {
    background: rgba(20,0,0,0.6);
    border: 2px solid #ff3333;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(255,51,51,0.2);
}

.product-card:hover {
    box-shadow: 0 0 40px rgba(255,51,51,0.6);
    transform: translateY(-5px);
    border-color: #ff6666;
}

.product-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image {
    width: 100%;
    height: 220px;
    background: rgba(10,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #ff3333;
    overflow: hidden;
    position: relative;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,51,51,0.3), transparent);
    animation: shimmer 3s infinite;
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    filter: brightness(0.85) contrast(1.15) saturate(1.3) hue-rotate(-15deg);
    transform: rotate(-2deg) scale(1.05);
}

.product-card:hover .product-image img {
    transform: rotate(0deg) scale(1.15);
    filter: brightness(1) contrast(1.2) saturate(1.4) hue-rotate(-10deg);
}

.product-card:nth-child(even) .product-image img {
    transform: rotate(2deg) scale(1.05) scaleX(-1);
}

.product-card:nth-child(3n) .product-image img {
    filter: brightness(0.8) contrast(1.2) saturate(1.5) hue-rotate(-20deg);
}

.product-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

.product-description {
    font-size: 14px;
    color: #ff6666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

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

.product-price {
    font-size: 28px;
    font-weight: 900;
    color: #ff3333;
    text-shadow: 0 0 15px #ff3333;
}

.product-actions {
    padding: 20px 25px;
    border-top: 2px solid rgba(255,51,51,0.3);
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    color: #ff3333;
    border: 2px solid #ff3333;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px #ff3333;
}

.add-to-cart-btn:hover {
    background: rgba(255,51,51,0.2);
    box-shadow: 0 0 20px rgba(255,51,51,0.5);
}

/* Footer */
.footer {
    margin-left: 250px;
    background: rgba(20,0,0,0.95);
    border-top: 3px solid #ff3333;
    padding: 60px 40px;
    color: #ff6666;
}

/* Cart Sidebar */
#cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: rgba(20,0,0,0.98);
    border-left: 3px solid #ff3333;
    box-shadow: -5px 0 30px rgba(255,51,51,0.5);
    transition: right 0.3s;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

#cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 30px;
    border-bottom: 2px solid #ff3333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    color: #ff3333;
    font-size: 24px;
    text-shadow: 0 0 10px #ff3333;
}

.close-btn {
    background: none;
    border: none;
    color: #ff3333;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    text-shadow: 0 0 20px #ff3333;
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    padding: 20px;
    border-bottom: 1px solid rgba(255,51,51,0.3);
    color: #ff6666;
}

.cart-footer {
    padding: 30px;
    border-top: 2px solid #ff3333;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: 900;
    color: #ff3333;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff3333;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    background: transparent;
    color: #ff3333;
    border: 3px solid #ff3333;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: rgba(255,51,51,0.2);
    box-shadow: 0 0 30px rgba(255,51,51,0.6);
}

/* Responsive */
@media (max-width: 968px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-header {
        padding: 20px 10px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 20px 10px;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .footer {
        margin-left: 80px;
    }
    
    .hero-with-image {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Product Page Styles */
.breadcrumb {
    padding: 30px 0;
    font-size: 14px;
    color: #ff6666;
    margin-left: 250px;
}

.breadcrumb a {
    color: #ff3333;
    text-decoration: none;
    text-shadow: 0 0 5px #ff3333;
}

.breadcrumb a:hover {
    text-shadow: 0 0 15px #ff3333;
}

.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin: 40px 0 80px;
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-main-image {
    width: 100%;
    height: 700px;
    background: rgba(20,0,0,0.6);
    border: 3px solid #ff3333;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255,51,51,0.4);
    position: relative;
}

.product-main-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,51,51,0.1), transparent);
    animation: scanline 3s linear infinite;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85) contrast(1.15) saturate(1.3) hue-rotate(-15deg);
    transform: rotate(-1deg) scale(1.02);
}

.product-details h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.2;
    color: #ff3333;
    text-shadow: 0 0 20px #ff3333;
}

.product-price-large {
    font-size: 56px;
    font-weight: 900;
    color: #ff3333;
    margin-bottom: 40px;
    text-shadow: 0 0 30px #ff3333;
}

.product-description-full {
    margin-bottom: 50px;
}

.product-description-full h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 40px;
    color: #ff3333;
    text-shadow: 0 0 15px #ff3333;
    border-bottom: 2px solid rgba(255,51,51,0.3);
    padding-bottom: 10px;
}

.product-description-full h4 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

.product-description-full p {
    font-size: 16px;
    color: #ff6666;
    line-height: 1.9;
    margin-bottom: 20px;
}

.product-description-full ul {
    margin-left: 25px;
    margin-bottom: 25px;
}

.product-description-full li {
    font-size: 16px;
    color: #ff6666;
    line-height: 1.9;
    margin-bottom: 12px;
    position: relative;
}

.product-description-full li::marker {
    color: #ff3333;
}

.add-to-cart-btn-large {
    width: 100%;
    padding: 22px 50px;
    background: transparent;
    color: #ff3333;
    border: 3px solid #ff3333;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
    text-shadow: 0 0 10px #ff3333;
    box-shadow: 0 0 30px rgba(255,51,51,0.3);
    font-family: 'Courier New', monospace;
}

.add-to-cart-btn-large:hover {
    background: rgba(255,51,51,0.2);
    box-shadow: 0 0 50px rgba(255,51,51,0.6);
    transform: translateY(-2px);
}

.back-to-catalog {
    display: inline-block;
    color: #ff6666;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    text-shadow: 0 0 5px #ff3333;
}

.back-to-catalog:hover {
    color: #ff3333;
    text-shadow: 0 0 15px #ff3333;
}

@media (max-width: 968px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-main-image {
        height: 500px;
    }
    
    .product-details h1 {
        font-size: 28px;
    }
    
    .product-price-large {
        font-size: 42px;
    }
}

/* Footer improvements */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
}

.footer-bottom p {
    color: #ff6666;
    margin: 10px 0;
    font-size: 14px;
}

.footer-bottom strong {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

/* Sidebar improvements for product pages */
.sidebar .logo {
    display: block;
    text-align: center;
}
