* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: #f7f5f2; color: #333; font-size: 14px; line-height: 1.5; margin: 0; padding: 0; }
html, body { height: 100%; }
#admin-app { height: 100%; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; outline: none; }

:root {
  --primary: #c9a87c;
  --primary-dark: #b08d5e;
  --primary-light: #f5ede0;
  --text: #333;
  --text-light: #999;
  --text-lighter: #ccc;
  --bg: #f7f5f2;
  --white: #fff;
  --danger: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 60px; }

/* 顶部导航 */
.top-bar { position: sticky; top: 0; z-index: 100; background: var(--white); padding: 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.top-bar .back { font-size: 20px; color: var(--text); width: 24px; }
.top-bar .title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.top-bar .right { width: 24px; text-align: right; font-size: 14px; color: var(--text-light); }

/* 底部导航 */
.tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--white); display: flex; border-top: 1px solid #eee; z-index: 100; }
.tab-bar .tab-item { flex: 1; text-align: center; padding: 8px 0; color: var(--text-light); font-size: 11px; }
.tab-bar .tab-item.active { color: var(--primary); }
.tab-bar .tab-item .icon { font-size: 22px; display: block; margin-bottom: 2px; }

/* 首页 */
.banner { width: 100%; height: 180px; background: linear-gradient(135deg, #f5ede0 0%, #e8d5b8 100%); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.banner-content { text-align: center; color: var(--primary-dark); }
.banner-content h2 { font-size: 24px; margin-bottom: 8px; font-weight: 600; }
.banner-content p { font-size: 13px; opacity: 0.8; }

/* 轮播图 */
.banner-slider { position: relative; width: 100%; height: 180px; overflow: hidden; background: #f0f0f0; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; cursor: pointer; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-title { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.5)); color: #fff; font-size: 14px; font-weight: 500; }
.banner-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.banner-dots .dot.active { width: 18px; border-radius: 3px; background: #fff; }

/* 自定义板块 */
.custom-section { padding: 8px 12px; cursor: pointer; }
.custom-section img { width: 100%; border-radius: 8px; }

.search-bar { padding: 12px 16px; background: var(--white); }
.search-bar input { width: 100%; padding: 10px 16px; border-radius: 20px; border: 1px solid #eee; background: var(--bg); font-size: 13px; }

.category-nav { display: flex; padding: 16px; background: var(--white); overflow-x: auto; gap: 16px; }
.category-nav::-webkit-scrollbar { display: none; }
.category-item { flex-shrink: 0; text-align: center; }
.category-item .icon { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 6px; }
.category-item .name { font-size: 12px; color: var(--text); }

.section-title { padding: 16px 16px 8px; display: flex; align-items: center; justify-content: space-between; }
.section-title h3 { font-size: 16px; font-weight: 600; }
.section-title .more { font-size: 12px; color: var(--text-light); }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 16px; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-card .img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f0f0f0; }
.product-card .info { padding: 10px; }
.product-card .name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 6px; }
.product-card .price { color: var(--primary-dark); font-size: 16px; font-weight: 600; }
.product-card .price .original { font-size: 11px; color: var(--text-lighter); text-decoration: line-through; margin-left: 6px; font-weight: normal; }
.product-card .sales { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 商品标签 */
.product-tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.tag { padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; color: #fff; }
.tag-hot { background: #e74c3c; }
.tag-promo { background: #f39c12; }
.tag-new { background: #9b59b6; }

/* 商品列表 */
.list-header { padding: 12px 16px; background: var(--white); display: flex; gap: 8px; overflow-x: auto; }
.list-header::-webkit-scrollbar { display: none; }
.list-header .cat-tab { flex-shrink: 0; padding: 6px 14px; border-radius: 16px; font-size: 13px; color: var(--text-light); background: var(--bg); }
.list-header .cat-tab.active { background: var(--primary); color: var(--white); }

/* 商品详情 */
.detail-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f0f0f0; }

/* 详情页图片轮播 */
.detail-slider { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #f0f0f0; }
.detail-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; }
.detail-slide.active { opacity: 1; }
.detail-slide img { width: 100%; height: 100%; object-fit: cover; }
.detail-slider-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.detail-slider-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.detail-slider-dots .dot.active { width: 18px; border-radius: 3px; background: #fff; }
.detail-info { background: var(--white); padding: 16px; margin-bottom: 10px; }
.detail-info .price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.detail-info .price { font-size: 24px; color: var(--primary-dark); font-weight: 700; }
.detail-info .original-price { font-size: 14px; color: var(--text-lighter); text-decoration: line-through; }
.detail-info .name { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.detail-info .desc { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.detail-info .meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--text-light); }

.spec-section { background: var(--white); padding: 16px; margin-bottom: 10px; }
.spec-section .label { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.spec-options { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-option { padding: 8px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; cursor: pointer; }
.spec-option.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }

.detail-content { background: var(--white); padding: 16px; margin-bottom: 70px; }
.detail-content .label { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.detail-content .text { font-size: 13px; color: #555; line-height: 1.8; white-space: pre-wrap; }

.bottom-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--white); padding: 10px 16px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #eee; z-index: 100; }
.bottom-bar .icon-btn { text-align: center; font-size: 11px; color: var(--text-light); width: 48px; }
.bottom-bar .icon-btn .icon { font-size: 20px; display: block; }
.bottom-bar .btn-cart { flex: 1; padding: 12px; background: var(--primary-light); color: var(--primary-dark); border-radius: 24px; font-size: 14px; font-weight: 600; text-align: center; }
.bottom-bar .btn-buy { flex: 1; padding: 12px; background: var(--primary); color: var(--white); border-radius: 24px; font-size: 14px; font-weight: 600; text-align: center; }

/* 购物车 */
.cart-list { padding: 10px 12px 120px; }
.cart-item { background: var(--white); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; margin-bottom: 10px; align-items: center; }
.cart-item .check { width: 20px; height: 20px; border: 2px solid #ddd; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--white); }
.cart-item .check.checked { background: var(--primary); border-color: var(--primary); }
.cart-item .img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #f0f0f0; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-size: 13px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .spec { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.cart-item .bottom-row { display: flex; justify-content: space-between; align-items: center; }
.cart-item .price { color: var(--primary-dark); font-weight: 600; font-size: 15px; }
.quantity-control { display: flex; align-items: center; gap: 0; border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.quantity-control button { width: 28px; height: 26px; font-size: 16px; color: var(--text); background: var(--bg); }
.quantity-control span { width: 36px; text-align: center; font-size: 13px; }

.cart-footer { position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--white); padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #eee; z-index: 99; box-shadow: 0 -2px 8px rgba(0,0,0,0.05); }
.cart-footer .select-all { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cart-footer .select-all .check { width: 18px; height: 18px; border: 2px solid #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--white); }
.cart-footer .select-all .check.checked { background: var(--primary); border-color: var(--primary); }
.cart-footer .total { flex: 1; text-align: right; font-size: 13px; }
.cart-footer .total .amount { color: var(--primary-dark); font-size: 18px; font-weight: 700; }
.cart-footer .checkout { padding: 10px 24px; background: var(--primary); color: var(--white); border-radius: 20px; font-size: 14px; font-weight: 600; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 60px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }
.empty-state .btn { display: inline-block; padding: 10px 30px; background: var(--primary); color: var(--white); border-radius: 20px; font-size: 14px; }

/* 订单确认 */
.address-card { background: var(--white); padding: 16px; margin: 10px 12px; border-radius: var(--radius); display: flex; align-items: center; gap: 12px; }
.address-card .icon { font-size: 24px; color: var(--primary); }
.address-card .info { flex: 1; }
.address-card .name-row { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.address-card .name-row .phone { margin-left: 10px; font-weight: normal; color: var(--text-light); }
.address-card .addr { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.address-card .arrow { color: var(--text-lighter); font-size: 18px; }

.order-products { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 12px; }
.order-product-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.order-product-item:last-child { border-bottom: none; }
.order-product-item .img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.order-product-item .info { flex: 1; }
.order-product-item .name { font-size: 13px; margin-bottom: 4px; }
.order-product-item .spec { font-size: 11px; color: var(--text-light); }
.order-product-item .right { text-align: right; }
.order-product-item .price { color: var(--primary-dark); font-weight: 600; font-size: 14px; }
.order-product-item .qty { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.order-summary { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 16px; }
.order-summary .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.order-summary .row.total { border-top: 1px solid #f5f5f5; margin-top: 8px; padding-top: 12px; font-weight: 600; }
.order-summary .row.total .value { color: var(--primary-dark); font-size: 18px; }

.remark-section { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 16px; }
.remark-section textarea { width: 100%; border: 1px solid #eee; border-radius: 8px; padding: 10px; font-size: 13px; resize: none; height: 60px; }

/* 支付页 */
.pay-container { padding: 30px 20px; text-align: center; }
.pay-container .amount { font-size: 36px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.pay-container .order-no { font-size: 13px; color: var(--text-light); margin-bottom: 30px; }
.qrcode-box { width: 220px; height: 220px; margin: 0 auto 20px; background: var(--white); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.qrcode-box img { width: 100%; height: 100%; object-fit: contain; }
.qrcode-placeholder { width: 100%; height: 100%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary-dark); font-size: 14px; text-align: center; line-height: 1.6; border-radius: 8px; }
.pay-tip { background: var(--primary-light); padding: 12px 16px; border-radius: 8px; font-size: 13px; color: var(--primary-dark); margin: 20px 0; line-height: 1.6; }
.pay-actions { display: flex; gap: 12px; margin-top: 20px; }
.pay-actions .btn { flex: 1; padding: 14px; border-radius: 24px; font-size: 15px; font-weight: 600; text-align: center; }
.pay-actions .btn-primary { background: var(--primary); color: var(--white); }
.pay-actions .btn-outline { border: 1px solid var(--primary); color: var(--primary); }

/* 个人中心 */
.profile-header { background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%); padding: 30px 20px; text-align: center; }
.profile-header .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 10px; }
.profile-header .name { font-size: 16px; font-weight: 600; }

.order-nav { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 16px 0; display: flex; }
.order-nav .item { flex: 1; text-align: center; font-size: 12px; color: var(--text); }
.order-nav .item .icon { font-size: 24px; display: block; margin-bottom: 4px; }

.menu-list { background: var(--white); margin: 10px 12px; border-radius: var(--radius); overflow: hidden; }
.menu-list .item { padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.menu-list .item:last-child { border-bottom: none; }
.menu-list .item .icon { font-size: 18px; color: var(--primary); width: 24px; }
.menu-list .item .arrow { margin-left: auto; color: var(--text-lighter); }

/* 订单列表 */
.order-card { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 14px; }
.order-card .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f5f5f5; }
.order-card .order-no { font-size: 12px; color: var(--text-light); }
.order-card .status { font-size: 13px; font-weight: 600; }
.status-pending_payment { color: var(--warning); }
.status-pending_confirm { color: var(--warning); }
.status-confirmed { color: var(--primary); }
.status-shipped { color: var(--primary); }
.status-completed { color: var(--success); }
.status-cancelled { color: var(--text-light); }
.order-card .products { margin-bottom: 10px; }
.order-card .product-row { display: flex; gap: 10px; padding: 6px 0; align-items: center; }
.order-card .product-row .img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.order-card .product-row .info { flex: 1; font-size: 13px; }
.order-card .product-row .info .spec { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.order-card .product-row .price { font-size: 13px; color: var(--text); }
.order-card .footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid #f5f5f5; }
.order-card .footer .total { font-size: 13px; }
.order-card .footer .total .amount { color: var(--primary-dark); font-weight: 700; font-size: 16px; }
.order-card .footer .actions { display: flex; gap: 8px; }
.order-card .footer .actions .btn { padding: 6px 14px; border-radius: 16px; font-size: 12px; border: 1px solid #ddd; color: var(--text); }
.order-card .footer .actions .btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* 地址管理 */
.address-list { padding: 10px 12px; }
.address-item { background: var(--white); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.address-item .name-row { font-size: 14px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.address-item .name-row .default-tag { font-size: 10px; background: var(--primary); color: var(--white); padding: 2px 6px; border-radius: 4px; font-weight: normal; }
.address-item .addr { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 10px; }
.address-item .actions { display: flex; justify-content: flex-end; gap: 16px; border-top: 1px solid #f5f5f5; padding-top: 10px; }
.address-item .actions button { font-size: 13px; color: var(--text-light); }

/* 表单 */
.form-group { background: var(--white); margin: 10px 12px; border-radius: var(--radius); padding: 4px 16px; }
.form-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.form-row:last-child { border-bottom: none; }
.form-row label { width: 80px; font-size: 14px; color: var(--text); flex-shrink: 0; }
.form-row input, .form-row select, .form-row textarea { flex: 1; border: none; font-size: 14px; background: transparent; }
.form-row textarea { resize: none; min-height: 60px; padding-top: 4px; }

.submit-btn { display: block; width: calc(100% - 24px); margin: 20px 12px; padding: 14px; background: var(--primary); color: var(--white); border-radius: 24px; font-size: 15px; font-weight: 600; text-align: center; }

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.75); color: var(--white); padding: 12px 24px; border-radius: 8px; font-size: 14px; z-index: 9999; max-width: 80%; text-align: center; }

/* 加载 */
.loading { text-align: center; padding: 40px; color: var(--text-light); font-size: 13px; }

/* 管理员后台样式 */
.admin-layout { display: flex; min-height: 100vh; background: #f0f2f5; }
.admin-sidebar { width: 200px; background: #001529; color: #fff; flex-shrink: 0; }
.admin-sidebar .logo { padding: 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar .menu { padding: 10px 0; }
.admin-sidebar .menu-item { padding: 12px 20px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.7); }
.admin-sidebar .menu-item:hover { background: rgba(255,255,255,0.05); }
.admin-sidebar .menu-item.active { background: var(--primary); color: #fff; }
.admin-main { flex: 1; padding: 20px; overflow-x: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-header h2 { font-size: 20px; }
.admin-header .user-info { font-size: 14px; color: #666; display: flex; align-items: center; gap: 12px; }
.admin-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.admin-card h3 { font-size: 16px; margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.stat-card .label { font-size: 13px; color: #999; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--primary-dark); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #fafafa; padding: 12px; text-align: left; font-weight: 600; border-bottom: 1px solid #eee; }
.admin-table td { padding: 12px; border-bottom: 1px solid #f5f5f5; }
.admin-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.admin-btn { padding: 6px 14px; border-radius: 4px; font-size: 13px; cursor: pointer; border: none; margin-right: 6px; }
.admin-btn-primary { background: var(--primary); color: #fff; }
.admin-btn-danger { background: var(--danger); color: #fff; }
.admin-btn-default { background: #f0f0f0; color: #333; }
.admin-btn-success { background: var(--success); color: #fff; }
.admin-btn-warning { background: var(--warning); color: #fff; }
.admin-input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; width: 100%; }
.admin-form-row { margin-bottom: 16px; }
.admin-form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.admin-form-row input, .admin-form-row select, .admin-form-row textarea { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.admin-form-row textarea { min-height: 80px; resize: vertical; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 图片预览 */
.img-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.img-preview-item { position: relative; width: 80px; height: 80px; border-radius: 4px; overflow: hidden; border: 1px solid #eee; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; line-height: 1; }
.img-remove:hover { background: rgba(231,76,60,0.8); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.pagination button { padding: 6px 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.login-box h2 { text-align: center; margin-bottom: 30px; color: #333; }
.login-box .form-group { margin-bottom: 20px; }
.login-box .form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.login-box .form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.login-box .login-btn { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 10px; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; }
  .admin-sidebar .logo { display: none; }
  .admin-sidebar .menu { display: flex; padding: 0; }
  .admin-sidebar .menu-item { flex-shrink: 0; padding: 12px 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-form-grid { grid-template-columns: 1fr; }
}

/* ============ 精致订单确认页 ============ */
.address-card { display: flex; align-items: center; background: linear-gradient(135deg, #fff 0%, #fdf9f3 100%); margin: 12px; padding: 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); position: relative; overflow: hidden; }
.address-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }
.address-icon { font-size: 24px; margin-right: 12px; }
.address-info { flex: 1; }
.address-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.address-name { font-weight: 600; font-size: 15px; color: #333; }
.address-phone { color: #666; font-size: 13px; }
.address-detail { color: #555; font-size: 13px; line-height: 1.5; }
.address-empty { color: var(--primary); font-size: 14px; }
.address-arrow { color: #ccc; font-size: 20px; }

.order-products { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.order-products-title { font-weight: 600; font-size: 15px; margin-bottom: 12px; color: #333; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.order-product-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f8f8f8; }
.order-product-item:last-child { border-bottom: none; }
.order-product-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; margin-right: 12px; background: #f5f5f5; }
.order-product-info { flex: 1; }
.order-product-name { font-size: 14px; color: #333; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-product-spec { font-size: 12px; color: #999; }
.order-product-right { text-align: right; }
.order-product-price { color: var(--primary-dark); font-weight: 600; font-size: 15px; }
.order-product-qty { color: #999; font-size: 12px; margin-top: 4px; }

.coupon-section { background: #fff; margin: 12px; padding: 4px 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.coupon-row, .promo-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f8f8f8; cursor: pointer; }
.promo-row { cursor: default; border-bottom: none; }
.coupon-label, .promo-label { flex: 1; font-size: 14px; color: #333; }
.coupon-value { color: #999; font-size: 13px; margin-right: 8px; }
.promo-value { color: #e74c3c; font-size: 14px; font-weight: 500; }
.coupon-arrow { color: #ccc; font-size: 18px; }

.remark-section { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.remark-section textarea { width: 100%; border: 1px solid #eee; border-radius: 8px; padding: 10px; font-size: 13px; resize: none; height: 60px; box-sizing: border-box; }

.order-summary { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 80px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #666; }
.summary-row.discount span:last-child { color: #e74c3c; }
.summary-total { display: flex; justify-content: space-between; padding: 12px 0 0; margin-top: 8px; border-top: 1px dashed #eee; font-size: 15px; font-weight: 600; }
.total-value { color: #e74c3c; font-size: 18px; }

.submit-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 -2px 12px rgba(0,0,0,0.08); z-index: 100; }
.submit-total { display: flex; align-items: baseline; }
.submit-label { font-size: 14px; color: #666; }
.submit-price { color: #e74c3c; font-size: 22px; font-weight: 700; }
.submit-btn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 12px 32px; border-radius: 24px; font-size: 15px; font-weight: 600; }

/* ============ 优惠券 ============ */
.coupon-center-banner { background: linear-gradient(135deg, #c9a87c 0%, #b08d5e 100%); padding: 30px 20px; text-align: center; color: #fff; }
.coupon-center-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.coupon-center-sub { font-size: 13px; opacity: 0.9; }

.coupon-tabs { display: flex; background: #fff; border-bottom: 1px solid #f0f0f0; }
.coupon-tab { flex: 1; text-align: center; padding: 14px; font-size: 14px; color: #666; cursor: pointer; position: relative; }
.coupon-tab.active { color: var(--primary-dark); font-weight: 600; }
.coupon-tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 3px; background: var(--primary); border-radius: 2px; }

.coupon-list { padding: 12px; }
.coupon-card { display: flex; background: #fff; border-radius: 12px; margin-bottom: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: relative; }
.coupon-card.disabled { opacity: 0.6; }
.coupon-card-left { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: #fff; padding: 16px 12px; text-align: center; min-width: 90px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.coupon-card-left::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; background: #f7f5f2; border-radius: 50%; }
.coupon-card-value { font-size: 28px; font-weight: 700; line-height: 1; }
.coupon-card-condition { font-size: 11px; margin-top: 4px; opacity: 0.9; }
.coupon-card-right { flex: 1; padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.coupon-card-name { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 4px; }
.coupon-card-desc { font-size: 12px; color: #999; margin-bottom: 8px; }
.coupon-card-btn { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; padding: 6px 16px; border-radius: 14px; font-size: 12px; align-self: flex-start; }
.coupon-card-status { font-size: 12px; color: #999; }

/* 优惠券选择器弹窗 */
.modal-mask { 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: 1000; }
.modal-content { background: #fff; width: 100%; max-width: 500px; border-radius: 16px 16px 0 0; max-height: 70vh; overflow-y: auto; padding: 20px; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-title { font-size: 17px; font-weight: 600; text-align: center; margin-bottom: 16px; }
.coupon-picker-list { max-height: 40vh; overflow-y: auto; }
.coupon-picker-item { display: flex; align-items: center; padding: 12px; border: 2px solid #f0f0f0; border-radius: 10px; margin-bottom: 10px; cursor: pointer; position: relative; }
.coupon-picker-item.selected { border-color: var(--primary); background: var(--primary-light); }
.coupon-picker-item.disabled { opacity: 0.5; cursor: not-allowed; }
.coupon-picker-item.disabled .coupon-picker-value { color: #999; }
.coupon-picker-left { text-align: center; min-width: 70px; padding-right: 12px; border-right: 1px dashed #ddd; }
.coupon-picker-value { font-size: 22px; font-weight: 700; color: #e74c3c; }
.coupon-picker-condition { font-size: 11px; color: #999; margin-top: 2px; }
.coupon-picker-right { flex: 1; padding-left: 12px; }
.coupon-picker-name { font-size: 14px; font-weight: 600; color: #333; }
.coupon-picker-expire { font-size: 11px; color: #999; margin-top: 4px; }
.coupon-picker-check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.coupon-picker-actions { display: flex; gap: 12px; margin-top: 16px; }
.btn-outline { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 24px; font-size: 14px; color: #666; background: #fff; }
.btn-primary { flex: 1; padding: 12px; border-radius: 24px; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }

/* ============ 通知中心 ============ */
.notification-list { padding: 12px; }
.notification-item { display: flex; background: #fff; padding: 16px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; cursor: pointer; }
.notification-icon { font-size: 28px; margin-right: 12px; }
.notification-content { flex: 1; }
.notification-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; }
.notification-text { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 6px; }
.notification-time { font-size: 11px; color: #bbb; }
.notification-dot { position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; }

/* 退货申请 */
.return-order-info { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; }
.return-order-title { font-weight: 600; font-size: 15px; margin-bottom: 12px; color: #333; }
.return-product { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.return-product img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; margin-right: 12px; background: #f5f5f5; }
.return-product .info { flex: 1; }
.return-product .name { font-size: 14px; color: #333; margin-bottom: 4px; }
.return-product .spec { font-size: 12px; color: #999; margin-bottom: 4px; }
.return-product .price { color: #c9a87c; font-weight: 600; font-size: 14px; }
.return-amount { text-align: right; margin-top: 12px; font-size: 14px; color: #666; }
.return-amount span { color: #e74c3c; font-size: 18px; font-weight: 700; }
.return-form { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; }
.form-title { font-weight: 600; font-size: 15px; margin-bottom: 12px; color: #333; }
.return-form textarea { width: 100%; border: 1px solid #eee; border-radius: 8px; padding: 10px; font-size: 13px; resize: vertical; box-sizing: border-box; }
.return-address { background: #fff; margin: 12px; padding: 16px; border-radius: 12px; }
.return-address-title { font-weight: 600; font-size: 15px; margin-bottom: 10px; color: #333; }
.return-address-content { font-size: 14px; color: #555; line-height: 1.6; padding: 10px; background: #f9f9f9; border-radius: 8px; margin-bottom: 8px; }
.return-address-tip { font-size: 12px; color: #999; }

/* 购物车删除按钮 */
.cart-delete-btn { background: #fef0f0; color: #e74c3c; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.cart-delete-btn:hover { background: #e74c3c; color: #fff; }
.quantity-control { display: flex; align-items: center; background: #f5f5f5; border-radius: 16px; overflow: hidden; }
.quantity-control button { width: 28px; height: 28px; border: none; background: #f0f0f0; font-size: 16px; cursor: pointer; color: #666; }
.quantity-control button:hover { background: #e0e0e0; }
.quantity-control span { min-width: 32px; text-align: center; font-size: 14px; font-weight: 600; }

/* 页面装修 - 商品框架样式 */
.product-card-hot { border: 2px solid #ff4757; border-radius: 10px; background: linear-gradient(135deg, #fff5f5, #fff); }
.product-card-premium { border: 2px solid #f39c12; border-radius: 10px; background: linear-gradient(135deg, #fffbf0, #fff); }
.frame-badge { position: absolute; top: 0; left: 0; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #fff; border-radius: 0 0 8px 0; z-index: 2; }
.frame-badge-hot { background: linear-gradient(135deg, #ff4757, #ff6b81); }
.frame-badge-premium { background: linear-gradient(135deg, #f39c12, #f1c40f); }
.product-grid.product-frame-hot { gap: 10px; padding: 0 8px; }
.product-grid.product-frame-premium { gap: 10px; padding: 0 8px; }

/* ========== 页面装修三栏编辑器 ========== */
.pd-topbar { height: 50px; background: #001529; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.pd-topbar-left { display: flex; align-items: center; gap: 12px; }
.pd-title { font-size: 16px; font-weight: 600; }
.pd-top-btn { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 6px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; margin-left: 8px; }
.pd-top-btn:hover { background: rgba(255,255,255,0.1); }
.pd-btn-save { background: #1890ff; border-color: #1890ff; }
.pd-btn-save:hover { background: #40a9ff; }
.pd-btn-preview { background: #52c41a; border-color: #52c41a; }
.pd-container { display: flex; height: calc(100vh - 50px); margin-top: 50px; }
.pd-left { width: 220px; background: #fff; border-right: 1px solid #eee; overflow-y: auto; flex-shrink: 0; }
.pd-search { padding: 12px; }
.pd-search input { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.pd-widget-group { padding: 0 12px 12px; }
.pd-group-title { font-size: 13px; color: #666; font-weight: 600; margin-bottom: 10px; }
.pd-widget-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pd-widget-item { text-align: center; padding: 10px 4px; border: 1px solid #eee; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.pd-widget-item:hover { border-color: #1890ff; background: #e6f7ff; }
.pd-widget-icon { font-size: 24px; margin-bottom: 4px; }
.pd-widget-name { font-size: 11px; color: #666; }
.pd-center { flex: 1; background: #f0f2f5; display: flex; justify-content: center; align-items: flex-start; padding: 20px; overflow-y: auto; }
.pd-phone { width: 375px; min-height: 667px; background: #fff; border-radius: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); overflow: hidden; position: relative; border: 8px solid #333; }
.pd-phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 20px; background: #333; border-radius: 0 0 12px 12px; z-index: 10; }
.pd-phone-status { height: 24px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 11px; color: #333; background: #fff; }
.pd-phone-header { height: 44px; display: flex; align-items: center; justify-content: center; background: #fff; border-bottom: 1px solid #f0f0f0; font-size: 15px; font-weight: 600; }
.pd-phone-content { padding: 8px 0; min-height: 500px; }
.pd-empty { text-align: center; padding: 60px 20px; color: #999; font-size: 13px; }
.pd-widget { position: relative; margin: 4px 8px; padding: 4px; border: 2px solid transparent; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.pd-widget:hover { border-color: #91d5ff; }
.pd-widget.pd-selected { border-color: #1890ff; background: #e6f7ff; }
.pd-float-toolbar { position: absolute; top: -12px; right: -12px; display: flex; gap: 2px; z-index: 20; }
.pd-float-toolbar button { width: 24px; height: 24px; border: none; border-radius: 4px; background: #1890ff; color: #fff; font-size: 12px; cursor: pointer; padding: 0; }
.pd-float-toolbar button:first-child { background: #ff4d4f; }
.pd-right { width: 300px; background: #fff; border-left: 1px solid #eee; overflow-y: auto; flex-shrink: 0; }
.pd-no-select { text-align: center; padding: 60px 20px; color: #999; font-size: 13px; }
.pd-prop-header { padding: 12px 16px; border-bottom: 1px solid #eee; font-weight: 600; font-size: 14px; background: #fafafa; }
.pd-prop-section { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; }
.pd-prop-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 10px; }
.pd-prop-row { margin-bottom: 12px; }
.pd-prop-row label { display: block; font-size: 12px; color: #666; margin-bottom: 6px; }
.pd-prop-row input[type="text"], .pd-prop-row select { width: 100%; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; }
.pd-prop-control { display: flex; align-items: center; gap: 8px; }
.pd-prop-control input[type="range"] { flex: 1; }
.pd-prop-control span { font-size: 12px; color: #666; min-width: 40px; }
.pd-slider { -webkit-appearance: none; height: 4px; background: #ddd; border-radius: 2px; outline: none; }
.pd-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: #1890ff; border-radius: 50%; cursor: pointer; }
.pd-image-item { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pd-image-thumb { width: 40px; height: 40px; background: #f5f5f5; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #999; overflow: hidden; flex-shrink: 0; }
.pd-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-image-inputs { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pd-image-inputs input { padding: 4px 8px; border: 1px solid #ddd; border-radius: 3px; font-size: 11px; }
.pd-del-btn { width: 22px; height: 22px; border: none; background: #ff4d4f; color: #fff; border-radius: 3px; cursor: pointer; font-size: 11px; padding: 0; flex-shrink: 0; }
.pd-add-btn { width: 100%; padding: 8px; border: 1px dashed #1890ff; background: #fff; color: #1890ff; border-radius: 4px; cursor: pointer; font-size: 12px; margin-top: 8px; }
.pd-add-btn:hover { background: #e6f7ff; }
.pd-banner { position: relative; background: #f5f5f5; overflow: hidden; }
.pd-banner-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.pd-banner-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.pd-banner-dots span.active { background: #fff; width: 16px; border-radius: 3px; }
.pd-search-box { padding: 8px 16px; font-size: 13px; color: #999; margin: 4px 8px; }
.pd-placeholder { background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #999; font-size: 13px; width: 100%; }
.pd-product-grid { display: grid; gap: 6px; padding: 4px 8px; }
.pd-product-card { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #f0f0f0; }
.pd-prod-hot .pd-product-card { border: 2px solid #ff4d4f; }
.pd-prod-premium .pd-product-card { border: 2px solid #fadb14; }

/* 图片上传器 */
.pd-upload-row { display: flex; align-items: center; gap: 8px; }
.pd-upload-preview { width: 50px; height: 50px; background: #f5f5f5; border: 1px dashed #ddd; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; flex-shrink: 0; overflow: hidden; }
.pd-upload-preview:hover { border-color: #1890ff; background: #e6f7ff; }
.pd-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.pd-upload-row input[type="text"] { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; }
.pd-image-item-full { margin-bottom: 12px; padding: 10px; background: #fafafa; border-radius: 6px; border: 1px solid #eee; }
.pd-image-item-full .pd-del-btn { width: 100%; height: 28px; background: #fff; color: #ff4d4f; border: 1px solid #ff4d4f; border-radius: 4px; cursor: pointer; font-size: 12px; }
.pd-nav-item { margin-bottom: 12px; padding: 10px; background: #fafafa; border-radius: 6px; border: 1px solid #eee; }
.pd-picker-item:hover { background: #f5f5f5; }

/* 图片库选择按钮 */
.pd-lib-btn { padding: 6px 12px; background: #f0f0f0; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.pd-lib-btn:hover { background: #e6f7ff; border-color: #1890ff; color: #1890ff; }

/* 后台满减规则 */
.promo-rule-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px; background: #f9f9f9; border-radius: 4px; }
.promo-rule-row input { padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; }
.promo-rule-row span { color: #666; font-size: 13px; }
