/**
 * 商品详情 · 交易小票 + 玻璃拟态
 * 作用域：.slip-page / .slip-* / .slip-dock
 * iOS 12+：先 rgba 实底，@supports 再 blur；无 gap/grid/color-mix 唯一路径
 */

/* ========== page ========== */
body.store-glass .slip-page {
    padding: 8px 8px 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    /* 媒体图溢出用 media 自己裁；整页 hidden-x 会连带裁支付芯片 */
    overflow-x: visible;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    box-sizing: border-box;
}

/* 小票本体：玻璃卡（实底兜底；blur 放 ::before，勿写在内容祖先上——部分安卓 WebView
 * 在 backdrop-filter 容器内从 display:none 切到 block 时，支付芯片不重绘） */
body.store-glass .slip,
body.store-glass .slip-desc {
    position: relative;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    background: var(--glass-strong, rgba(255, 255, 255, 0.62));
    border: 1px solid rgba(255, 255, 255, 0.55);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 12px 32px rgba(58, 52, 78, 0.12);
    /* 勿 overflow-x:hidden：与 overflow-y:visible 组合会算成 auto，裁切支付芯片 */
    overflow: visible;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    isolation: auto;
}

body.store-glass .slip::before,
body.store-glass .slip-desc::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.store-glass .slip,
    body.store-glass .slip-desc {
        background: rgba(255, 255, 255, 0.72);
        background: var(--glass-strong, rgba(255, 255, 255, 0.72));
    }
    body.store-glass .slip::before,
    body.store-glass .slip-desc::before {
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        backdrop-filter: blur(18px) saturate(140%);
        background: rgba(255, 255, 255, 0.18);
    }
}

/* 内容压在磨玻璃伪元素之上 */
body.store-glass .slip > *,
body.store-glass .slip-desc > * {
    position: relative;
    z-index: 1;
}

body.store-glass .slip-desc {
    margin-top: 8px;
}

/* ========== media ========== */
body.store-glass .slip-media {
    background: rgba(238, 242, 248, 0.65);
}

body.store-glass .slip-media__stage {
    position: relative;
    display: block;
    width: 100%;
}

body.store-glass .slip-media__zoom {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}

body.store-glass .slip-media__zoom-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.45);
    color: #fff;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    pointer-events: none;
}

body.store-glass .slip-media__zoom-hint .material-icons-outlined {
    font-size: 18px;
}

body.store-glass .slip-media__img,
body.store-glass .slip-page .item-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 34vh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    object-position: center center;
    background: rgba(238, 242, 248, 0.4);
    position: static !important;
    -webkit-transform: none !important;
    transform: none !important;
    pointer-events: none;
}

body.store-glass .slip-media__stage--empty {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    min-height: 100px;
    color: rgba(20, 20, 20, 0.28);
}

body.store-glass .slip-media__stage--empty .material-icons-outlined {
    font-size: 36px;
}

body.store-glass .slip-media__thumbs {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 6px 8px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-top: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
}

body.store-glass .slip-media__thumbs > * {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-right: 6px;
}

body.store-glass .slip-media__thumbs > *:last-child {
    margin-right: 0;
}

body.store-glass .slip-media__thumbs::-webkit-scrollbar {
    height: 0;
    display: none;
}

body.store-glass .slip-thumb {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border: 2px solid var(--glass-line-soft, rgba(255, 255, 255, 0.4));
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

body.store-glass .slip-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.store-glass .slip-thumb.is-active {
    border-color: var(--primary, #1856FF);
}

/* ========== head ========== */
body.store-glass .slip-head {
    padding: 10px 12px 8px;
    border-bottom: 1px dashed rgba(20, 20, 20, 0.1);
}

body.store-glass .slip-head__title {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

body.store-glass .slip-title {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    margin: 0 8px 0 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.28;
    color: var(--ink, #141414);
    word-break: break-word;
}

body.store-glass .slip-share {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    background: var(--glass, rgba(255, 255, 255, 0.42));
    color: var(--ink, #141414);
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

body.store-glass .slip-share .material-icons-outlined {
    font-size: 17px;
}

body.store-glass .slip-head__price {
    margin-top: 6px;
}

body.store-glass .slip-head__price .price,
body.store-glass .slip-dock__price .price {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary, #1856FF);
}

body.store-glass .slip-head__price .price .unit,
body.store-glass .slip-dock__price .price .unit {
    font-size: 0.78em;
    margin-right: 1px;
}

/* 事实行：中间点分隔，不散落徽章 */
body.store-glass .slip-facts {
    margin: 6px 0 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted, rgba(20, 20, 20, 0.55));
}

body.store-glass .slip-fact {
    display: inline;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

body.store-glass .slip-fact::after {
    content: " · ";
    color: rgba(20, 20, 20, 0.28);
    font-weight: 400;
}

body.store-glass .slip-fact:last-child::after {
    content: "";
}

body.store-glass .slip-fact.badge-soft-danger,
body.store-glass .slip-fact.item-stock.badge-soft-danger {
    color: #EA2143 !important;
    font-weight: 700;
}

body.store-glass .slip-fact.snap-up.badge-soft-primary,
body.store-glass .slip-fact.snap-up.badge-soft-info {
    color: #1856FF !important;
    font-weight: 700;
}

body.store-glass .slip-tags {
    margin-top: 6px;
}

body.store-glass .slip-tag {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--primary, #1856FF);
    background: rgba(24, 86, 255, 0.1);
    border: 1px solid rgba(24, 86, 255, 0.16);
}

/* ========== form sections ========== */
body.store-glass .slip-form {
    display: block !important;
    padding: 0 0 10px;
}

body.store-glass .slip-sec {
    padding: 8px 12px 2px;
    border-bottom: 1px dashed rgba(20, 20, 20, 0.08);
}

body.store-glass .slip-sec:last-child {
    border-bottom: 0;
}

body.store-glass .slip-sec__h {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(20, 20, 20, 0.4);
}

body.store-glass .slip-sec__h .material-icons-outlined {
    margin-right: 4px;
    font-size: 14px;
}

body.store-glass .slip-field {
    margin: 0 0 8px;
}

body.store-glass .slip-field__hint {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(20, 20, 20, 0.45);
}

/* SKU chips — button 与 a 同款；勿用 -webkit-box（不换行会裁切） */
body.store-glass .slip-skus,
body.store-glass .slip-page .sku-list {
    display: block !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.store-glass .slip-skus > .sku,
body.store-glass .slip-page .sku-list > .sku {
    margin: 0 6px 6px 0 !important;
}

body.store-glass .slip-chip,
body.store-glass .slip-page .sku,
body.store-glass button.slip-chip,
body.store-glass button.sku {
    position: relative;
    display: inline-block !important;
    display: -webkit-inline-flex !important;
    display: inline-flex !important;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    vertical-align: top;
    min-height: 32px;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    background: var(--glass, rgba(255, 255, 255, 0.42)) !important;
    color: var(--ink, #141414) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    font-style: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
}

body.store-glass .slip-page .sku .badge-money,
body.store-glass .slip-page .sku .badge-moeny {
    display: none !important;
}

body.store-glass .slip-chip__fee {
    display: inline;
    margin-left: 5px;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #c45a12;
}

body.store-glass .slip-chip.is-primary,
body.store-glass .slip-page .sku.is-primary {
    background: var(--primary, #1856FF) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 14px rgba(24, 86, 255, 0.28) !important;
}

body.store-glass .slip-chip.is-soldout,
body.store-glass .slip-page .sku.is-soldout {
    opacity: 0.48 !important;
    -webkit-filter: grayscale(0.25);
    filter: grayscale(0.25);
}

body.store-glass .slip-chip.is-soldout .slip-chip__fee {
    text-decoration: line-through;
}

body.store-glass .slip-chip.is-soldout.is-primary,
body.store-glass .slip-page .sku.is-soldout.is-primary {
    opacity: 0.72 !important;
    box-shadow: none !important;
}

body.store-glass .slip-chip.is-primary .slip-chip__fee {
    color: rgba(255, 255, 255, 0.92);
}

body.store-glass .slip-pick,
body.store-glass .slip-page .optional-card {
    display: block !important;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.55) !important;
    background: var(--glass, rgba(255, 255, 255, 0.42)) !important;
    border: 1px dashed rgba(20, 20, 20, 0.16) !important;
    color: var(--ink, #141414) !important;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: none !important;
}

/* ========== rows（标签左 / 控件右）========== */
body.store-glass .slip-rows {
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    background: var(--glass, rgba(255, 255, 255, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.25));
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.store-glass .slip-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 0 10px;
    min-height: 44px;
    border-bottom: 1px solid rgba(20, 20, 20, 0.06);
}

body.store-glass .slip-row:last-child {
    border-bottom: 0;
}

body.store-glass .slip-row__lab,
body.store-glass .slip-page .slip-row .form-label {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 64px;
    flex: 0 0 64px;
    width: 64px;
    margin: 0 !important;
    padding: 0;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: rgba(20, 20, 20, 0.5) !important;
    line-height: 1.2;
}

body.store-glass .slip-row__ctrl {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 0;
}

body.store-glass .slip-input,
body.store-glass .slip-page .item-input,
body.store-glass .slip-page .slip-row .form-control {
    width: 100%;
    min-height: 32px !important;
    height: 32px !important;
    margin: 0;
    padding: 4px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
}

body.store-glass .slip-input:focus,
body.store-glass .slip-page .slip-row .form-control:focus {
    outline: none;
    box-shadow: none !important;
}

/* qty */
body.store-glass .slip-qty,
body.store-glass .slip-page .item-qty {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
    width: 118px !important;
    max-width: 100% !important;
    height: 32px;
    min-height: 32px;
    margin: 0 0 0 auto;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.35));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.store-glass .slip-page .item-qty__btn {
    position: relative;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 32px;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #141414;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

body.store-glass .slip-page .item-qty__btn::before,
body.store-glass .slip-page .item-qty__btn::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 1px;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

body.store-glass .slip-page .change-num-sub::before,
body.store-glass .slip-page .change-num-add::before {
    width: 10px;
    height: 2px;
}

body.store-glass .slip-page .change-num-add::after {
    width: 2px;
    height: 10px;
}

body.store-glass .slip-page .item-qty__input {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 32px !important;
    min-height: 32px !important;
    text-align: center;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
}

body.store-glass .slip-page .wholesale-table {
    margin: 6px 10px 8px !important;
    font-size: 11px;
}

/* captcha */
body.store-glass .slip-captcha,
body.store-glass .slip-page .item-captcha {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
}

body.store-glass .slip-captcha .captcha-input {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 8px;
}

body.store-glass .slip-captcha .captcha-img {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 92px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    object-fit: cover;
    background: #fff;
}

body.store-glass .slip-widgets:empty {
    display: none;
}

body.store-glass .slip-widgets:not(:empty) {
    margin-top: 8px;
}

/* ========== pay ========== */
body.store-glass .slip-pay,
body.store-glass .slip-page .cash-pay {
    margin: 0 !important;
    padding: 8px 12px 14px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    position: relative;
    z-index: 2;
}

/* 显隐只靠 class；禁止依赖 jQuery 内联 display（部分机型卡在 none） */
body.store-glass .slip-page .cash-pay.is-pay-open,
body.store-glass .cash-pay.is-pay-open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

body.store-glass .slip-page .cash-pay.is-pay-closed,
body.store-glass .cash-pay.is-pay-closed {
    display: none !important;
}

/* 不用 -webkit-box：旧引擎不换行，配合父级裁切会把芯片「吃掉」 */
body.store-glass .slip-pays,
body.store-glass .slip-page .pay-list {
    display: block;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: 0 0 8px !important;
    padding: 2px 0 0 !important;
    min-height: 40px;
    gap: 0;
    overflow: visible !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

body.store-glass .slip-page .pay-list .pay,
body.store-glass .slip-page .pay-list button.pay {
    display: inline-block;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    vertical-align: top;
    margin: 0 6px 6px 0 !important;
    min-width: 5.5em;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    background: var(--glass, rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(200, 210, 230, 0.9);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #141414;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

body.store-glass .slip-page .item-pay-empty {
    display: block;
    width: 100%;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #6b7280);
}

body.store-glass .slip-page .pay-list .pay img {
    width: 18px;
    height: 18px;
    margin-right: 5px;
    border-radius: 4px;
    object-fit: cover;
}

body.store-glass .slip-page .pay-list .pay span {
    font-size: 13px;
    font-weight: 600;
    color: #141414;
}

body.store-glass .slip-page .pay-list .pay.is-primary,
body.store-glass .slip-page .pay-list .pay.active,
body.store-glass .slip-page .pay-list .pay.selected {
    background: var(--primary, #1856FF);
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(24, 86, 255, 0.28);
}

body.store-glass .slip-page .pay-list .pay.is-primary span,
body.store-glass .slip-page .pay-list .pay.active span,
body.store-glass .slip-page .pay-list .pay.selected span {
    color: #fff;
}

body.store-glass .slip-page .item-pay-empty {
    display: block;
    padding: 4px 0 8px;
    font-size: 12px;
    color: rgba(20, 20, 20, 0.45);
}

body.store-glass .slip-buy-desk .slip-buy,
body.store-glass .slip-page .item-buy-bar--desk .buy-now {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--primary, #1856FF);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(24, 86, 255, 0.3);
}

body.store-glass .slip-buy:disabled,
body.store-glass .slip-page .buy-now:disabled {
    opacity: 0.45;
    box-shadow: none;
    cursor: not-allowed;
}

body.store-glass .slip-buy .material-icons-outlined {
    display: none;
}

/* ========== desc ========== */
body.store-glass .slip-desc__h {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink, #141414);
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    border-bottom: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
}

body.store-glass .slip-desc__h .material-icons-outlined {
    margin-right: 6px;
    font-size: 18px;
    color: var(--primary, #1856FF);
}

body.store-glass .slip-desc__body {
    padding: 10px 12px 14px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted, rgba(20, 20, 20, 0.72));
}

body.store-glass .slip-desc__body img {
    max-width: 100%;
    height: auto;
}

/* ========== dock（跨设备：由 class + JS 驱动，不单靠 media query）========== */
body.store-glass .item-buy-dock,
body.store-glass .slip-dock {
    display: none;
}

body.store-glass .item-buy-spacer,
body.store-glass .slip-spacer {
    display: none;
    width: 100%;
    height: 0;
    pointer-events: none;
}

/* 底栏购买钮：禁止 width:100%（会在横向 flex 里把按钮挤出屏幕） */
body.store-glass .slip-dock .slip-buy,
body.store-glass .item-buy-dock .buy-now,
body.store-glass .item-buy-bar--float .buy-now {
    display: -webkit-inline-box !important;
    display: -webkit-inline-flex !important;
    display: inline-flex !important;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: auto !important;
    min-width: 7.5em;
    max-width: 58%;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--primary, #1856FF) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(24, 86, 255, 0.28);
    opacity: 1;
    visibility: visible;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.store-glass .slip-dock .slip-buy:disabled,
body.store-glass .item-buy-dock .buy-now:disabled {
    opacity: 0.5;
    box-shadow: none;
}

/*
 * 强制显示态：不依赖 max-width media（部分 WebView 对 991.98px / matchMedia 不稳定）
 * 桌面由下方 min-width:992 再藏掉
 */
body.store-glass.slip-dock-force .slip-dock,
body.store-glass.slip-dock-force .item-buy-dock,
body.store-glass.item-checkout-open .slip-dock,
body.store-glass.item-checkout-open .item-buy-dock,
body.item-checkout-open .slip-dock,
body.item-checkout-open .item-buy-dock {
    display: block !important;
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    /* 不用 calc+env 写 bottom：旧引擎可能整段丢弃；安全区改用 padding */
    z-index: 1080 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box !important;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body.store-glass.slip-dock-force .slip-dock__bar,
body.store-glass.slip-dock-force .item-buy-bar--float,
body.store-glass.item-checkout-open .slip-dock__bar,
body.store-glass.item-checkout-open .item-buy-bar--float,
body.item-checkout-open .item-buy-bar--float {
    pointer-events: auto;
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    background: var(--glass-strong, rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.55);
    border: 1px solid var(--glass-line-soft, rgba(255, 255, 255, 0.28));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 12px 32px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.store-glass.slip-dock-force .slip-dock__bar,
    body.store-glass.slip-dock-force .item-buy-bar--float,
    body.store-glass.item-checkout-open .slip-dock__bar,
    body.store-glass.item-checkout-open .item-buy-bar--float {
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        backdrop-filter: blur(20px) saturate(140%);
        background: rgba(255, 255, 255, 0.58);
        background: var(--glass-strong, rgba(255, 255, 255, 0.58));
    }
}

body.store-glass.slip-dock-force .slip-dock__price,
body.store-glass.slip-dock-force .item-buy-bar__price,
body.store-glass.item-checkout-open .slip-dock__price,
body.store-glass.item-checkout-open .item-buy-bar__price {
    display: block;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 48%;
    margin-right: 10px;
    overflow: hidden;
}

body.store-glass.slip-dock-force .slip-dock__price .price,
body.store-glass.slip-dock-force .item-buy-bar__price .price,
body.store-glass.item-checkout-open .item-buy-bar__price .price {
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.store-glass.slip-dock-force .slip-spacer,
body.store-glass.slip-dock-force .item-buy-spacer,
body.store-glass.item-checkout-open .slip-spacer,
body.store-glass.item-checkout-open .item-buy-spacer,
body.item-checkout-open .slip-spacer,
body.item-checkout-open .item-buy-spacer {
    display: block;
    height: 24px;
}

/* 支付区正下方主留白：盖住底栏高度，短屏也能点到支付芯片 */
body.store-glass.slip-dock-force .slip-spacer--pay,
body.store-glass.item-checkout-open .slip-spacer--pay,
body.item-checkout-open .slip-spacer--pay {
    height: 100px;
}

body.store-glass.slip-dock-force .slip-spacer--foot,
body.store-glass.item-checkout-open .slip-spacer--foot {
    height: 72px;
}

/* 支付区在底栏之上留空，避免短屏机被玻璃底栏盖住 */
body.store-glass.item-checkout-open .slip-pay,
body.store-glass.slip-dock-force .slip-pay {
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
}

body.store-glass.item-checkout-open .slip-page,
body.store-glass.slip-dock-force .slip-page {
    padding-bottom: 16px;
}

/* 桌面：永远藏悬浮底栏，用页内购买钮 */
@media (min-width: 992px) {
    body.store-glass .slip-page {
        max-width: 720px;
        padding: 16px 12px 32px;
    }

    body.store-glass .slip-media__img {
        max-height: 42vh;
    }

    body.store-glass .slip-title {
        font-size: 1.25rem;
    }

    body.store-glass .slip-row__lab {
        -webkit-flex-basis: 80px;
        flex-basis: 80px;
        width: 80px;
    }

    body.store-glass .slip-dock,
    body.store-glass .item-buy-dock,
    body.store-glass.slip-dock-force .slip-dock,
    body.store-glass.slip-dock-force .item-buy-dock,
    body.store-glass.item-checkout-open .slip-dock,
    body.store-glass.item-checkout-open .item-buy-dock {
        display: none !important;
    }

    body.store-glass.slip-dock-force .slip-spacer,
    body.store-glass.item-checkout-open .slip-spacer,
    body.store-glass .slip-spacer,
    body.store-glass .item-buy-spacer {
        display: none !important;
        height: 0 !important;
    }
}

/* 窄屏：页内购买钮保留作兜底 */
@media (max-width: 991px) {
    body.store-glass .slip-buy-desk {
        display: -webkit-box !important;
        display: -webkit-flex !important;
        display: flex !important;
    }
}

@media (max-width: 575.98px) {
    body.store-glass .slip-page {
        padding: 6px 6px 16px;
    }

    body.store-glass .slip,
    body.store-glass .slip-desc {
        border-radius: 12px;
    }

    body.store-glass .slip-title {
        font-size: 1rem;
    }

    body.store-glass .slip-head__price .price {
        font-size: 1.4rem;
    }

    body.store-glass .slip-media__img {
        max-height: 30vh;
    }

    body.store-glass .slip-page .pay-list .pay {
        -webkit-box-flex: 1;
        -webkit-flex: 1 1 42%;
        flex: 1 1 42%;
        max-width: 48%;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
    }
}

/* dark */
html[data-theme="dark"] body.store-glass .slip,
html[data-theme="dark"] body.store-glass .slip-desc {
    background: rgba(28, 24, 48, 0.82);
    background: var(--glass-strong, rgba(28, 24, 48, 0.72));
    border-color: rgba(255, 255, 255, 0.14);
    border-color: var(--glass-line-soft, rgba(255, 255, 255, 0.1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 32px rgba(0, 0, 0, 0.4);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    html[data-theme="dark"] body.store-glass .slip,
    html[data-theme="dark"] body.store-glass .slip-desc {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(28, 24, 48, 0.78);
        background: var(--glass-strong, rgba(28, 24, 48, 0.78));
    }
    html[data-theme="dark"] body.store-glass .slip::before,
    html[data-theme="dark"] body.store-glass .slip-desc::before {
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        backdrop-filter: blur(18px) saturate(140%);
        background: rgba(20, 16, 36, 0.22);
    }
}

html[data-theme="dark"] body.store-glass .slip-media {
    background: rgba(12, 14, 22, 0.55);
}

html[data-theme="dark"] body.store-glass .slip-media__img {
    background: transparent;
}

html[data-theme="dark"] body.store-glass .slip-media__thumbs {
    background: rgba(255, 255, 255, 0.04);
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body.store-glass .slip-title,
html[data-theme="dark"] body.store-glass .slip-desc__h,
html[data-theme="dark"] body.store-glass .slip-chip,
html[data-theme="dark"] body.store-glass .slip-page .sku,
html[data-theme="dark"] body.store-glass .slip-pick {
    color: var(--ink, #F4F2FF) !important;
}

html[data-theme="dark"] body.store-glass .slip-facts,
html[data-theme="dark"] body.store-glass .slip-sec__h,
html[data-theme="dark"] body.store-glass .slip-row__lab,
html[data-theme="dark"] body.store-glass .slip-field__hint {
    color: var(--muted, rgba(244, 242, 255, 0.5)) !important;
}

html[data-theme="dark"] body.store-glass .slip-fact::after {
    color: rgba(244, 242, 255, 0.25);
}

html[data-theme="dark"] body.store-glass .slip-head,
html[data-theme="dark"] body.store-glass .slip-sec {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] body.store-glass .slip-rows {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] body.store-glass .slip-row {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] body.store-glass .slip-chip,
html[data-theme="dark"] body.store-glass .slip-page .sku,
html[data-theme="dark"] body.store-glass .slip-pick,
html[data-theme="dark"] body.store-glass .slip-page .pay-list .pay,
html[data-theme="dark"] body.store-glass .slip-share {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] body.store-glass .slip-qty,
html[data-theme="dark"] body.store-glass .slip-page .item-qty {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #F4F2FF;
}

html[data-theme="dark"] body.store-glass .slip-page .item-qty__btn {
    color: #F4F2FF;
}

html[data-theme="dark"] body.store-glass .slip-input,
html[data-theme="dark"] body.store-glass .slip-page .slip-row .form-control {
    color: #F4F2FF !important;
}

html[data-theme="dark"] body.store-glass .slip-desc__body {
    color: rgba(244, 242, 255, 0.75);
}

html[data-theme="dark"] body.store-glass .slip-dock__bar,
html[data-theme="dark"] body.store-glass .item-buy-bar--float {
    background: rgba(28, 24, 48, 0.88);
    background: var(--glass-strong, rgba(28, 24, 48, 0.72));
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] body.store-glass .slip-head__price .price,
html[data-theme="dark"] body.store-glass .slip-dock__price .price {
    color: var(--primary, #6B9CFF);
}

html[data-theme="dark"] body.store-glass .slip-buy,
html[data-theme="dark"] body.store-glass .slip-buy-desk .slip-buy,
html[data-theme="dark"] body.store-glass .slip-chip.is-primary,
html[data-theme="dark"] body.store-glass .slip-page .sku.is-primary,
html[data-theme="dark"] body.store-glass .slip-dock .slip-buy,
html[data-theme="dark"] body.store-glass .item-buy-dock .buy-now {
    background: var(--primary, #1856FF) !important;
    color: #fff !important;
}

/* ========== image zoom lightbox ========== */
.slip-zoom {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 12000;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.slip-zoom[hidden] {
    display: none !important;
}

.slip-zoom__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(8, 10, 18, 0.82);
}

.slip-zoom__stage {
    position: relative;
    z-index: 1;
    max-width: 94vw;
    max-height: 86vh;
    padding: 0;
    -webkit-user-select: none;
    user-select: none;
}

.slip-zoom__img {
    display: block;
    max-width: 94vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.slip-zoom__close,
.slip-zoom__nav {
    position: absolute;
    z-index: 2;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

.slip-zoom__close {
    top: 12px;
    right: 12px;
    top: -webkit-calc(12px + constant(safe-area-inset-top));
    top: calc(12px + constant(safe-area-inset-top));
    top: -webkit-calc(12px + env(safe-area-inset-top));
    top: calc(12px + env(safe-area-inset-top));
}

.slip-zoom__nav--prev {
    left: 8px;
}

.slip-zoom__nav--next {
    right: 8px;
}

.slip-zoom__close .material-icons-outlined,
.slip-zoom__nav .material-icons-outlined {
    font-size: 24px;
}

.slip-zoom__counter {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    bottom: -webkit-calc(14px + constant(safe-area-inset-bottom));
    bottom: calc(14px + constant(safe-area-inset-bottom));
    bottom: -webkit-calc(14px + env(safe-area-inset-bottom));
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 2;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

body.slip-zoom-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .slip-zoom__nav {
        width: 36px;
        height: 36px;
    }

    .slip-zoom__img {
        max-width: 96vw;
        max-height: 78vh;
    }
}
