.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 1000px;
    z-index: -10;
    zoom: 1;
    background-color: #fff;
    background: url(/assets/luna/img/background.png) no-repeat;
    background-size: cover;
    -webkit-background-size: cover;
    -o-background-size: cover;
    background-position: center 0;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.noML {
    margin-left: initial !important;
}

.hide {
    display: none;
}

.layui-tab-title .layui-this:after {
    border-radius: 5px 5px 0 0;

}

.layui-tab-title .layui-this {
    color: #737373;
}

.layui-tab-title li {
    color: #737373;
}


/*极验*/
.geetest_holder.geetest_wind {
    display: inline-block;
    vertical-align: middle;
}

.notSelection {
    -moz-user-select: none;
    /*火狐*/
    -webkit-user-select: none;
    /*webkit浏览器*/
    -ms-user-select: none;
    /*IE10*/
    -khtml-user-select: none;
    /*早期浏览器*/
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/*滚动条重置*/
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    background-color: #F5F5F5;
}

::-webkit-scrollbar-track {
    background-color: #fff;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    /*border-radius: 10px;*/
    background-color: #AAA;
}

.layui-row {
    margin: 0 10px;
}

.header .header-box {
    /* Removed padding-top: 15px - use flex centering instead */
}

.header .header-box img {
    max-width: 150px;
    max-height: 45px;
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    .header .header-box {
        padding-top: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding-right: 15px;
        /* Right padding for button */
    }

    .header .header-box img {
        max-width: 120px;
        /* Resize logo to fit */
        max-height: 24px !important;
        /* Force small height for vertical centering */
        height: auto;
    }

    .header .header-box .info {
        display: none;
        /* Hide logo text on mobile to save space */
    }

    /* Mobile Query Button */
    .header .header-box .query {
        float: none !important;
        display: block !important;
        transform: scale(0.85);
        /* Slightly smaller */
        transform-origin: right center;
        margin: 0 !important;
    }

    /* Override PC float for query a */
    .header .header-box .query a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
}

/* Header Glassmorphism */
.header {
    background: rgba(235, 248, 255, 0.25) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    /* No vertical padding - use flex centering instead */
}

/* PC Header Styles */
@media (min-width: 769px) {
    .header {
        position: relative !important;
        height: 70px !important;
        padding: 0 !important;
        background: rgba(235, 248, 255, 0.25) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: block !important;
        margin-bottom: 10px !important;
        box-shadow: none !important;
    }

    /* Make Layui row fill header height */
    .header>.layui-row {
        height: 100% !important;
    }

    /* Make ALL Layui columns fill height and center content */
    .header .layui-col-md8,
    .header .layui-col-sm12,
    .header [class*="layui-col-"] {
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
    }

    .header .header-box {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
        width: 100%;
    }

    .header .header-box a.logo {
        display: inline-flex !important;
        align-items: center !important;
        height: 100%;
    }

    .header .header-box img {
        vertical-align: middle;
        max-height: 45px;
    }

    .header .header-box .query {
        float: none !important;
        display: flex !important;
        align-items: center !important;
        height: 100%;
    }

    .main {
        padding-top: 0 !important;
    }

    body>.main,
    .header+.main {
        padding-top: 0 !important;
    }

    .notice-box {
        margin-top: 0 !important;
    }
}

.header .header-box .info {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Logo Link - Horizontal Alignment */
.header .header-box a.logo {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none;
}

/* Floating Toggle Button (Secondary Pages) - Match Primary Toggle */
.order-m {
    position: fixed !important;
    bottom: 100px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    color: #fff !important;
    text-align: center !important;
    line-height: 60px !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    font-size: 28px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.order-m>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.order-m span#darkModeLabelAlt {
    font-size: 10px !important;
    margin-top: 2px;
}

body.dark-mode .order-m {
    background: #333333 !important;
    border: 1px solid #555;
    color: #f1c40f !important;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.header .header-box .query {
    display: inline-block;
    float: right;
}

.header .header-box .query a {
    color: #fff;
    display: inline-block;
    width: 119px;
    line-height: 35px;
    border-radius: 19px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
    background: #1E9FFF;
}

.header .header-box .query a svg {
    margin-left: 18px;
    margin-right: 5px;
    vertical-align: middle;
}

.header .header-box .notice {
    margin-top: 10px;
    padding: 0 15px;
}

.header .header-box .notice .tit {
    color: #545454;
    font-size: 14px;
    font-weight: 700;
}

.header .header-box .notice .tips {
    margin-top: 5px;
    color: #515a6e;
    font-size: 12px;
    line-height: 1.5;
}




.main .main-box {
    margin-top: 20px;
    background: rgba(235, 245, 255, 0.25);
    /* Ultra Transparency */
    backdrop-filter: blur(20px);
    /* Stronger blur */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 16px;
    /* Intermediate Roundness */
    padding: 15px 30px 30px 30px;
    /* Reduced Top Padding */
}

/* Notice Box Enhancement */
.notice-box {
    background: rgba(255, 255, 255, 0.2) !important;
    /* Almost clear */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    border-radius: 16px;
    /* Intermediate Roundness */
    overflow: hidden;
    margin-top: 15px !important;
    /* PC: Restore spacing */
    padding: 15px 20px !important;
    /* Add breathing room for text */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    /* Consistent Shadow */
}

@media (max-width: 768px) {
    .notice-box {
        margin-top: 0 !important;
        /* Mobile: Keep tight */
        padding: 15px 10px !important;
        /* Mobile: Wider text area */
        margin-bottom: 0 !important;
        /* Prevent double gap with Cate */
    }
}

/* Remove internal divider line and padding in Notice Box */
.notice-box .goods {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.notice-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(60, 140, 231, 0.05) 50%);
    pointer-events: none;
}

.main-box:after {
    /*伪元素是行内元素 正常浏览器清除浮动方法*/
    content: "";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

.main .title,
.main .cate,
.main .goods {
    margin: 0 20px;
}

.main .title {
    font-size: 20px;
    font-weight: 600;
    color: #545454;
}

.main .title svg,
.main .title img {
    vertical-align: middle;
}

.main .cate {
    padding-top: 20px;
    margin: 0 10px;
    font-size: 0;
}

/* Category Box Glass & Mobile Layout Fix */
.main .cate .cate-box {
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    min-width: 130px;
    background: rgba(235, 245, 255, 0.2);
    /* Ultra Transparent */
    border: 1px solid rgba(0, 0, 0, 0.15);
    /* Stronger Border for Day Mode */
    border-radius: 16px;
    /* Intermediate Roundness */
    height: 48px;
    /* Reduced Height (Compact) */
    line-height: 48px;
    /* Center Text */
    padding: 0 20px;
    margin: 0 10px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    margin-bottom: 10px;
    box-sizing: border-box;
    /* Important for width calc */
}

@media (max-width: 768px) {
    .main .cate {
        padding: 0 !important;
        /* Reset padding, use Title margin for gap */
        /* Restore top gap, keep side padding tight */
        /* H=10px distance from Announcement */
        /* Restore top gap, keep side padding tight */
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .main .cate .cate-box {
        width: 48%;
        /* Force 2 columns */
        min-width: 0;
        /* Override desktop min-width */
        margin: 0 0 10px 0;
        /* Remove horizontal margin, keep bottom */
        padding: 0 10px;
        /* Smaller padding inside */
    }
}

.main .cate .cate-box-select {
    background: #1E9FFF !important;
    -webkit-box-shadow: 0 7px 10px 0 rgba(54, 144, 248, .23);
    box-shadow: 0 7px 10px 0 rgba(54, 144, 248, .23);
    border: 1px solid transparent !important;
    /* Remove grey border */
    color: #fff !important;
    /* Ensure white text */
}

.main .cate .cate-box-select p,
.main .cate .cate-box-select div {
    color: #fff !important;
}

.main .cate .cate-box-select img {
    position: absolute;
    right: -6px;
    bottom: -19px;
}

.main .cate .cate-box p {
    font-weight: 400;
    font-size: 14px;
    color: #545454;
    margin-top: 12px;
}

.main .cate .cate-box-select p {
    color: #fff;
}

.main .cate .cate-box div {
    opacity: .76;
    color: #999;
    font-size: 13px;
    margin-top: 7px;
}

.main .cate .cate-box-select div {
    color: #fff;
}


.main .goods {
    margin-top: 10px;
    border-top: 1px solid #f7f7f7;
    padding-top: 10px;
    /* CSS Grid for responsive product layout */
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 15px !important;
}

.main .title-2 {
    margin-bottom: 10px;
    color: #545454;
    grid-column: 1 / -1;
    /* Title spans full width */
}

.main .title-2 svg,
.main .title-2 span {
    vertical-align: middle;
}

/* Goods Box Glass */
.main .goods .goods-box {
    padding: 18px;
    vertical-align: middle;
    min-height: 80px;
    background: rgba(235, 248, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .14);
    box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .14);
    border-radius: 16px;
    transition: all .3s;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* Fill grid cell */
    box-sizing: border-box;
}

.main .goods .picture {
    vertical-align: top;
    margin-right: 10px;
    display: inline-block;
    min-width: 80px;
    width: 80px;
    height: 80px;

}

.main .goods .picture img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.main .goods .msg {
    vertical-align: top;
    display: inline-block;
}

.main .goods .msg .goods-name {
    margin-bottom: 10px;
    color: #545454;
    font-size: 15px;
    font-weight: 400;
    margin-top: 5px;
}

.main .goods .msg .goods-price {
    color: #3C8CE7;
    font-size: 18px;
    font-weight: 700;
}

.main .goods .msg .goods-price span {
    font-size: 14px;
    vertical-align: bottom;
}

.main .goods .msg .goods-price div {
    display: inline-block;
    background: #ffebe8;
    color: #fb636b;
    padding: 1px 3px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

.main .goods .msg .goods-num {
    margin-top: 3px;
}

.main .goods .msg .goods-num div {
    display: inline-block;
    width: 53px;
    height: 5px;
    background: #f3f3f3;
    position: relative;
    border-radius: 3px;
}

.main .goods .msg .goods-num div p {
    display: inline-block;
    position: absolute;
    width: 40%;
    height: 100%;
    background: linear-gradient(55deg, #65d69e, #31dd92);
    border-radius: 3px;
}

.main .goods .msg .goods-num span {
    color: #0db26a;
    font-size: 13px;
    margin-left: 10px;
    margin-right: 18px;
}

/*手机端查单*/
.query-m {
    display: none;
    position: fixed;
    width: 60px;
    height: 60px;
    background: #1E9FFF;
    border-radius: 50%;
    right: 20px;
    bottom: 180px;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
}

.query-m a {
    width: 60px;
    height: 60px;
    display: inline-block;
}

.query-m svg {
    margin-left: 15px;
    margin-top: 6px;
}

.query-m span {
    color: #fff;
    display: block;
    text-align: center;
    margin-top: -5px;
    font-weight: 700;
}


/*扫码下单*/
.order-m {
    cursor: pointer;
    position: fixed;
    width: 70px;
    height: 70px;
    background: #1E9FFF;
    border-radius: 50%;
    right: 100px;
    bottom: 20%;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
}

.order-m a {
    width: 70px;
    height: 70px;
    display: inline-block;
}

.order-m svg {
    margin-left: 17.5px;
    margin-top: 6px;
}

.order-m span {
    color: #fff;
    display: block;
    text-align: center;
    margin-top: -4px;
    font-weight: 700;
}

.buy {
    text-align: center;
    margin-top: 10px;
}

.buy button {
    border: initial;
    color: #fff;
    display: inline-block;
    width: 170px;
    font-size: 18px;
    font-weight: 700;
    line-height: 45px;
    border-radius: 100px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
    background: #1E9FFF;
}

.intro {
    padding: 10px 20px;
    color: #444444;
    font-size: 14px;
    line-height: 2.2;
    letter-spacing: .5px;
    font-weight: 700;
}

/*底部*/
.footer {
    margin-top: 50px;
    margin-bottom: 15px;
    text-align: center;
    color: #9a9a9a;
}


/*首页提示框*/
.home-tips {
    border-radius: 12px !important;
}

.home-tips .layui-layer-title {
    background: #1E9FFF;
    color: #e60000 !important;
    height: 40px;
    line-height: 40px;
    border-radius: 10px 10px 0 0;
    background-color: initial;
    border-bottom: initial;
    font-size: 20px;
    /* Increased from 16px */
    font-weight: 700;
    text-align: center;
    padding: initial;
    overflow: hidden;
}

.home-tips .layui-layer-title svg path {
    fill: #e60000 !important;
}

.home-tips .layui-layer-setwin {
    color: #fff;
    position: absolute;
    top: initial;
    bottom: -50px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 30px;
    height: 30px;
}

.home-tips .layui-layer-setwin a {
    position: initial;
}

.home-tips .layui-layer-content {
    padding: 10px 20px;
    color: #444444;
    font-size: 15px;
    line-height: 2.2;
    letter-spacing: .5px;
    font-weight: 700;
    word-wrap: break-word;
    word-break: normal;
}

/*扫码*/
.qr {
    text-align: center;
    position: relative;
}

.qr svg {
    display: block;
    margin: 0 auto;
}

.qr img {
    height: 300px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/*购买页*/
.main-box .goods-img {
    margin-left: 20px;
    margin-right: 10px;
    margin-top: 10px;
    width: calc(100% - 30px);
    height: 0;
    position: relative;
    padding-bottom: calc(100% - 40px);
}

.main-box .goods-msg {
    margin-right: 20px;
    margin-left: 10px;
    margin-top: 20px;
}

.main-box .goods-img img {
    width: calc(100% - 10px);
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
    border-radius: 5px;
    margin-top: 5px;
    /*padding: 5px;*/
    height: 100%;
    position: absolute;
    object-fit: cover;
}

.main-box .goods-msg .goods-name {
    font-weight: 700;
    font-size: 18px;
    color: #545454;
    border-bottom: 1px solid #f7f7f7;
    padding-bottom: 5px;
}

.layui-form-select dl dd.layui-this {
    /*修改下拉框的颜色*/
    background-color: #22b6f2;
}

/*tips*/
.small-tips {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
    line-height: initial;
}

.tips-cyan {
    background: #ccdcf6;
    color: #2F4056;
}

.tips-pink {
    background: #ffebe8;
    color: #fb636b;
}

.tips-green {
    background: #dff7ea;
    color: #28C76F;
}

.tips-yellow {
    background: #fbf7da;
    color: #d6b900;
}

.tips-blue {
    background: #cadbff;
    color: #3C8CE7;
}

.tips-red {
    background: #ffd3d3;
    color: #FA016D;
}

.tips-black {
    background: #262626;
    color: #ffffff
}

.pay {
    margin-top: 20px;
    border-top: 1px solid #f7f7f7;
    padding-top: 10px;
}

.pay-type {
    display: inline-block;
    text-align: center;
    background: #f7f7f7;
    border: 2px solid #e7e7e7;
    border-radius: 5px;
    position: relative;
    padding: 7px 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.pay-type svg {
    vertical-align: middle;
}

.pay-select {
    border: 2px solid rgb(51, 105, 255);
    background: rgb(248, 250, 255);
    color: rgb(51, 105, 255);
}

.sale {
    margin-top: 5px;
    margin-left: -5px;
}

.sale .small-tips {
    margin-bottom: 5px;
}

.l-msg {
    color: #999;
    width: 72px;
    display: inline-block;
    vertical-align: middle;
}

.price {
    margin-top: 5px;
}

.price .price-sign {
    color: #e4393c;
    font-size: 16px;
}

.price .price-num {
    color: #e4393c;
    font-size: 22px;
}

.price .price-c {
    margin-left: 5px;
    color: #666;
    font: 12px/150% tahoma, arial, Microsoft YaHei, Hiragino Sans GB, "\u5b8b\u4f53", sans-serif;
}

.entry {
    margin-top: 15px;
}

.pay-num {
    width: 50px !important;
    text-align: center;
    font-size: 20px !important;
}

.sub svg,
.add svg {
    vertical-align: middle;
    margin-top: -7px;
    cursor: pointer;
}

.input input {
    display: inline-block;
    padding: 0 5px;
    height: 35px;
    width: 300px;
    font-weight: 500;
    font-size: 14px;
    color: #999;
    background: #fff;
    border: 1px solid #f0f0f0;
    -webkit-box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .07);
    box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .07);
    border-radius: 4px;
    overflow: hidden;
}

.code img {
    height: 35px;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    vertical-align: middle;
    margin-top: -3px;
}

.code input {
    width: 178px !important;
}

#wait-geetest-captcha {
    color: #999;
}

.err_title {
    color: #545454;
    font-size: 20px;
    font-weight: 700;
    margin-top: 20px;
}

.err_content {
    margin-top: 30px;
    margin-bottom: 30px;
    color: #737373;
}

.err_but {
    padding-bottom: 100px;
}

.btn a,
.btn button {
    border: initial;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    width: 160px;
    height: 40px;
    line-height: 40px;
    margin-top: 15px;
    border-radius: 100px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: 0 5px 6px 0 rgba(73, 105, 230, .22);
    background: #1E9FFF;
}

.pay-title {
    color: #737373;
    font-weight: 700;
    font-size: 20px;
    margin: 0 15px;
}

.order-list {
    margin-left: initial;
    margin-right: initial;
    margin-top: 10px;
    border-bottom: 1px solid #f7f7f7;
    padding-bottom: 5px;
}

.info-ui {
    color: #737373;
}

.info-ui strong {
    width: 30%;
    margin-bottom: 3px;
    text-align: right;
    display: inline-block;
}

.order-info {
    width: calc(100% - 12px);
    height: 75px;
    overflow-wrap: break-word;
    padding: 5px;
    overflow: auto;
    resize: none !important;
    border: 1px solid #f0f0f0;
    -webkit-box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .07);
    box-shadow: 0 4px 10px 0 rgba(135, 142, 154, .07);
    border-radius: 4px;
}

/*手机端适应*/
@media (max-width: 768px) {
    body {
        background: initial;
    }

    .header {
        background-image: none;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        color: #333;
        height: 50px !important;
        margin-bottom: 10px !important;
        border-radius: 0 !important;
        overflow: visible;
        display: block !important;
        /* Block to allow layui grid to work */
        padding: 0 !important;
    }

    /* Target the layui row inside header */
    .header>.layui-row {
        height: 100%;
    }

    /* Target the layui column */
    .header .layui-col-sm12 {
        height: 100%;
        padding: 0 10px;
        /* Side padding to match announcement */
    }

    .header .header-box {
        width: 100%;
        height: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    .header .info {
        color: #333 !important;
        display: inline-block !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        margin-left: 8px;
        vertical-align: middle;
    }

    .header .header-box img {
        max-width: 120px;
        max-height: 36px !important;
        /* Larger logo than text */
        height: auto;
        display: inline-block;
        vertical-align: middle;
    }

    .header .header-box a.logo {
        display: flex !important;
        align-items: center !important;
    }

    /* Fix Query Button Alignment */
    .header .header-box .query {
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        float: none !important;
        /* Remove float for flex alignment */
    }

    /* Category Grid - 2 Columns on Portrait */
    .main .cate {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .main .cate .cate-box {
        width: calc(50% - 15px) !important;
        /* 2 columns with gap */
        min-width: unset !important;
        margin: 0 5px 10px 5px !important;
        box-sizing: border-box !important;
    }


}



/* PC Header Alignment */
@media (min-width: 769px) {
    .header .header-box {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100%;
        float: none !important;
        /* Clear legacy float */
    }

    .header .header-box .logo-area {
        display: flex;
        align-items: center;
    }

    .header .header-box .query {
        float: none !important;
        display: flex;
        align-items: center;
        height: 100%;
    }

    /* Ensure PC Logo Vertically Centered */
    .header .header-box img {
        display: block;
        vertical-align: middle;
    }
}

/* Category Box Centering & Bold */
.main .cate .cate-box {
    display: inline-flex !important;
    /* Use Flex for centering */
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    /* Bold Text */
    vertical-align: middle;
    /* ... existing styles ... */
    overflow: hidden;
    min-width: 130px;
    background: rgba(235, 245, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    height: 48px;
    padding: 0 20px;
    margin: 0 10px 10px 10px;
    /* Margin bottom included */
    cursor: pointer;
    box-sizing: border-box;
}

.main .cate .cate-box p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
    /* Reset line-height */
}

.query-m {
    display: initial;
}

.order-m {
    display: none;
}

.input input {
    width: calc(100% - 95px);
}

.code input {
    width: calc(100% - 219px) !important;
}

.main-box .goods-msg {
    margin-left: 20px;
}

.main .goods .goods-price div {
    margin-bottom: 5px;
}

.geetest_holder.geetest_wind {
    margin-top: 10px;
}



.order-info {
    margin-top: 10px;
}

/* Divider/Product Area */
.main .goods {
    margin-top: 0 !important;
    /* Let Button margin handle the 10px gap */
    padding-top: 10px !important;
    /* 10px gap below the line */
}

/* "Select Category" Title */
.main .title {
    margin-top: 10px !important;
    /* H=10px gap from Notice */
    margin-bottom: 10px !important;
    /* H=10px gap to Buttons */
}

/* "Select Goods" Title */
.main .title-2 {
    margin-top: 0 !important;
    /* Rely on .goods padding for 10px gap */
    margin-bottom: 10px !important;
    /* H=10px gap to Products */
}

/* Reduce side margins for inner content to align with container padding */
.main .title,
.main .cate,
.main .goods {
    margin: 0 !important;
}

/* Reduce gap between Title and Buttons/Cards */
.main .title,
.main .title-2 {
    margin-bottom: 10px !important;
}

/* PC: Let goods-box adapt to grid columns */
.main .goods .goods-box {
    margin-bottom: 10px !important;
    box-sizing: border-box;
}

/* Wider Content on Mobile */
/* Wider Content on Mobile - RESTORED GLOBAL PADDING */
.main .main-box {
    padding: 15px 10px 30px 10px;
    margin-top: 10px !important;
}

@media (max-width: 768px) {
    .main .goods .goods-box {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 425px) {
    .main .cate .cate-box {
        min-width: calc(50% - 60px);
    }
}

/* --- FIXED RESPONSIVE GRID --- */
.main .goods {
    display: block !important;
    /* Stack Title and List vertically */
    width: 100% !important;
    margin: 0 !important;
    padding-top: 10px !important;
}

.main .goods .goods-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)) !important;
    gap: 10px 15px !important;
    /* Row 10px, Col 15px */
    width: 100% !important;
    box-sizing: border-box !important;
}

.main .goods .goods-box {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    box-sizing: border-box !important;
}

/* Product Name: Wrap on PC, No-Wrap on Mobile */
.main .goods .msg .goods-name {
    white-space: normal !important;
    /* Allow wrap on PC */
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: 100%;
    line-height: 1.4;
    /* Better readability */
}

@media (max-width: 768px) {
    .main .goods .msg .goods-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Fix Notice */
.main-box .notice-inner .tips {
    display: block !important;
    width: 100% !important;
}

.main-box .notice-inner .tips p {
    margin: 0;
    width: 100%;
}

/* --- MOBILE/TABLET COMPACT LAYOUT (Buy Page) --- */
@media (max-width: 992px) {

    /* 1. Reset Form Layout to Flex */
    .main-box form.layui-form {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start;
    }

    /* 2. Image Area: Fixed Width Left */
    .img-container-mobile {
        width: 140px !important;
        /* Fixed width for icon area */
        padding-right: 15px !important;
        margin-bottom: 0 !important;
        /* Remove bottom margin */
        order: 1;
        flex-shrink: 0;
        /* Prevent shrinking */
    }

    .goods-img {
        text-align: left;
        /* Alignment */
        height: auto !important;
        padding-bottom: 0 !important;
        width: auto !important;
        margin: 0 !important;
    }

    .goods-img img {
        width: 120px !important;
        /* Approx 1/3 of PC size (300-400px) */
        height: 120px !important;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        position: static !important;
        /* Reset absolute positioning */
        margin: 0 !important;
    }

    /* 3. Unwrap Containers */
    .goods-msg-wrapper-mobile,
    .goods-msg {
        display: contents !important;
    }

    /* 4. Header Info: Right Side (Remaining Width) */
    .goods-header-info {
        width: calc(100% - 140px) !important;
        /* Fill rest */
        order: 2;
        padding-left: 0 !important;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    .goods-header-info .goods-name {
        font-size: 18px;
        font-weight: bold;
        line-height: 1.4;
        margin-bottom: 10px;
        white-space: normal;
        /* Allow title to wrap naturally */
    }

    /* 5. Inputs: Full Width */
    .goods-payment-form {
        width: 100% !important;
        order: 3;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    /* 6. Fix Submit Button Order */
    .layui-col-sm12.buy {
        width: 100% !important;
        order: 4;
        margin-top: 20px;
    }

    .goods-payment-form .entry {
        margin-bottom: 15px;
    }

    /* Fix mobile stacked alignment and width */
    .order-list .layui-col-md4 {
        margin-bottom: 15px;
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Force full width buttons on mobile */
    .info-box .btn a,
    .info-box .btn button {
        width: 100% !important;
    }

    /* Mobile Only Visibility */
    .mobile-pay-btn {
        display: block !important;
        width: 100%;
        margin-bottom: 8px;
    }

    /* Desktop Only Visibility */
    .desktop-pay-btn {
        display: none !important;
    }
}

/* Wide View Visibility Defaults */
@media screen and (min-width: 769px) {
    .mobile-pay-btn {
        display: none !important;
    }

    .desktop-pay-btn {
        display: block !important;
        width: 100%;
        margin-top: auto;
    }
}

/* Wide view textarea gap */
.order-info {
    margin-bottom: 8px !important;
}

/* Remove bottom margin for the last column on mobile if needed, but margin-bottom is safer for stacking */

/* Dark Mode Button Overrides */
/* Dark Mode Button Overrides */
body.dark-mode .layui-btn-normal,
body.dark-mode .btn a,
body.dark-mode .btn button,
body.dark-mode .buy button,
body.dark-mode .header .header-box .query a,
body.dark-mode .main .cate .cate-box-select,
body.dark-mode .query-m,
body.dark-mode .order-m {
    background-color: #3F5C7A !important;
}

body.dark-mode .clipboard-but {
    background-color: #3F5C7A !important;
}

/* Light Mode Pale Blue Glass Effect */
body:not(.dark-mode) .main .main-box {
    background-color: rgba(235, 248, 255, 0.65) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Light Mode Glassmorphism for Home Tips (Modal) */
body:not(.dark-mode) .home-tips {
    background-color: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Dark Mode Rich Text & Modal Fixes */
/* Fix for "Purchase Prompt" Modal (home-tips skin) */
body.dark-mode .home-tips {
    background-color: #2b303b !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

/* Fix for Product Description (.intro) and Modal Content */
body.dark-mode .home-tips .layui-layer-content,
body.dark-mode .intro {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Deep override to strip inline styles from rich text editors */
/* This forces all internal text elements to inherit the dark theme colors */
body.dark-mode .home-tips .layui-layer-content *,
body.dark-mode .intro * {
    background-color: transparent !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Ensure images inside rich text remain visible */
body.dark-mode .home-tips .layui-layer-content img,
body.dark-mode .intro img {
    background-color: transparent !important;
}