.goods-page {
    max-width: 540px;
    margin: 0 auto;
    min-height: 100vh;
    background: #eef1f6;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* ---------- 商品图轮播 ---------- */
.goods-swiper-wrap {
    position: relative;
}

.goods-swiper {
    /* 高度跟随屏幕宽度等比变化（页面最大宽度 540px），各分辨率下比例一致 */
    height: 100vw;
    max-height: 540px;
    background: linear-gradient(135deg, #2b3a75, #141d3f);
}

.goods-swiper .swiper-wrapper,
.goods-swiper .swiper-slide {
    height: 100%;
}

.goods-swiper-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;   /* 保持原图比例，居中裁剪，不会拉伸变形 */
    object-position: center;
}

.goods-swiper-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 10;
    min-width: 44px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 12px;
    text-align: center;
    pointer-events: none;
}

/* ---------- 信息卡片：价格/销量/标题/短描述 ---------- */
.goods-info {
    margin: 10px 12px 0;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
}

.goods-info-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.goods-price {
    display: flex;
    align-items: baseline;
    color: #ff3b30;
    font-size: 24px;
    font-weight: bold;
}

.goods-price em {
    font-style: normal;
    font-size: 14px;
    margin-right: 1px;
}

.goods-sales {
    font-size: 12px;
    color: #9aa3b2;
}

.goods-title {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #1b2a5e;
    line-height: 1.4;
    word-break: break-all;
}

.goods-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #8a93a6;
    line-height: 1.6;
    word-break: break-all;
}

/* ---------- 区块卡片 ---------- */
.goods-section {
    margin: 10px 12px 0;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
}

.goods-section-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #1b2a5e;
}

.goods-memo {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    word-break: break-all;
}

.goods-memo img {
    max-width: 100%;
}

/* ---------- 评价列表 ---------- */
.goods-comment-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f2f3f7;
}

.goods-comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.goods-comment-avatar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 50%;
    background: #e8ebf2;
}

.goods-comment-main {
    flex: 1;
    min-width: 0;
}

.goods-comment-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.goods-comment-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.goods-comment-time {
    font-size: 11px;
    color: #b6bdc9;
}

.goods-comment-stars {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.goods-star {
    margin-right: 2px;
}

.goods-star-on {
    color: #ff3b30;
}

.goods-star-off {
    color: #e0e3ea;
}

.goods-comment-content {
    margin-top: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    word-break: break-all;
}

.goods-comment-empty {
    padding: 16px 0 4px;
    text-align: center;
    font-size: 13px;
    color: #9aa3b2;
}

.goods-comment-loading,
.goods-comment-nomore {
    padding: 12px 0 2px;
    text-align: center;
    font-size: 12px;
    color: #b6bdc9;
}

/* ---------- 底部提示 ---------- */
.goods-footer-tip {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #b6bdc9;
}

/* ---------- 底部操作栏 ---------- */
.goods-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 540px;
    transform: translateX(-50%);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -2px 10px rgba(27, 42, 94, .08);
    box-sizing: border-box;
}

.goods-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    color: #666;
    font-size: 11px;
}

.goods-bar-item svg {
    margin-bottom: 2px;
}

.goods-bar-btn {
    flex: 1;
    height: 44px;
    line-height: 44px;
    margin-left: 12px;
    text-align: center;
    border-radius: 22px;
    background: linear-gradient(90deg, #ff9500, #ff5e1f);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* ---------- 联系客服弹窗 ---------- */
.goods-modal-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.goods-modal-mask.show {
    opacity: 1;
    visibility: visible;
}

.goods-modal {
    position: relative;
    width: 320px;
    padding: 28px 20px 20px;
    background: #fff;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    transform: scale(.85) translateY(10px);
    transition: transform .25s ease;
}

.goods-modal-mask.show .goods-modal {
    transform: scale(1) translateY(0);
}

.goods-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f2f3f7;
    color: #8a93a6;
    cursor: pointer;
}

.goods-modal-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #3d8bff, #2f7cf6);
    box-shadow: 0 4px 12px rgba(47, 124, 246, .35);
}

.goods-modal-title {
    margin-top: 10px;
    font-size: 17px;
    font-weight: bold;
    color: #1b2a5e;
}

.goods-modal-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #8a93a6;
}

.goods-modal-qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 196px;
    height: 196px;
    margin: 14px auto 0;
    padding: 8px;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}

.goods-modal-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.goods-modal-qrcode-empty {
    font-size: 13px;
    color: #b6bdc9;
}

.goods-modal-wx {
    margin-top: 12px;
    font-size: 13px;
    color: #555;
}

.goods-modal-wx span {
    color: #2f7cf6;
    font-weight: bold;
}

.goods-modal-btn {
    margin-top: 12px;
    height: 40px;
    line-height: 40px;
    border-radius: 20px;
    background: linear-gradient(90deg, #3d8bff, #2f7cf6);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- 下单预览页 ---------- */
.order-goods {
    display: flex;
    padding: 4px 0 12px;
    border-bottom: 1px solid #f2f3f7;
}

.order-goods-img {
    flex: none;
    width: 72px;
    height: 72px;
    margin-right: 10px;
    border-radius: 10px;
    background-color: #2b3a75;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.order-goods-info {
    flex: 1;
    min-width: 0;
}

.order-goods-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.order-goods-price {
    margin-top: 8px;
    color: #ff3b30;
    font-size: 18px;
    font-weight: bold;
}

.order-goods-price em {
    font-style: normal;
    font-size: 12px;
    margin-right: 1px;
}

.order-specs {
    margin-top: 6px;
}

.order-spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f2f3f7;
}

.order-spec-item:last-child {
    border-bottom: none;
}

.order-spec-price {
    color: #ff3b30;
    font-weight: bold;
}

/* ---------- 左上角浮动返回按钮 ---------- */
.goods-back-btn {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    left: max(12px, calc((100vw - 540px) / 2 + 12px));
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    cursor: pointer;
}

.goods-back-btn:active {
    background: rgba(0, 0, 0, .6);
}
