/* ==========================================================================
   设计系统 token（hyper[大图]）
   --------------------------------------------------------------------------
   只新增角色变量，不重命名既有类与既有规则；文件末尾的「设计系统基础层」用这些
   变量覆盖外观。品牌锚点：靛蓝 #4d55e8 / 链接蓝 #3369ff。
   ========================================================================== */
:root {
    /* 颜色角色 */
    --hy-bg: #fafafa;
    --hy-surface: #ffffff;
    --hy-surface-soft: #f5f6fb;
    --hy-surface-elevated: #ffffff;
    --hy-text: #232830;
    --hy-text-muted: #6c757d;
    --hy-text-soft: #868e96;
    --hy-border: #e3e6ee;
    --hy-border-strong: #cfd4e0;
    --hy-primary: #4d55e8;
    --hy-primary-dark: #3b41c4;
    --hy-primary-soft: #eef0ff;
    --hy-link: #3369ff;
    --hy-on-primary: #ffffff;
    --hy-success: #07bb07;
    --hy-success-soft: #e7f8e7;
    --hy-warning: #f0a020;
    --hy-warning-soft: #fff4e0;
    --hy-danger: #d0021b;
    --hy-danger-soft: #fdeaec;
    --hy-focus: #4d55e8;

    /* 形状与阴影 */
    --hy-radius-sm: 6px;
    --hy-radius: 10px;
    --hy-radius-lg: 14px;
    --hy-shadow-sm: 0 1px 2px rgba(35, 40, 48, .06);
    --hy-shadow: 0 6px 20px rgba(35, 40, 48, .08);
    --hy-shadow-lg: 0 18px 40px rgba(35, 40, 48, .12);

    /* 间距刻度（4px 基准） */
    --hy-space-1: 4px;
    --hy-space-2: 8px;
    --hy-space-3: 12px;
    --hy-space-4: 16px;
    --hy-space-5: 20px;
    --hy-space-6: 24px;
    --hy-space-8: 32px;
    --hy-space-10: 40px;
    --hy-space-14: 56px;

    /* 排版 */
    --hy-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --hy-text-xs: 12px;
    --hy-text-sm: 13px;
    --hy-text-base: 14px;
    --hy-text-md: 15px;
    --hy-text-lg: 17px;
    --hy-text-xl: 21px;
    --hy-text-2xl: 26px;
    --hy-text-3xl: 32px;

    /* 结构 */
    --hy-header-h: 70px;
    --hy-container: 1200px;
}

/* app-creative.min.css */
.modal-header {
    padding: 6px 12px !important;
}
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active:focus,
.btn-outline-primary:focus,
.btn-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus {
    box-shadow: none;
}
body, .wrapper, .content-page {
    overflow: visible;
}

/* header */
.header-navbar {
    height: 70px;
    background-color: #fff;
    box-shadow: 0 0 35px 0 rgb(154 161 171 / 15%);
}
.header-flex {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-title {
    font-size: 24px;
    font-weight: 700;
    display: inline-block;
    color: #000;
    margin-left: 10px;
    vertical-align: middle;
    font-family: "SimHei";
}

body {
    background-color: #fafafa;
    height: 100%;
}
body[data-leftbar-compact-mode=condensed] {
    min-height: 0;
}
body[data-layout=topnav] .content-page {
    padding: 0!important;
    min-height: 0;
}
.content {
    margin-bottom: 69px;
}
.page-title-right {
    display: block !important;
    float: right !important;
    margin-top: 17px !important;
}
@media screen and (max-width: 380px) {
    .app-search {
        width: 160px;
    }
}
.hyper-wrapper a {
    color: #000;
}
.hyper-footer {
    position: absolute;
    width: 100%;
    bottom: 0;
    padding: 20px 0;
    line-height: 16px;
    border-top: 1px solid rgba(152,166,173,.2);
    color: #98a6ad;
}
@media screen and (max-width: 768px) {
    .hyper-footer {
        text-align: center;
    }
}
.hyper-footer a {
    color: #919ca7;
}
@media screen and (max-width: 576px) {
    .container {
       padding: 0 12px;
    }
}
@media screen and (min-width: 576px) {
    .container {
       padding: 0;
    }
}
@media screen and (min-width: 992px) {
    .hyper-sm-last {
        -webkit-box-ordinal-group: 14;
        -ms-flex-order: 13;
        order: 13;
    }
}

/* Home Page */

/* modal-dialog */
.modal-body img {
    max-width: 100%;
    height: auto;
}
@media screen and (min-width: 1367px) {
    .modal-dialog {
        max-width: 900px !important;
    }
}
@media screen and (max-width: 1367px) {
    .modal-dialog {
        max-width: 700px !important;
    }
}
@media screen and (max-width: 768px) {
    .modal-dialog {
        max-width: 500px !important;
    }
}

/* Select Button */

.nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.nav-list::-webkit-scrollbar {
    display: none;
}
@media screen and (min-width: 767px) {
    .tab-link {
        min-width: 100px;
    }
}
@media screen and (max-width: 767px) {
    .tab-link {
        min-width: 60px;
    }
}
.tab-link {
    font-size: 1rem;
    padding: 6px 12px;
    border-radius: .5rem;
    border: 1px solid #3688fc;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tab-link.active {
    color: #fff;
    background: linear-gradient(-45deg, #3369ff, #3798f7);
}
.img-checkmark img {
    width: 36px;
}
.tab-link.active .img-checkmark {
    display: block;
}
.img-checkmark {
    position: absolute;
    opacity: 0.8;
    right: -6px;
    bottom: -12px;
    display: none;
}

/* Home Card */

.home-card {
    box-shadow: 0 3px 6px 0 rgb(0 0 0 / 12%);
    transition: all .5s;
}
.home-card:hover {
    box-shadow: 1px 3px 2px 0 rgb(0 0 0 / 5%);
}
@media screen and (max-width: 767px) {
    .hyper-wrapper {
        padding-left: 0;
        padding-right: 0;
        display: grid;
        grid-gap: 12px;
        gap: 12px;
    }
    .home-card {
        padding: 12px;
        margin-bottom: 0;
        font-size: 14px;
        display: flex;
        align-items: flex-start;
    	border-radius: 5px;
    	cursor: pointer;
        background-color: #fff;

    }
    .home-img {
        max-width: 80px;
        margin-right: 12px;
    }
    .flex {
        display: flex;
        flex-direction: column;
    }
    .name {
        font-size: 14px;
        min-height: 42px;
    	display: -webkit-box;
        -webkit-line-clamp: 2;
    	-webkit-box-orient: vertical;
    	overflow: hidden;
    	text-align: left;
    }
    .price {
        color: #d0021b;
    }
    .price b {
        font-size: 14px;
    }
}
@media screen and (min-width: 768px) {
    .hyper-wrapper {
        padding-left: 0;
        padding-right: 0;
        display: grid;
        grid-template-columns: repeat(3,minmax(0,1fr));
        grid-gap: 12px;
    }
    .home-card {
        padding: 32px 20px 14px 20px;
        font-size: 14px;
        display: flex;
        flex-direction: column;
    	border-radius: 5px;
    	cursor: pointer;
        background-color: #fff;
    }
    .home-img {
        max-width: 88%;
        margin: 0 auto auto auto;
    }
    .flex {
        display: flex;
        flex-direction: column;
        margin-top: 12px;
    }
    .name {
        font-size: 16px;
        min-height: 42px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price {
        color: #d0021b;
        text-align: center;
    }
    .price b {
        font-size: 24px;
    }
}

@media screen and (min-width: 992px) {
    .hyper-wrapper {
        padding-left: 0;
        padding-right: 0;
        display: grid;
        grid-template-columns: repeat(4,minmax(0,1fr));
        grid-gap: 12px;
    }
    .home-card {
        padding: 32px 20px 14px 20px;
        font-size: 14px;
        display: flex;
        flex-direction: column;
    	border-radius: 5px;
    	cursor: pointer;
        background-color: #fff;
    }
    .home-img {
        max-width: 88%;
        margin: 0 auto auto auto;
    }
    .flex {
        display: flex;
        flex-direction: column;
        margin-top: 12px;
    }
    .name {
        font-size: 16px;
        min-height: 42px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price {
        color: #d0021b;
        text-align: center;
    }
    .price b {
        font-size: 24px;
    }
}
@media screen and (min-width: 1320px) {
    .hyper-wrapper {
        padding-left: 0;
        padding-right: 0;
        display: grid;
        grid-template-columns: repeat(5,minmax(0,1fr));
        grid-gap: 12px;
    }
    .home-card {
        padding: 32px 20px 14px 20px;
        font-size: 14px;
        display: flex;
        flex-direction: column;
    	border-radius: 5px;
    	cursor: pointer;
        background-color: #fff;
    }
    .home-img {
        max-width: 88%;
        margin: 0 auto auto auto;
    }
    .flex {
        display: flex;
        flex-direction: column;
        margin-top: 12px;
    }
    .name {
        font-size: 16px;
        min-height: 42px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price {
        color: #d0021b;
        text-align: center;
    }
    .price b {
        font-size: 24px;
    }
}

/* Buy Page*/
.form-group h3 {
    font-weight: 400;
    color: #212529;
}
.geetest_holder.geetest_wind {
    width: 100% !important;
    min-width: 100% !important;
}
.buy-product img {
    max-width:100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
}
@media screen and (min-width: 992px) {
    .buy-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }
    .sticky {
        position: -webkit-sticky;
        position: sticky;
        top: 6px;
    }
    .buy-shop {
        grid-column: span 2 / span 2;
    }
    .buy-product {
        grid-column: span 4 / span 4;
    }
}
/* pay-type */
@media screen and (min-width: 1367px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,200px));
        grid-gap: 12px;
    }
}
@media screen and (min-width: 991px) and (max-width: 1367px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(1,minmax(0,300px));
        grid-gap: 6px;
    }
}
@media screen and (min-width: 768px) and (max-width: 991px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(4,minmax(0,200px));
        grid-gap: 12px;
    }
}
@media screen and (min-width: 576px) and (max-width: 768px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(3,minmax(0,200px));
        grid-gap: 12px;
    }
}
@media screen and (max-width: 576px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(2,minmax(0,200px));
        grid-gap: 12px;
    }
}
@media screen and (max-width: 380px) {
    .pay-grid {
        display: grid;
        grid-template-columns: repeat(1,minmax(0,300px));
        grid-gap: 6px;
    }
}
.pay-type {
    background-color: #fff;
    color: #000;
    border: 2px solid #bdcfe1;
}
.pay-type:hover {
    background-color: #fff;
    color: #000;
}
.pay-type.active {
    background-color: #fff;
    color: #3688fc;
    border: 2px solid #3688fc;
}
.buy-price {
    color: #ea5455;
}

/* Orderinfo Page */

.orderinfo-grid {
    display: grid;
    grid-template-columns: auto;
}
@media screen and (min-width: 767px) {
    .orderinfo-card-grid {
        display: grid;
        grid-template-columns: repeat(6,minmax(0,1fr));
        grid-gap: 12px;
    }
    .orderinfo-info {
        grid-column: span 2 / span 2;
    }
    .orderinfo-kami {
        grid-column: span 4 / span 4;
    }
}
@media screen and (max-width: 767px) {
    .orderinfo-info {
        display: grid;
        justify-content: center;
    }
}
.textarea-kami {
    min-height: calc(100% - 48px - 38px)
}
.kami-btn {
    margin-top: 6px;
    float: right;
}

/* Footer */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 99;
}
#back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    width: 44px;
    height: 44px;
}
body {
    /*background-image:url(https://file.olo4.com/images/rand/9.jpg) ;*/
    background-repeat:repeat;
    background-attachment:fixed;
    background-position:50% 50%;
}
.pay-type {
    display: inline-block;
    text-align: center;
    background: #f7f7f7;
    border: 2px solid #e7e7e7;
    border-radius: 5px;
    position: relative;
    padding: 6px 7px;
    margin-top: 5px;
    margin-right: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}
.pay-select {
    border: 2px solid #3369ff;
    background: #f8faff;
    color: #3369ff;
}
.tab-link {
    background-color: #fafbfe;
}
.stats-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 28px 26px 28px 30px;
    margin-bottom: 24px;
}
.stats-icon {
    display: block;
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(77,85,232,.09);
    /*background: var(--primary-light);*/
    color: #4d55e8;
    color: var(--primary);
    border-radius: 50%;
}
.stats-card i {
    font-size: 24px;
}
.stats-detail {
    margin-right: auto;
    margin-left: 24px;
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
}
.stats-icon-user {
    background: rgba(7,187,7,.13);
    /*background: var(--success--light);*/
    color: #07bb07;
    color: var(--success);
}
.edu-badge, .malus-invite-tips {
    cursor: pointer;
}
.malus-invite-tips {
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    background: var(--light);
    color: #868e96;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    padding: 3px 8px 3px 16px;
    text-align: center;
    border-radius: 20px 0 0 0;
}
.stats-member h6 {
    margin-top: 3px!important;
    font-size: 16px;
}
.stats-icon-time {
    background: rgba(253,151,68,.19);
    /*background: var(--orange-light);*/
    color: #fd9644;
    color: var(--orange);
}
.vip-center .card-header .card-title {
    font-size: 16px;
    font-weight: 700;
}
.btn-pill {
    border-radius: 10rem;
    padding-left: 1.5em;
    padding-right: 1.5em;
}
@media (min-width: 576px){
    .modal-sm {
        max-width: 600px !important;
    }
}
@media (max-width: 576px){
    .search-order {
        display: none;
    }
}
.order-table .table td {
    padding: 1.2rem 0 0 0 !important;
    vertical-align: center !important;
    border-top: 1px solid #f3f3f3;
}
.btn-outline-orange {
    background: rgba(7,187,7,.13);
    border: 1px solid var(--success);
    color: #07bb07;
    color: var(--success);
    background: none;
}
.overview {
    -webkit-box-align: center!important;
    -ms-flex-align: center!important;
    align-items: center!important;
}
.overview .card-title {
    font-size: 16px;
    font-weight: 600;
}
.affiliate-overview {
    align-items: center;
    display: flex;
    padding: 24px 24px 24px 48px;
}
.affiliate-overview .card {
    margin-right: 8px;
    height: 88px;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    width: 260px;
    box-shadow: none;
}

.affiliate-show-withdrowal-btn {
    margin: 0 12px 0 auto;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 56px;
    position: relative;
}
.bg-success {
    background-color: rgba(7,187,7,.13)!important;
    background-color: var(--success--light)!important;
}
.stamp {
    color: #fff;
    background: #868e96;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 48px;
    height: 48px;
    border-radius: 6px;
    margin-right: 24px!important;
}
@media (max-width: 768px){
    .affiliate-overview {
        align-items: flex-start;
        padding: 24px;
    }
    .affiliate-overview .card {
        margin-right: 0;
    }
    .affiliate-link, .affiliate-overview {
        flex-direction: column;
    }
    .affiliate-show-withdrowal-btn {
        margin-top: 24px;
        width: 100%;
    }
}
.stamp-md {
    line-height: 2.5rem;
}
.affiliate-overview .h4 {
    font-size: 26px;
}
.bg-success {
    background-color: rgba(7,187,7,.13)!important;
    /*background-color: var(--success--light)!important;*/
}
.bg-success i {
    color: #07bb07;
    color: var(--success);
}
.stamp i {
    font-size: 24px;
}
.contact {
    min-height: 136px;
}
.bg-red {
    background: rgba(235,87,87,.17)!important;
}
.bg-red i {
    color: #eb5757;
}
.invite-card .card-title {
    font-size: 16px;
    font-weight: 700;
}
.malus-share .list {
    padding-left: 18px;
    font-size: 14px;
}
.invite-table .table th {
    vertical-align: middle;
    line-height: 1;
}
.invite-table .table th {
    vertical-align: center !important;
    border-top: 1px solid #f3f3f3;
}
.withdrowal-setting .account-info {
    margin-bottom: 24px;
}
.withdrowal-setting .account-info .payment-type {
    margin-top: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 20px;
}
.withdrowal-setting .account-info .payment-type div.active {
    border: 1px solid #4d55e8;
}
.withdrowal-setting .account-info .payment-type div {
    cursor: pointer;
    width: 162px;
    height: 42px;
    background: #fff;
    border: 1px solid #e8e7f8;
    box-sizing: border-box;
    border-radius: 4px;
    margin-right: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}
.withdrowal-setting .account-info .payment-type div svg {
    margin-right: 8px;
}
.withdrowal-setting .account-info .account {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.withdrowal-setting .account-info .account .form-wrapper.account-name {
    width: 340px;
    margin-right: 16px;
}
.withdrowal-setting .account-info .account .form-wrapper .label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.withdrowal-setting .account-info .account .form-wrapper.account-name input {
    width: 100%;
}
.withdrowal-setting .account-info .account .form-wrapper input {
    background: #fff;
    border: 1px solid #dcdcdc;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 12px;
    line-height: 17px;
    display: flex;
    align-items: center;
    color: #7b7b7b;
    margin-right: 16px;
    padding: 0 12px;
    height: 46px;
    margin-bottom: 16px;
}
.withdrowal-setting .desc {
    margin-top: 18px;
    position: relative;
}
.withdrowal-setting .desc h4 {
    margin-bottom: 24px;
}
.withdrowal-setting .desc li {
    list-style: none;
    font-size: 12px;
    line-height: 17px;
    display: flex;
    align-items: center;
    color: #666;
    flex: none;
    order: 0;
    align-self: flex-start;
    margin-top: 12px;
}
.withdrowal-setting .desc button {
    margin-top: 42px;
    border-radius: 4px;
    width: 212px;
    height: 47px;
    float: right;
}
.invite-table .show-address {
    max-width: 180px;
}
.choose-tag {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0px;
}
.choose-tag .tag.active {
    border-color: #4d55e8;
    color: #4d55e8;
}
.choose-tag .tag {
    font-size: 15px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #e0e0e0;
    font-weight: 400;
    background: none;
    color: #333;
    position: relative;
    padding: 4px 8px;
    min-width: 100px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.choose-tag .tag .discount-tag {
    color: #fff;
    background: #ff4243;
    padding: 2px 6px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    margin-left: 4px;
    transform: scale(.9);
    margin-top: -1px;
}
.body-dark {
    background: #18191a !important;
}
.header-dark {
    background-color: #383838 !important;
}
.card-dark {
    background-color: #383838 !important;
}
.tab-link-dark {
    background-color: #383838 !important;
}
.home-card-dark {
    background-color: #383838 !important;
}
.form-control-dark {
    background-color: #383838 !important;
}
.card-header-dark {
    background-color: #383838 !important;
}
.modal-content-dark {
    background-color: #383838 !important;
}
.name-dark {
    color: #d2d2d2 !important;
}

/* ==========================================================================
   设计系统基础层（2026-10 重构）
   --------------------------------------------------------------------------
   本层只做两件事：
     1. 把 Bootstrap 4 既有组件的观感收敛到 token 上（颜色/圆角/间距/焦点）；
     2. 提供 ds-* 组件类，供新写的 markup 使用。
   不删除上面任何既有选择器，避免历史页面掉样式。
   ========================================================================== */

/* ---------- 基础排版与画布 ---------- */
/* 页面级 H1：直接放在内容流顶部（非 .page-title-box 包裹）时使用。
   字号与 .page-title 对齐，保证把 h4/h5 换成 h1 后视觉不变。 */
.ds-page-heading {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 var(--hy-space-4);
    color: var(--hy-text);
}

body.hyper-body,
.hyper-body {
    font-family: var(--hy-font-sans);
    font-size: var(--hy-text-base);
    line-height: 1.65;
    color: var(--hy-text);
    background-color: var(--hy-bg);
    -webkit-text-size-adjust: 100%;
}

.ds-container,
.hyper-body .container {
    width: 100%;
    max-width: var(--hy-container);
    margin-inline: auto;
    padding-inline: var(--hy-space-4);
    /* app-creative.min.css 里有一条 .container{min-width:992px!important}，
       会把 320–991px 的视口撑出横向滚动条，购买控件被推出屏幕。
       这里用同等权重 + !important 显式解掉，窄屏才能正常回流。 */
    min-width: 0 !important;
}

@media (max-width: 575.98px) {
    .ds-container,
    .hyper-body .container { padding-inline: var(--hy-space-3); }
}

/* 可见焦点：任何主题层都不得在没有替代方案的情况下移除焦点样式。 */
.hyper-body a:focus-visible,
.hyper-body button:focus-visible,
.hyper-body input:focus-visible,
.hyper-body select:focus-visible,
.hyper-body textarea:focus-visible,
.ds-btn:focus-visible,
.ds-nav-toggle:focus-visible,
.ds-tab:focus-visible {
    outline: 2px solid var(--hy-focus);
    outline-offset: 2px;
    border-radius: var(--hy-radius-sm);
}

/* ---------- 头部 ---------- */
.hyper-body .header-navbar,
.ds-header {
    background-color: var(--hy-surface);
    min-height: var(--hy-header-h);
    border-bottom: 1px solid var(--hy-border);
}

.ds-header__inner {
    gap: var(--hy-space-4);
    min-width: 0;
}

.ds-header__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--hy-space-2);
    min-width: 0;
    text-decoration: none;
}

.ds-header__brand img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.hyper-body .logo-title {
    font-family: var(--hy-font-sans);
    font-size: var(--hy-text-xl);
    font-weight: 700;
    color: var(--hy-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

@media (max-width: 767.98px) {
    .hyper-body .logo-title { font-size: var(--hy-text-lg); max-width: 52vw; }
}

/* ---------- 导航：结构化状态 ---------- */
.hyper-body .pc-nav-links { flex-wrap: wrap; justify-content: flex-end; }

.ds-nav-toggle {
    display: none;
    align-items: center;
    gap: var(--hy-space-2);
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    background: var(--hy-surface);
    border: 1px solid var(--hy-border-strong);
    border-radius: var(--hy-radius-sm);
    color: var(--hy-text);
    cursor: pointer;
}

.ds-nav-toggle[aria-expanded="true"] {
    background: var(--hy-primary-soft);
    border-color: var(--hy-primary);
    color: var(--hy-primary-dark);
}

.ds-nav-drawer {
    position: absolute;
    top: var(--hy-header-h);
    right: var(--hy-space-4);
    left: auto;
    z-index: 1040;
    min-width: 240px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - var(--hy-header-h) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    box-shadow: var(--hy-shadow-lg);
    padding: var(--hy-space-2) 0;
}

@media (max-width: 991.98px) {
    .ds-nav-toggle { display: inline-flex; }
    .ds-nav-drawer { display: none; }
    .ds-nav-drawer.is-open { display: block; }
}

/* 既有 .mobile-nav-menu 结构也走同一套观感 */
.hyper-body .mobile-nav-menu {
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    box-shadow: var(--hy-shadow-lg);
}

.hyper-body .mobile-nav-item:focus-visible {
    background: var(--hy-primary-soft);
    color: var(--hy-primary-dark);
}

/* 触控目标不小于 44px */
.hyper-body .btn {
    min-height: 36px;
    border-radius: var(--hy-radius-sm);
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .hyper-body .nav-cart-btn,
    .hyper-body .mobile-nav-item { min-height: 44px; }
}

/* ---------- 面包屑 ---------- */
.ds-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hy-space-2);
    list-style: none;
    margin: 0 0 var(--hy-space-4);
    padding: 0;
    font-size: var(--hy-text-sm);
    color: var(--hy-text-muted);
}

.ds-breadcrumb > li { display: inline-flex; align-items: center; gap: var(--hy-space-2); }

.ds-breadcrumb > li + li::before {
    content: "/";
    color: var(--hy-text-soft);
}

.ds-breadcrumb a {
    color: var(--hy-text-muted);
    text-decoration: none;
}

.ds-breadcrumb a:hover,
.ds-breadcrumb a:focus-visible { color: var(--hy-primary); text-decoration: underline; }

.ds-breadcrumb [aria-current="page"] { color: var(--hy-text); font-weight: 600; }

/* ---------- 区块与栅格 ---------- */
.ds-section { margin-bottom: var(--hy-space-10); }

.ds-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--hy-space-4);
    flex-wrap: wrap;
    margin-bottom: var(--hy-space-5);
    padding-bottom: var(--hy-space-3);
    border-bottom: 1px solid var(--hy-border);
}

.ds-section__title {
    margin: 0;
    font-size: var(--hy-text-xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--hy-text);
}

.ds-section__more {
    font-size: var(--hy-text-sm);
    color: var(--hy-link);
    text-decoration: none;
}

.ds-section__more:hover { text-decoration: underline; }

.ds-grid {
    display: grid;
    gap: var(--hy-space-5);
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.ds-grid--products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.ds-grid--articles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.ds-split {
    display: grid;
    gap: var(--hy-space-6);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
    .ds-split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
    .ds-split--reverse { grid-template-columns: 300px minmax(0, 1fr); }
}

.ds-sticky-aside { position: static; }

@media (min-width: 992px) {
    .ds-sticky-aside { position: sticky; top: calc(var(--hy-header-h) + var(--hy-space-4)); }
}

/* 窄屏下商品网格退化为单列，避免价格与按钮被压到不可读 */
@media (max-width: 575.98px) {
    .ds-grid--products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hy-space-3); }
}

@media (max-width: 359.98px) {
    .ds-grid--products { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 媒体容器：预留比例，消除 CLS ---------- */
.ds-media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--hy-surface-soft);
    border-radius: var(--hy-radius) var(--hy-radius) 0 0;
}

.ds-media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ds-media--1x1 { aspect-ratio: 1 / 1; }
.ds-media--4x3 { aspect-ratio: 4 / 3; }
.ds-media--3x2 { aspect-ratio: 3 / 2; }
.ds-media--16x9 { aspect-ratio: 16 / 9; }

/* 不支持 aspect-ratio 的旧内核兜底：用 padding 撑出 16:9 之外的比例由各自类覆盖 */
@supports not (aspect-ratio: 1 / 1) {
    .ds-media::before { content: ""; display: block; padding-top: 75%; }
    .ds-media--1x1::before { padding-top: 100%; }
    .ds-media--16x9::before { padding-top: 56.25%; }
    .ds-media > img { position: absolute; inset: 0; }
}

/* ---------- 卡片 ---------- */
.ds-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    overflow: hidden;
    box-shadow: var(--hy-shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.ds-card:hover,
.ds-card:focus-within {
    border-color: var(--hy-border-strong);
    box-shadow: var(--hy-shadow);
    transform: translateY(-2px);
}

.ds-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--hy-space-2);
    padding: var(--hy-space-4);
    flex: 1 1 auto;
    min-width: 0;
}

.ds-card__title {
    margin: 0;
    font-size: var(--hy-text-md);
    font-weight: 600;
    line-height: 1.45;
    color: var(--hy-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ds-card__title a { color: inherit; text-decoration: none; }
.ds-card__title a:hover { color: var(--hy-primary); }

.ds-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hy-space-2);
    font-size: var(--hy-text-xs);
    color: var(--hy-text-muted);
}

.ds-card__price { margin-top: auto; padding-top: var(--hy-space-2); }

.ds-card__cta { margin-top: var(--hy-space-2); }

/* 与既有 .home-card 结构兼容：统一成 token 外观 */
.hyper-body .home-card {
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    overflow: hidden;
    box-shadow: var(--hy-shadow-sm);
    transition: box-shadow .18s ease, transform .18s ease;
}

.hyper-body .home-card:hover {
    box-shadow: var(--hy-shadow);
    transform: translateY(-2px);
}

.hyper-body .home-card .home-img,
.hyper-body .home-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--hy-surface-soft);
}

/* ---------- 按钮 ---------- */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hy-space-2);
    min-height: 40px;
    padding: 0 var(--hy-space-4);
    font-size: var(--hy-text-base);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--hy-radius-sm);
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ds-btn--primary { background: var(--hy-primary); border-color: var(--hy-primary); color: var(--hy-on-primary); }
.ds-btn--primary:hover { background: var(--hy-primary-dark); border-color: var(--hy-primary-dark); color: var(--hy-on-primary); }

.ds-btn--secondary { background: var(--hy-surface); border-color: var(--hy-border-strong); color: var(--hy-text); }
.ds-btn--secondary:hover { border-color: var(--hy-primary); color: var(--hy-primary); }

.ds-btn--ghost { background: transparent; border-color: transparent; color: var(--hy-primary); }
.ds-btn--ghost:hover { background: var(--hy-primary-soft); }

.ds-btn--danger { background: var(--hy-danger); border-color: var(--hy-danger); color: #fff; }
.ds-btn--danger:hover { background: #b00116; border-color: #b00116; color: #fff; }

.ds-btn--sm { min-height: 32px; padding: 0 var(--hy-space-3); font-size: var(--hy-text-sm); }
.ds-btn--lg { min-height: 48px; padding: 0 var(--hy-space-6); font-size: var(--hy-text-lg); }
.ds-btn--block { display: flex; width: 100%; }
.ds-btn[disabled], .ds-btn.is-disabled { opacity: .55; cursor: not-allowed; }

/* 主购买按钮：既有 .btn-primary 收敛到品牌色 */
.hyper-body .btn-primary {
    background-color: var(--hy-primary);
    border-color: var(--hy-primary);
    color: var(--hy-on-primary);
}

.hyper-body .btn-primary:hover,
.hyper-body .btn-primary:focus {
    background-color: var(--hy-primary-dark);
    border-color: var(--hy-primary-dark);
}

.hyper-body .btn-outline-primary {
    border-color: var(--hy-primary);
    color: var(--hy-primary);
    background: transparent;
}

.hyper-body .btn-outline-primary:hover,
.hyper-body .btn-outline-primary:focus {
    background-color: var(--hy-primary-soft);
    border-color: var(--hy-primary);
    color: var(--hy-primary-dark);
}

/* ---------- 表单 ---------- */
.ds-field { margin-bottom: var(--hy-space-4); }

.ds-field__label,
.ds-fieldset__legend {
    display: block;
    margin-bottom: var(--hy-space-2);
    font-size: var(--hy-text-sm);
    font-weight: 600;
    color: var(--hy-text);
}

.ds-field__control {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: var(--hy-space-2) var(--hy-space-3);
    font-size: var(--hy-text-base);
    font-family: inherit;
    line-height: 1.5;
    color: var(--hy-text);
    background: var(--hy-surface);
    border: 1px solid var(--hy-border-strong);
    border-radius: var(--hy-radius-sm);
    transition: border-color .16s ease, box-shadow .16s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ds-field__control:focus {
    border-color: var(--hy-primary);
    box-shadow: 0 0 0 3px var(--hy-primary-soft);
    outline: none;
}

.ds-field__control[aria-invalid="true"],
.ds-field__control.is-invalid {
    border-color: var(--hy-danger);
}

.ds-field__hint {
    margin-top: var(--hy-space-1);
    font-size: var(--hy-text-xs);
    color: var(--hy-text-muted);
}

/* 错误提示同时用图标/文字与颜色表达，不依赖颜色单一维度 */
.ds-field__error {
    display: flex;
    align-items: flex-start;
    gap: var(--hy-space-1);
    margin-top: var(--hy-space-1);
    font-size: var(--hy-text-xs);
    font-weight: 600;
    color: var(--hy-danger);
}

.ds-field__error::before {
    content: "!";
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--hy-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.ds-fieldset {
    margin: 0 0 var(--hy-space-4);
    padding: 0;
    border: 0;
    min-width: 0;
}

/* 既有 Bootstrap 表单收敛到 token */
.hyper-body .form-control {
    min-height: 42px;
    border-color: var(--hy-border-strong);
    border-radius: var(--hy-radius-sm);
    color: var(--hy-text);
}

.hyper-body .form-control:focus {
    border-color: var(--hy-primary);
    box-shadow: 0 0 0 3px var(--hy-primary-soft);
}

.hyper-body .form-group > label { font-weight: 600; font-size: var(--hy-text-sm); }

/* 移动端字号不小于 16px 的输入框可避免 iOS 自动放大 */
@media (max-width: 575.98px) {
    .ds-field__control,
    .hyper-body .form-control { font-size: 16px; }
}

/* ---------- 徽标 / 价格 / 提示 ---------- */
.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--hy-space-1);
    padding: 2px var(--hy-space-2);
    font-size: var(--hy-text-xs);
    font-weight: 600;
    line-height: 1.6;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ds-badge--stock { background: var(--hy-success-soft); color: #056b05; border-color: #b7e6b7; }
.ds-badge--delivery { background: var(--hy-primary-soft); color: var(--hy-primary-dark); border-color: #ccd2ff; }
.ds-badge--new { background: var(--hy-warning-soft); color: #8a5a00; border-color: #f2d9a8; }
.ds-badge--muted { background: var(--hy-surface-soft); color: var(--hy-text-muted); border-color: var(--hy-border); }
.ds-badge--danger { background: var(--hy-danger-soft); color: #8c0112; border-color: #f2bcc3; }

.ds-price {
    display: inline-flex;
    align-items: baseline;
    gap: var(--hy-space-2);
    font-variant-numeric: tabular-nums;
}

.ds-price__amount {
    font-size: var(--hy-text-lg);
    font-weight: 700;
    color: var(--hy-danger);
    line-height: 1.2;
}

.ds-price__compare {
    font-size: var(--hy-text-xs);
    color: var(--hy-text-soft);
    text-decoration: line-through;
}

.hyper-body .price b { color: var(--hy-danger); font-size: var(--hy-text-lg); }

.ds-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--hy-space-2);
    padding: var(--hy-space-3) var(--hy-space-4);
    margin-bottom: var(--hy-space-4);
    font-size: var(--hy-text-sm);
    line-height: 1.6;
    border: 1px solid var(--hy-border);
    border-left-width: 4px;
    border-radius: var(--hy-radius-sm);
    background: var(--hy-surface);
    color: var(--hy-text);
}

.ds-alert--info { border-left-color: var(--hy-primary); background: var(--hy-primary-soft); }
.ds-alert--success { border-left-color: var(--hy-success); background: var(--hy-success-soft); }
.ds-alert--warning { border-left-color: var(--hy-warning); background: var(--hy-warning-soft); }
.ds-alert--danger { border-left-color: var(--hy-danger); background: var(--hy-danger-soft); }

/* ---------- 步骤 ---------- */
.ds-steps {
    display: grid;
    gap: var(--hy-space-4);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ds-step;
}

.ds-step {
    display: flex;
    gap: var(--hy-space-3);
    padding: var(--hy-space-4);
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
}

.ds-step__index {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hy-primary-soft);
    color: var(--hy-primary-dark);
    font-size: var(--hy-text-sm);
    font-weight: 700;
}

.ds-step__body { min-width: 0; }

/* ---------- 表格：窄屏不产生页面级横向滚动 ---------- */
.ds-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    background: var(--hy-surface);
}

.ds-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: var(--hy-text-sm);
}

.ds-table th,
.ds-table td {
    padding: var(--hy-space-3);
    text-align: left;
    border-bottom: 1px solid var(--hy-border);
    vertical-align: middle;
}

.ds-table th {
    background: var(--hy-surface-soft);
    font-weight: 600;
    color: var(--hy-text-muted);
    white-space: nowrap;
}

.ds-table tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 575.98px) {
    .ds-table { min-width: 0; }
    .ds-table th, .ds-table td { padding: var(--hy-space-2); }
}

/* ---------- 空状态 ---------- */
.ds-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hy-space-3);
    padding: var(--hy-space-14) var(--hy-space-4);
    text-align: center;
    background: var(--hy-surface);
    border: 1px dashed var(--hy-border-strong);
    border-radius: var(--hy-radius);
    color: var(--hy-text-muted);
}

.ds-empty__title {
    margin: 0;
    font-size: var(--hy-text-md);
    font-weight: 600;
    color: var(--hy-text);
}

.ds-empty__actions { display: flex; flex-wrap: wrap; gap: var(--hy-space-3); justify-content: center; }

/* ---------- 正文 ---------- */
.ds-prose {
    max-width: 72ch;
    font-size: var(--hy-text-md);
    line-height: 1.85;
    color: var(--hy-text);
    overflow-wrap: break-word;
}

.ds-prose--wide { max-width: none; }

.ds-prose h2 { margin: var(--hy-space-8) 0 var(--hy-space-3); font-size: var(--hy-text-xl); line-height: 1.35; }
.ds-prose h3 { margin: var(--hy-space-6) 0 var(--hy-space-2); font-size: var(--hy-text-lg); line-height: 1.4; }
.ds-prose p { margin: 0 0 var(--hy-space-4); }
.ds-prose a { color: var(--hy-link); text-decoration: underline; text-underline-offset: 2px; }
.ds-prose ul, .ds-prose ol { margin: 0 0 var(--hy-space-4); padding-left: 1.4em; }
.ds-prose li { margin-bottom: var(--hy-space-1); }
.ds-prose img { max-width: 100%; height: auto; border-radius: var(--hy-radius-sm); }
.ds-prose blockquote {
    margin: 0 0 var(--hy-space-4);
    padding: var(--hy-space-3) var(--hy-space-4);
    border-left: 3px solid var(--hy-primary);
    background: var(--hy-surface-soft);
    color: var(--hy-text-muted);
}
.ds-prose pre {
    margin: 0 0 var(--hy-space-4);
    padding: var(--hy-space-4);
    overflow-x: auto;
    background: #232830;
    color: #f1f3f8;
    border-radius: var(--hy-radius-sm);
    font-size: var(--hy-text-sm);
}
.ds-prose code { font-size: .95em; }
.ds-prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--hy-space-4); }
.ds-prose th, .ds-prose td { padding: var(--hy-space-2) var(--hy-space-3); border: 1px solid var(--hy-border); }

/* 长内容页面的锚点跳转要给固定头部留出空间 */
.ds-prose [id] { scroll-margin-top: calc(var(--hy-header-h) + var(--hy-space-4)); }

/* ---------- 目录 ---------- */
.ds-toc {
    padding: var(--hy-space-4);
    background: var(--hy-surface-soft);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius);
    font-size: var(--hy-text-sm);
}

.ds-toc ol { margin: 0; padding-left: 1.2em; }
.ds-toc li { margin-bottom: var(--hy-space-1); }
.ds-toc a { color: var(--hy-text-muted); text-decoration: none; }
.ds-toc a:hover, .ds-toc a:focus-visible { color: var(--hy-primary); text-decoration: underline; }

/* ---------- 标签页 ---------- */
.ds-tabs {
    display: flex;
    gap: var(--hy-space-2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--hy-border);
    margin-bottom: var(--hy-space-4);
}

.ds-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 var(--hy-space-4);
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--hy-text-muted);
    font-size: var(--hy-text-base);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.ds-tab[aria-selected="true"],
.ds-tab.is-active { color: var(--hy-primary); border-bottom-color: var(--hy-primary); }

/* ---------- 页脚 ---------- */
.hyper-body .hyper-footer,
.ds-footer {
    margin-top: var(--hy-space-14);
    padding: var(--hy-space-8) 0 var(--hy-space-6);
    background: var(--hy-surface);
    border-top: 1px solid var(--hy-border);
    color: var(--hy-text-muted);
    font-size: var(--hy-text-sm);
    position: static;
}

.ds-footer__cols { row-gap: var(--hy-space-5); }

.ds-footer__brand {
    font-size: var(--hy-text-md);
    font-weight: 700;
    color: var(--hy-text);
    margin-bottom: var(--hy-space-2);
}

.ds-footer__sep { margin: 0 var(--hy-space-2); color: var(--hy-border-strong); }

.hyper-body .hyper-footer a { color: var(--hy-text-muted); text-decoration: none; }
.hyper-body .hyper-footer a:hover,
.hyper-body .hyper-footer a:focus-visible { color: var(--hy-primary); text-decoration: underline; }

.ds-footer__legal img { max-width: 100%; height: auto; }

/* 返回顶部按钮：与右下角悬浮车错开，避免遮挡 */
.hyper-body .back-to-top { position: fixed; right: 18px; bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 99; }
.hyper-body #back-to-top { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 767.98px) {
    .hyper-body .back-to-top { right: 12px; bottom: calc(110px + env(safe-area-inset-bottom)); }
    .hyper-body #back-to-top { width: 40px; height: 40px; }
}

/* ---------- 共享局部模板的观感对齐 ---------- */
/* 这些组件各自的 <style> 已自带样式，这里只补 hover/焦点与窄屏可读性。 */
.hyper-body .friend-links { color: var(--hy-text-muted); }
.hyper-body .friend-links__items a:focus-visible { outline: 2px solid var(--hy-focus); outline-offset: 2px; }

.hyper-body .temporary-notice__button:focus-visible,
.hyper-body .theme-quick-cart__close:focus-visible,
.hyper-body .theme-quick-cart__submit:focus-visible,
.hyper-body .dj-pf__btn:focus-visible,
.hyper-body .dj-ps__btn:focus-visible {
    outline: 2px solid var(--hy-focus);
    outline-offset: 2px;
}

.hyper-body .seo-related-products__item a,
.hyper-body .seo-related-articles__item a { color: var(--hy-link); }

/* ---------- 图片兜底 ---------- */
.hyper-body img { max-width: 100%; }
.hyper-body .buy-product img,
.hyper-body .orderinfo-card-grid img { height: auto; }

/* 商品图与文章图统一预留比例，避免加载时跳动 */
.hyper-body .home-img,
.hyper-body .buy-product img {
    background-color: var(--hy-surface-soft);
}

/* ==========================================================================
   首页商品展示：卡片网格（对齐 apple_v5 的展示方式）
   --------------------------------------------------------------------------
   .hyper-wrapper 是既有的网格容器，这里只在其上追加 .hx-product-grid 的
   列数与间距；卡片本身用 hx-product* 这一套新类，结构与 av5-product 一致：
   媒体区（固定比例）→ 正文（分类 / 名称 / 属性）→ 底部（价格 / 真实销量 / 加购）。
   网格列数与 apple_v5 完全对齐，桌面与移动一致递减。
   ========================================================================== */

/* 商品区工具条已随首页标题条一并移除（首页不再输出标题文本块）。
   搜索功能保留在分类标签行右侧，见下方 .hx-catalog-bar。 */

/* 分类标签行 + 站内搜索 */
.hyper-body .hx-catalog-bar {
    display: flex;
    align-items: center;
    gap: var(--hy-space-3);
    /* 与上方区块（站点公告 / 成交滚动条）以及下方「全部商品」标题留出间距 */
    margin-top: var(--hy-space-2);
    margin-bottom: var(--hy-space-4);
}

/* 站点公告区块：上下都留出间距。
   首页第一个内容块，若不留上边距，白色公告卡会紧贴页头底边、看起来和 head 连成一块；
   下边距用于与成交滚动条/分类标签行拉开距离。 */
.hyper-body .hx-notice-row {
    margin-top: var(--hy-space-5);
    margin-bottom: var(--hy-space-5);
}

/* 公告关闭时，成交滚动条成为首个内容块，同样需要与页头留白 */
.hyper-body .purchase-info-container { margin-top: var(--hy-space-5); }

/* 内容区与页头之间留一条固定间距：
   页头不是 sticky，所以这里只需要一点留白，让每个页面的第一个内容块
   （公告卡 / 购买卡 / 统计卡 …）与 head 明确分开，不再贴在一起。 */
.hyper-body .content-page > .content > .container { padding-top: var(--hy-space-4); }

.hyper-body .hx-catalog-bar > .nav-list {
    flex: 1 1 auto;
    min-width: 0;
}

.hyper-body .hx-catalog-search {
    flex: 0 0 auto;
    width: 220px;
}

.hyper-body .hx-catalog-search .form-control {
    min-height: 36px;
    padding-right: 32px;
    font-size: var(--hy-text-sm);
}

.hyper-body .hx-catalog-search .uil-search {
    position: absolute;
    top: 50%;
    right: var(--hy-space-2);
    transform: translateY(-50%);
    font-size: var(--hy-text-md);
    color: var(--hy-text-soft);
    pointer-events: none;
}

/* 窄屏：标签行可横向滑动，搜索框独占一行放在标签下方 */
@media (max-width: 767.98px) {
    .hyper-body .hx-catalog-bar {
        flex-wrap: wrap;
        gap: var(--hy-space-2);
    }

    .hyper-body .hx-catalog-bar > .nav-list {
        flex: 1 1 100%;
        order: 1;
        padding-bottom: 6px;
    }

    .hyper-body .hx-catalog-search {
        flex: 1 1 100%;
        order: 0;
        width: auto;
    }
}

.hyper-body .hx-product-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.ds-grid--products,
.hx-product-grid { align-items: stretch; }

/* 桌面：最多 5 列，与 apple_v5 的 5 列一致 */
@media (min-width: 992px) {
    .hyper-body .hx-product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }
}

/* 平板：3 列 */
@media (max-width: 991.98px) {
    .hyper-body .hx-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
}

/* 手机：2 列 */
@media (max-width: 767.98px) {
    .hyper-body .hx-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
}

/* 超窄屏：单列，保证名称与按钮不被压扁 */
@media (max-width: 380px) {
    .hyper-body .hx-product-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 商品卡 ---------- */
/* 参考站的卡片构成：图片居中 → 商品名（两行）→ 底部「价格 + 真实已售/评分」，
   右下角一个圆形加购按钮。整卡是一个 <a>，所以按钮是 span[role=button]。
   这里用本主题的 token 重写，不照搬参考站的数值。 */
.hyper-body .hx-product {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 12px;
    color: var(--hy-text);
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: var(--hy-radius-sm);
    box-shadow: 0 3px 6px 0 rgb(0 0 0 / 8%);
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.hyper-body .hx-product:hover,
.hyper-body .hx-product:focus-visible {
    color: var(--hy-text);
    border-color: var(--hy-border-strong);
    box-shadow: 0 8px 20px 0 rgb(35 40 48 / 12%);
}

.hyper-body .hx-product.is-sold-out { opacity: .86; }

/* 图片：居中、定比，杜绝加载跳动 */
.hx-product__media {
    display: block;
    width: 100%;
    max-width: 88%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0 auto var(--hy-space-2);
    object-fit: contain;
    background: transparent;
}

/* 库存角标 */
.hx-stock-badge {
    position: absolute;
    top: var(--hy-space-2);
    right: var(--hy-space-2);
    padding: 3px 8px;
    font-size: var(--hy-text-xs);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: 999px;
}

.hx-stock-badge.is-stock { color: #087451; background: #def7ec; }
.hx-stock-badge.is-empty { color: #8a0112; background: #fdeaec; }

/* 正文：名称占满剩余高度，底部信息贴底 */
.hx-product__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

/* 名称固定两行高，保证卡片等高、网格不参差 */
.hx-product__name {
    display: -webkit-box;
    min-height: 2.96em;
    margin: 0 0 var(--hy-space-2);
    overflow: hidden;
    font-size: var(--hy-text-base);
    font-weight: 500;
    line-height: 1.48;
    color: var(--hy-text);
    text-align: left;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* 底部：左价格 + 真实已售/评分，右加购按钮留出位置 */
.hx-product__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--hy-space-2);
    min-width: 0;
    margin-top: auto;
    padding-right: 42px;
}

.hx-product__price {
    flex: 0 0 auto;
    min-width: 0;
    color: var(--hy-danger);
    font-variant-numeric: tabular-nums;
}

.hx-product__price p { margin: 0; }

.hx-product__price b {
    font-size: var(--hy-text-xl);
    font-weight: 700;
    line-height: 1.15;
}

/* 已售与评分由 common/home-product-stats 输出，这里对齐到右下 */
.hx-product__bottom .home-product-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    color: var(--hy-text-soft);
    font-size: var(--hy-text-xs);
    line-height: 1.35;
    white-space: nowrap;
}

.hx-product__bottom .home-product-stats i { margin-right: 2px; font-size: 1.05em; }
.hx-product__bottom .home-review-score { color: var(--hy-warning); }
.hx-product__bottom .is-empty { color: var(--hy-text-soft); }

/* 右下角圆形加购按钮 */
.hyper-body .home-cart-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: var(--hy-text-lg);
    color: var(--hy-primary);
    background: var(--hy-surface);
    border: 1px solid var(--hy-border);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgb(35 40 48 / 8%);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.hyper-body .home-cart-btn:hover,
.hyper-body .home-cart-btn:focus-visible {
    color: var(--hy-on-primary);
    background: var(--hy-primary);
    border-color: var(--hy-primary);
    transform: scale(1.06);
}

/* 窄屏：字号与触控目标收敛，按钮放大到 36px 保证可点 */
@media (max-width: 767.98px) {
    .hyper-body .hx-product { padding: 10px; }
    .hx-product__name { font-size: var(--hy-text-sm); }
    .hx-product__price b { font-size: var(--hy-text-lg); }
    .hx-product__bottom { padding-right: 38px; align-items: center; }
    .hx-product__bottom .home-product-stats { align-items: flex-start; }
    .hyper-body .home-cart-btn { width: 36px; height: 36px; right: 8px; bottom: 8px; }
}

/* 动效降级 */
@media (prefers-reduced-motion: reduce) {
    .hyper-body .hx-product,
    .hyper-body .home-cart-btn { transition: none; }
    .hyper-body .hx-product:hover { transform: none; }
    .hyper-body .home-cart-btn:hover { transform: none; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
    .ds-card,
    .ds-btn,
    .hyper-body .home-card,
    .hyper-body .btn {
        transition: none !important;
        transform: none !important;
    }
}

/* ---------- 打印 ---------- */
@media print {
    .ds-header,
    .hyper-body .hyper-footer,
    .hyper-body .back-to-top,
    .hyper-body .cart-float,
    .hyper-body .mobile-nav-menu { display: none !important; }
}

