/* ============================= */
/* Variables */
/* ============================= */
.header {
    --header-height: 80px;
    --pad-x: 20px;
    --ls: 0.12em;
    --black: #000;
    --dropdown-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --threads-header-font-stack: "Titillium Web";
    display: block;
    font-family: var(--threads-header-font-stack);
    font-size-adjust: 0.52;
}

.threads-header-widget button,
.threads-header-widget input,
.threads-header-widget select,
.threads-header-widget textarea {
    font: inherit;
}

/* Announcement */
.top-bar {
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.12em;
    padding: 6px 10px;
}

/* Header */
.header {
    /* font-family: 'Titanium'; */
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
}

.nav-header-powered-by {
    display: none;
    width: 175px;
    height: 29px;
    object-fit: cover;
    object-position: center;
}

.nav-header-powered-by-mobile {
    width: 200px;
    height: 50px !important;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 1rem auto;
}

.nav-header-powered-by-mobile-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

@media screen and (min-width: 992px) {
    .nav-header-powered-by {
        display: block;
    }

    .nav-header-powered-by-mobile {
        display: none;
    }

}

.nav {
    display: grid;
    grid-template-columns: 2fr 2fr auto 1fr;
    align-items: center;
    gap: 16px;
    position: relative;
    min-height: 52px;
}

.nav a {
    color: var(--black);
    text-decoration: none;
    text-transform: inherit;
}

/* ============================= */
/* SWAP TEXT NAV EFFECT - Main Navigation Only */
/* ============================= */
.nav-left a {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    line-height: 1.2;
    height: 1.2em;
}

.nav-left a .swap-text {
    display: block;
    flex: 0 0 auto;
    font-family: inherit;
    font-size: inherit;
    font-style: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
    transition: transform 0.35s ease;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.nav-left a::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 100%;
    display: block;
    font-family: inherit;
    font-size: inherit;
    font-style: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
    white-space: nowrap;
    pointer-events: none;
    transition: transform 0.35s ease;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.nav-left a:hover .swap-text {
    transform: translate3d(0, -100%, 0);
}

.nav-left a:hover::after {
    transform: translate3d(0, -100%, 0);
}

/* ============================= */

.nav-left {
    justify-self: start;
    overflow: visible;
    min-width: 0;
}
.nav-right ul {
    /* gap: 8px !important; */
}
.nav-left ul,
.nav-right ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-right {
    min-width: 0;
}

/* ============================= */
/* DROPDOWN STYLES */
/* ============================= */

.nav-left li {
    position: relative;
}

/* Top-level Chevron Styles */
.dropdown-arrow {
    display: inline-flex;
    align-items: center;
    align-self: center;
    line-height: 1;
    transition: transform 0.25s ease;
    transform: rotate(0deg);
}

.dropdown-arrow svg {
    width: 12px;
    height: 12px;
    display: block;
}

/* Top-level Hover and Open States */
.nav-left li.has-dropdown:hover .dropdown-arrow,
.nav-left li.has-dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Base submenu styles - ALL levels start hidden */
.nav-left .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #000000;
    border: 1px solid #e0e0e0;
    box-shadow: var(--dropdown-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 8px 8px;
    margin: 0;
    list-style: none;
    display: block;
    flex-direction: column;
    gap: 0;
}

/* Nested submenu (third level and beyond) positioning */
.nav-left .submenu .submenu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 180px;
    z-index: 1002;
    margin-left: 0px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* Support for deeper nesting */
.nav-left .submenu .submenu .submenu {
    z-index: 1003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.nav-left .submenu .submenu .submenu .submenu {
    z-index: 1004;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* Show first level submenu on parent hover */
.nav-left li.has-dropdown:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show nested submenus on direct parent hover */
.nav-left .submenu .has-dropdown:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure deeper nesting works correctly */
.nav-left .submenu .submenu .has-dropdown:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-left .submenu .submenu .submenu .has-dropdown:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nested dropdown indicators - Right arrow for ALL nested levels */
.nav-left .submenu .has-dropdown>a {
    position: relative;
    padding-right: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left .submenu .has-dropdown>a::after {
    content: "▶";
    position: absolute;
    right: 15px;
    top: 50%;
    font-size: 10px;
    color: #fff;
    transition: transform 0.25s ease;
}

/* Hover states for nested items */
.nav-left .submenu .has-dropdown {
    position: relative;
}

.nav-left .submenu .has-dropdown>a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Standard submenu item styles */
.nav-left .submenu li {
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
}

.nav-left .submenu li:last-child {
    border-bottom: none;
}

.nav-left .submenu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    border: none;
    transition: background-color 0.2s ease;
    position: static;
    overflow: visible;
}

nav.nav-left > ul > li.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

nav.nav-left > ul > li.menu-item.menu-item-type-post_type.menu-item-object-page.menu-item-has-children.has-dropdown span {
    margin-top: 4px;
}

.nav-left .submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Remove swap text effect from submenu items */
.nav-left .submenu a .swap-text {
    transform: none !important;
    transition: none;
}

.nav-left .submenu a::after {
    display: none;
}

.nav-left .submenu a:hover .swap-text {
    transform: none !important;
}

/* Override the ::after for nested dropdowns */
.nav-left .submenu .has-dropdown>a::after {
    display: block !important;
    content: "▶" !important;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #fff;
    transition: transform 0.25s ease;
}

/* Keep submenu visible when hovering over nested items */
.nav-left .submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-left .submenu .submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Prevent submenu from closing when moving cursor between levels */
.nav-left .has-dropdown:hover>.submenu,
.nav-left .has-dropdown:focus-within>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-left .submenu .has-dropdown:hover>.submenu,
.nav-left .submenu .has-dropdown:focus-within>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================= */

/* Highlight active menu item */
.nav-left .current-menu-item>a,
.drawer-menu .current-menu-item>a {
    font-weight: bold !important;
}

.nav a.item {
    white-space: nowrap;
}

/* Centered logo */
.logo-wrap {
    justify-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: inline-block;
    line-height: 0;
}

.logo img {
    height: 28px;
    display: block;
    max-width: 100%;
}

/* Right navigation */
.nav-right {
    justify-self: end;
}

/* Icons */
.icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-action {
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
}

.icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.icon .label {
    font-size: 12px;
    letter-spacing: 0.16em;
}

.nav-right li {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Divider under header row */
.divider {
    height: 2px;
    background: #000;
    margin: 0 var(--pad-x);
}

/* Buttons */
.hamburger {
    background: none;
    border: 0;
    line-height: 1;
    cursor: pointer;
    font-size: 24px;
    display: none;
}

.drawer-close {
    background: none;
    border: 0;
    line-height: 1;
    cursor: pointer;
    font-size: 22px;
}

/* Mobile nested submenu styles */
.drawer-menu .submenu .submenu {
    display: none;
    background: #e8e8e8;
    border-top: 1px solid #d0d0d0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drawer-menu .submenu .has-dropdown.mobile-open .submenu {
    display: block;
}

/* Mobile nested submenu items */
.drawer-menu .submenu .submenu a {
    padding: 12px calc(var(--pad-x) + 40px);
    font-size: 12px;
    color: #333;
    background: #e8e8e8;
}

/* Mobile nested dropdown arrows */
.drawer-menu .submenu .has-dropdown>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-menu .submenu .has-dropdown>a .dropdown-arrow {
    font-size: 12px;
}

/* Support for 4th level in mobile */
.drawer-menu .submenu .submenu .submenu a {
    padding: 10px calc(var(--pad-x) + 60px);
    background: #ddd;
    font-size: 11px;
}

.hidden {
    display: none !important;
}

.threads-header-no-scroll {
    overflow: hidden;
}

/* ===== Overlay drawer ===== */
.drawer {
    position: fixed;
    left: 0;
    width: 100vw;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    will-change: transform;
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.drawer-top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px var(--pad-x);
    position: relative;
    z-index: 2;
}

.drawer-menu {
    flex: 1;
    overflow-y: auto;
}

/* Drawer logo */
.logo-drawer {
    display: inline-block;
    line-height: 0;
}

.logo-drawer img {
    height: 28px;
    display: block;
}

/* ============================= */
/* Mobile Drawer Menu Borders */
/* ============================= */
.drawer-menu ul {
    margin: 10px 10px;
    padding: 0;
    list-style: none;
    /* font-family: 'Titanium', sans-serif; */
}

.drawer-menu li {
    border-bottom: 1px solid #000;
}

.drawer-menu a {
    display: block;
    padding: 16px var(--pad-x);
    color: var(--black);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: var(--ls);
    font-size: 14px;
    line-height: 1.4;
}

/* ============================= */
/* Mobile Drawer Submenu Styles */
/* ============================= */
.drawer-menu .has-dropdown>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-menu .submenu {
    display: none;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.drawer-menu .has-dropdown.mobile-open .submenu {
    display: block;
}

.drawer-menu .submenu li {
    border-bottom: 1px solid #e0e0e0;
}

.drawer-menu .submenu li:last-child {
    border-bottom: none;
}

.drawer-menu .submenu a {
    padding: 14px calc(var(--pad-x) + 20px);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.05em;
    color: #444;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-left {
        display: none;
    }

    .nav {
        grid-template-columns: auto 1fr auto;
    }

    .hamburger {
        display: block;
        justify-self: start;
    }

    .logo-wrap {
        justify-self: center;
    }

    .nav-right {
        justify-self: end;
    }

    .logo img {
        height: 26px;
    }

    .nav-right .label {
        display: none;
    }
 
    /*.nav-right li:nth-child(2) {
        display: none;
    } */

    .nav {
        gap: 12px;
    }
}

@media (min-width: 480px) and (max-width: 1280px) {
    .nav-left ul {
        margin-left: 20px;
    }
    .nav-right ul {
        margin-right: 20px;
    }
}

@media (min-width: 480px) {

}
/* Extra small screens */
@media (max-width: 480px) {
    .nav {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
    }

    .hamburger {
        position: absolute;
        left: var(--pad-x);
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-right {
        position: absolute;
        /* right: var(--pad-x); */
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    .nav-right ul{
        gap: 8px !important;
    }
    
    .logo-wrap {
        justify-self: center;
        grid-row: 1;
    }
}

.threads-header-widget.hide {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.header.stuck {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header.stuck+.top-bar,
.stuck .top-bar {
    display: none;
}

.threads-header-search-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.widget_search:before,
.woocommerce-product-search:before,
.wp-block-search__inside-wrapper:before,
form.search-form:before {
    display: none !important;
}

/* Search Panel */
.header-search-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #000;
    z-index: 1001;
}

.header-search-panel.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 1300px !important;
    background: #000;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 1320px) {
    .header-search-panel.active {
        width: 100% !important;
        left: 0;
        transform: none;
        position: relative;
    }
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    padding: 20px 40px 40px 40px;
    background: #000;
    margin: 0 auto;
}

.search-input-wrap {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    border-bottom: solid 1px #aaa;
}

.search-form .search-icon {
    flex-shrink: 0;
    margin-right: 10px;
    stroke: #aaa;
}

.search-form .search-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
}

.search-form .search-field::placeholder {
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
}

.search-tabs {
    display: flex;
    gap: 20px;
    padding: 10px 20px 30px;
    background: #000;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.tab-button {
    background: none;
    border: none;
    color: #aaa;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s;
}

.tab-button.active {
    color: #fff;
    border-bottom: 2px solid #fff;
}

.search-results {
    background: #000;
    padding: 0;
    overflow-y: auto;
    max-height: 70vh;
    width: 100%;
    margin: 0 auto;
}

.results-grid {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.results-grid.active {
    display: grid;
}

.suggestion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #111;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #222;
}

.suggestion-item img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    margin-bottom: 15px;
}

.suggestion-item span {
    display: block;
    margin: 5px 0;
    color: #fff;
}

.suggestion-item .price {
    color: #ccc;
    font-size: 14px;
}

.no-results {
    color: #aaa;
    text-align: center;
    grid-column: 1 / -1;
}

/* Account dropdown */
.account-dropdown {
    position: relative;
}

.account-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    min-width: 200px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.account-menu.is-open {
    display: block;
}

.account-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 15px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

.account-menu .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff !important;
    padding: 10px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 400;
    transition: background 0.2s;
}

.account-menu .login-btn:hover {
    background: #333;
}

.account-menu .login-btn svg {
    margin-right: 8px;
}

.account-menu .create-account {
    display: block;
    text-align: center;
    font-size: 13px;
    text-decoration: underline;
    color: #000;
}

.account-menu .create-account:hover {
    color: #555;
}

/* Cart styles */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-5 .shoptimizer-cart .cart-contents .amount {
    display: none;
}

.header-5 .shoptimizer-cart .cart-contents .count {
    display: none;
}

.cart-slot {
    position: relative;
}

.cart-icon {
    position: relative;
    display: inline-block;
}

.custom-cart-content {
    display: contents;
}

.shoptimizer-cart-wrapper {
    display: contents;
}

.additional-nav {
    display: contents;
}

.header-5 .shoptimizer-cart a.cart-contents {
    padding: 0;
    border: none;
    line-height: 55px;
}

.mobile-cart {
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.custom-cart-icon .shoptimizer-cart a.cart-contents::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='16' cy='20' r='1'/%3E%3Cpath d='M1 1h4l2.6 12.4A2 2 0 0 0 9.6 15h7.8a2 2 0 0 0 2-1.6L22 6H6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.custom-cart-icon .shoptimizer-cart .fa,
.custom-cart-icon .shoptimizer-cart .dashicons,
.custom-cart-icon .shoptimizer-cart svg:first-child {
    display: none !important;
}

.custom-cart-icon .shoptimizer-cart .cart-contents-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #111;
    border-top: 1px solid #333;
    max-height: 400px;
    overflow-y: auto;
    z-index: 2000;
}

@media (max-width: 1300px) {

    .search-form,
    .search-tabs,
    .search-results {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .search-form {
        padding: 15px 20px 30px 20px;
    }

    .search-results {
        padding: 15px 20px;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .search-tabs {
        padding: 10px 15px;
        gap: 15px;
    }
}
