/* --- UI/UX ENHANCEMENTS --- */

/* 1. Glassmorphism Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 2. Hero Section Modernization */
.hero-section {
    background: linear-gradient(120deg, var(--primary-color) 0%, #4f46e5 50%, var(--primary-dark) 100%);
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

/* 3. Product Filters (Modern Pills) */
.nav-pills .nav-link {
    color: var(--secondary-color);
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.nav-pills .nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 4. Filter Buttons Container Mobile Scroll */
.nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.nav-pills::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* 5. Mobile Menu Corrections */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--card-bg);
        border-radius: 1rem;
        padding: 1.5rem;
        margin-top: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 0.5rem;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(37, 99, 235, 0.05);
    }
}

/* 6. Minimalist Footer */
.minimal-footer {
    background-color: #f8fafc;
    /* Very light grey */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .minimal-footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

/* 7. Product Grid Mobile (App-Like) */
@media (max-width: 576px) {

    /* Make grid 2 columns */
    .product-grid-mobile .col-12 {
        width: 50%;
        /* Force 50% width */
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .product-grid-mobile {
        margin-left: -0.35rem;
        margin-right: -0.35rem;
    }

    /* Compact Product Card for Mobile */
    .product-card-mobile {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .product-card-mobile .card-img-top {
        height: 160px;
        /* Taller look */
        border-radius: 0.75rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        margin-bottom: 0.5rem;
    }

    .product-card-mobile .card-body {
        padding: 0 !important;
    }

    .product-card-mobile .card-title {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.2rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-card-mobile .card-price {
        font-size: 0.85rem;
        color: var(--primary-color);
        font-weight: 700;
    }

    .product-card-mobile .btn,
    .product-card-mobile .text-muted {
        display: none;
        /* Hide description and button on grid to save space */
    }
}