@charset "utf-8";

/* Reserve a classic scrollbar before the first page box is parsed. */
html[data-kh-desktop-scrollbar="true"] { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
    html[data-kh-desktop-scrollbar="true"] { overflow-y: scroll; }
}

/* Only the outer frame moves. The current skin's internal 640px layout remains intact. */
body[data-kh-desktop-active="true"] > #wrap {
    left: var(--kh-content-left);
    width: 640px;
    min-width: 640px;
    max-width: 640px;
    margin: 0;
}

body[data-kh-desktop-active="true"] #header_wrap.header_top,
body[data-kh-desktop-active="true"] #sub_header_wrap,
body[data-kh-desktop-active="true"] .goods_view .detail_tab_info {
    left: var(--kh-content-left) !important;
    right: auto;
    width: 640px !important;
    max-width: 640px !important;
    transition-property: top, background-color, border-color, box-shadow;
}

body[data-kh-desktop-active="true"] > #intro_page {
    display: none;
}

#khDesktopWing[hidden] { display: none !important; }
body[data-kh-desktop-active="true"] > #khDesktopWing {
    position: fixed;
    left: var(--kh-cart-left);
    bottom: 24px;
    z-index: 101;
    width: var(--kh-cart-width);
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #e6e8ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(29, 35, 45, .05);
}
#khDesktopWing > .intro_pg_tll_bn {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none;
    height: auto !important;
    margin: 0;
    padding: 0;
    border-radius: inherit;
}

body[data-kh-desktop-active="true"] .kh-detail-action-bar,
body[data-kh-desktop-active="true"] .kh-multi-actions,
body[data-kh-desktop-active="true"] .kh-order-page > #frmOrder > .btn_pay_wrap {
    left: var(--kh-content-left) !important;
    right: auto !important;
    width: 640px !important;
    max-width: 640px;
    transform: none !important;
}
body[data-kh-desktop-active="true"] .st_buy_content,
body[data-kh-desktop-active="true"] #addCartLayer.kh-cart-success-sheet {
    left: var(--kh-content-center) !important;
    width: 640px !important;
    max-width: 640px;
}

/* Preserve dialog size caps and the full-viewport option/coupon dim. */
body[data-kh-desktop-active="true"] #wrap :is(.lypop, .ly_pop, .ly_srch):not(#popupOption):not(#popupCoupon):not(.kh-order-coupon-modal) {
    left: var(--kh-content-left) !important;
    right: auto !important;
    width: 640px !important;
    max-width: 640px;
}
body[data-kh-desktop-active="true"] #popupOption.ly_show,
body[data-kh-desktop-active="true"] #wrap #popupCoupon.ly_show,
body[data-kh-desktop-active="true"] #wrap #popupCouponApply.kh-order-coupon-modal.ly_show {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: var(--kh-content-left) !important;
    padding-right: calc(100% - var(--kh-content-left) - 640px) !important;
}
body[data-kh-desktop-active="true"] #categoryModal,
body[data-kh-desktop-active="true"] #searchGoodsModal {
    left: var(--kh-content-left) !important;
    right: auto !important;
    width: 640px !important;
    max-width: 640px !important;
}
body[data-kh-desktop-active="true"] .kh-product-share {
    padding-left: var(--kh-content-left);
    padding-right: calc(100% - var(--kh-content-left) - 640px);
}

/* Keep auxiliary floating controls outside the cart and checkout buttons. */
body[data-kh-desktop-active="true"] .top_scroll_btn {
    left: calc(var(--kh-content-left) + 16px) !important;
    right: auto !important;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
body[data-kh-desktop-active="true"] #gitple-launcher {
    left: var(--kh-chat-left) !important;
    right: auto !important;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
}
body[data-kh-desktop-active="true"] #gitple-launcher-tooltip {
    left: var(--kh-chat-tooltip-left) !important;
    right: auto !important;
    bottom: calc(172px + env(safe-area-inset-bottom, 0px)) !important;
    width: 240px !important;
    max-width: 240px !important;
    box-sizing: border-box;
    white-space: normal;
}
body[data-kh-desktop-active="true"] .kh-am-v1-banner.kh-am-v1-bottom_right:not(.kh-am-v1-review) {
    left: auto !important;
    right: calc(100% - var(--kh-content-left) - 640px + 16px) !important;
    bottom: calc(180px + env(safe-area-inset-bottom, 0px)) !important;
}
