:root {
    --primary-color: #2a2a2a;
    --secondary-color: #d4af37;
    --danger-color: #fa561b;
    --accent-color: #f8f9fa;
    --text-dark: #333;
    --text-light: #f8f8f8;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Main Header */
.main-header {
    /* background: white; */
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* .navbar {
            padding: 1rem 0;
            background: #000;
        } */


/* Logo */
.navbar-brand {
    margin-right: 2rem;
    transition: var(--transition);
}


.container-fluid {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.logo-img {
    height: 42px;
    transition: var(--transition);
}

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

/* Category Toggle Button */
.category-toggle {
    background: white;
    border: none;
    font-weight: 500;
    font-size: 0.85rem;
    color: black;
    margin-right: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    /* padding: 0.6rem 1.2rem; */
    border-radius: 8px;
}


.category-toggle i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Premium Search Bar */
.search-container {
    flex-grow: 1;
    max-width: 640px;
    position: relative;
}

.search-form {
    position: relative;
}

.search-input {
    height: 40px;
    padding-left: 1.8rem;
    padding-right: 60px;
    font-size: 0.90rem;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.466) !important;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-btn {
    position: absolute;
    right: 2px;
    top: 2px;
    height: 36px;
    width: 37px;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--danger-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.search-btn i {
    font-size: 1rem;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    padding: 1rem 0;
}

.search-input:focus+.search-suggestions {
    display: block;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
}

.header-icon {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-left: 1.8rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.header-icon span.label {
    font-size: 0.7rem;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* User Dropdown */
.user-dropdown .dropdown-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-dropdown .dropdown-toggle i {
    font-size: 1.4rem;
}

.user-dropdown .dropdown-toggle span {
    font-size: 0.7rem;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: 12px !important;
    padding: 0.5rem 0;
    margin-top: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--primary-color);
}

/* Cart Badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #fa561b 100%);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Category Navigation */
.category-nav {
    /* background: linear-gradient(135deg, var(--secondary-color) 0%, #fa561b 100%); */
    background: #333333;
    color: white;
    position: relative;
    z-index: 999;
}

.category-nav .nav {
    display: flex;
    flex-wrap: nowrap;          /* Prevent wrapping */
    overflow-x: auto;           /* Enable horizontal scroll */
    white-space: nowrap;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE */
}

.category-nav .nav::-webkit-scrollbar {
    display: none;              /* Chrome/Safari */
}

.category-nav .nav-link {
    flex: 0 0 auto;     /* Prevent stretching */
    white-space: nowrap;
}


.category-nav .nav-link {
    color: black;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.4rem;
    margin: 0 0.2rem;
    position: relative;
    transition: var(--transition);
}

.category-nav .nav-link.active::after {
    width: 60%;
}

.category-nav .nav-link:hover {
    color: #2a2a2a;
}

.category-nav .dropdown-menu {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px !important;
}

.category-nav .dropdown-item {
    color: var(--primary-color) !important;
}

.category-nav .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
/* Sidebar */
.category-sidebar {
    position: fixed;
    top: 0;
    left: -360px;
    width: 330px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 1100;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 0 18px 18px 0;
}

.category-sidebar.active {
    left: 0;
}

/* Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.sidebar-header h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #333333;
    letter-spacing: 0.5px;
}

.close-sidebar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 115, 190, 0.1);
    color: #333333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    background: #333333;
    color: #fff;
    transform: rotate(90deg) scale(1.05);
}

/* Categories */
.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 0.6rem;
}

.sidebar-categories a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.35s ease;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-categories a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,122,0,0.15), rgba(30,115,190,0.15));
    opacity: 0;
    transition: 0.3s;
}

.sidebar-categories a:hover::before {
    opacity: 1;
}

.sidebar-categories a:hover {
    transform: translateX(8px);
    color: #333333;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-categories a i {
    width: 22px;
    margin-right: 14px;
    font-size: 1.05rem;
    color: #FF7A00;
    z-index: 1;
}

/* Footer */
.sidebar-footer {
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.sidebar-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #FF7A00;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-footer a:hover {
    color: #1E73BE;
    transform: translateX(4px);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}



/* Responsive Adjustments */
@media (max-width: 992px) {


    .header-icons {
        margin-left: auto;
    }

    .category-nav .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 0.5rem 0;
    }

    .category-nav .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .category-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .logo-img {
        height: 36px;
    }

    .category-toggle {
        margin-right: 1rem;
        padding: 0.5rem;
    }

    .header-icon {
        margin-left: 1rem;
    }

    .header-icon span.label {
        display: none;
    }

    .user-dropdown .dropdown-toggle span {
        display: none;
    }

    .search-input {
        height: 42px;
        padding-left: 1.2rem;
    }

    .search-btn {
        height: 36px;
        width: 36px;
    }

    .navbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    /* First row layout */
    .category-toggle {
        order: 1;
    }

    .navbar-brand {
        order: 2;
        margin: 0 auto;   /* center naturally */
        position: static; /* remove absolute */
        transform: none;
    }

    .header-icons {
        order: 3;
        margin-left: auto;
    }

    /* Second row */
    .search-container {
        order: 4;
        width: 100%;
        margin-top: 10px;
    }

    /* Hide labels */
    .category-toggle span,
    .header-icon span.label,
    .user-dropdown .dropdown-toggle span {
        display: none;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu {
    animation: fadeIn 0.3s ease forwards;
}

#searchResults {
    position: absolute;
    display: none;
    background: #000;
    /* dark background */
    margin-top: 2px;
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    /* take full width of the parent (the form) */
    box-sizing: border-box;
    z-index: 1000;
}

/* Make sure the parent (form) is positioned relatively for absolute ul */
.search-form {
    position: relative;
}

/* Style each result item */
#searchResults li {
    border-bottom: 1px solid #eee;
}

/* Link styles inside li */
#searchResults li a {
    text-decoration: none;
    color: #000;
    display: flex;
    /* flex for image + text side by side */
    align-items: center;
    padding: 5px 8px;
    background: white;
    transition: background 0.3s;
}

/* Hover effect */
#searchResults li:hover,
#searchResults li a:hover {
    background: #f8f8f8;
    color: #000;
}

/* Image inside each li */
#searchResults li img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}


