:root {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #8a2be2;
    --primary-light: #e9d5ff;
    --primary-glow: rgba(138, 43, 226, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 20px 40px -10px rgba(138, 43, 226, 0.15), 0 10px 15px -3px rgba(138, 43, 226, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Abstract 3D Background Elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    opacity: 0.6;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.05));
    animation: float 10s ease-in-out infinite alternate;
}

.bg-element.el-1 { top: -5%; left: 10%; width: 300px; animation-delay: 0s; transform: rotate(15deg); }
.bg-element.el-2 { bottom: 10%; right: 5%; width: 400px; animation-delay: -3s; transform: rotate(-20deg); }
.bg-element.el-3 { top: 40%; left: -10%; width: 250px; animation-delay: -5s; transform: rotate(45deg); filter: blur(3px); opacity: 0.3;}
.bg-element.el-4 { top: 15%; right: 15%; width: 200px; animation-delay: -7s; }
.bg-element.el-5 { bottom: -10%; left: 30%; width: 350px; animation-delay: -2s; transform: rotate(-10deg); }

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg) scale(1); }
    50% { transform: translateY(-20px) rotate(5deg) scale(1.02); }
    100% { transform: translateY(10px) rotate(-5deg) scale(0.98); }
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glass Navigation */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-top: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 2rem;
    z-index: 100;
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), #ff007f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-container {
    position: relative;
    width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 100px;
    background: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Hero Section */
.hero {
    text-align: center;
    margin: 5rem 0 3rem 0;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.stats-bar {
    display: inline-flex;
    gap: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.stat {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 0.25rem;
}

/* Filters Section */
.filters-section {
    margin-bottom: 3rem;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    color: var(--primary);
}

.clear-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.brand-tags-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}

.brand-tags-container::-webkit-scrollbar {
    display: none; /* Chrome */
}

.brand-tag {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(138, 43, 226, 0.1);
    border-radius: 100px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02), inset 0 0 0 1px rgba(255,255,255,0.5);
    scroll-snap-align: start;
}

.brand-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(138, 43, 226, 0.08);
    color: var(--text-main);
    border-color: rgba(138, 43, 226, 0.3);
}

.brand-tag.active {
    background: linear-gradient(135deg, var(--primary), #ff007f);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px var(--primary-glow);
    font-weight: 600;
}

/* Products Grid */
.products-section {
    position: relative;
    min-height: 400px;
    padding-bottom: 5rem;
    animation: slideUp 0.8s ease-out 0.6s both;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: visible;
    animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    border-radius: inherit;
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-light);
}

.product-card:hover::before {
    opacity: 1;
}

.product-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.product-card:hover .product-image {
    transform: scale(1.08) translateY(-5px);
}

.product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    z-index: 2;
    opacity: 0.9;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    z-index: 2;
    line-height: 1.3;
}

.card-3d-element {
    position: absolute;
    width: 90px;
    height: 90px;
    object-fit: contain;
    z-index: 3;
    opacity: 1;
    transition: var(--transition);
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.2));
    pointer-events: none;
}

.product-card:hover .card-3d-element {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 20px 20px rgba(138, 43, 226, 0.3));
}

/* Loading & Empty States */
.loading-state, .no-results {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(138, 43, 226, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

.no-results i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.no-results.hidden, .loading-state.hidden {
    display: none;
}

/* Animations */
@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

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

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .glass-nav {
        flex-direction: column;
        gap: 1rem;
        border-radius: var(--radius-lg);
        padding: 1rem;
    }
    
    .search-container {
        width: 100%;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .stats-bar {
        gap: 1.5rem;
        padding: 0.75rem 1.5rem;
    }

    .brand-tags-container {
        scroll-snap-type: x mandatory;
        padding-bottom: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-card {
        padding: 1rem;
    }

    .product-image {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .product-name {
        font-size: 0.95rem;
    }
    
    .product-brand {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    .card-3d-element {
        width: 55px;
        height: 55px;
        filter: drop-shadow(0 10px 10px rgba(0,0,0,0.15));
    }
}
