/* ====================================
   Winsurf eMarket - Header & Navigation
   ==================================== */

/* Top Bar */
.top-bar {
    background: var(--secondary);
    color: #ccc;
    font-size: 12px;
    padding: 8px 0;
}

.top-bar .container,
.top-bar .container-fluid {
    display: block;
}

.top-bar a {
    color: #ccc;
}

.top-bar a:hover {
    color: #fff;
}

.top-bar__left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar select {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.top-bar select option {
    color: #333;
    background: #fff;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.dropdown-toggle i {
    font-size: 10px;
}

.top-bar__divider {
    color: #555;
}

/* Main Header */
/* display:contents lifts topbar / header-main / nav-bar to be body-level for
   layout so the sticky header-main pins to the viewport, not to the header box. */
.site-header {
    display: contents;
}

/* Sticky only the middle (search) row for a clean premium feel. */
.header-main {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    padding: 10px 0;
}

/* Global header image sizing guard */
.site-header img {
    max-height: 42px !important;
    max-width: 180px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.site-header .logo,
.site-header .brand-logo {
    max-width: 100%;
    overflow: visible;
}

#store-logo-header {
    display: block;
    height: 55px !important;
    max-height: 55px !important;
    width: auto !important;
    max-width: 180px !important;
}

.header-main .row {
    row-gap: 8px;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
    overflow: visible;
}

#store-name-header {
    display: block;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
}

.store-logo {
    width: auto;
    height: 38px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-text span {
    color: var(--secondary);
}

/* Search Bar */
.header-search {
    width: 100%;
}

.search-wrap {
    display: flex;
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.search-wrap:focus-within {
    box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.14);
}

.search-wrap select {
    padding: 0 10px;
    border: none;
    border-right: 1px solid var(--border);
    outline: none;
    font-size: 13px;
    background: #f9f9f9;
    color: #333;
}

.search-wrap input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 13px;
}

.search-wrap button {
    padding: 0 18px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 16px;
}

.search-wrap button:hover {
    background: var(--primary-dark);
}

/* Header Icons — horizontal text + icon, premium pills */
.header-icons {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-end;
    overflow: visible;
}

.icon-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    position: relative;
    color: var(--text, #1f2430);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    transition: var(--transition);
}

.icon-btn i {
    font-size: 19px;
    color: var(--secondary);
    transition: var(--transition);
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.035);
    border-color: var(--border, #eee);
    color: var(--primary);
}
.icon-btn:hover i {
    color: var(--primary);
}

.icon-btn .badge-count {
    position: absolute;
    top: 2px;
    left: 26px;
    background: var(--primary);
    color: #fff;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff;
}

.icon-btn .badge-count.has-count {
    display: flex;
}

.header-profile-dropdown .dropdown-toggle::after {
    display: none;
}

.header-profile-menu {
    min-width: 230px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: var(--shadow-lg);
}

.header-profile-menu .dropdown-header {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 10px;
}

.header-profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    border-radius: 8px;
    padding: 8px 10px;
}

.header-profile-menu .dropdown-item i {
    width: 14px;
    text-align: center;
}

.header-profile-menu .dropdown-item:hover {
    background: #fff5f4;
    color: var(--primary);
}

/* Navigation Bar */
.nav-bar {
    background: var(--primary);
}

.nav-bar .container,
.nav-bar .container-fluid {
    display: flex;
    align-items: stretch;
}

.nav-mobile-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: transparent;
    height: 42px;
    padding: 0 12px;
}

.nav-mobile-toggle:focus {
    box-shadow: none;
}

.nav-collapse {
    display: flex !important;
    flex: 1;
    align-items: stretch;
}

/* Category Mega Toggle */
.cat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    background: var(--primary-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    height: 44px;
    white-space: nowrap;
}

.cat-toggle i {
    font-size: 16px;
}

.cat-toggle:hover {
    background: #a93226;
}

/* Main Nav Links */
.main-nav {
    display: flex;
    flex: 1;
}

.main-nav>li {
    position: relative;
}

.main-nav>li>a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    transition: var(--transition);
}

.main-nav>li>a:hover,
.main-nav>li.active>a {
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
}

.main-nav>li>a i {
    font-size: 10px;
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 200;
    border-radius: 0 0 var(--radius) var(--radius);
}

.main-nav>li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid #f5f5f5;
}

.nav-dropdown li a:hover {
    color: var(--primary);
    padding-left: 22px;
    background: var(--surface-2);
}

/* Right Nav */
.nav-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-right a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    height: 44px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.nav-right a:hover {
    color: #fff;
}

@media (max-width: 991.98px) {
    .nav-bar .container,
    .nav-bar .container-fluid {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .cat-toggle {
        flex: 1 1 auto;
        height: 42px;
    }

    .nav-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-collapse {
        flex-basis: 100%;
        width: 100%;
        display: none !important;
        background: var(--primary-dark);
        border-radius: var(--radius);
        padding: 8px;
    }

    .nav-collapse.show {
        display: block !important;
    }

    .main-nav {
        width: 100%;
        flex-direction: column;
    }

    .main-nav > li > a {
        height: auto;
        padding: 10px 12px;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        min-width: 100%;
        border: none;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.08);
    }

    .main-nav > li:hover .nav-dropdown,
    .main-nav > li:focus-within .nav-dropdown {
        display: block;
    }

    .nav-dropdown li a {
        color: rgba(255, 255, 255, 0.9);
        border-bottom-color: rgba(255, 255, 255, 0.12);
        padding: 10px 14px;
    }

    .nav-dropdown li a:hover {
        color: #fff;
        background: rgba(0, 0, 0, 0.16);
        padding-left: 14px;
    }

    .nav-right {
        width: 100%;
        margin-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
    }

    .nav-right a {
        height: auto;
        padding: 8px 12px;
    }
}

/* Category Sidebar */
.cat-sidebar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    display: none;
}

.cat-sidebar.open {
    display: block;
}

.cat-sidebar li {
    border-bottom: 1px solid #f5f5f5;
}

.cat-sidebar li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 13px;
    color: var(--text);
}

.cat-sidebar li a:hover {
    color: var(--primary);
    background: var(--surface-2);
}

.cat-sidebar li a i {
    font-size: 10px;
    color: #aaa;
}

/* Header category dropdown: same UI direction as hero category list */
#header-category-list > li {
    position: relative;
    border-bottom: none;
}

#header-category-list > li > a {
    gap: 10px;
    padding: 8px 10px 8px 0;
    min-height: 36px;
    border-radius: 8px;
    background: #fff;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    text-decoration: none;
}

#header-category-list > li > a:hover {
    color: var(--primary);
    background: #fff5f4;
    transform: translateX(3px);
    text-decoration: none;
}

#header-category-list .header-cat-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#header-category-list .header-cat-main img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

#header-category-list .header-cat-main span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#header-category-list .header-cat-arrow {
    margin-left: auto;
    color: #9b9b9b;
    font-size: 11px;
    transition: transform 0.18s ease, color 0.18s ease;
}

#header-category-list > li.has-sub:hover > a .header-cat-arrow,
#header-category-list > li.has-sub:focus-within > a .header-cat-arrow {
    transform: translateX(2px);
    color: var(--primary);
}

#header-category-list .header-cat-submenu {
    position: absolute;
    top: -1px;
    left: 100%;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-lg);
    z-index: 320;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

#header-category-list .header-cat-submenu li {
    border-bottom: 1px solid #f1f1f1;
}

#header-category-list .header-cat-submenu li:last-child {
    border-bottom: none;
}

#header-category-list .header-cat-submenu li a {
    display: block;
    padding: 9px 12px;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    background: #fff;
}

#header-category-list .header-cat-submenu li a:hover {
    color: var(--primary);
    background: #fff5f4;
}

#header-category-list > li:hover > .header-cat-submenu,
#header-category-list > li:focus-within > .header-cat-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-box {
    background: #fff;
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: var(--radius-lg);
    position: relative;
}

.search-overlay-box h3 {
    margin-bottom: 14px;
    font-size: 16px;
}

.search-overlay-input {
    display: flex;
}

.search-overlay-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--primary);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
    font-size: 14px;
}

.search-overlay-input button {
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.overlay-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

@media (max-width: 991.98px) {
    .top-bar__left {
        display: none;
    }

    .header-icons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .icon-btn {
        padding: 8px 9px;
    }

    .icon-btn span {
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    #store-name-header {
        font-size: 20px;
    }

    #store-logo-header {
        height: 34px !important;
        max-height: 34px !important;
        max-width: 140px !important;
    }

    .icon-btn {
        padding: 6px 8px;
    }

    .icon-btn span {
        display: none;
    }

    .header-icons {
        gap: 2px;
    }
}

/* Mobile header + bottom navigation */
.mobile-menu-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--secondary);
    width: 38px;
    height: 38px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn i {
    font-size: 18px;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav__item {
    flex: 1;
    min-height: 56px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.mobile-bottom-nav__item i {
    font-size: 18px;
}

.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
    color: var(--primary);
    background: #fff4f3;
}

.mobile-bottom-nav__icon-wrap {
    position: relative;
    display: inline-flex;
}

.mobile-bottom-nav__badge {
    position: absolute;
    top: -7px;
    right: -10px;
    width: 17px;
    height: 17px;
    font-size: 10px;
    display: none;
}

.mobile-bottom-nav__badge.has-count {
    display: flex;
}

.mobile-category-backdrop {
    display: none;
}

.mobile-category-sidebar {
    background: #fff;
    border-right: 1px solid var(--border);
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.18);
}

.mobile-category-sidebar__head {
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mobile-sidebar-brand {
    width: 100%;
    padding-top: 14px;
    background: #fff;
    display: flex;
    justify-content: center;
}

.mobile-sidebar-brand__link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.mobile-sidebar-brand__link img {
    width: auto;
    height: 45px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.mobile-sidebar-brand__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
}

.mobile-category-sidebar__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.mobile-category-sidebar__title-row h3 {
    margin: 0;
    font-size: 15px;
}

.mobile-category-sidebar__title-row button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-muted);
}

.mobile-category-list {
    list-style: none;
    margin: 0;
    padding: 10px 10px 18px;
}

.mobile-category-loading {
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px 4px;
}

.mobile-category-item {
    border-bottom: 1px solid #f1f1f1;
}

.mobile-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
}

.mobile-category-link {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 4px;
    text-decoration: none;
    color: var(--text);
}

.mobile-category-link__main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mobile-category-link__icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.mobile-category-link__name {
    font-size: 13px;
    font-weight: 600;
}

.mobile-category-link:hover .mobile-category-link__name {
    color: var(--primary);
}

.mobile-category-toggle {
    width: 40px;
    min-height: 44px;
    border: none;
    background: #fff;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #f4f4f4;
}

.mobile-category-toggle i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.mobile-category-row:hover {
    background: #fff7f6;
}

.mobile-category-item.expanded .mobile-category-toggle i {
    transform: rotate(90deg);
}

.mobile-category-submenu {
    display: none;
    list-style: none;
    margin: 0 0 8px;
    padding: 0 0 0 12px;
    background: #fff;
}

.mobile-category-submenu li a {
    display: block;
    min-height: 40px;
    padding: 8px 2px;
    font-size: 12px;
    color: #444;
    background: #fff;
}

.mobile-category-submenu li a:hover {
    color: var(--primary);
    background: #fff7f6;
}

.mobile-category-item:hover > .mobile-category-submenu,
.mobile-category-item:focus-within > .mobile-category-submenu,
.mobile-category-item.expanded > .mobile-category-submenu {
    display: block;
}

@media (max-width: 991.98px) {
    .nav-bar {
        display: none;
    }

    body {
        padding-bottom: 74px;
    }

    .header-main {
        padding: 8px 0 10px;
        position: static;
        box-shadow: none;
    }

    /* Compact topbar for mobile header */
    .topbar {
        display: block;
    }
    .topbar-inner {
        gap: 6px;
    }
    .topbar-left .topbar-link,
    .topbar-right .topbar-link {
        font-size: 11px;
        padding: 2px 6px;
    }
    /* Trim the widest link so the row fits small screens */
    .topbar-right .topbar-link[data-filter="offers"] {
        display: none;
    }

    .header-brand-col {
        position: relative;
        min-height: 56px;
        justify-content: center !important;
        padding-left: 54px;
        padding-right: 124px;
    }

    .header-brand-link {
        justify-content: center;
        max-width: 100%;
        margin: 0 auto;
    }

    #store-name-header {
        flex: 0 1 auto;
        text-align: center;
        font-size: 22px;
    }

    .mobile-menu-btn {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-header-icons {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-search-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid var(--border, #e0e0e0);
        border-radius: 8px;
        background: #fff;
        color: var(--secondary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }

    .mobile-search-btn:hover,
    .mobile-search-btn[aria-expanded="true"] {
        color: var(--primary);
        border-color: var(--primary);
        background: #fff7f6;
    }

    /* Search hidden by default on mobile; toggled open by the search button */
    .mobile-search-col {
        display: none;
    }
    .mobile-search-col.open {
        display: block;
        margin-top: 8px;
    }

    .mobile-search-col .header-search {
        width: 100%;
        max-width: 92%;
        margin: 0 auto;
    }

    .mobile-search-col .search-wrap input,
    .mobile-search-col .search-wrap button,
    .mobile-search-col .search-wrap {
        min-height: 36px;
        height: 36px;
    }

    .mobile-search-col .search-wrap input {
        padding-top: 0px;
        padding-bottom: 6px;
    }

    .nav-mobile-toggle {
        display: none !important;
    }

    .cat-toggle,
    .main-nav > li > a,
    .nav-right a {
        min-height: 44px;
    }

    .mobile-category-sidebar {
        position: fixed;
        top: 0;
        left: -110%;
        width: min(86vw, 340px);
        height: 100vh;
        z-index: 1205;
        transition: left 0.28s ease;
        overflow-y: auto;
    }

    .mobile-category-sidebar.open {
        left: 0;
    }

    .mobile-category-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1200;
        background: rgba(0, 0, 0, 0.35);
    }
}

@media (max-width: 575.98px) {
    .header-brand-col {
        padding-right: 114px;
    }

    #store-logo-header {
        height: 30px !important;
        max-height: 30px !important;
        max-width: 130px !important;
    }

    #store-name-header {
        font-size: 19px;
    }
}

/* ==================== TOPBAR ==================== */
.topbar {
    background: var(--primary-dark, #b23a12);
    color: #fff;
    font-size: 11.5px;
    line-height: 1;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 26px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 2px; }
.topbar-link {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: 0; color: #fff; opacity: .9;
    text-decoration: none; padding: 3px 9px; font-size: 11.5px; cursor: pointer;
    transition: opacity .15s ease;
}
.topbar-link:hover { opacity: 1; }
.topbar-right .topbar-link + .topbar-link { border-left: 1px solid rgba(255,255,255,.25); }

/* ==================== NAV PARENT CATEGORIES (hover children) ==================== */
.main-nav { flex: 0 0 auto; }
.nav-categories {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: stretch; flex: 1; gap: 0;
    overflow: visible;
}
.nav-cat-item { position: relative; }
.nav-cat-item > a {
    display: flex; align-items: center; gap: 6px;
    height: 44px; padding: 0 14px;
    color: rgba(255,255,255,0.92); font-size: 13px; font-weight: 600;
    text-decoration: none; white-space: nowrap; transition: background .2s ease, color .2s ease;
}
.nav-cat-item > a:hover { background: rgba(0,0,0,0.12); color: #fff; }
.nav-cat-caret { font-size: 9px; transition: transform .25s ease; }
.nav-cat-item.has-sub:hover .nav-cat-caret { transform: rotate(180deg); }

.nav-cat-submenu {
    position: absolute; top: 100%; left: 0; min-width: 210px;
    background: #fff; border-radius: 0 0 10px 10px;
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
    list-style: none; margin: 0; padding: 6px 0; z-index: 200;
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.nav-cat-item.has-sub:hover > .nav-cat-submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-cat-submenu li a {
    display: block; padding: 9px 18px; color: #333;
    font-size: 13px; text-decoration: none; white-space: nowrap;
    transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.nav-cat-submenu li a:hover { background: var(--primary); color: #fff; padding-left: 22px; }

@media (max-width: 991px) {
    .nav-categories { display: none; }
}

/* Shop link beside logo (plain text + icon) */
.header-shop-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 16px; padding: 0;
    color: var(--text, #222); font-weight: 600; font-size: 15px;
    text-decoration: none; white-space: nowrap;
    transition: color .2s ease;
}
.header-shop-link:hover { color: var(--primary); }

/* Navbar 3rd layer: subcategory flyout */
.nav-cat-submenu li.nav-subcat-item { position: relative; }
.nav-subcat-item > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav-subcat-caret { font-size: 9px; opacity: .7; }
.nav-subsub {
    position: absolute; top: -6px; left: 100%; min-width: 190px;
    background: #fff; border-radius: 0 8px 8px 8px;
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
    list-style: none; margin: 0; padding: 6px 0;
    opacity: 0; visibility: hidden; transform: translateX(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease; z-index: 210;
}
.nav-subcat-item.has-sub:hover > .nav-subsub { opacity: 1; visibility: visible; transform: translateX(0); }
.nav-subsub li a { display: block; padding: 8px 16px; color: #333; font-size: 13px; white-space: nowrap; transition: background .15s, color .15s; }
.nav-subsub li a:hover { background: var(--primary); color: #fff; }
