/* ========== 重置 & 基础 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #e8e8e8;
    -webkit-font-smoothing: antialiased;
}

/* ========== 应用容器（统一页宽） ========== */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========== 顶部导航 ========== */
.header {
    background-color: #d43c33;
    color: #fff;
    padding: 0 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 200;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-with-actions {
    justify-content: space-between;
}

.header-title {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.header-btn:active {
    background-color: rgba(255,255,255,0.2);
}

/* ========== 搜索栏 ========== */
.search-bar {
    display: none;
    padding: 10px 12px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    align-items: center;
    gap: 10px;
}

.search-bar.active {
    display: flex;
}

.search-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #d43c33;
}

.search-close {
    background: none;
    border: none;
    color: #d43c33;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 4px;
    flex-shrink: 0;
}

/* ========== 公告栏 ========== */
.announcement-bar {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.announcement-icon {
    color: #aaa;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.announcement-text-wrapper {
    flex: 1;
    overflow: hidden;
}

.announcement-text {
    color: #888;
    font-size: 13px;
    white-space: nowrap;
    display: inline-block;
    animation: scroll-text 12s linear infinite;
    padding-left: 100%;
}

@keyframes scroll-text {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ========== Banner 轮播 ========== */
.banner-carousel {
    background-color: #fff;
    padding: 8px 12px 10px;
    flex-shrink: 0;
}

/* 宽高比 38%，约为 2.6:1，紧凑展示 */
.carousel-wrapper {
    position: relative;
    width: 100%;
    padding-top: 38%;
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-track {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

/* 左箭头：垂直居中，左侧内边 10px */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.30);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 10;
    padding: 0;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-prev:active,
.carousel-next:active {
    background-color: rgba(212, 60, 51, 0.85);
}

/* 指示点：水平居中，底部内边 8px */
.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background-color: #fff;
    width: 14px;
    border-radius: 3px;
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    padding: 12px;
    padding-bottom: 72px;
    background-color: #f8f8f8;
    overflow-y: auto;
}

/* ========== 区域标题 ========== */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 4px;
}

.section-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* ========== 首页商品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: #f5f5f5;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 5px; left: 5px;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
}

.product-tag {
    position: absolute;
    bottom: 5px; left: 5px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
}

.product-info {
    padding: 8px 8px 10px;
    text-align: center;
}

.product-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 14px;
    color: #d43c33;
    font-weight: 700;
    margin-bottom: 8px;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: #d43c33;
    border: none;
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.buy-btn:active {
    background-color: #b83228;
    transform: scale(0.95);
}

/* ========== 商品列表（全部商品页） ========== */
.product-list {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.product-list-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    gap: 12px;
    border-bottom: 1px solid #f3f3f3;
    cursor: pointer;
    transition: background-color 0.15s;
}

.product-list-item:last-child {
    border-bottom: none;
}

.product-list-item:active {
    background-color: #fef5f5;
}

.product-list-item.hidden {
    display: none;
}

.product-list-image {
    position: relative;
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-list-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.product-badge.small {
    font-size: 9px;
    padding: 1px 4px;
    top: 4px; left: 4px;
}

.product-list-info {
    flex: 1;
    min-width: 0;
}

.product-list-name {
    font-size: 15px;
    color: #333;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-list-price {
    font-size: 16px;
    color: #d43c33;
    font-weight: 700;
}

.cart-btn {
    width: 40px;
    height: 40px;
    background-color: #d43c33;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s, transform 0.1s;
}

.cart-btn:active {
    background-color: #b83228;
    transform: scale(0.92);
}

/* 加载更多 */
.load-more-wrapper {
    padding: 20px;
    text-align: center;
}

.load-more-btn {
    display: inline-block;
    padding: 9px 40px;
    border: 1px solid #ccc;
    border-radius: 22px;
    background-color: #fff;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:active {
    border-color: #d43c33;
    color: #d43c33;
}

/* 底部广告 */
.bottom-banner {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    background-color: #fff;
    border-top: 1px solid #e8e8e8;
    z-index: 200;
    height: 56px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    gap: 3px;
    transition: color 0.2s;
}

.nav-item.active {
    color: #d43c33;
}

.nav-item.active svg {
    stroke: #d43c33;
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(0,0,0,0.72);
    color: #fff;
    padding: 9px 20px;
    border-radius: 22px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 9999;
    white-space: nowrap;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ========== 联系客服页面 ========== */
.contact-page {
    padding: 20px 16px;
    padding-bottom: 80px;
    background-color: #f8f8f8;
    flex: 1;
}

.contact-qr-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.contact-qr-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-qr-card .card-title svg {
    color: #d43c33;
}

.qr-image-wrapper {
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    padding: 8px;
}

.qr-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.qr-id {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-info-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.contact-info-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 18px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f3f3f3;
}

.contact-info-card .card-title svg {
    color: #d43c33;
}

.contact-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f3f3;
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-row-icon {
    width: 32px;
    height: 32px;
    background-color: #fef0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.contact-row-icon svg {
    stroke: #d43c33;
}

.contact-row-content {
    flex: 1;
}

.contact-row-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.contact-row-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.contact-row-value a {
    color: #d43c33;
    text-decoration: none;
}

.contact-notice {
    background-color: #fff9f9;
    border: 1px solid #fde8e8;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.contact-notice svg {
    stroke: #d43c33;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-notice-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* ========== 订单弹窗 & 支付流程 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 500;
    align-items: flex-end;
    justify-content: center;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    display: flex;
}

.modal-container,
.modal-sheet {
    background-color: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 1;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:active {
    background-color: #f5f5f5;
}

.modal-body {
    padding: 20px;
    background-color: #fff;
}

/* 商品摘要 */
.order-product-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 20px;
}

.order-product-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background-color: #eee;
}

.order-product-detail {
    flex: 1;
    min-width: 0;
}

.order-product-detail .product-title {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-product-detail .product-price-summary {
    font-size: 16px;
    color: #d43c33;
    font-weight: 700;
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 0;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.step-dot .dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #ddd;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.step-dot.active .dot {
    background-color: #d43c33;
    color: #fff;
}

.step-dot.done .dot {
    background-color: #52c41a;
    color: #fff;
}

.step-dot .label {
    font-size: 11px;
    color: #999;
}

.step-dot.active .label {
    color: #d43c33;
}

.step-line {
    flex: 1;
    height: 1px;
    background-color: #ddd;
    margin-bottom: 18px;
}

/* 表单样式（订单填写） */
.order-form {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f0f0f0;
}

.order-form .form-group {
    margin-bottom: 18px;
}

.order-form .form-group:last-child {
    margin-bottom: 0;
}

.order-form .form-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 7px;
    font-weight: 500;
}

.order-form .form-label .required {
    color: #d43c33;
    margin-left: 2px;
}

.order-form .form-input,
.order-form .form-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
}

.order-form .form-input:focus,
.order-form .form-select:focus {
    border-color: #d43c33;
    box-shadow: 0 0 0 2px rgba(212,60,51,0.08);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #999;
    pointer-events: none;
}

/* 省市区三级联动 */
.region-selects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.region-select {
    height: 40px;
    padding: 0 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background-color: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 22px;
    transition: border-color 0.2s;
    width: 100%;
    cursor: pointer;
}

.region-select:focus {
    border-color: #d43c33;
    box-shadow: 0 0 0 2px rgba(212,60,51,0.08);
}

.region-select:disabled {
    background-color: #f8f8f8;
    color: #bbb;
    cursor: not-allowed;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background-color: #f5f5f5;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.qty-btn:active {
    background-color: #ebebeb;
}

.qty-value {
    width: 52px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    outline: none;
}

/* 支付方式选择 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 16px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    gap: 14px;
}

.payment-option:active {
    background-color: #fef5f5;
}

.payment-option.selected {
    border-color: #d43c33;
    background-color: #fff9f9;
}

.payment-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.payment-option-icon.balance-icon {
    background-color: #fff3e0;
}

.payment-option-icon.lakala-icon {
    background-color: #e8f5e9;
}

.payment-option-content {
    flex: 1;
}

.payment-option-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.payment-option-desc {
    font-size: 12px;
    color: #999;
}

.payment-option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.payment-option.selected .payment-option-radio {
    border-color: #d43c33;
}

.payment-option.selected .payment-option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #d43c33;
    border-radius: 50%;
}

.order-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.amount-label {
    font-size: 14px;
    color: #666;
}

.amount-value {
    font-size: 20px;
    color: #d43c33;
    font-weight: 700;
}

/* 拉卡拉支付区域 */
.lakala-form {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.lakala-form-title {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
    text-align: center;
}

.lakala-form .form-group {
    margin-bottom: 12px;
}

.lakala-form .form-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: block;
}

.lakala-form .form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fff;
}

.lakala-form .form-input:focus {
    border-color: #d43c33;
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 余额支付区域 */
.balance-display {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.balance-label {
    font-size: 12px;
    color: #999;
}

.balance-insufficient {
    font-size: 13px;
    color: #e74c3c;
    margin-top: 8px;
}

/* 提交按钮 */
.submit-order-btn {
    width: 100%;
    height: 48px;
    background-color: #d43c33;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
    margin-top: 20px;
}

.submit-order-btn:active {
    background-color: #b83228;
    transform: scale(0.98);
}

.submit-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 支付成功页 */
.pay-success {
    text-align: center;
    padding: 30px 0 10px;
}

.pay-success-icon {
    width: 64px;
    height: 64px;
    background-color: #f0fff4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid #52c41a;
}

.pay-success-icon svg {
    stroke: #52c41a;
}

.pay-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.pay-success-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
}

.pay-success-order {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    text-align: left;
    margin-bottom: 24px;
}

.pay-success-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.pay-success-row:last-child {
    border-bottom: none;
}

.pay-success-row .row-label {
    color: #888;
}

.pay-success-row .row-value {
    color: #333;
    font-weight: 500;
}

.back-home-btn {
    width: 100%;
    height: 44px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 10px;
    color: #555;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.back-home-btn:active {
    background-color: #ebebeb;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 更多商品按钮 ========== */
.more-products-wrapper {
    padding: 16px 0;
    text-align: center;
}

.more-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 32px;
    background-color: #fff;
    border: 2px solid #d43c33;
    border-radius: 25px;
    color: #d43c33;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.more-products-btn:active {
    background-color: #d43c33;
    color: #fff;
}

/* ========== 海报区域 ========== */
.poster-section {
    margin-top: 16px;
}

.poster-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poster-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 160px;
}

.poster-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== 分类筛选栏 ========== */
.category-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.category-bar .section-header {
    flex: 1;
    display: flex;
    align-items: center;
}

.product-count {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.category-btn:active {
    border-color: #d43c33;
    color: #d43c33;
}

/* ========== 分类选择面板 ========== */
.category-panel {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.category-panel.show {
    display: flex;
}

.category-tag {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 18px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tag:active,
.category-tag.active {
    background-color: #d43c33;
    color: #fff;
}

/* ========== 空列表提示 ========== */
.empty-list {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    background-color: #fff;
    border-radius: 10px;
}

.loading-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    background-color: #fff;
    border-radius: 10px;
}

/* ========== 图片放大弹窗 (Lightbox) ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    padding: 0;
    margin: 0;
    overflow: auto;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background-color 0.2s;
    padding: 0;
}

.lightbox-close:active {
    background-color: rgba(255, 255, 255, 0.4);
}

/* 让商品图片支持点击放大 */
.product-image {
    cursor: pointer;
    transition: opacity 0.15s;
}

.product-image:active {
    opacity: 0.8;
}

.product-list-image img {
    cursor: pointer;
    transition: opacity 0.15s;
}

.product-list-image img:active {
    opacity: 0.8;
}

/* ========== 分页样式 ========== */
.pagination-wrapper {
    padding: 20px 0;
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn:active,
.page-btn.active {
    background-color: #d43c33;
    border-color: #d43c33;
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-btn.prev,
.page-btn.next {
    padding: 0 8px;
}

.page-ellipsis {
    padding: 0 6px;
    color: #999;
}

.page-info {
    margin-top: 12px;
    font-size: 12px;
    color: #999;
}

/* ========== 响应式 ========== */
@media screen and (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-name { font-size: 12px; }
    .product-price { font-size: 13px; }
    .buy-btn { padding: 4px 10px; font-size: 11px; }
    .product-list-image { width: 70px; height: 70px; }
    .product-list-name { font-size: 14px; }
}

@media screen and (min-width: 481px) {
    .app-container {
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }
}

@media screen and (min-width: 768px) {
    body {
        padding: 20px 0;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .app-container {
        border-radius: 20px;
        overflow: hidden;
        min-height: calc(100vh - 40px);
    }

    .bottom-nav {
        border-radius: 0 0 20px 20px;
    }
}
