:root {
    --primary-color: #2D3047;
    --secondary-color: #419D78;
    --accent-color: #E0A458;
}

body {
    font-family: 'Cairo', sans-serif;
}

/* Navbar Styles */
.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar.shadow-sm {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0;
}

.navbar-brand img {
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--primary-color) !important;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

/* Cart Button */
.cart-btn {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Menu */
.user-menu-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    transform: translateY(-1px);
}

/* Mobile Enhancements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }

    .navbar-nav {
        padding: 0.5rem 0;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .navbar-toggler:focus {
        box-shadow: none;
        background-color: rgba(var(--bs-primary-rgb), 0.1);
    }

    .cart-btn {
        margin: 0.5rem 0;
    }

    .user-menu-btn {
        width: 100%;
        text-align: right;
        margin: 0.5rem 0;
    }
}

/* Search Bar */
.search-form {
    position: relative;
    max-width: 300px;
}

.search-input {
    padding-right: 40px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: none;
    border: none;
    color: #6c757d;
    transition: all 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Product Cards */
.product-card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price .currency {
    font-size: 0.8em;
    color: #666;
}

/* Category Cards */
.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 200px;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

.category-card:hover .overlay {
    background: rgba(0,0,0,0.7);
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.show {
    background-color: #1a237e !important;
    border-color: #1a237e !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* User Menu Button */
.user-menu-btn.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
}

.user-menu-btn.btn-primary:hover,
.user-menu-btn.btn-primary:focus,
.user-menu-btn.btn-primary:active,
.user-menu-btn.btn-primary.show,
.user-menu-btn.btn-primary[aria-expanded="true"] {
    background-color: #1a237e !important;
    border-color: #1a237e !important;
    color: #fff !important;
}

.dropdown-toggle::after {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Admin Dashboard Link */
.dropdown-menu .dropdown-item.text-primary {
    font-weight: bold;
    background-color: rgba(13, 110, 253, 0.1);
}

.dropdown-menu .dropdown-item.text-primary:hover {
    background-color: rgba(13, 110, 253, 0.2);
}

.dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-menu .dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Improve dropdown menu appearance */
.dropdown-menu {
    padding: 0.5rem 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Admin Dashboard Styles */
.admin-sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-sidebar .list-group-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.admin-sidebar .list-group-item.active {
    background-color: var(--primary-color);
    color: white;
}

.admin-sidebar .list-group-item i {
    width: 20px;
    text-align: center;
}

/* Admin Cards */
.admin-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Admin Form Controls */
.admin-form .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.admin-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Footer */
footer {
    background-color: var(--primary-color) !important;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        min-height: auto;
        padding: 4rem 0;
    }
    
    .hero-section img {
        margin-top: 2rem;
    }
}

/* Price Symbol */
.price::before {
    content: "﷼";
    margin-left: 2px;
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
