/*
Theme Name: Asalat Alotoor
Section: PATCH-007 Global Header System
*/


/* =========================================================
   HEADER FOUNDATION
   ========================================================= */

.asala-header,
.asala-header * {
    box-sizing: border-box;
}

.asala-header {
    position: relative;
    z-index: 100;
    width: 100%;
    direction: rtl;
    background: #ffffff;
    border-bottom: 1px solid #eadfd8;
}

.asala-header .asala-container {
    width: min(1180px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.asala-topbar {
    width: 100%;
    background:
        linear-gradient(
            90deg,
            #35130d 0%,
            #572317 50%,
            #35130d 100%
        );
    color: #fff7ec;
}

.asala-topbar-inner {
    min-height: 38px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: center;
}

.asala-topbar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;

    color: #fff7ec;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.asala-topbar-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;

    color: #e8c986;
}

.asala-topbar-icon svg {
    display: block;
    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asala-topbar-divider {
    display: block;
    width: 1px;
    height: 22px;
    margin: 0 26px;

    background: rgba(255, 255, 255, 0.46);
}


/* =========================================================
   MAIN HEADER
   Desktop physical layout:
   Actions | Search | Logo
   ========================================================= */

.asala-header-main {
    width: min(1180px, calc(100% - 40px)) !important;

    min-height: 98px !important;

    display: grid !important;

    grid-template-columns:
        230px
        minmax(320px, 1fr)
        230px !important;

    grid-template-areas:
        "actions search brand";

    align-items: center;

    gap: 28px !important;

    padding-top: 12px !important;
    padding-bottom: 12px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    direction: ltr;
}


/* =========================================================
   LOGO
   ========================================================= */

.asala-brand {
    grid-area: brand;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100%;
    min-width: 0;
    min-height: 0 !important;

    padding: 0 !important;
    margin: 0 !important;

    direction: rtl;
}

.asala-brand .custom-logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100%;
    max-width: 230px;

    height: auto !important;

    padding: 0 !important;
    margin: 0 !important;

    line-height: 0;
}

.asala-brand .custom-logo {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 220px !important;
    max-height: 74px !important;

    margin: 0 auto !important;

    object-fit: contain !important;
}

.asala-brand-link {
    text-align: center;
}

.asala-brand-title {
    color: #4a2116;
    font-size: 29px;
    font-weight: 800;
}


/* =========================================================
   SEARCH
   ========================================================= */

.asala-header-search {
    grid-area: search;

    width: 100%;
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;

    direction: rtl;
}

.asala-search-form {
    width: 100%;

    display: flex;
    align-items: stretch;

    margin: 0 !important;
    padding: 0;

    direction: rtl;
}

.asala-search-form .search-field {
    flex: 1;
    min-width: 0;

    width: 100%;

    height: 48px !important;

    margin: 0 !important;
    padding: 0 17px !important;

    border: 1px solid #d9cec6 !important;
    border-left: 0 !important;

    border-radius: 0 9px 9px 0 !important;

    outline: 0;
    box-shadow: none !important;

    background: #ffffff !important;

    color: #36241d;

    font-family: inherit;
    font-size: 14px;
    line-height: 48px;
}

.asala-search-form .search-field::placeholder {
    color: #aaa09a;
    opacity: 1;
}

.asala-search-submit {
    flex: 0 0 58px;

    width: 58px !important;
    min-width: 58px !important;
    height: 48px !important;

    display: grid !important;
    place-items: center;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    border-radius: 9px 0 0 9px !important;

    background:
        linear-gradient(
            135deg,
            #71371d,
            #9a5728
        ) !important;

    color: #ffffff !important;

    cursor: pointer;
}

.asala-search-submit:hover {
    background:
        linear-gradient(
            135deg,
            #5c2917,
            #84451f
        ) !important;
}

.asala-search-submit svg {
    display: block;

    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.asala-header-actions {
    grid-area: actions;

    position: static !important;

    display: flex !important;
    align-items: center;
    justify-content: flex-start;

    width: 100%;

    gap: 17px !important;

    margin: 0 !important;
    padding: 0 !important;

    direction: rtl;
}

.asala-header-action {
    position: relative;

    min-width: 54px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    color: #33221b;
    text-decoration: none !important;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

a.asala-header-action:hover {
    color: #8f3e26;
    transform: translateY(-1px);
}

.asala-header-action svg {
    display: block;

    width: 25px !important;
    height: 25px !important;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.asala-account-link svg,
.asala-cart-link svg {
    fill: currentColor;
    stroke: none;
}

.asala-header-action.is-disabled {
    opacity: 0.72;
    cursor: default;
}

.asala-header-action.is-disabled:hover {
    color: #33221b;
    transform: none;
}


/* =========================================================
   CART COUNT
   ========================================================= */

.asala-cart-count {
    position: absolute !important;

    top: -8px !important;
    right: 2px !important;

    min-width: 20px !important;
    height: 20px !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 0 5px !important;

    border-radius: 999px !important;

    background: #a90035 !important;
    color: #ffffff !important;

    font-size: 10px !important;
    line-height: 20px !important;
    font-weight: 800;
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.asala-mobile-header-controls,
.asala-mobile-menu-button-main {
    display: none;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.asala-navigation {
    position: relative;

    width: 100%;

    min-height: 48px;

    background: #ffffff;

    border-top: 1px solid #eee4de;
    border-bottom: 1px solid #eee4de;
}

.asala-navigation .asala-container {
    min-height: 48px !important;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
}

.asala-menu-toggle {
    display: none !important;
}

.asala-menu {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 29px;

    margin: 0;
    padding: 0;

    list-style: none;

    direction: rtl;
}

.asala-menu li {
    margin: 0;
    padding: 0;
}

.asala-menu li a {
    display: block;

    padding: 13px 2px 11px;

    border-bottom: 2px solid transparent;

    color: #3d2a22;

    text-decoration: none !important;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.asala-menu li a:hover,
.asala-menu .current-menu-item > a,
.asala-menu .current_page_item > a {
    color: #981838;
    border-bottom-color: #981838;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 768px) and (max-width: 1024px) {

    .asala-header .asala-container {
        width: min(100% - 32px, 980px);
    }

    .asala-header-main {
        width: min(100% - 32px, 980px) !important;

        grid-template-columns:
            150px
            minmax(260px, 1fr)
            190px !important;

        gap: 18px !important;

        min-height: 88px !important;
    }

    .asala-brand .custom-logo {
        max-width: 185px !important;
        max-height: 65px !important;
    }

    .asala-header-actions {
        gap: 13px !important;
    }

    .asala-header-action {
        min-width: 40px;
    }

    .asala-header-action > span:not(.asala-cart-count) {
        display: none;
    }

    .asala-menu {
        gap: 19px;
    }

    .asala-menu li a {
        font-size: 13px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .asala-header .asala-container {
        width: calc(100% - 24px);
    }


    /* -------------------------
       Top bar
       ------------------------- */

    .asala-topbar-inner {
        width: calc(100% - 16px) !important;

        min-height: 40px;

        grid-template-columns:
            minmax(0, 1fr)
            auto
            minmax(0, 1fr);
    }

    .asala-topbar-item {
        gap: 5px;

        padding: 5px 2px;

        font-size: clamp(9px, 2.8vw, 12px);
        line-height: 1.35;
    }

    .asala-topbar-icon {
        flex-basis: 17px;
        width: 17px;
        height: 17px;
    }

    .asala-topbar-divider {
        height: 22px;
        margin: 0 6px;
    }


    /* -------------------------
       Main row
       Cart | Logo | Menu
       ------------------------- */

    .asala-header-main {
        width: calc(100% - 24px) !important;

        min-height: 0 !important;

        display: grid !important;

        grid-template-columns:
            76px
            minmax(0, 1fr)
            76px !important;

        grid-template-areas:
            "actions brand menu"
            "search search search";

        align-items: center;

        gap: 8px 10px !important;

        padding: 8px 0 10px !important;

        direction: ltr;
    }


    /* -------------------------
       Logo
       ------------------------- */

    .asala-brand {
        grid-area: brand;

        width: 100% !important;
        min-height: 58px !important;
        height: 58px !important;

        padding: 0 !important;
        margin: 0 !important;
    }

    .asala-brand .custom-logo-link {
        width: 100% !important;
        height: 58px !important;

        max-width: none;
    }

    .asala-brand .custom-logo {
        width: auto !important;
        height: auto !important;

        max-width: min(190px, 100%) !important;
        max-height: 58px !important;

        margin: 0 auto !important;
    }

    .asala-brand-title {
        font-size: 22px;
    }


    /* -------------------------
       Actions
       only Cart on mobile
       ------------------------- */

    .asala-header-actions {
        grid-area: actions;

        position: static !important;

        width: 76px !important;
        min-width: 76px;

        display: flex !important;
        align-items: center;
        justify-content: flex-start;

        gap: 0 !important;

        top: auto !important;
        left: auto !important;
        right: auto !important;

        direction: rtl;
    }

    .asala-account-link,
    .asala-wishlist-link {
        display: none !important;
    }

    .asala-cart-link {
        display: flex !important;

        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;

        padding: 0 !important;

        align-items: center;
        justify-content: center;
    }

    .asala-cart-link svg {
        width: 29px !important;
        height: 29px !important;
    }

    .asala-cart-link > span:not(.asala-cart-count) {
        display: none !important;
    }

    .asala-cart-count {
        top: -3px !important;
        right: -1px !important;
    }


    /* -------------------------
       Hamburger
       ------------------------- */

    .asala-mobile-header-controls {
        grid-area: menu;

        width: 76px;
        min-width: 76px;
        height: 44px;

        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;

        margin: 0 0 0 auto;
        direction: ltr;
    }

    .asala-mobile-account-button {
        width: 35px;
        min-width: 35px;
        height: 40px;

        display: grid;
        place-items: center;

        padding: 0;
        margin: 0;

        color: #271a16;
        text-decoration: none !important;
        border-radius: 8px;
    }

    .asala-mobile-account-button svg {
        width: 29px;
        height: 29px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.1;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .asala-mobile-account-button:hover,
    .asala-mobile-account-button:focus-visible {
        color: #8f3e26;
        outline: none;
    }

    .asala-mobile-menu-button-main {
        grid-area: auto;

        display: flex !important;

        width: 35px !important;
        height: 40px !important;

        padding: 7px 2px !important;
        margin: 0 !important;

        flex-direction: column;
        justify-content: space-between;

        cursor: pointer;

        position: static !important;

        top: auto !important;
        right: auto !important;

        z-index: 20;
    }

    .asala-mobile-menu-button-main span {
        display: block !important;

        width: 100%;
        height: 3px !important;

        margin: 0;

        border-radius: 999px;

        background: #271a16;
    }


    /* -------------------------
       Search
       ------------------------- */

    .asala-header-search {
        grid-area: search;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .asala-search-form {
        width: 100%;

        height: 46px !important;
    }

    .asala-search-form .search-field {
        height: 46px !important;

        padding: 0 14px !important;

        font-size: 16px;

        line-height: 46px;
    }

    .asala-search-submit {
        width: 56px !important;
        min-width: 56px !important;
        height: 46px !important;
    }

    .asala-search-submit svg {
        width: 22px;
        height: 22px;
    }


    /* -------------------------
       Mobile navigation dropdown
       ------------------------- */

    .asala-navigation {
        min-height: 0 !important;
        height: 0 !important;

        border: 0 !important;

        background: transparent;
    }

    .asala-navigation .asala-container {
        width: 100% !important;

        min-height: 0 !important;
        height: 0 !important;

        display: block !important;

        position: relative;

        padding: 0 !important;
    }

    .asala-menu {
        display: none;

        position: absolute;

        top: 0 !important;
        right: 0;
        left: 0;

        width: 100%;

        max-height: calc(100vh - 150px);

        overflow-y: auto;

        flex-direction: column;
        align-items: stretch;

        gap: 0;

        margin: 0;
        padding: 7px 16px 16px;

        background: #ffffff;

        border-top: 1px solid #eee3dc;
        border-bottom: 1px solid #eee3dc;

        box-shadow:
            0 14px 28px
            rgba(44, 22, 14, 0.12);

        z-index: 120;
    }

    .asala-menu li {
        width: 100%;
    }

    .asala-menu li a {
        width: 100%;

        padding: 13px 5px;

        border-bottom: 1px solid #eee7e2;

        color: #33231d;

        text-align: right;

        font-size: 15px;
    }

    .asala-menu li:last-child a {
        border-bottom: 0;
    }

    .asala-menu-toggle:checked ~ .asala-menu {
        display: flex;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .asala-header-main {
        width: calc(100% - 20px) !important;

        grid-template-columns:
            70px
            minmax(0, 1fr)
            70px !important;

        gap: 6px 7px !important;
    }

    .asala-header-actions,
    .asala-mobile-header-controls {
        width: 70px !important;
        min-width: 70px;
    }

    .asala-mobile-header-controls {
        gap: 4px;
    }

    .asala-mobile-account-button,
    .asala-mobile-menu-button-main {
        width: 33px !important;
        min-width: 33px;
    }

    .asala-brand .custom-logo {
        max-width: 165px !important;
        max-height: 55px !important;
    }

    .asala-topbar-item {
        font-size: 9.5px;
    }

    .asala-topbar-divider {
        margin: 0 4px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 330px) {

    .asala-header-main {
        width: calc(100% - 16px) !important;
    }

    .asala-brand .custom-logo {
        max-width: 150px !important;
    }

    .asala-search-form .search-field {
        padding-right: 11px !important;
        padding-left: 11px !important;
    }

}
/* =========================================================
   PATCH-043E — Brand-led primary navigation
   ========================================================= */
.asala-menu > .menu-item-has-children{position:relative}
.asala-menu > .menu-item-has-children > a{display:flex;align-items:center;gap:6px}
.asala-menu > .menu-item-has-children > a::after{content:"⌄";font-size:13px;line-height:1;opacity:.75}
.asala-menu .sub-menu{display:none;position:absolute;top:calc(100% - 1px);right:0;z-index:180;min-width:190px;margin:0;padding:7px;list-style:none;background:#fff;border:1px solid #eadfd8;border-radius:0 0 12px 12px;box-shadow:0 14px 30px rgba(44,22,14,.12)}
.asala-menu .menu-item-has-children:hover > .sub-menu,.asala-menu .menu-item-has-children:focus-within > .sub-menu{display:block}
.asala-menu .sub-menu li{width:100%;margin:0}
.asala-menu .sub-menu li a{width:100%;padding:10px 12px;border:0!important;border-radius:8px;font-size:13.5px;white-space:nowrap;text-align:right}
.asala-menu .sub-menu li a:hover,.asala-menu .sub-menu li a:focus-visible{background:#ffffff;color:#34261e}
@media(max-width:767px){
 .asala-menu > .menu-item-has-children > a::after{margin-right:auto}
 .asala-menu .sub-menu{display:block!important;position:static;min-width:0;width:100%;margin:0;padding:0 16px 5px;background:#ffffff;border:0;border-radius:0;box-shadow:none}
 .asala-menu .sub-menu li a{padding:10px 12px!important;border-bottom:1px solid #f0e8e3!important;font-size:14px!important;color:#6d4433!important}
 .asala-menu .sub-menu li:last-child a{border-bottom:0!important}
}

/* =========================================================
   PATCH-043N — Mobile header scale/readability refinement
   Mobile only; desktop/tablet desktop rules remain unchanged.
   ========================================================= */
@media (max-width: 767px) {
    .asala-topbar-inner {
        min-height: 44px !important;
    }

    .asala-topbar-item {
        gap: 6px !important;
        padding: 6px 2px !important;
        font-size: clamp(10.5px, 3vw, 13px) !important;
    }

    .asala-topbar-icon {
        flex-basis: 19px !important;
        width: 19px !important;
        height: 19px !important;
    }

    .asala-header-main {
        width: calc(100% - 20px) !important;
        grid-template-columns: 52px minmax(0, 1fr) 52px !important;
        gap: 10px 12px !important;
        padding: 12px 0 14px !important;
    }

    .asala-brand,
    .asala-brand .custom-logo-link {
        min-height: 68px !important;
        height: 68px !important;
    }

    .asala-brand .custom-logo {
        max-width: min(205px, 100%) !important;
        max-height: 68px !important;
    }

    .asala-cart-link {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
    }

    .asala-cart-link svg {
        width: 31px !important;
        height: 31px !important;
    }

    .asala-mobile-menu-button-main {
        width: 48px !important;
        height: 44px !important;
        padding: 6px 2px !important;
    }

    .asala-mobile-menu-button-main span {
        height: 3.5px !important;
    }

    .asala-search-form,
    .asala-search-form .search-field,
    .asala-search-submit {
        height: 50px !important;
    }

    .asala-search-form .search-field {
        line-height: 50px !important;
    }

    .asala-search-submit {
        width: 60px !important;
        min-width: 60px !important;
    }

    .asala-search-submit svg {
        width: 24px !important;
        height: 24px !important;
    }
}

/* =========================================================
   PATCH-044L — Mobile hamburger geometry correction
   Keep the existing account icon; restore a complete, balanced
   three-line hamburger beside it without clipping.
   ========================================================= */
@media (max-width: 767px) {
    .asala-header-main {
        grid-template-columns: 84px minmax(0, 1fr) 84px !important;
    }

    .asala-header-actions,
    .asala-mobile-header-controls {
        width: 84px !important;
        min-width: 84px !important;
    }

    .asala-mobile-header-controls {
        gap: 6px !important;
        overflow: visible !important;
    }

    .asala-mobile-account-button {
        width: 36px !important;
        min-width: 36px !important;
        height: 44px !important;
        flex: 0 0 36px;
    }

    .asala-mobile-menu-button-main {
        width: 42px !important;
        min-width: 42px !important;
        height: 44px !important;
        flex: 0 0 42px;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        overflow: visible !important;
    }

    .asala-mobile-menu-button-main span {
        width: 32px !important;
        min-width: 32px !important;
        height: 3px !important;
        flex: 0 0 3px !important;
        margin: 0 !important;
        border-radius: 999px !important;
    }
}



/* =========================================================
   PATCH-044M — Mobile cart outer-edge offset
   Move only the cart icon away from the centered logo.
   ========================================================= */
@media (max-width: 767px) {
    .asala-cart-link {
        left: -10px !important;
    }
}


/* =========================================================
   PATCH-044Q — Mobile cart sizing + adjacent search trigger
   - Keep the cart at the outer edge of the left action track.
   - Add a compact search icon beside it that focuses the existing
     product-search field through the native <label for> behavior.
   ========================================================= */
.asala-mobile-search-trigger {
    display: none;
}

@media (max-width: 767px) {
    .asala-header-actions {
        justify-content: space-between !important;
        gap: 6px !important;
        direction: rtl;
    }

    .asala-mobile-search-trigger {
        display: grid;
        place-items: center;
        width: 36px;
        min-width: 36px;
        height: 36px;
        flex: 0 0 36px;
        margin: 0;
        padding: 0;
        border-radius: 9px;
        color: #2b1d18;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .asala-mobile-search-trigger svg {
        display: block;
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .asala-mobile-search-trigger:hover,
    .asala-mobile-search-trigger:active {
        color: #8f3e26;
    }

    .asala-cart-link {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px;
        left: 0 !important;
    }

    .asala-cart-link svg {
        width: 24px !important;
        height: 24px !important;
    }

    .asala-cart-count {
        top: -5px !important;
        right: -5px !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 4px !important;
        font-size: 9px !important;
        line-height: 18px !important;
    }
}

/* PATCH-046B — social links fallback for the primary menu; polished by Clean Luxury when active. */
.asala-navigation .asala-mobile-social-links{display:none!important}
@media(max-width:767px){
    .asala-navigation .asala-menu>.asala-mobile-social-links{display:flex!important;flex-direction:column;gap:8px;margin-top:14px!important;padding-top:12px!important;border-top:1px solid rgba(120,100,85,.16)!important}
    .asala-navigation .asala-mobile-social-links__title{font-size:11px;font-weight:700;color:#746a63;text-align:right}
    .asala-navigation .asala-mobile-social-links__buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
    .asala-navigation .asala-mobile-social-links .asala-social-link{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:7px!important;border:1px solid #e3dbd4!important;border-radius:10px!important;background:#fff!important;color:#2d2622!important;text-decoration:none!important;font-size:11px!important;font-weight:700!important}
    .asala-navigation .asala-mobile-social-links .asala-social-link::before,.asala-navigation .asala-mobile-social-links .asala-social-link::after{content:none!important;display:none!important}
    .asala-navigation .asala-mobile-social-links .asala-social-link svg{width:17px;height:17px;display:block;flex:0 0 17px}
}

/* Native controls retain existing drawer selectors through the hidden state checkbox. */
.asala-mobile-menu-button-main,
.asala-mobile-search-trigger,
.asala-mobile-menu-close { border: 0; background: transparent; color: inherit; font: inherit; }
.asala-mobile-menu-backdrop { border: 0; padding: 0; border-radius: 0; }
body#asala-page .asala-mobile-menu-button-main:focus-visible,
body#asala-page .asala-mobile-search-trigger:focus-visible,
body#asala-page .asala-mobile-menu-close:focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px; }
/* PATCH-MENU-028: do not toggle document overflow on menu open.
   The fixed menu/backdrop isolate touch and wheel interactions instead. */
html.asala-menu-modal-opened,
html.asala-menu-modal-opened body { overscroll-behavior: none; }
.asala-filter-drawer[hidden] { display: none !important; }
.asala-shop-hero.asala-shop-hero-no-image { background: #342a24; }

/* PATCH-047AE — new drawer controls stay hidden outside their mobile profile. */
.asala-mobile-menu-heading,
.asala-mobile-brands-toggle { display: none; }

/* PATCH-047AF — One navigation stack. Desktop header behavior is retained. */
body#asala-page .asala-nav-stack { position: relative; z-index: 100; }
body#asala-page .asala-smart-brand-rail { background: #fff; border-block-end: 1px solid #eee7dc; }
body#asala-page .asala-smart-brand-rail__track { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; padding: 8px 12px; max-width: 100%; scrollbar-width: thin; }
body#asala-page .asala-smart-brand-rail__item { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #251c15; border-radius: 8px; }
body#asala-page .asala-brand-visual { position: relative; display: inline-flex; align-items: center; justify-content: center; width: clamp(44px,12vw,48px); height: clamp(44px,12vw,48px); flex-shrink: 0; overflow: hidden; border-radius: 50%; background: rgba(237,230,216,var(--asala-circle-alpha,1)); }
body#asala-page .asala-brand-visual img { width: 100%; height: 100%; object-fit: contain; padding: 5px; box-sizing: border-box; opacity: var(--asala-logo-alpha,1); }
body#asala-page .asala-brand-visual img[hidden] { display: none; }
body#asala-page .asala-brand-fallback { color: #6e572e; font-size: 22px; }
body#asala-page .asala-brand-visual.has-image .asala-brand-fallback { display: none; }
body#asala-page .asala-smart-brand-rail__name { font-size: 12px; line-height: 1.35; height: 2.7em; text-align: center; width: 100%; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; opacity: var(--asala-name-alpha,1); }
body#asala-page .asala-smart-brand-rail__item:focus-visible { outline: 3px solid #8a4c22; outline-offset: -2px; }
body#asala-page .asala-brand-menu-logo .asala-brand-visual { width: 36px; height: 36px; background: transparent; }
body#asala-page .asala-nav-stack.is-nav-locked { transform: none; transition: none; z-index: 10020; }
body#asala-page .asala-nav-stack.is-nav-locked .asala-smart-brand-rail { visibility: hidden; pointer-events: none; }
@media (max-width: 767px) {
    body#asala-page .asala-nav-stack.asala-nav-enhanced { position: sticky; top: var(--asala-nav-admin-offset,0px); transition: transform 180ms ease, visibility 180ms; }
    body#asala-page .asala-nav-stack.asala-nav-enhanced.is-nav-hidden { transform: translateY(calc(-100% - var(--asala-nav-admin-offset,0px))); visibility: hidden; pointer-events: none; }
    /* No permanent will-change/filter/contain: fixed menu children need viewport geometry. */
    body#asala-page .asala-nav-stack.asala-nav-enhanced.is-nav-locked { transform: none; visibility: visible; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
    body#asala-page .asala-nav-stack.asala-nav-enhanced { transition: none; }
}

/* PATCH-048AI — one always-visible site header, independently collapsing optional brand rail. */
html body#asala-page .asala-nav-stack,
html body#asala-page .asala-nav-stack.asala-nav-enhanced {
    position: sticky !important;
    top: var(--asala-nav-admin-offset, 0px) !important;
    z-index: 1000;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: none !important;
}
html body#asala-page .asala-nav-stack.asala-nav-enhanced.is-nav-hidden {
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
html body#asala-page .asala-nav-stack .asala-smart-brand-rail {
    max-height: 180px;
    overflow: hidden;
    transition: max-height 180ms ease, opacity 180ms ease;
}
html body#asala-page .asala-nav-stack.is-rail-scroll-hidden .asala-smart-brand-rail {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    border: 0;
}
html body#asala-page .asala-smart-brand-rail__track {
    padding: calc(8px * var(--asala-rail-scale, 1)) calc(12px * var(--asala-rail-scale, 1));
    gap: calc(10px * var(--asala-rail-scale, 1));
}
html body#asala-page .asala-smart-brand-rail__item {
    flex-basis: calc(72px * var(--asala-rail-scale, 1));
    gap: calc(4px * var(--asala-rail-scale, 1));
}
html body#asala-page .asala-smart-brand-rail .asala-brand-visual {
    width: calc(clamp(44px, 12vw, 48px) * var(--asala-rail-scale, 1));
    height: calc(clamp(44px, 12vw, 48px) * var(--asala-rail-scale, 1));
}
html body#asala-page .asala-smart-brand-rail .asala-brand-visual img {
    padding: calc(5px * var(--asala-rail-scale, 1));
}
html body#asala-page .asala-smart-brand-rail__name {
    font-size: clamp(10px, calc(12px * var(--asala-rail-scale, 1)), 12px);
}
@media (max-width: 767px) {
    html body#asala-page .asala-smart-brand-rail__track {
        gap: calc(6px * var(--asala-rail-scale, 1)) !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    html body#asala-page .asala-nav-stack .asala-smart-brand-rail { transition: none; }
}


/* =========================================================
   PATCH-HEADER-029 — Mobile header touch-target consistency
   Expand only the actual tappable controls; keep glyph size,
   DOM, navigation, drawer behavior, and desktop header intact.
   Mobile action tracks: two 44px targets each, without overlap.
   ========================================================= */
@media (max-width: 767px) {
    body#asala-page .asala-header-main {
        grid-template-columns: 88px minmax(0, 1fr) 88px !important;
    }

    body#asala-page .asala-header-actions,
    body#asala-page .asala-mobile-header-controls {
        width: 88px !important;
        min-width: 88px !important;
        max-width: 88px !important;
        gap: 0 !important;
        justify-content: space-between !important;
    }

    body#asala-page .asala-header-actions .asala-cart-link,
    body#asala-page .asala-header-actions .asala-mobile-search-trigger,
    body#asala-page .asala-mobile-header-controls .asala-mobile-account-button,
    body#asala-page .asala-mobile-header-controls .asala-mobile-menu-button-main {
        box-sizing: border-box !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        flex: 0 0 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
    }

    body#asala-page .asala-header-actions .asala-mobile-search-trigger,
    body#asala-page .asala-mobile-header-controls .asala-mobile-account-button {
        display: grid !important;
        place-items: center !important;
    }

    body#asala-page .asala-header-actions .asala-cart-link,
    body#asala-page .asala-mobile-header-controls .asala-mobile-menu-button-main {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Preserve the existing line geometry of the working 18.28 menu. */
    body#asala-page .asala-mobile-menu-button-main {
        flex-direction: column !important;
        gap: 6px !important;
    }

    /* Cart quantity badge remains anchored to its own 44px button. */
    body#asala-page .asala-cart-count {
        top: -3px !important;
        right: 0 !important;
    }
}
