/* ========================================
   ZERO DELAY - ADVANCED DESIGN SYSTEM
   Modern, Animated, Professional
======================================== */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-red: #dc2626;
    --dark-red: #991b1b;
    --accent-red: #ef4444;
    --black: #0a0a0a;
    --dark-gray: #1a1a1a;
    --mid-gray: #2a2a2a;
    --light-gray: #3a3a3a;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --glass-bg: rgba(26, 26, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.3);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========== ANIMATED BACKGROUND ========== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(153, 27, 27, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, -5%) rotate(120deg); }
    66% { transform: translate(5%, 5%) rotate(240deg); }
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

/* ========== GLASS EFFECT ========== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-container i {
    font-size: 1.5rem;
    color: var(--primary-red);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--white), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--off-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--white);
}

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

/* ========== AUTH BUTTONS ========== */
.auth-nav-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-login,
.btn-signup,
.btn-admin {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login {
    color: var(--white);
    background: transparent;
    border: 1px solid var(--white);
}

.btn-login:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-signup {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    box-shadow: var(--shadow-glow);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.btn-admin {
    background: var(--light-gray);
    color: var(--white);
    border: 1px solid var(--glass-border);
}

.btn-admin:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 1;
}

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

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-red) 50%, var(--white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--off-white);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cta-primary,
.cta-secondary {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.cta-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.6);
}

.cta-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: var(--white);
    border: 1px solid var(--glass-border);
}

.cta-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ========== SECTIONS ========== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--off-white);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== PRODUCTS SECTION ========== */
.products-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(220, 38, 38, 0.03) 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
    border-color: var(--primary-red);
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.product-description {
    color: var(--off-white);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    margin: 3% auto;
    padding: 0;
    border: 2px solid var(--primary-red);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

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

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.close:hover {
    background: var(--primary-red);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}

#modal-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

#modal-description {
    color: var(--off-white);
    margin-bottom: 2rem;
    line-height: 1.8;
    flex: 1;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.buy-button {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.6);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark-gray);
    padding: 3rem 0 1.5rem;
    border-top: 2px solid var(--primary-red);
    margin-top: 6rem;
}

.footer .container {
    text-align: center;
}

.footer p {
    color: var(--off-white);
    margin: 0.5rem 0;
}

/* ========== LOADING STATE ========== */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--off-white);
    font-size: 1.1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 6rem 0 3rem;
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    #modal-image {
        width: 100%;
        height: 300px;
    }
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
