/* Glassmorphism, animations, particles, gradients */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #8b5cf6;
    --secondary: #ec4899;
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg), #1e1b4b);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Glassmorphism Generic Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Sticky Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-radius: 0;
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--primary);
}
.cart-badge {
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 5px;
    display: inline-block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 10vmin 5%;
}
.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

/* Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255,255,255,0.2);
}
.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.5s;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}
.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}
.product-card .btn-primary {
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    padding: 1rem 1.5rem;
    margin-top: 10px;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Overlay */
#loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    .hero h1 { font-size: 2.5rem; }
}
