/*=============================================================================================
  StarTech-style Header  (scoped to .startech-header)
  Top bar (dark navy) + white nav bar + cascading mega menu.
==============================================================================================*/
.startech-header {
    /* Colors are driven by the theme's dynamic palette (Shop settings ->
       general_infos primary/secondary, injected as CSS vars in master head).
       This keeps the header color fully dynamic. Fallbacks match the current palette. */
    --st-navy: var(--secondary-color, #1a2548);   /* dark top bar */
    --st-accent: var(--primary-color, #425db3);   /* icons / hover / CTA / active */
    --st-nav-text: var(--title-color, #1b2532);   /* nav link text */
    --st-line: #e6e8ec;
    position: relative;
    width: 100%;
}

/* ---------------------------------------------------------------- Top bar */
.startech-header .header-middle {
    background: var(--st-navy);
    padding: 12px 0;
    border-bottom: none;
}
.startech-header .st-top-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    /* .header .container is display:flex, so this div is a flex item;
       force it to fill the row width so margin-left:auto on .st-actions works. */
    flex: 1 1 100%;
    width: 100%;
}
.startech-header .st-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}
.startech-header .st-logo img {
    max-width: 170px;
    height: 46px;
    object-fit: contain;
}
.startech-header .st-mobile-toggle {
    display: none;
    color: #fff;
    font-size: 24px;
    line-height: 0;
    align-items: center;
}

/* Search */
.startech-header .st-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 560px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
}
.startech-header .st-search input.form-control {
    width: 100%;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 46px 0 16px;
    font-size: 14px;
    color: var(--st-nav-text);
    background: transparent;
    box-shadow: none;
}
.startech-header .st-search input.form-control:focus {
    border-color: var(--st-accent);
    outline: none;
}
.startech-header .st-search .btn-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none;
    color: #5c6b7a;
    font-size: 19px;
    line-height: 0;
    padding: 0;
    min-width: auto;
    width: auto;
    cursor: pointer;
}
.startech-header .st-search .btn-search:hover {
    color: var(--st-accent);
}
.startech-header .st-search .live_search_box {
    top: 50px;
}

/* Action blocks */
.startech-header .st-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}
.startech-header .st-action {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    white-space: nowrap;
    transition: color .2s ease;
}
.startech-header .st-actions > .st-action + .st-action {
    border-left: 1px solid rgba(255, 255, 255, .14);
    padding-left: 18px;
}
.startech-header .st-action i {
    font-size: 23px;
    line-height: 0;
    color: #fff;
}
.startech-header .st-action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.startech-header .st-action-text b {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.startech-header .st-action-text small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}
.startech-header .st-action:hover {
    opacity: 0.82;
}

/* Icon buttons (wishlist / cart) */
.startech-header .st-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 22px;
    line-height: 0;
    transition: opacity .2s ease;
}
/* Force white icons — beats base .cart-dropdown{color:primary} + .cart-dropdown>a i{inherit} */
.startech-header .st-icon-btn,
.startech-header .st-icon-btn i,
.startech-header .st-cart .cart-toggle,
.startech-header .st-cart .cart-toggle i {
    color: #fff !important;
}
.startech-header .st-cart .cart-toggle i {
    font-size: 22px;
}
.startech-header .st-icon-btn:hover {
    opacity: 0.82;
}
.startech-header .st-cart {
    display: inline-flex;
    align-items: center;
}
.startech-header .st-cart .cart-count {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: var(--st-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
}

/* Primary CTA (PC-Builder slot) */
.startech-header .st-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: var(--st-accent);
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.startech-header .st-cta-btn:hover {
    background: var(--st-accent);
    color: #fff;
}
.startech-header .st-cta-btn i {
    font-size: 16px;
    line-height: 0;
}

/* ---------------------------------------------------------------- Nav bar */
.startech-header .header-bottom {
    background: #fff;
    border-bottom: 1px solid var(--st-line);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
    padding: 0;
}
.startech-header .st-nav-wrap {
    display: flex;
    align-items: center;
}
.startech-header .st-nav {
    width: 100%;
}
.startech-header .st-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
.startech-header .st-menu > li {
    position: relative;
    margin-right: 22px;
}
.startech-header .st-menu > li:last-child {
    margin-right: 0;
}
.startech-header .st-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--st-nav-text);
    line-height: 1.1;
    transition: color .2s ease;
}
.startech-header .st-menu > li:hover > a,
.startech-header .st-menu > li.active > a {
    color: var(--st-accent);
}
.startech-header .st-menu > li > a .st-caret {
    font-size: 13px;
    line-height: 0;
    margin-top: 1px;
    transition: transform .2s ease;
}
.startech-header .st-menu > li:hover > a .st-caret {
    transform: rotate(180deg);
}
/* Kill the base theme's pseudo-arrow (::after) — we use our own .st-caret only */
.startech-header .st-menu > li > a::after,
.startech-header .st-menu .has-submenu > a::after {
    content: none !important;
    display: none !important;
}
.startech-header .st-menu > li.has-submenu {
    padding-right: 0;
}

/* Dropdown panels (leverages base absolute positioning from style.css) */
.startech-header .st-menu .submenu {
    background: #fff;
    min-width: 240px;
    padding: 6px 0;
    border-top: 3px solid var(--st-accent);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    font-family: var(--font-family);
}
.startech-header .st-menu .submenu .submenu {
    border-radius: 6px;
}
.startech-header .st-menu .submenu li {
    position: relative;
    padding: 0;
    line-height: 1.2;
}
.startech-header .st-menu .submenu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #33404f;
    transition: background .15s ease, color .15s ease;
}
.startech-header .st-menu .submenu li a:hover,
.startech-header .st-menu .submenu li.active > a {
    background: var(--st-accent);
    color: #fff;
}
.startech-header .st-menu .submenu li .st-arrow {
    font-size: 15px;
    line-height: 0;
    color: #98a4b3;
    flex: 0 0 auto;
}
.startech-header .st-menu .submenu li a:hover .st-arrow {
    color: #fff;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1199px) {
    .startech-header .st-top-inner {
        gap: 16px;
    }
    .startech-header .st-actions {
        gap: 14px;
    }
    .startech-header .st-actions > .st-action + .st-action {
        padding-left: 14px;
    }
    .startech-header .st-menu > li {
        margin-right: 16px;
    }
    .startech-header .st-menu > li > a {
        font-size: 13px;
    }
}

@media (max-width: 991px) {
    .startech-header .st-mobile-toggle {
        display: inline-flex;
    }
    .startech-header .header-bottom {
        display: none;
    }
    .startech-header .st-action-text {
        display: none;
    }
    .startech-header .st-cta-btn span {
        display: none;
    }
    .startech-header .st-cta-btn {
        padding: 9px 12px;
    }
    .startech-header .st-actions {
        gap: 14px;
    }
    .startech-header .st-actions > .st-action + .st-action {
        border-left: none;
        padding-left: 0;
    }
}

@media (max-width: 575px) {
    .startech-header .st-top-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    .startech-header .st-search {
        order: 3;
        flex: 1 0 100%;
        max-width: 100%;
    }
    .startech-header .st-logo img {
        height: 40px;
    }
}
