:root {
    --bg-base: #050505;
    --card-bg: rgba(20, 20, 22, 0.6);
    --text-main: #f8f9fa;
    --text-muted: #9ca3af;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-pink: #ff007f;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-purple); }

/* --- Discount Banner --- */
.discount-banner {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    color: white;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.4);
}

.marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.marquee span {
    padding-right: 50px;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Ambient Background --- */
.ambient-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-1 { width: 600px; height: 600px; background: var(--neon-purple); top: -200px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--neon-cyan); bottom: -100px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 400px; height: 400px; background: var(--neon-pink); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; }

.noise-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    pointer-events: none;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}

/* --- Hero Section --- */
.hero-section {
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.glitch {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    margin-bottom: 1rem;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-pink);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-cyan);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(80% 0 5% 0); }
    40% { clip-path: inset(30% 0 20% 0); }
    60% { clip-path: inset(70% 0 10% 0); }
    80% { clip-path: inset(20% 0 50% 0); }
    100% { clip-path: inset(50% 0 30% 0); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Main Grid --- */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--neon-cyan);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 243, 255, 0.1);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* --- Product Cards --- */
.product-card {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.card-inner {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-inner:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 243, 255, 0.1),
                inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(145deg, #1a1a1c, #0a0a0c);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card-inner:hover .image-wrapper::before { opacity: 1; }

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: transform 0.5s ease;
}

.card-inner:hover .image-wrapper img {
    transform: scale(1.1) rotate(-2deg);
}

.category-tag {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discount-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: var(--neon-pink);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
    animation: pulse 2s infinite;
}

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

.product-details {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.price-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.price-group {
    display: flex;
    flex-direction: column;
}

.old-price {
    color: #ef4444;
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.price {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.neon-btn {
    background: transparent;
    border: 2px solid var(--neon-purple);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-btn span {
    position: relative;
    z-index: 2;
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--neon-purple);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: 1;
}

.neon-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.neon-btn:hover {
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.6);
}
