:root {
    /* Premium Palette */
    --primary-color: #D32F2F;
    /* Softer, premium red */
    --primary-hover: #B71C1C;
    --accent-gold: #D4A017;
    /* Warm Golden Tone */
    --secondary-color: #2D3436;
    /* Soft Black/Dark Slate */
    --text-muted: #636E72;
    --border-color: #ECECEC;
    --white: #ffffff;
    --warm-bg: #FCFBF8;
    /* Very subtle warm background */
    --light-bg: #F5F5F5;
}

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--warm-bg);
    /* Warm background */
}

a {
    text-decoration: none;
}

/* --- Top Header (Main) --- */
.main-header {
    background-color: var(--white);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo img {
    max-height: 40px;
}

/* Search Bar */
.search-bar-container {
    max-width: 650px;
    width: 100%;
}

.search-input-group {
    border: 2px solid var(--accent-gold);
    /* Gold border for premium feel */
    border-radius: 5px;
    background-color: var(--white);
    overflow: hidden;
    height: 42px;
    display: flex;
}

.search-input {
    border: none;
    flex-grow: 1;
    padding: 0 15px;
    font-size: 14px;
    height: 100%;
    color: var(--secondary-color);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background-color: var(--primary-color);
    border: none;
    color: var(--white);
    padding: 0 25px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s;
}

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

/* Header Actions (Wishlist, Cart, User) */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.action-icon {
    position: relative;
    color: var(--secondary-color);
    font-size: 20px;
    transition: color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.action-icon:hover {
    color: var(--accent-gold);
    /* Gold hover effect */
}

.icon-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Bottom Navigation --- */
.bottom-header {
    background-color: var(--secondary-color);
    /* Dark background for contrast */
    border-bottom: none;
    height: 50px;
}

/* Categories Dropdown */
.all-categories-btn {
    background-color: var(--accent-gold);
    /* Gold button */
    color: var(--secondary-color);
    /* Dark text on gold */
    height: 50px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 250px;
    cursor: pointer;
    transition: background 0.3s;
}

.all-categories-btn:hover {
    background-color: #C6920E;
    /* Darker gold hover */
    color: var(--secondary-color);
}

/* Main Nav Links */
.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.main-nav .nav-link {
    color: var(--white);
    /* White text on dark bar */
    font-weight: 500;
    font-size: 14px;
    padding: 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.main-nav .nav-link:hover {
    color: var(--accent-gold);
    /* Gold text on hover */
}

/* Responsive */
@media (max-width: 991px) {
    .main-header {
        padding: 10px 0;
    }

    .bottom-header {
        height: auto;
    }

    .all-categories-btn {
        width: 100%;
        height: 45px;
        border-radius: 4px;
        margin-bottom: 10px;
    }

    .search-bar-container {
        margin: 10px 0;
        width: auto;
        /* Let flex handle width */
    }

    .navbar-toggler {
        padding: 5px;
    }

    .header-actions {
        gap: 15px;
    }

    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        border-top: 1px solid var(--border-color);
        /* Add separator */
        margin-top: 10px;
    }

    .main-nav .nav-link {
        height: 40px;
        width: 100%;
        color: var(--secondary-color);
        padding-left: 0;
    }

    .bottom-header {
        background-color: var(--white);
    }
}

/* --- Categories Dropdown Menu --- */
.categories-dropdown-wrapper {
    position: relative;
    width: 250px; /* Match button width */
}

.all-categories-btn {
    width: 100%; /* Fill wrapper */
}

.categories-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 0 0 8px 8px;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Show on Hover */
.categories-dropdown-wrapper:hover .categories-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.categories-dropdown-menu li {
    border-bottom: 1px solid #f5f5f5;
}

.categories-dropdown-menu li:last-child {
    border-bottom: none;
}

.categories-dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-dropdown-menu li a:hover {
    background-color: #f9f9f9;
    color: var(--primary-color);
    padding-left: 25px;
}

.categories-dropdown-menu li a i {
    font-size: 12px;
    color: #ccc;
}