:root {
    --primary-color: #2ecc71;
    --primary-hover: #27ae60;
    --secondary-color: #f1c40f;
    --dark-color: #1a202c;
    --light-color: #f7fafc;
    --gray-color: #718096;
    --border-radius: 20px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --bottom-nav-height: 65px;
    
    /* Pastel Colors for Categories */
    --cat-green: #e9f7ef;
    --cat-red: #fef2f2;
    --cat-yellow: #fffaf0;
    --cat-blue: #ebf8ff;
    --cat-orange: #fff5eb;
}

body {
    font-family: 'Quicksand', 'Inter', sans-serif;
    background-color: #ffffff;
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 70px;
    overflow-x: hidden; /* Prevent horizontal scroll */
    animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix for horizontal scroll caused by rows */
.row {
    margin-left: -12px;
    margin-right: -12px;
}

.container, .container-fluid {
    overflow-x: hidden;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 10px;
}

.text-muted {
    color: var(--gray-color) !important;
}

/* Category Cards (Horizontal) */
.category-card {
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    border: none;
    height: 100%;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.category-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-card:hover img {
    transform: scale(1.2) rotate(5deg);
}

.category-card h6 {
    transition: color 0.3s ease;
}

.category-card:hover h6 {
    color: var(--primary-color) !important;
}

/* Micro-interactions for other elements */
.hero-section .btn:hover i {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.rating i {
    transition: transform 0.3s ease;
}

.product-card:hover .rating i {
    transform: scale(1.2);
}

.product-card:hover .rating i:nth-child(1) { transition-delay: 0.05s; }
.product-card:hover .rating i:nth-child(2) { transition-delay: 0.1s; }
.product-card:hover .rating i:nth-child(3) { transition-delay: 0.15s; }
.product-card:hover .rating i:nth-child(4) { transition-delay: 0.2s; }
.product-card:hover .rating i:nth-child(5) { transition-delay: 0.25s; }

.bg-pastel-green { background-color: var(--cat-green); }
.bg-pastel-red { background-color: var(--cat-red); }
.bg-pastel-blue { background-color: var(--cat-blue); }
.bg-pastel-yellow { background-color: var(--cat-yellow); }
.bg-pastel-orange { background-color: var(--cat-orange); }

/* Product Cards Premium */
.product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-card .img-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    transition: var(--transition);
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 5;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 991px) {
    .product-actions {
        opacity: 1;
        transform: translateX(0);
        top: 5px;
        right: 5px;
    }
    
    .btn-share {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.9) !important;
        border: none !important;
    }
}

.btn-share {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.btn-share:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-share:hover i {
    color: white !important;
}

.product-card:hover .img-container {
    background: white;
}

.product-card .img-container img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.08));
}

.product-card:hover .img-container img {
    transform: scale(1.15) rotate(-5deg);
}

.product-card .card-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card h6 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    height: 2.8em;
}

.product-card .category-name {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.product-card .location-text {
    font-size: 0.65rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-weight: 600;
}

.product-card .seller-name {
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .rating {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.product-card .rating i {
    font-size: 0.75rem;
    color: #ffc107;
}

.product-card .form-select-sm {
    border-color: #e2e8f0;
    color: var(--dark-color);
    font-weight: 600;
    padding: 6px 30px 6px 12px;
    background-color: #f8fafc;
    transition: var(--transition);
}

.product-card .form-select-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.15);
    background-color: #fff;
}

.product-card .price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
}

.product-card .price-wrapper {
    display: flex;
    flex-direction: column;
}

.product-card .price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1;
    margin-bottom: 2px;
}

.product-card .unit {
    font-size: 0.8rem;
    color: var(--gray-color);
    font-weight: 600;
}

.product-card .btn-add {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

.product-card .btn-add:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.3);
}

.product-card .btn-add:active {
    transform: scale(0.95);
}

.product-card .btn-add i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.product-card .btn-add.loading i {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.product-card .btn-add.success {
    background: #27ae60 !important;
}

.product-card .btn-add.success i::before {
    content: "\f00c"; /* FontAwesome check icon */
}

.product-card .badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #f39c12;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-card .badge-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-size: 0.65rem;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

.animate-bounce {
    animation: bounce 3s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* 5 Column Grid for Categories */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (max-width: 768px) {
    .rounded-pill-md {
        border-radius: 1rem !important;
    }
}

.table-responsive {
    border: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rotate-45 { transform: rotate(45deg); }

/* Custom Buttons */
.btn {
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
}

.btn-success:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

.btn-success:active {
    transform: translateY(0);
}

.btn-outline-success {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-success:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.2);
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

/* Iconic Round Buttons (like Add to Cart) */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Navbar Enhancements */
.navbar {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand {
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    filter: drop-shadow(0 2px 4px rgba(46, 204, 113, 0.2));
}

.nav-link {
    font-weight: 600;
    color: var(--dark-color) !important;
    position: relative;
    padding: 0.5rem 1.2rem !important;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .btn {
        padding: 8px 18px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    .product-card {
        padding: 10px;
        border-radius: 20px;
    }
    
    .product-card .img-container {
        padding: 15px;
        margin-bottom: 8px;
        min-height: 120px;
    }
    
    .product-card .img-container img {
        height: 100px !important;
    }
    
    .product-card h6 {
        font-size: 0.85rem;
    }
    
    .product-card .price {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 30px 0;
        text-align: center;
        border-radius: 0;
    }
    
    .display-3 {
        font-size: 2rem;
    }

    .category-card {
        padding: 15px 8px;
    }

    .category-card img {
        width: 45px;
        height: 45px;
    }

    .category-card h6 {
        font-size: 0.8rem;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.05);
    z-index: 1050;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform 0.3s ease;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 0;
    flex: 1;
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.35rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item.active i {
    transform: translateY(-5px);
    color: var(--primary-color);
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Adjustments for mobile search */
.mobile-search-container {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 60px;
    z-index: 1020;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-search-container .form-control {
    border-radius: 16px;
    padding: 12px 12px 12px 45px;
    background: #f1f5f9;
    border: 1px solid transparent;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.mobile-search-container .form-control:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

@media (max-width: 991px) {
    :root {
        --bottom-nav-height: 70px;
    }

    body {
        padding-top: 60px;
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
        background-color: #f8fafc;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Product Card Mobile Optimization (2 columns) */
    .row.g-4 {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }

    @media (max-width: 375px) {
        .col-6 {
            width: 100%; /* Single column on very small screens */
        }
        
        .product-card {
            flex-direction: row;
            align-items: center;
            padding: 12px;
        }
        
        .product-card .img-container {
            width: 100px;
            min-height: 100px;
            margin-bottom: 0;
            margin-right: 12px;
            flex-shrink: 0;
        }
        
        .product-card .card-content {
            padding: 0;
        }
        
        .product-card h6 {
            height: auto;
            -webkit-line-clamp: 1;
        }
        
        .product-card .price-row {
            margin-top: 4px;
        }
    }

    .product-card {
        border-radius: 20px;
        padding: 10px;
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    }

    .product-card .img-container {
        min-height: 140px;
        padding: 12px;
        border-radius: 15px;
        margin-bottom: 8px;
    }

    .product-card .img-container img {
        max-height: 100px;
    }

    .product-card h6 {
        font-size: 0.9rem;
        margin-bottom: 4px;
        line-height: 1.3;
        height: 2.6em;
    }

    .product-card .price-row {
        margin-top: 8px;
    }

    .product-card .price {
        font-size: 1.1rem !important;
    }

    .btn-add {
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
    }

    #floating-checkout {
        bottom: calc(var(--bottom-nav-height) + 20px + env(safe-area-inset-bottom)) !important;
        right: 16px;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    /* Spacing and Blocks */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    /* Category Cards Mobile */
    .category-card {
        padding: 12px 8px;
        border-radius: 16px;
    }

    .category-card img {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .category-card h6 {
        font-size: 0.75rem;
    }
}

/* Floating Checkout Improvements */
#floating-checkout {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 1040;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0) translateY(100px);
    opacity: 0;
}

#floating-checkout.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

#floating-checkout .btn {
    border: 2px solid white;
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
}

#floating-checkout .cart-count-badge {
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

#floating-checkout.show .btn {
    animation: pulse-green 2s infinite;
}

.nav-link:hover::after {
    width: 20px;
}

.nav-link.active::after {
    width: 25px;
}

/* Cart Badge */
#cart-count {
    font-size: 0.65rem;
    padding: 0.35em 0.6em;
    top: 5px !important;
    right: 2px !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Search Bar in Header */
.header-search {
    max-width: 300px;
    position: relative;
}

.header-search .form-control {
    border-radius: 50px;
    padding-left: 40px;
    background: #f1f3f5;
    border: 1px solid transparent;
    transition: var(--transition);
}

.header-search .form-control:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.header-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    transition: var(--transition);
}

.header-search .form-control:focus + i {
    color: var(--primary-color);
}

/* Card Styling */
.card {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: #fff;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.product-image-wrapper {
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
}

.card-img-top {
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

/* Mobile Optimizations */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-md);
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .display-4 {
        font-size: 2.5rem;
    }
    .card-body {
        padding: 1rem !important;
    }
}

/* Category Pills */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-pill {
    padding: 12px 20px;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.category-pill i {
    width: 20px;
    text-align: center;
    color: var(--gray-color);
    transition: var(--transition);
}

.category-pill.active, .category-pill:hover {
    background: #e9f7ef;
    color: var(--primary-color);
    border-color: rgba(46, 204, 113, 0.2);
}

.category-pill.active i, .category-pill:hover i {
    color: var(--primary-color);
}

.category-pill.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
}

.category-pill.active i {
    color: #fff;
}

/* Hero Section Gradient */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 24px;
}


/* Price Calculator Style */
.calculator-box {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Analytics Cards */
.stat-card {
    padding: 25px;
    border-radius: 15px;
    color: white;
    transition: var(--transition);
}
.stat-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.stat-card.blue { background: linear-gradient(45deg, #4e73df, #224abe); }
.stat-card.green { background: linear-gradient(45deg, #1cc88a, #13855c); }
.stat-card.orange { background: linear-gradient(45deg, #f6c23e, #dda20a); }
.stat-card.red { background: linear-gradient(45deg, #e74a3b, #be2617); }

/* Admin Sidebar/Nav */
/* Admin Sidebar Mobile Optimization */
@media (max-width: 991.98px) {
    .admin-sidebar {
        margin-bottom: 20px;
        border-radius: 20px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .admin-sidebar .card-body {
        padding: 0 !important;
    }

    .admin-sidebar nav {
        display: flex !important;
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px 0 15px 0;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }

    .admin-sidebar nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }

    .admin-nav-item {
        flex: 0 0 auto;
        display: inline-flex !important;
        align-items: center;
        padding: 8px 16px !important;
        margin-bottom: 0 !important;
        border-radius: 50px !important;
        font-size: 0.85rem;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    .admin-nav-item i {
        margin-right: 6px !important;
        width: auto !important;
        font-size: 0.9rem;
    }

    .admin-nav-item.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }
}

.admin-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 5px;
    border-radius: 12px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.admin-nav-item i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.admin-nav-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.admin-nav-item.active {
    background-color: var(--primary-color);
    color: white !important;
}

.admin-nav-item.active i {
    color: white;
}

/* Admin Dashboard Enhancements */
.hover-bg-white:hover {
    background-color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

.shadow-hover {
    transition: all 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.stats-card {
    border: none;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.transition {
    transition: all 0.3s ease;
}

.bg-opacity-10 {
    background-opacity: 0.1;
}

.table-hover tbody tr:hover {
    background-color: rgba(46, 204, 113, 0.02);
}

.list-group-item:hover {
    background-color: rgba(46, 204, 113, 0.02);
}

.stat-card-modern {
    border: none;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
/* Modern UI Utilities */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gap-responsive {
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .gap-responsive {
        gap: 0.75rem;
    }
}

.rounded-4 {
    border-radius: 1.5rem !important;
}

.rounded-5 {
    border-radius: 2rem !important;
}

.shadow-premium {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 20px 40px -10px rgba(0, 0, 0, 0.02) !important;
}

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* No-scroll Mobile Optimizations */
@media (max-width: 576px) {
    .horizontal-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 10px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .horizontal-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .horizontal-scroll > * {
        flex: 0 0 auto;
        scroll-snap-align: start;
        width: 140px;
    }

    .grid-2-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

.border-soft {
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.bg-soft-primary { background-color: rgba(52, 152, 219, 0.05) !important; }
.bg-soft-success { background-color: rgba(46, 204, 113, 0.05) !important; }
.bg-soft-warning { background-color: rgba(241, 196, 15, 0.05) !important; }
.bg-soft-danger { background-color: rgba(231, 74, 59, 0.05) !important; }

/* Admin Sidebar active state fix */
.admin-nav-item.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}
.toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Loading Spinner */
.btn-loading {
    position: relative;
    color: transparent !important;
}
.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Admin Sidebar Mobile Toggle */
@media (max-width: 991px) {
    .admin-sidebar {
        display: none;
    }
    
    .col-lg-3:has(.admin-sidebar) {
        display: none;
    }
    
    /* Make the content take full width when sidebar is hidden */
    .col-lg-9 {
        width: 100% !important;
    }
}

/* Search Bar */
.search-bar {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.search-bar .form-control {
    border: 1px solid #e2e8f0;
    padding: 12px 20px;
    font-size: 0.95rem;
    box-shadow: none !important;
    border-radius: 16px 0 0 16px;
}

.search-bar .form-control:focus {
    border-color: var(--primary-color);
}

.search-bar .btn {
    border: 1px solid #e2e8f0;
    border-left: none;
    background: #fff;
    color: var(--primary-color);
    padding: 0 20px;
    border-radius: 0 16px 16px 0;
}

.search-bar .btn:hover {
    background: #f8fafc;
}
