/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --dark: #2d3436;
    --light: #f8f9fa;
    --gray: #636e72;
    --border: #dfe6e9;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary);
    color: white;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Buttons */
.btn-primary, .btn-outline, .btn-login, .btn-logout {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-login {
    background: transparent;
    color: var(--dark);
}

.btn-logout {
    background: var(--danger);
    color: white;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image img {
    max-width: 100%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Featured Section */
.featured {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    font-size: 18px;
}

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

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.product-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.product-badge.free {
    background: var(--success);
    color: white;
}

.product-badge.premium {
    background: var(--warning);
    color: white;
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--dark);
}

.product-content p {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 14px;
}

.product-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--gray);
}

.product-stats i {
    margin-right: 5px;
}

.btn-product {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-product:hover {
    background: var(--primary-dark);
}

/* Categories */
.categories {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.category-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    color: var(--gray);
    font-size: 14px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section a {
    display: block;
    color: #b2bec3;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #b2bec3;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-actions {
        display: none;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 120px 0 50px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
}

/* Animation Classes */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}