/* Modern Theme Styles */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Global Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--light-bg);
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Tables */
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: var(--light-bg);
}

.table > :not(caption) > * > * {
    padding: 1rem;
}

.table-hover tbody tr:hover {
    background-color: var(--light-bg);
}

/* Forms */
.form-control, .form-select {
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border-color: var(--border-color);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 0.375rem;
}

/* Admin Sidebar */
.admin-sidebar {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.admin-sidebar .nav-link {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.admin-sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Category Cards */
.category-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    height: 160px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Status Badges */
.badge.bg-warning {
    background-color: var(--warning-color) !important;
    color: #fff;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table > :not(caption) > * > * {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
    }
}

/* Toast Notifications */
.toast-container {
    z-index: 1050;
}

.toast {
    background: #fff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

#heroSlider {
    border-radius: 8px;
    overflow: hidden;
}

#heroSlider img {
    border-radius: 8px;
}

/* Navigation Styles */
.navbar-nav.mx-auto.categories-menu {
    margin-left: 0 !important;
    margin-right: auto !important;
    gap: 0.5rem;
}

.categories-menu .nav-item {
    margin: 0;
    padding: 0;
    position: relative;
}

.categories-menu .nav-link {
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
}

.categories-menu .nav-link:hover,
.categories-menu .nav-link:focus {
    color: var(--primary-color);
    background: transparent;
}

.categories-menu .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

.categories-menu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.2s ease;
}

.categories-menu .nav-link:hover::after,
.categories-menu .nav-link.active::after {
    width: 100%;
}

.categories-menu .nav-link .badge {
    margin-left: 0.5rem;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.categories-menu .nav-link:hover .badge,
.categories-menu .nav-link.active .badge {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 991.98px) {
    .categories-menu {
        padding: 0.5rem;
    }
    
    .categories-menu .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Mobile Navigation and Layout */
@media (max-width: 991.98px) {
    /* Logo and Header */
    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .navbar-brand img {
        max-height: 40px;
        max-width: 150px;
    }

    /* Cart Icon */
    .cart-icon {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1020;
        display: flex !important;
        align-items: center;
        color: var(--text-primary);
        text-decoration: none;
    }

    .cart-icon i {
        font-size: 1.25rem;
    }

    .cart-icon .badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background-color: var(--primary-color);
        color: white;
        font-size: 0.7rem;
        padding: 0.25rem 0.45rem;
        border-radius: 50%;
    }

    /* Mobile Menu */
    .navbar-collapse {
        background: white;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        padding: 1rem;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    /* Close Button */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }

    /* Categories Menu */
    .categories-menu {
        margin: 0 !important;
        padding: 1rem 0 !important;
    }

    .categories-menu .nav-item {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .categories-menu .nav-link {
        padding: 0.8rem 0;
        font-size: 1rem;
    }

    .categories-menu .nav-link::after {
        display: none;
    }

    /* Product Grid */
    .col-6 {
        width: 100% !important;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .product-card .card-img-top {
        height: 250px;
    }

    /* Category Cards */
    .category-card {
        margin-bottom: 1rem;
    }

    .category-card .card-img-wrapper {
        padding-top: 60%;
    }

    /* Search Bar */
    .search-form {
        position: relative;
        width: 100%;
        margin: 1rem 0;
    }

    .search-form .form-control {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    /* Mobile Filters */
    .filters-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        z-index: 1040;
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 1rem;
        overflow-y: auto;
    }

    .filters-sidebar.show {
        transform: translateX(0);
    }

    /* Mobile Specific Spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Bottom Navigation Bar */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 0.5rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1030;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-bottom-nav a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.8rem;
        text-align: center;
        padding: 0.25rem;
    }

    .mobile-bottom-nav i {
        font-size: 1.2rem;
        display: block;
        margin-bottom: 0.25rem;
    }

    .mobile-bottom-nav a.active {
        color: var(--primary-color);
    }

    /* Add padding to main content to account for bottom nav */
    body {
        padding-bottom: 4rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .product-card .card-img-top {
        height: 200px;
    }

    .navbar-brand img {
        max-height: 35px;
    }

    .section-padding {
        padding: 2rem 0;
    }
}

/* Logo and header styles */
.navbar-brand img {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.navbar {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Mobile logo styles */
@media (max-width: 991.98px) {
    .navbar-brand img {
        max-height: 40px;
        max-width: 150px;
    }
} 