/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent-light: #ff6b6b;
    --blue: #0f3460;
    --bg-main: #f5f5f7;
    --bg-white: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #eeeeee;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
}

html, body {
    font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ===== 页面容器 ===== */
.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 70px;
    background: var(--bg-main);
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 搜索栏 ===== */
.search-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 12px 16px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== 轮播图 ===== */
.banner-section {
    position: relative;
    margin: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.banner-slider {
    position: relative;
    overflow: hidden;
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-slide {
    position: relative;
    min-width: 100%;
    height: 160px;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.banner-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.banner-text p {
    font-size: 12px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    right: 16px;
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 16px;
    border-radius: 3px;
    background: #fff;
}

/* ===== 分类入口 ===== */
.category-section {
    padding: 16px;
    background: var(--bg-white);
    margin: 0 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: scale(1.05);
}

.category-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.category-item span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== 秒杀区块 ===== */
.flash-sale-section {
    padding: 16px;
    margin: 12px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.flash-icon {
    font-size: 20px;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.flash-timer {
    font-family: "DIN Alternate", "Roboto", monospace;
    font-size: 14px;
    color: var(--accent);
}

.timer-num {
    background: var(--accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
}

.flash-products {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.flash-products::-webkit-scrollbar {
    display: none;
}

.flash-product-item {
    flex-shrink: 0;
    width: 100px;
    background: linear-gradient(145deg, #fff5f6, #fff);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.flash-product-item:hover {
    transform: translateY(-2px);
}

.flash-product-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.flash-product-item .flash-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.flash-product-item .flash-original {
    font-size: 11px;
    color: var(--text-light);
    text-decoration: line-through;
}

.section-more {
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
}

/* ===== 商品网格 ===== */
.hot-products-section {
    padding: 16px;
    margin: 12px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}

.product-price {
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
}

.product-original {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 4px;
}

.product-sales {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--bg-white);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    position: relative;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

.nav-item span {
    font-size: 11px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== 分类页 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.back-btn, .share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.back-btn svg, .share-btn svg {
    width: 24px;
    height: 24px;
}

.category-page-content {
    display: flex;
}

.category-tabs {
    width: 80px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 57px;
    height: calc(100vh - 127px);
    overflow-y: auto;
}

.category-tab {
    padding: 14px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.category-tab.active {
    background: var(--bg-main);
    color: var(--accent);
    border-left-color: var(--accent);
}

.category-products {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    height: calc(100vh - 127px);
}

/* ===== 商品详情页 ===== */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.detail-header .back-btn, .detail-header .share-btn {
    color: var(--text-primary);
}

.header-title {
    font-size: 17px;
    font-weight: 600;
}

.detail-content {
    padding-bottom: 80px;
}

.detail-images {
    position: relative;
}

.detail-images img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.image-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.detail-base {
    padding: 16px;
    background: var(--bg-white);
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
}

.detail-current-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.detail-original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 12px;
}

.detail-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.detail-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-section {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-white);
}

.detail-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.spec-value {
    color: var(--text-primary);
    font-size: 13px;
}

.detail-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.detail-actions {
    display: flex;
    gap: 20px;
}

.action-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
}

.action-icon svg {
    width: 22px;
    height: 22px;
}

.action-icon span {
    font-size: 11px;
}

.detail-btns {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff9a44, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-buy-now {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.spec-select {
    padding: 10px 0;
}

.spec-title {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-option {
    padding: 8px 16px;
    background: var(--bg-main);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.spec-option.active {
    background: rgba(233, 69, 96, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
}

.quantity-btn:active {
    background: var(--border-color);
}

.quantity-num {
    font-size: 16px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* ===== 购物车页 ===== */
.edit-btn {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
}

.cart-content {
    padding: 12px;
    min-height: calc(100vh - 140px);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.cart-empty svg {
    width: 80px;
    height: 80px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.cart-empty p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-go-shopping {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
}

.cart-item-checkbox {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-spec {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-quantity button {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.cart-item-quantity span {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
}

.cart-footer {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.cart-select-all span {
    font-size: 14px;
    color: var(--text-primary);
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-total span:first-child {
    font-size: 13px;
    color: var(--text-secondary);
}

.total-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.btn-checkout {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 订单页 ===== */
.orders-tabs {
    display: flex;
    background: var(--bg-white);
    padding: 12px 0;
    position: sticky;
    top: 57px;
    z-index: 50;
}

.orders-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.orders-tab.active {
    color: var(--accent);
    font-weight: 600;
}

.orders-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.orders-content {
    padding: 12px;
    min-height: calc(100vh - 150px);
}

.orders-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.orders-empty svg {
    width: 60px;
    height: 60px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.orders-empty p {
    color: var(--text-secondary);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.order-no {
    font-size: 13px;
    color: var(--text-secondary);
}

.order-status {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}

.order-status.pending { color: #ff9800; }
.order-status.paid { color: #2196f3; }
.order-status.shipped { color: #4caf50; }
.order-status.completed { color: var(--text-secondary); }

.order-card-products {
    padding: 12px;
}

.order-product-item {
    display: flex;
    margin-bottom: 10px;
}

.order-product-item:last-child {
    margin-bottom: 0;
}

.order-product-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 10px;
}

.order-product-info {
    flex: 1;
}

.order-product-name {
    font-size: 13px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-product-spec {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.order-product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.order-product-price {
    color: var(--text-primary);
    font-weight: 600;
}

.order-product-qty {
    color: var(--text-light);
    font-size: 12px;
}

.order-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.btn-order-action {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
}

.btn-order-action.primary {
    background: var(--accent);
    color: #fff;
}

/* ===== 个人中心页 ===== */
.profile-header-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 30px 16px 40px;
}

.profile-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-level {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg-white);
    margin: -20px 16px 0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.profile-menu {
    margin: 16px;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: var(--bg-main);
}

.menu-item svg:first-child {
    width: 22px;
    height: 22px;
    color: var(--accent);
    margin-right: 12px;
}

.menu-item span {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.menu-item .arrow-icon {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

.profile-service {
    padding: 0 16px;
}

.service-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--bg-white);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.service-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== 下单确认页 ===== */
.checkout-content {
    padding-bottom: 80px;
}

.address-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-white);
    margin: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.address-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.address-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.address-phone {
    font-size: 14px;
    color: var(--text-secondary);
}

.address-detail {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.address-section .arrow-icon {
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.order-products {
    padding: 16px;
    background: var(--bg-white);
    margin: 0 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.order-products h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.checkout-product-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-product-item:last-child {
    border-bottom: none;
}

.checkout-product-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.checkout-product-info {
    flex: 1;
}

.checkout-product-name {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkout-product-spec {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.checkout-product-bottom {
    display: flex;
    justify-content: space-between;
}

.checkout-product-price {
    color: var(--accent);
    font-weight: 600;
}

.checkout-product-qty {
    color: var(--text-secondary);
    font-size: 13px;
}

.order-remark {
    padding: 16px;
    background: var(--bg-white);
    margin: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.order-remark label {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.order-remark input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.order-remark input:focus {
    border-color: var(--accent);
}

.order-summary {
    padding: 16px;
    background: var(--bg-white);
    margin: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.order-summary h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-row span:last-child {
    color: var(--text-primary);
}

.coupon-discount {
    color: var(--accent) !important;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-total span:last-child {
    color: var(--accent);
    font-size: 18px;
}

.checkout-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.checkout-total span:first-child {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-submit-order {
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 支付页 ===== */
.payment-content {
    padding: 16px;
}

.payment-order-info {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.payment-amount {
    text-align: center;
    margin-bottom: 16px;
}

.payment-label {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.payment-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
}

.payment-order-no {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.payment-countdown {
    text-align: center;
    padding: 16px;
    background: #fff5f5;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.countdown-time {
    color: var(--accent);
    font-weight: 700;
    margin: 0 4px;
}

.payment-methods {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.payment-methods h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.payment-method:last-child {
    margin-bottom: 0;
}

.payment-method.active {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

.method-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.method-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.method-icon.wechat {
    background: #07c160;
}

.method-icon.alipay {
    background: #1677ff;
}

.method-icon.bank {
    background: var(--accent);
}

.method-info {
    flex: 1;
}

.method-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.method-desc {
    font-size: 12px;
    color: var(--text-light);
}

.method-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.payment-method.active .method-check {
    background: var(--accent);
    border-color: var(--accent);
}

.payment-method.active .method-check svg {
    color: #fff;
}

.method-check svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    color: #fff;
}

.payment-method.active .method-check svg {
    opacity: 1;
}

.btn-confirm-pay {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

/* ===== 支付成功页 ===== */
.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #52c41a, #73d13d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: #fff;
}

.success-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.success-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.success-order {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.success-buttons {
    display: flex;
    gap: 16px;
}

.btn-view-orders {
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-back-home {
    padding: 14px 32px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Toast提示 ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ===== 模态框 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-height: 70vh;
    background: var(--bg-white);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
}

.modal-body {
    padding: 16px;
    max-height: calc(70vh - 60px);
    overflow-y: auto;
}

.address-item {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.address-item:last-child {
    margin-bottom: 0;
}

.address-item.active {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

.address-item-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.address-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.address-item-phone {
    color: var(--text-secondary);
}

.address-item-detail {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.address-item-default {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    border-radius: 4px;
    margin-left: 10px;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== 选中样式 ===== */
::selection {
    background: rgba(233, 69, 96, 0.2);
}

/* ===== 响应式 ===== */
@media (max-width: 375px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .product-grid {
        gap: 8px;
    }
    
    .product-card img {
        height: 110px;
    }
    
    .detail-images img {
        height: 280px;
    }
}

/* 规格选择器样式 */
.spec-selector {
    margin-bottom: 12px;
}

.spec-options .spec-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
