

:root {
    --nav-bg: #ffffff;
    --nav-border: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-muted: #6b7280;
    --accent: #111111;
    --accent-hover: #333333;
    --badge-bg: #ef4444;
    --dropdown-hover: #f9fafb;
}





/* ── Main navbar ── */
.main-nav {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: box-shadow 0.3s;
}

    .main-nav.scrolled {
        box-shadow: 0 1px 12px rgba(0,0,0,0.06);
    }

/* Logo */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.04em;
    line-height: 1;
    transition: opacity 0.2s;
}

    .logo:hover {
        opacity: 0.7;
    }

    .logo span {
        color: var(--badge-bg);
    }



/* Nav icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-icon-btn {
    position: relative;
    width: 55px;
    height: 55px;
    font-size:2rem!important;
    border: none;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .nav-icon-btn:hover {
        background: var(--search-bg);
    }

    

.cart-count {
    position: absolute;
    top: 4px;
    right: 2px;
    background: var(--badge-bg);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--nav-bg);
    line-height: 1;
}

/* ── Category bar ── */
.cat-bar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 0;
    position: sticky;
    top: 68px;
    z-index: 1030;
}

    .cat-bar .nav-link {
        color: var(--text-muted);
        font-size: 0.8125rem;
        font-weight: 500;
        padding: 12px 16px;
        border-bottom: 2px solid transparent;
        transition: all 0.2s;
        white-space: nowrap;
        font-size: 1.2rem;
    }

        .cat-bar .nav-link:hover,
        .cat-bar .nav-link.active {
            color: var(--text-primary);
            border-bottom-color: var(--text-primary);
        }

        .cat-bar .nav-link.sale-link {
            color: var(--badge-bg);
            font-weight: 600;
        }

            .cat-bar .nav-link.sale-link:hover {
                border-bottom-color: var(--badge-bg);
            }

/* ── Dropdowns ── */
.dropdown-menu {
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 8px;
    min-width: 220px;
    animation: dropIn 0.2s ease;
}

.dropdown-menu.show {
    position: fixed !important; /* breaks out of parent */
    min-width: max-content; /* let content decide width */
    width: max-content;
    max-width: calc(100vw - 1.5rem); /* never wider than screen */
    right: 0.75rem !important; /* keep it on screen */
    left: auto !important;
    z-index: 1055;
}

@media (min-width: 576px) {
    .dropdown-menu.show {
        right: auto !important;
    }
}

    @keyframes dropIn {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

.dropdown-item {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 9px 14px;
    color: var(--text-primary);
    transition: background 0.15s;
}

    .dropdown-item:hover {
        background: var(--dropdown-hover);
        color: var(--text-primary);
    }

    .dropdown-item i {
        width: 20px;
        text-align: center;
        margin-right: 10px;
        color: var(--text-muted);
        font-size: 0.9rem;
    }

/* ── Mobile ── */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: var(--nav-bg);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    padding: 20px;
}

    .mobile-menu.open {
        transform: translateX(0);
    }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

    .mobile-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.mobile-menu .mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--nav-border);
    transition: color 0.2s;
}

    .mobile-menu .mobile-link:hover {
        color: var(--badge-bg);
    }

    .mobile-menu .mobile-link i {
        font-size: 1.1rem;
        color: var(--text-muted);
        width: 24px;
        text-align: center;
    }

.mobile-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 991.98px) {
    .cat-bar {
        display: none;
    }
}

