/* Root Variables */
:root {
    --primary-color: #6200EA;
    --primary-light: #9D46FF;
    --primary-dark: #3700B3;
    --surface-dark: #121212;
    --surface-darker: #0D0D0D;
    --surface-card: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #111111; /* Fallback color */

    background: radial-gradient(circle at 10% 20%, var(--surface-darker) 0%, #111111 90%);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
.background-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.08;
    z-index: -1;
}

.glow-1 {
    top: -200px;
    left: -100px;
    background: var(--primary-color);
}

.glow-2 {
    bottom: -250px;
    right: -100px;
    background: var(--primary-light);
}

/* Title Styling */
.page-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0;
    justify-content: center;
    background: linear-gradient(90deg, #FFFFFF, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title i {
    font-size: 36px;
    color: var(--primary-light);
}

/* Search Bar Container */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 20px;
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(5px);
}

.search-container input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    padding: 8px 15px;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.search-container i {
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(157, 70, 255, 0.1);
}

.search-container:focus-within i {
    color: var(--primary-light);
}

.search-container i:hover {
    transform: scale(1.1);
    color: var(--primary-light);
}

/* Product Grid */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1440px;
    margin: auto;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card */
.product-card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(98, 0, 234, 0.15);
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Ribbon */
.product-card .ribbon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(98, 0, 234, 0.3);
}

/* Product Text */
.product-card h3 {
    font-size: 20px;
    margin: 16px 0 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.product-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Styling */
.price-container {
    display: flex;
    align-items: center;
    margin: 16px 0;
}

.price {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(90deg, #FFFFFF, #9D46FF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.crossed-price {
    font-size: 16px;
    text-decoration: line-through;
    color: rgba(255, 102, 102, 0.8);
    margin-left: 10px;
}

/* Cart Icon */
.product-card .cart-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(98, 0, 234, 0.3);
}

.product-card .cart-icon:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0px 5px 15px rgba(98, 0, 234, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.cart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-notification.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 5px 15px rgba(98, 0, 234, 0.3);
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s ease-in-out;
    z-index: 999;
    border: none;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0px 8px 20px rgba(98, 0, 234, 0.4);
}

/* Cart Count Badge */
.floating-cart-btn span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3366;
    color: white;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
    }

    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        padding: 15px;
    }

    .floating-cart-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }

    .search-container {
        max-width: 300px;
    }

    .product-container {
        grid-template-columns: 1fr;
    }
}