.header-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; position: relative; }
.as_info_detail .header-top-actions { justify-content: flex-end; }
.header-top-actions .header-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; margin: 0; background: transparent; border: 0; color: #fff9ef; cursor: pointer; flex-shrink: 0; border-radius: 8px; }
body:not(.header-is-scrolled) .header-top-actions .header-icon,
body:not(.header-is-scrolled) .header-user-trigger {
    color: #fff9ef;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.4);
    font-weight: 800;
}
.header-top-actions .header-icon:hover { color: #fff3c6; background: #ffffff24; }
.header-top-actions .header-icon:focus-visible { outline: 2px solid #fff3c6; outline-offset: 3px; }
.header-top-actions .header-icon img { width: 23px; height: 23px; }
.header-top-actions .as_cart_wrapper > span { margin: 0; }
.header-top-actions .as_cart_box { z-index: 30; max-width: calc(100vw - 32px); }
.mobile-panel-close {
    display: none;
}
.header-top-actions .header-search { position: relative; }
#header-search-box { position: absolute; top: calc(100% + 12px); right: 0; width: 300px; max-width: calc(100vw - 32px); padding: 12px; background: linear-gradient(180deg, #a62a15, #e77922); border: 1px solid rgba(255, 243, 198, .48); border-radius: 12px; z-index: 31; box-shadow: 0 12px 30px rgba(143, 30, 19, .28); }
#header-search-box[hidden] { display: none; }
#header-search-input { width: 100%; height: 42px; color: #fff; background: transparent; border: 1px solid #aaa; border-radius: 24px; padding: 8px 16px; }
#header-search-input::placeholder { color: #ddd; }
.header-search-results {
    margin-top: 10px;
    max-height: 360px;
    overflow-y: auto;
    display: grid;
    gap: 6px;
}
.header-search-results[hidden] {
    display: none;
}
.header-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: #fff;
    border-radius: 9px;
    text-decoration: none;
}
.header-search-item:hover,
.header-search-item:focus {
    color: #5e140d;
    background: #fff3c6;
    text-decoration: none;
}
.header-search-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: #ffd8a1;
    flex: none;
}
.header-search-item span {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.header-search-item strong,
.header-search-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-search-item strong {
    font-size: 14px;
    line-height: 1.2;
}
.header-search-item small {
    color: #cfcfcf;
    font-size: 12px;
}
.header-search-item:hover small,
.header-search-item:focus small {
    color: #3a2a14;
}
.header-search-message {
    padding: 12px 8px 4px;
    color: #ddd;
    font-size: 13px;
}
@media (max-width: 991px) { .header-top-actions { justify-content: flex-end; } .header-top-actions .header-search { position: static; } #header-search-box { right: 50%; transform: translateX(50%); } }
@media (max-width: 768px) {
    .header-top-actions {
        gap: 8px;
    }
    .header-top-actions .header-icon,
    .header-user-trigger {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 7px;
        color: #fff9ef;
        border-radius: 14px;
    }
    .header-user-trigger span {
        display: none;
    }
    .header-top-actions .header-icon svg,
    .header-user-trigger svg {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
    body.mobile-header-modal-open:before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1099;
        background: rgba(0, 0, 0, .58);
    }
    #header-search-box {
        position: fixed;
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: min(560px, calc(100vw - 32px));
        max-width: none;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        transform: translate(-50%, -50%);
        padding: 58px 18px 24px;
        border-radius: 18px;
        background: #fffaf3;
        border-color: rgba(202, 91, 25, .18);
        z-index: 1100;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .48), 0 18px 48px rgba(36, 23, 15, .34);
    }
    #header-search-box.mobile-header-modal-panel,
    #header-cart-box.mobile-header-modal-panel,
    .header-user-dropdown.mobile-header-modal-panel {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        top: 50% !important;
        bottom: auto !important;
        width: min(560px, calc(100vw - 32px)) !important;
        max-width: none !important;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        margin: 0 !important;
        padding: 58px 18px 24px !important;
        border: 1px solid rgba(202, 91, 25, .18);
        border-radius: 18px !important;
        background: #fffaf3 !important;
        box-shadow: 0 18px 48px rgba(36, 23, 15, .34) !important;
        transform: translate(-50%, -50%) !important;
        z-index: 1100 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .header-top-actions .as_cart_box {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: 50%;
        bottom: auto;
        width: min(560px, calc(100vw - 32px));
        max-width: none;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        margin: 0;
        padding: 58px 18px 24px;
        border-radius: 18px;
        z-index: 1100;
        transform: translate(-50%, -50%);
        background: #fffaf3;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .48), 0 18px 48px rgba(36, 23, 15, .34);
    }
    .as_cart.cart_open .as_cart_box {
        margin: 0;
    }
    .header-user-dropdown {
        position: fixed;
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: min(560px, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        padding: 58px 18px 24px;
        border-radius: 18px;
        z-index: 1100;
        transform: translate(-50%, -50%);
        background: #fffaf3;
        border-color: rgba(202, 91, 25, .18);
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .48), 0 18px 48px rgba(36, 23, 15, .34);
    }
    .header-user-dropdown:before {
        display: none;
    }
    .header-user-menu:hover .header-user-dropdown,
    .header-user-menu:focus-within .header-user-dropdown {
        transform: translate(-50%, -50%);
    }
    .mobile-panel-close {
        position: absolute;
        top: 12px;
        right: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        color: #8f1e13;
        background: #fff3c6;
        font-size: 28px;
        line-height: 1;
        z-index: 2;
        box-shadow: 0 8px 18px rgba(143, 30, 19, .16);
    }
    #header-search-input {
        color: #24170f;
        background: #fff;
        border-color: #e8c99d;
    }
    #header-search-input::placeholder {
        color: #9b8b7b;
    }
    .header-search-item {
        color: #24170f;
        background: #fff;
        border: 1px solid #f1dfc9;
    }
    .header-search-item small,
    .header-search-message {
        color: #7f7063;
    }
    .header-user-dropdown a,
    .header-user-dropdown button {
        color: #24170f;
        background: #fff;
        border: 1px solid #f1dfc9;
    }
    .header-user-dropdown a:hover,
    .header-user-dropdown button:hover {
        color: #8f1e13;
        background: #fff3c6;
    }
    .as_cart_box .as_cart_list ul {
        padding-bottom: 18px;
    }
    .as_cart_box .as_cart_list li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 0 16px;
    }
    .as_cart_list .as_cart_img,
    .as_cart_info {
        float: none;
    }
    .as_cart_list .as_cart_img {
        flex: 0 0 86px;
    }
    .as_cart_list .as_cart_img img {
        width: 86px;
        height: 86px;
        border-radius: 10px;
    }
    .as_cart_info {
        width: auto;
        flex: 1;
        padding-left: 0;
    }
    .as_cart_info .mini-cart-line {
        display: none;
    }
    .mini-cart-breakdown {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
        color: #6f6258;
        font-size: 13px;
        line-height: 1.35;
        flex-wrap: wrap;
    }
    .mini-cart-breakdown span {
        display: inline-flex;
        align-items: baseline;
        gap: 3px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: inherit;
        font-size: inherit;
        line-height: inherit;
    }
    .mini-cart-breakdown span + span:before {
        content: "•";
        margin-right: 5px;
        color: #d9a66a;
    }
    .mini-cart-breakdown b {
        color: #8f1e13;
        font-size: inherit;
        text-transform: none;
    }
    .as_cart_box .as_cart_total,
    .as_cart_box .as_cart_btn {
        width: 100%;
    }
    .as_cart_box .as_cart_btn {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 18px;
    }
    .as_cart_box .mini-cart-view-btn {
        display: none;
    }
    .as_cart_box .as_cart_btn a {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        padding: 0 12px;
        font-size: 15px;
        text-align: center;
    }
}
@media (max-width: 575px) {
    .header-top-actions {
        gap: 8px;
    }
    .header-top-actions .header-icon,
    .header-user-trigger {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 7px;
        color: #fff9ef;
        border-radius: 14px;
    }
    .header-user-trigger span {
        display: none;
    }
    .header-top-actions .header-icon svg,
    .header-user-trigger svg {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
}
.as_info_detail .as_cart_list ul { padding: 0 0 20px; text-align: left; }
.as_info_detail .as_cart_list li { display: flex; align-items: center; padding: 0; }

/* Keep links and native buttons visually identical. */
.header-top-actions .header-icon { appearance: none; -webkit-appearance: none; box-shadow: none; line-height: 1; text-decoration: none; position: relative; }
.header-top-actions .header-icon svg { display: block; width: 24px; height: 24px; flex: 0 0 24px; }
body:not(.header-is-scrolled) .header-top-actions .header-icon svg,
body:not(.header-is-scrolled) .header-user-trigger svg {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    filter: drop-shadow(0 2px 7px rgba(0, 0, 0, .38));
}
.header-top-actions .as_cart_wrapper > .header-cart-count { position: absolute; top: -2px; right: -5px; display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 4px; margin: 0; border-radius: 10px; background: #fff3c6; color: #8f1e13; font-size: 10px; font-weight: 700; line-height: 1; border: 2px solid #c94617; }
.header-user-menu { position: relative; }
.header-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 7px 10px;
    color: #fff9ef;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
body:not(.header-is-scrolled) .header-top-actions .header-icon:hover,
body:not(.header-is-scrolled) .header-user-trigger:hover,
body:not(.header-is-scrolled) .header-user-menu:focus-within .header-user-trigger {
    color: #fff;
    background: rgba(255, 255, 255, .28);
}
.header-user-trigger svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}
.header-user-trigger:hover,
.header-user-menu:focus-within .header-user-trigger {
    color: #fff3c6;
    background: #ffffff24;
}
.header-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 34;
    min-width: 190px;
    padding: 8px;
    background: linear-gradient(180deg, #a62a15, #e77922);
    border: 1px solid rgba(255, 243, 198, .48);
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(143, 30, 19, .32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .18s ease;
}
.header-user-menu:hover .header-user-dropdown,
.header-user-menu:focus-within .header-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-user-dropdown:before {
    content: "";
    position: absolute;
    top: -10px;
    right: 18px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid #a62a15;
}
.header-user-dropdown a,
.header-user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    color: #fff9ef;
    background: transparent;
    border: 0;
    border-radius: 7px;
    text-align: left;
    text-decoration: none;
    font-weight: 600;
}
.header-user-dropdown a:hover,
.header-user-dropdown button:hover {
    color: #5e140d;
    background: #fff3c6;
}
.header-user-dropdown i,
.header-user-dropdown svg {
    width: 18px;
    height: 18px;
    text-align: center;
    flex: none;
}
.header-user-dropdown svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.header-user-dropdown form {
    margin: 0;
}
.as_menu > ul > li:focus-within > .as_submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.as_menu > ul > li { margin-left: 16px; margin-right: 16px; }

.as_product_box:focus-within .as_product_img ul { bottom: 0; opacity: 1; visibility: visible; }
.as_product_img .as_product_actions {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 0 16px;
}
.as_product_img .as_product_actions li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0 13px;
    line-height: 1;
}
.as_product_img .as_product_actions .as_product_cart_action {
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 142px;
}
.as_product_img .as_product_actions a,
.as_product_img .as_product_actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 34px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    text-decoration: none;
    cursor: pointer;
}
.as_product_img .as_product_actions a span {
    margin-left: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}
.as_product_img .as_product_actions svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex: 0 0 20px;
}
.as_product_img .as_product_actions img {
    flex: 0 0 auto;
}
.as_product_img .as_product_actions a:hover,
.as_product_img .as_product_actions button:hover,
.as_product_img .as_product_actions a:focus-visible,
.as_product_img .as_product_actions button:focus-visible {
    opacity: .82;
    outline: none;
}

@media (min-width: 769px) {
    .mobile-panel-close {
        display: none !important;
    }
    #header-search-box {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        bottom: auto;
        left: auto;
        width: 300px;
        max-width: calc(100vw - 32px);
        max-height: none;
        overflow: visible;
        transform: none;
        padding: 12px;
        border-radius: 12px;
        background: linear-gradient(180deg, #a62a15, #e77922);
        box-shadow: 0 12px 30px rgba(143, 30, 19, .28);
    }
    .header-top-actions .as_cart_box {
        position: absolute;
        top: 100%;
        right: 0 !important;
        bottom: auto;
        left: auto !important;
        width: 300px;
        max-width: calc(100vw - 32px);
        max-height: none;
        overflow: visible;
        padding: 5px 20px 20px;
        border-radius: 20px;
        transform: none;
        background: #fff;
        box-shadow: -2px 0 28px 0 rgb(0 0 0 / 5%);
    }
    .header-user-dropdown {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        bottom: auto;
        left: auto;
        width: auto;
        min-width: 190px;
        max-height: none;
        overflow: visible;
        padding: 8px;
        border-radius: 10px;
        transform: translateY(8px);
        background: linear-gradient(180deg, #a62a15, #e77922);
        box-shadow: 0 14px 32px rgba(143, 30, 19, .32);
    }
    .header-user-menu:hover .header-user-dropdown,
    .header-user-menu:focus-within .header-user-dropdown {
        transform: translateY(0);
    }
}

@media (max-width: 575px) {
    .header-user-trigger span { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .header-user-dropdown { right: auto; transform: translate(-50%, -50%); }
    .header-user-menu:hover .header-user-dropdown,
    .header-user-menu:focus-within .header-user-dropdown { transform: translate(-50%, -50%); }
    .as_product_img .as_product_actions { padding: 0 10px; }
    .as_product_img .as_product_actions li { min-width: 42px; padding: 0 8px; }
    .as_product_img .as_product_actions .as_product_cart_action { min-width: 120px; }
    .as_product_img .as_product_actions a span,
    .as_product_img .as_product_actions button span { font-size: 13px; }
}
