/* =================================================================
   Aurelis Core — Premium Global Header
   Global scope (intentionally NOT restricted to .aurelis-root).
   Palette mirrors Aurelis homepage tokens; operates site-wide.
   ================================================================= */

/* -- Design tokens -- */
:root {
    --ach-bg:           #071826;
    --ach-bg-soft:      #0E2438;
    --ach-bg-elevated:  #0B1F2F;
    --ach-height:       78px;
    --ach-max-w:        1280px;
    --ach-pad-x:        clamp(16px, 2vw, 28px);
    --ach-accent:       #FF6200;
    --ach-accent-soft:  rgba(255, 98, 0, 0.12);
    --ach-accent-strong: rgba(255, 98, 0, 0.35);
    --ach-text:         #FFFFFF;
    --ach-text-muted:   #A6B6C8;
    --ach-border:       rgba(255, 255, 255, 0.08);
    --ach-ease:         200ms ease;
    --ach-z:            1000;
    --ach-z-drop:       1010;
    --ach-z-overlay:    1020;
    --ach-z-drawer:     1030;
    --ach-z-panel:      1040;
}

/* =================================================================
   1. HEADER SHELL
   ================================================================= */
:is(.ach-header, .elementor-location-header) {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--ach-z);
    height: var(--ach-height);
    background: var(--ach-bg) !important;
    border-bottom: 1px solid var(--ach-border);
    transition: background var(--ach-ease),
                border-color var(--ach-ease),
                box-shadow var(--ach-ease);
    will-change: background, box-shadow;
}

:is(.ach-header, .elementor-location-header) > *,
:is(.ach-header, .elementor-location-header) .ach-inner,
:is(.ach-header, .elementor-location-header) .ach-left,
:is(.ach-header, .elementor-location-header) .ach-nav-wrap,
:is(.ach-header, .elementor-location-header) .ach-actions {
    background: transparent !important;
}

:is(.ach-header, .elementor-location-header).is-scrolled {
    background: var(--ach-bg-soft) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.ach-inner {
    width: 100%;
    max-width: var(--ach-max-w);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--ach-pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

/* =================================================================
   2. LOGO
   ================================================================= */
.ach-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    text-decoration: none;
    width: auto;
    max-width: 200px;
    min-width: 0;
}

.ach-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 36px;
    height: auto;
    object-fit: contain;
}

.ach-logo-text {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #5E6BFF 0%, #7A6EFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* =================================================================
   3. PRIMARY NAV
   ================================================================= */
.ach-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ach-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ach-nav__item {
    position: relative;
}

.ach-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 13px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #A8B6C8;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    position: relative;
    transition: color var(--ach-ease), background var(--ach-ease);
}

.ach-nav__link:hover,
.ach-nav__link:focus-visible {
    color: var(--ach-text);
    background: rgba(94, 107, 255, 0.1);
    outline: none;
}

/* Active item */
.ach-nav__item.current-menu-item > .ach-nav__link,
.ach-nav__item.current-menu-ancestor > .ach-nav__link,
.ach-nav__item.current_page_item > .ach-nav__link {
    color: var(--ach-text);
}

.ach-nav__item.current-menu-item > .ach-nav__link::after,
.ach-nav__item.current_page_item > .ach-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 13px;
    right: 13px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ach-accent), var(--ach-accent-2));
}

/* Deals accent */
.ach-nav__link--deals {
    color: var(--ach-highlight);
}

.ach-nav__link--deals:hover,
.ach-nav__link--deals:focus-visible {
    color: var(--ach-highlight);
    background: rgba(247, 147, 30, 0.1);
}

/* Dropdown submenu */
.ach-nav__item:hover > .ach-nav__sub,
.ach-nav__item:focus-within > .ach-nav__sub {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ach-nav__sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 196px;
    background: #0A1F33;
    border: 1px solid rgba(94, 107, 255, 0.2);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--ach-ease), transform var(--ach-ease);
    z-index: var(--ach-z-drop);
    list-style: none;
    margin: 0;
}

.ach-nav__sub li a {
    display: block;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    color: var(--ach-text-muted);
    border-radius: 8px;
    text-decoration: none;
    transition: color var(--ach-ease), background var(--ach-ease);
}

.ach-nav__sub li a:hover {
    color: var(--ach-text);
    background: rgba(94, 107, 255, 0.12);
}

/* =================================================================
   4. UTILITIES (right cluster)
   ================================================================= */
.ach-utils {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 32px;
}

/* =================================================================
   5. ICON BUTTONS
   ================================================================= */
.ach-actions .ach-icon-btn,
.ach-actions a.ach-icon-btn,
.ach-actions button.ach-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex: 0 0 auto;
    line-height: 1;
    vertical-align: middle;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    color: var(--ach-text);
    position: relative;
    font-family: inherit;
    text-decoration: none;
    transition: color var(--ach-ease),
                opacity var(--ach-ease),
                transform var(--ach-ease);
}

.ach-actions .ach-icon-btn:hover,
.ach-actions .ach-icon-btn:focus-visible,
.ach-actions a.ach-icon-btn:hover,
.ach-actions a.ach-icon-btn:focus-visible,
.ach-actions button.ach-icon-btn:hover,
.ach-actions button.ach-icon-btn:focus-visible {
    color: var(--ach-accent);
    background: transparent;
    color: #FFFFFF !important;
    opacity: 1 !important;
    box-shadow: none;
    transform: translateY(-1px);
    opacity: 0.96;
    outline: none;
}

.ach-actions .ach-icon-btn:active,
.ach-actions a.ach-icon-btn:active,
.ach-actions button.ach-icon-btn:active {
    transform: scale(0.96);
}

.ach-actions .ach-icon-btn:focus-visible,
.ach-actions a.ach-icon-btn:focus-visible,
.ach-actions button.ach-icon-btn:focus-visible {
    outline: 2px solid var(--ach-accent);
    outline-offset: 2px;
    border-radius: 0;
}

.ach-actions .ach-icon-btn svg,
.ach-actions .ach-icon-btn .ach-icon,
.ach-actions a.ach-icon-btn svg,
.ach-actions a.ach-icon-btn .ach-icon,
.ach-actions button.ach-icon-btn svg,
.ach-actions button.ach-icon-btn .ach-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    pointer-events: none;
    stroke-width: 1.8;
    vertical-align: middle;
}

/* Cart count badge */
.ach-cart-count {
    position: absolute;
    top: 5px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    border-radius: 50px;
    background: #FF8A00;
    color: #FFFFFF;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.ach-cart-count:empty {
    display: none;
}

/* Dedicated Elementor hamburger widget is hidden on desktop. */
.ach-hamburger {
    display: none;
}

/* =================================================================
   6. CART WRAP + MINI-CART PANEL
   ================================================================= */
.ach-cart-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
    flex: 0 0 auto;
}

.ach-minicart {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    background: #091D2E;
    border: 1px solid rgba(100, 120, 150, 0.20);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    z-index: var(--ach-z-panel);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--ach-ease), transform var(--ach-ease);
}

.ach-minicart.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ach-minicart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ach-minicart__title {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ach-text);
    margin: 0;
}

.ach-minicart__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(8, 27, 41, 0.9);
    border: none;
    cursor: pointer;
    color: var(--ach-text-muted);
    font-family: inherit;
    transition: background var(--ach-ease), color var(--ach-ease);
}

.ach-minicart__close:hover {
    background: #132D45;
    color: var(--ach-text);
}

.ach-minicart__close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    pointer-events: none;
}

.ach-minicart__body {
    overflow-y: auto;
    max-height: 320px;
    scrollbar-width: thin;
    scrollbar-color: rgba(110, 136, 173, 0.55) transparent;
}

.ach-minicart__body::-webkit-scrollbar { width: 4px; }
.ach-minicart__body::-webkit-scrollbar-track { background: transparent; }
.ach-minicart__body::-webkit-scrollbar-thumb {
    background: rgba(110, 136, 173, 0.55);
    border-radius: 2px;
}

/* WooCommerce mini-cart template overrides */
.ach-minicart .woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ach-minicart .woocommerce-mini-cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 4px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ach-minicart .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

.ach-minicart .woocommerce-mini-cart-item a:not(.remove_from_cart_button) {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ach-text);
    text-decoration: none;
    line-height: 1.35;
    transition: color var(--ach-ease);
}

.ach-minicart .woocommerce-mini-cart-item a:not(.remove_from_cart_button) img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: var(--ach-bg-soft);
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}

.ach-minicart .woocommerce-mini-cart-item a:not(.remove_from_cart_button):hover {
    color: var(--ach-text-muted);
}

.ach-minicart .woocommerce-mini-cart-item .quantity {
    grid-column: 1;
    grid-row: 2;
    padding-left: 54px;
    font-size: 0.8125rem;
    color: var(--ach-text-muted);
}

.ach-minicart .woocommerce-mini-cart-item .remove_from_cart_button {
    grid-column: 2;
    grid-row: 1 / 3;
    margin-left: 0;
    color: rgba(166, 182, 200, 0.5);
    font-size: 1.1rem;
    line-height: 1;
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: center;
    transition: color var(--ach-ease);
}

.ach-minicart .woocommerce-mini-cart-item .remove_from_cart_button:hover {
    color: #ef4444;
}

.ach-minicart .woocommerce-mini-cart__empty-message {
    padding: 28px 20px 12px;
    text-align: center;
    color: var(--ach-text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* Total row */
.ach-minicart .woocommerce-mini-cart__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ach-text);
    margin: 0;
}

.ach-minicart .woocommerce-mini-cart__total strong {
    font-weight: 400;
    color: var(--ach-text-muted);
}

/* Buttons row */
.ach-minicart .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 20px 20px;
    margin: 0;
}

.ach-minicart .woocommerce-mini-cart__buttons a.button {
    display: block;
    width: 100%;
    padding: 11px 20px;
    border-radius: 12px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background var(--ach-ease), transform 0.15s ease, box-shadow 0.15s ease;
}

.ach-minicart .woocommerce-mini-cart__buttons a.button:not(.checkout) {
    background: #0E2438;
    color: var(--ach-text-muted);
    border: 1px solid rgba(110, 136, 173, 0.42);
}

.ach-minicart .woocommerce-mini-cart__buttons a.button:not(.checkout):hover {
    background: #132D45;
    border-color: #6E88AD;
    color: var(--ach-text);
}

.ach-minicart .woocommerce-mini-cart__buttons a.button.checkout {
    background: #FF6200;
    color: #FFFFFF;
    border: 1px solid #FF6200;
}

.ach-minicart .woocommerce-mini-cart__buttons a.button.checkout:hover {
    background: #FF7826;
    border-color: #FF7826;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 98, 0, 0.4);
}

.ach-minicart .woocommerce-mini-cart__buttons a.button.checkout:active,
.ach-minicart .woocommerce-mini-cart__buttons a.button.checkout:focus-visible {
    background: #E85800;
    border-color: #E85800;
    color: #071826;
}

.ach-minicart .woocommerce-mini-cart__buttons a.button:not(.checkout):focus-visible {
    outline: 2px solid #FF6200;
    outline-offset: 3px;
}

.ach-minicart .woocommerce-mini-cart__buttons a.button.checkout:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* Empty cart shop link */
.ach-minicart__empty-browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 20px 20px;
    padding: 9px 20px;
    border-radius: 10px;
    background: #0E2438;
    color: var(--ach-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background var(--ach-ease), color var(--ach-ease);
    width: calc(100% - 40px);
    text-align: center;
    box-sizing: border-box;
}

.ach-minicart__empty-browse:hover {
    background: #132D45;
    color: var(--ach-text);
}

/* =================================================================
   7. SEARCH PANEL (slides in from top)
   ================================================================= */
.ach-search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--ach-z-panel);
    background: #081B2A;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(94, 107, 255, 0.2);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease;
}

.ach-search-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ach-search-panel__inner {
    max-width: var(--ach-max-w);
    margin: 0 auto;
    padding: calc(var(--ach-height) + 16px) var(--ach-pad-x) 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ach-search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(3, 14, 25, 0.72);
    border: 1px solid rgba(94, 107, 255, 0.25);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color var(--ach-ease);
}

.ach-search-form:focus-within {
    border-color: rgba(94, 107, 255, 0.6);
}

.ach-search-form__icon {
    flex-shrink: 0;
    padding: 0 0 0 16px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.ach-search-form__icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--ach-text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ach-search-form input[type="search"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 12px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 1rem;
    color: var(--ach-text);
    -webkit-appearance: none;
    appearance: none;
}

.ach-search-form input[type="search"]::placeholder {
    color: var(--ach-text-muted);
}

.ach-search-form input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.ach-search-form button[type="submit"] {
    padding: 0 20px;
    height: 52px;
    background: rgba(94, 107, 255, 0.14);
    border: none;
    border-left: 1px solid rgba(94, 107, 255, 0.2);
    cursor: pointer;
    color: var(--ach-text-muted);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--ach-ease), color var(--ach-ease);
}

.ach-search-form button[type="submit"]:hover {
    background: rgba(94, 107, 255, 0.25);
    color: var(--ach-text);
}

.ach-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(8, 27, 41, 0.9);
    border: none;
    cursor: pointer;
    color: var(--ach-text-muted);
    flex-shrink: 0;
    font-family: inherit;
    transition: background var(--ach-ease), color var(--ach-ease);
}

.ach-search-close:hover {
    background: rgba(96, 105, 255, 0.12);
    color: var(--ach-text);
}

.ach-search-close:focus-visible {
    outline: 2px solid var(--ach-accent-2);
    outline-offset: 2px;
}

.ach-search-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    pointer-events: none;
}

/* =================================================================
   8. OVERLAY
   ================================================================= */
.ach-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--ach-z-overlay);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.ach-overlay.is-visible {
    opacity: 1;
}

/* =================================================================
   9. MOBILE DRAWER
   ================================================================= */
.ach-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(88vw, 380px);
    height: 100vh;
    height: 100dvh;
    z-index: var(--ach-z-drawer);
    background: #071826;
    border-left: 1px solid rgba(94, 107, 255, 0.15);
    box-shadow: -20px 0 64px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transform: translateX(110%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.ach-drawer::-webkit-scrollbar { display: none; }

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

.ach-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ach-drawer__brand {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #5E6BFF, #7A6EFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.ach-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(8, 27, 41, 0.9);
    border: none;
    cursor: pointer;
    color: var(--ach-text-muted);
    font-family: inherit;
    transition: background var(--ach-ease), color var(--ach-ease);
}

.ach-drawer__close:hover {
    background: rgba(96, 105, 255, 0.12);
    color: var(--ach-text);
}

.ach-drawer__close:focus-visible {
    outline: 2px solid var(--ach-accent-2);
    outline-offset: 2px;
}

.ach-drawer__close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    pointer-events: none;
}

.ach-drawer__nav {
    flex: 1;
    padding: 12px;
}

/* wp_nav_menu output reset inside drawer */
.ach-drawer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ach-drawer__nav ul li {
    margin: 0;
}

.ach-drawer__nav ul li a {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    border-radius: 10px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.0625rem;
    font-weight: 500;
    color: #C6D2DF;
    text-decoration: none;
    transition: color var(--ach-ease), background var(--ach-ease);
}

.ach-drawer__nav ul li a:hover,
.ach-drawer__nav ul li.current-menu-item > a,
.ach-drawer__nav ul li.current_page_item > a {
    color: var(--ach-text);
    background: rgba(94, 107, 255, 0.1);
}

/* Submenu indent */
.ach-drawer__nav ul ul {
    padding-left: 16px;
}

/* Mobile drawer submenu toggle */
.ach-drawer__nav .ach-drawer__submenu {
    display: none;
    padding-left: 16px;
}

.ach-drawer__nav .ach-has-submenu.is-submenu-open > .ach-drawer__submenu {
    display: block;
}

.ach-drawer__nav .ach-has-submenu {
    position: relative;
}

.ach-drawer__nav .ach-has-submenu > a {
    padding-right: 52px;
}

.ach-submenu-toggle {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #C6D2DF;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
}

.ach-submenu-toggle:hover,
.ach-submenu-toggle:focus-visible {
    background: rgba(94, 107, 255, 0.10);
    color: #FFFFFF;
}

.ach-submenu-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}

.ach-has-submenu.is-submenu-open > .ach-submenu-toggle svg {
    transform: rotate(180deg);
}

.ach-drawer__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 6px 16px;
    flex-shrink: 0;
}

.ach-drawer__foot {
    padding: 16px 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ach-drawer__account-link,
.ach-drawer__cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--ach-ease), color var(--ach-ease);
}

.ach-drawer__account-link {
    background: rgba(94, 107, 255, 0.08);
    color: var(--ach-text-muted);
    border: 1px solid rgba(94, 107, 255, 0.15);
}

.ach-drawer__account-link:hover {
    background: rgba(94, 107, 255, 0.15);
    color: var(--ach-text);
}

.ach-drawer__cart-link {
    background: linear-gradient(135deg, rgba(94, 107, 255, 0.18), rgba(122, 110, 255, 0.18));
    color: var(--ach-text);
    border: 1px solid rgba(94, 107, 255, 0.28);
}

.ach-drawer__cart-link:hover {
    background: linear-gradient(135deg, rgba(94, 107, 255, 0.28), rgba(122, 110, 255, 0.28));
}

.ach-drawer__account-link svg,
.ach-drawer__cart-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    flex-shrink: 0;
}

/* =================================================================
   10. RESPONSIVE HEADER
   ================================================================= */
@media (min-width: 1025px) {
    :is(.ach-header, .elementor-location-header) .ach-inner {
        gap: 22px;
    }

    :is(.ach-header, .elementor-location-header) .ach-left,
    :is(.ach-header, .elementor-location-header) .ach-nav-wrap,
    :is(.ach-header, .elementor-location-header) .ach-actions {
        min-width: 0;
    }

    :is(.ach-header, .elementor-location-header) .ach-nav-wrap {
        flex: 1 1 auto;
        display: block;
    }

    :is(.ach-header, .elementor-location-header) .ach-nav {
        display: flex;
        justify-content: center;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        width: auto;
    }

    .elementor-widget-emagcy-header-hamburger,
    [data-widget_type^="emagcy-header-hamburger"],
    [data-widget-type^="emagcy-header-hamburger"] {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    :root {
        --ach-height: 72px;
    }

    :is(.ach-header, .elementor-location-header) {
        overflow: hidden;
    }

    :is(.ach-header, .elementor-location-header) .ach-inner {
        gap: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    :is(.ach-header, .elementor-location-header) .ach-left {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 170px;
    }

    :is(.ach-header, .elementor-location-header) .ach-left .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-left a,
    :is(.ach-header, .elementor-location-header) .ach-left img {
        display: block;
        width: auto;
        max-width: 170px;
        min-width: 0;
        height: auto;
    }

    :is(.ach-header, .elementor-location-header) .ach-nav-wrap,
    :is(.ach-header, .elementor-location-header) .ach-nav {
        display: none !important;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        gap: 8px;
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-search,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-wishlist,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-cart,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-hamburger,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-search"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-wishlist"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-cart"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-hamburger"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-search"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-wishlist"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-cart"],
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-hamburger"] {
        display: inline-flex !important;
        align-items: center;
        width: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-search .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-wishlist .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-cart .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions .elementor-widget-emagcy-header-hamburger .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-search"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-wishlist"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-cart"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget_type^="emagcy-header-hamburger"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-search"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-wishlist"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-cart"] .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-actions [data-widget-type^="emagcy-header-hamburger"] .elementor-widget-container {
        display: inline-flex !important;
        align-items: center;
        width: auto !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        line-height: 1;
    }

    .elementor-widget-emagcy-header-account,
    [data-widget_type^="emagcy-header-account"],
    [data-widget-type^="emagcy-header-account"] {
        display: none !important;
    }

    .elementor-widget-emagcy-header-hamburger,
    [data-widget_type^="emagcy-header-hamburger"],
    [data-widget-type^="emagcy-header-hamburger"] {
        display: inline-flex !important;
        width: auto !important;
        flex: 0 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .elementor-widget-emagcy-header-hamburger .elementor-widget-container,
    [data-widget_type^="emagcy-header-hamburger"] .elementor-widget-container,
    [data-widget-type^="emagcy-header-hamburger"] .elementor-widget-container,
    .elementor-widget-emagcy-header-hamburger .ach-hamburger,
    [data-widget_type^="emagcy-header-hamburger"] .ach-hamburger,
    [data-widget-type^="emagcy-header-hamburger"] .ach-hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    :root {
        --ach-height: 66px;
    }

    :is(.ach-header, .elementor-location-header) .ach-inner,
    :is(.ach-header, .elementor-location-header) .ach-actions {
        gap: 6px;
    }

    :is(.ach-header, .elementor-location-header) .ach-left,
    :is(.ach-header, .elementor-location-header) .ach-left .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-left a,
    :is(.ach-header, .elementor-location-header) .ach-left img {
        max-width: 120px;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions .ach-icon-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .ach-minicart {
        position: fixed;
        top: calc(var(--ach-height) + 10px);
        left: 16px;
        right: 16px;
        width: calc(100vw - 32px);
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 374px) {
    :is(.ach-header, .elementor-location-header) .ach-left,
    :is(.ach-header, .elementor-location-header) .ach-left .elementor-widget-container,
    :is(.ach-header, .elementor-location-header) .ach-left a,
    :is(.ach-header, .elementor-location-header) .ach-left img {
        max-width: 110px;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions {
        gap: 4px;
    }

    :is(.ach-header, .elementor-location-header) .ach-actions .ach-icon-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
}

/* =================================================================
   11. SCROLL LOCK
   ================================================================= */
body.ach-scroll-lock {
    overflow: hidden;
}

/* =================================================================
   12. REDUCED MOTION
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    :is(.ach-header, .elementor-location-header),
    .ach-minicart,
    .ach-search-panel,
    .ach-drawer,
    .ach-overlay,
    .ach-nav__sub,
    .ach-icon-btn,
    .ach-nav__link,
    .ach-cart-count {
        transition: none !important;
        animation: none !important;
    }
}

/* =================================================================
   13. ELEMENTOR THEME BUILDER INTEGRATION
   ================================================================= */
/* Ensure the Elementor header location container is sticky */
.elementor-location-header {
    position: sticky;
    top: 0;
    z-index: var(--ach-z);
}

/* Prevent Elementor section/container from overriding static flow */
.elementor-location-header .elementor-section,
.elementor-location-header .e-con {
    position: static;
}

/* =================================================================
   14. ELEMENTOR WIDGET CONTAINER — HEADER ACTIONS FIX
   Elementor wraps every widget in .elementor-widget-container (block
   by default). Override so each action icon stays an inline item.
   ================================================================= */

/* Widget outer elements: no auto margin, natural (auto) width */
.elementor-widget-emagcy-header-search,
.elementor-widget-emagcy-header-account,
.elementor-widget-emagcy-header-cart,
.elementor-widget-emagcy-header-hamburger {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
}

/* Widget inner containers: must be inline-flex, not block */
.elementor-widget-emagcy-header-search .elementor-widget-container,
.elementor-widget-emagcy-header-account .elementor-widget-container,
.elementor-widget-emagcy-header-cart .elementor-widget-container,
.elementor-widget-emagcy-header-hamburger .elementor-widget-container {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0;
    line-height: 1;
}

/* =================================================================
   15. FOCUS ACCESSIBILITY
   ================================================================= */
.ach-icon-btn:focus-visible,
.ach-nav__link:focus-visible,
.ach-drawer__account-link:focus-visible,
.ach-drawer__cart-link:focus-visible,
.ach-drawer__nav ul li a:focus-visible {
    outline: 2px solid var(--ach-accent);
    outline-offset: 2px;
    border-radius: 0;
}

/* =================================================================
   16. DEFAULT-STATE GUARD (colour only)
   hello-elementor reset.css declares [type="button"],button{color:#c36} at the
   same specificity as the class rules above but loads later, so these controls
   rendered pink. Re-asserting with a type+class selector, no layout involved.
   ================================================================= */
button.ach-minicart__close,
button.ach-drawer__close,
button.ach-search-close {
    color: var(--ach-text-muted);
    border-color: transparent;
}

button.ach-minicart__close:hover,
button.ach-drawer__close:hover,
button.ach-search-close:hover {
    color: var(--ach-text);
}
