/* youyipu.com PC端样式 - 完整版 */
/* ========== 变量 ========== */
:root {
  --primary: #C41E3A;
  --primary-dark: #A01830;
  --primary-light: #E8554A;
  --text: #333;
  --text-light: #999;
  --border: #eee;
  --bg: #f5f5f5;
  --white: #fff;
  --width: 1200px;
}

/* ========== 通用 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei','PingFang SC',Arial,sans-serif; color: var(--text); background: var(--bg); min-width: 1200px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: var(--width); margin: 0 auto; }
.clearfix::after { content: ''; display: block; clear: both; }

/* ========== Header ========== */
.header-wrap { background: var(--white); }
.header-top { background: #f8f8f8; border-bottom: 1px solid #eee; padding: 8px 0; font-size: 12px; }
.header-top .container { display: flex; justify-content: space-between; }
.ht-left a { margin-left: 15px; color: #666; }
.ht-left a:hover { color: var(--primary); }
.ht-right a { margin-left: 20px; color: #666; }
.ht-right a:hover { color: var(--primary); }

.header-main { padding: 20px 0; border-bottom: 2px solid var(--primary); }
.header-main .container { display: flex; align-items: center; }
.logo { width: 250px; }
.logo h1 { font-size: 28px; color: var(--primary); margin: 0; }
.logo-sub { font-size: 12px; color: #999; }
.logo a { display: flex; align-items: baseline; gap: 10px; }

.search-box { flex: 1; max-width: 600px; margin: 0 50px; display: flex; }
.search-box input { flex: 1; height: 40px; border: 2px solid var(--primary); border-right: none; padding: 0 15px; font-size: 14px; outline: none; }
.search-box button { width: 80px; height: 40px; background: var(--primary); color: white; border: none; cursor: pointer; font-size: 16px; }
.search-box button:hover { background: var(--primary-dark); }

.cart-user { display: flex; gap: 20px; }
.cart-box a, .user-box a { display: flex; align-items: center; gap: 5px; padding: 8px 15px; border: 1px solid #ddd; border-radius: 4px; position: relative; }
.cart-count { position: absolute; top: -8px; right: -8px; background: var(--primary); color: white; font-size: 11px; padding: 2px 6px; border-radius: 10px; min-width: 18px; text-align: center; }

.main-nav { background: var(--white); border-bottom: 1px solid #eee; }
.main-nav .container { display: flex; align-items: center; }
.category-all { position: relative; width: 240px; }
.category-all-title { background: var(--primary); color: white; padding: 12px 20px; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.category-dropdown { position: absolute; top: 100%; left: 0; width: 240px; background: white; border: 1px solid #ddd; border-top: none; z-index: 100; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.category-all:hover .category-dropdown { display: block; }

.cat-item { border-bottom: 1px solid #f0f0f0; padding: 10px 15px; cursor: pointer; }
.cat-item:hover { background: #fafafa; }
.cat-name { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.cat-name:hover { color: var(--primary); }
.cat-submenu { display: none; position: absolute; left: 240px; top: 0; width: 700px; min-height: 100%; background: white; border: 1px solid #ddd; padding: 15px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cat-item:hover .cat-submenu { display: flex; flex-wrap: wrap; gap: 15px; }
.sub-item { min-width: 150px; }
.sub-title { font-weight: bold; color: var(--primary); margin-bottom: 8px; }
.sub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-links a { font-size: 12px; color: #666; }
.sub-links a:hover { color: var(--primary); }

.nav-links { display: flex; margin-left: 30px; }
.nav-links a { padding: 15px 25px; font-size: 15px; color: #333; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* ========== Banner ========== */
.banner-section { padding: 20px 0; }
.banner-slider { position: relative; width: 100%; height: 400px; overflow: hidden; border-radius: 8px; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.banner-dot.active { background: var(--primary); }

/* ========== 区块通用 ========== */
.section-block { background: var(--white); margin: 20px 0; padding: 20px; border-radius: 8px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #eee; }
.section-title { font-size: 20px; color: #333; display: flex; align-items: center; gap: 10px; }
.section-title i { color: var(--primary); }
.view-more { color: #666; font-size: 13px; }
.view-more:hover { color: var(--primary); }

/* ========== 商品网格 ========== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }

.product-card { background: var(--white); border-radius: 8px; overflow: hidden; transition: all 0.3s; border: 1px solid transparent; cursor: pointer; display: block; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-color: var(--primary-light); }
.card-img { position: relative; padding-top: 100%; background: #fafafa; overflow: hidden; }
.card-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .card-img img { transform: scale(1.05); }
.card-img .tag { position: absolute; top: 10px; left: 10px; padding: 3px 8px; font-size: 11px; border-radius: 3px; color: white; }
.tag.hot { background: linear-gradient(135deg, #ff6b6b, #ee5a5a); }
.tag.new { background: linear-gradient(135deg, #4ecdc4, #44b3aa); }
.tag.seckill { background: linear-gradient(135deg, #f39c12, #e67e22); }

.card-info { padding: 12px; }
.card-name { font-size: 14px; color: #333; line-height: 1.4; height: 40px; overflow: hidden; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-desc { font-size: 12px; color: #999; margin-bottom: 8px; }
.card-bottom { display: flex; align-items: center; gap: 10px; }
.price { color: var(--primary); font-size: 18px; font-weight: bold; }
.price small { font-size: 12px; }
.original-price { color: #999; font-size: 12px; text-decoration: line-through; }
.sales { color: #999; font-size: 12px; margin-left: auto; }

/* ========== 分类页 ========== */
.category-layout { display: flex; gap: 20px; }
.category-sidebar { width: 240px; flex-shrink: 0; }
.sidebar-block { background: var(--white); border-radius: 8px; margin-bottom: 20px; }
.sidebar-title { padding: 15px; border-bottom: 1px solid #eee; font-size: 15px; font-weight: bold; }
.sidebar-content { padding: 15px; }
.sidebar-item { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.sidebar-item:last-child { border: none; }
.sidebar-item a { display: flex; justify-content: space-between; color: #666; font-size: 13px; }
.sidebar-item a:hover, .sidebar-item.active a { color: var(--primary); }
.sidebar-item .count { color: #999; }

.category-main { flex: 1; }
.filter-bar { background: var(--white); padding: 15px; border-radius: 8px; margin-bottom: 20px; display: flex; gap: 20px; align-items: center; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-label { color: #666; }
.filter-btn { padding: 6px 15px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; background: white; font-size: 13px; }
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f5; }
.sort-bar { display: flex; justify-content: flex-end; gap: 15px; }
.sort-item { color: #666; cursor: pointer; font-size: 13px; padding: 5px 10px; }
.sort-item:hover, .sort-item.active { color: var(--primary); }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #666; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .disabled { color: #ccc; cursor: not-allowed; }

/* ========== 产品详情页 ========== */
.product-detail { background: var(--white); border-radius: 8px; padding: 30px; margin: 20px 0; }
.detail-layout { display: flex; gap: 40px; }
.detail-gallery { width: 450px; flex-shrink: 0; }
.gallery-main { width: 100%; aspect-ratio: 1; background: #fafafa; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumb { width: 80px; height: 80px; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { flex: 1; }
.detail-name { font-size: 24px; font-weight: bold; color: #333; margin-bottom: 15px; line-height: 1.4; }
.detail-desc { font-size: 14px; color: #999; margin-bottom: 20px; }
.price-block { background: #fff5f5; padding: 20px; border-radius: 8px; margin-bottom: 20px; }
.price-row { display: flex; align-items: baseline; margin-bottom: 10px; }
.price-label { color: #666; width: 80px; }
.detail-price { font-size: 32px; color: var(--primary); font-weight: bold; }
.detail-price small { font-size: 16px; }
.original-price { color: #999; text-decoration: line-through; margin-left: 15px; font-size: 16px; }
.stock-info { color: #666; font-size: 13px; }

.detail-specs { margin: 20px 0; }
.spec-item { display: flex; align-items: center; margin-bottom: 15px; }
.spec-label { width: 80px; color: #666; }
.spec-value { flex: 1; }
.spec-btn { padding: 8px 15px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; background: white; margin-right: 10px; margin-bottom: 5px; font-size: 13px; }
.spec-btn:hover, .spec-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f5; }
.spec-btn.disabled { color: #ccc; cursor: not-allowed; }

.quantity-box { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.quantity-btn { width: 32px; height: 32px; border: 1px solid #ddd; background: #f5f5f5; cursor: pointer; font-size: 16px; }
.quantity-btn:hover { background: #eee; }
.quantity-input { width: 60px; height: 32px; border: 1px solid #ddd; text-align: center; font-size: 14px; }

.action-btns { display: flex; gap: 15px; margin-top: 25px; }
.btn-buy { flex: 1; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.btn-buy:hover { background: var(--primary-dark); }
.btn-cart { flex: 1; padding: 15px; background: #ff9500; color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.btn-cart:hover { background: #e68600; }

.detail-tabs { margin-top: 40px; }
.tab-nav { display: flex; border-bottom: 2px solid #eee; }
.tab-item { padding: 15px 30px; font-size: 15px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-item:hover, .tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { padding: 30px 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ========== 登录页 ========== */
.login-page { background: linear-gradient(135deg, #fafafa, #f0f0f0); min-height: 100vh; }
.login-header { background: var(--white); padding: 20px 0; border-bottom: 1px solid #eee; }
.login-header .container { display: flex; justify-content: space-between; align-items: center; }
.login-header .logo h1 { font-size: 32px; }
.login-header .logo span { color: #999; font-size: 18px; margin-left: 20px; }

.login-main { padding: 60px 0; }
.login-main .container { display: flex; justify-content: center; }
.login-box { background: var(--white); border-radius: 12px; padding: 40px; width: 450px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.login-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 30px; }
.login-tab { flex: 1; text-align: center; padding: 15px; font-size: 16px; cursor: pointer; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.login-tab:hover, .login-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #333; font-size: 14px; }
.input-group { position: relative; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.input-group input { width: 100%; height: 45px; border: 1px solid #ddd; border-radius: 6px; padding: 0 15px 0 45px; font-size: 14px; outline: none; }
.input-group input:focus { border-color: var(--primary); }
.form-options { display: flex; justify-content: space-between; margin: 20px 0; }
.form-options label { display: flex; align-items: center; gap: 5px; color: #666; cursor: pointer; }
.form-options a { color: var(--primary); }

.btn-submit { width: 100%; height: 48px; background: var(--primary); color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.btn-submit:hover { background: var(--primary-dark); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

.sms-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 8px 15px; background: #f5f5f5; border: none; border-radius: 4px; font-size: 12px; color: var(--primary); cursor: pointer; }
.sms-btn:hover { background: #eee; }
.sms-btn:disabled { color: #ccc; cursor: not-allowed; }

.error-msg { color: #f00; font-size: 12px; margin-top: 5px; display: none; }
.form-group.error .error-msg { display: block; }
.form-group.error input { border-color: #f00; }

.login-tip { text-align: center; margin-top: 15px; color: #666; font-size: 13px; }
.login-tip.error { color: #f00; }

/* ========== 购物车 ========== */
.cart-layout { display: flex; gap: 20px; }
.cart-main { flex: 1; }
.cart-sidebar { width: 300px; }
.cart-box { background: var(--white); border-radius: 8px; }
.cart-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 15px; }
.cart-header label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cart-header .select-all { font-size: 14px; color: #333; }
.cart-count-num { color: var(--primary); font-weight: bold; }

.cart-items { padding: 20px; }
.cart-item { display: flex; align-items: center; padding: 20px 0; border-bottom: 1px solid #f5f5f5; }
.cart-item:last-child { border: none; }
.cart-check { margin-right: 15px; }
.cart-img { width: 100px; height: 100px; border-radius: 6px; overflow: hidden; margin-right: 15px; flex-shrink: 0; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; }
.cart-name { font-size: 14px; color: #333; margin-bottom: 10px; line-height: 1.4; }
.cart-spec { font-size: 12px; color: #999; margin-bottom: 10px; }
.cart-price { color: var(--primary); font-weight: bold; }
.cart-num { display: flex; align-items: center; gap: 5px; }
.cart-num button { width: 28px; height: 28px; border: 1px solid #ddd; background: white; cursor: pointer; }
.cart-num input { width: 40px; height: 28px; border: 1px solid #ddd; text-align: center; }
.cart-del { color: #999; cursor: pointer; margin-left: 20px; }
.cart-del:hover { color: #f00; }

.cart-summary { background: var(--white); border-radius: 8px; padding: 20px; margin-top: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: #666; }
.summary-total { font-size: 20px; color: var(--primary); font-weight: bold; }
.summary-total span { font-size: 14px; color: #666; }
.btn-checkout { width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; margin-top: 15px; }
.btn-checkout:hover { background: var(--primary-dark); }

/* ========== 订单页 ========== */
.order-layout { display: flex; gap: 20px; }
.order-main { flex: 1; }
.order-sidebar { width: 350px; }
.address-block { background: var(--white); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.address-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.address-item { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 10px; cursor: pointer; }
.address-item:hover, .address-item.active { border-color: var(--primary); background: #fff5f5; }
.address-item.default { border-color: var(--primary); }
.address-name { font-weight: bold; margin-bottom: 5px; }
.address-detail { color: #666; font-size: 13px; }

.order-goods { background: var(--white); border-radius: 8px; padding: 20px; }
.order-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #f5f5f5; }
.order-item:last-child { border: none; }
.order-item-img { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; margin-right: 15px; }
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; }
.order-item-name { font-size: 14px; margin-bottom: 5px; }
.order-item-price { color: var(--primary); font-weight: bold; }

/* ========== 用户中心 ========== */
.user-layout { display: flex; gap: 20px; margin: 20px 0; }
.user-sidebar { width: 220px; }
.user-content { flex: 1; }
.user-menu { background: var(--white); border-radius: 8px; padding: 15px 0; }
.menu-title { padding: 10px 20px; font-size: 16px; font-weight: bold; color: #333; border-bottom: 1px solid #eee; margin-bottom: 10px; }
.menu-item { padding: 12px 20px; color: #666; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.menu-item:hover, .menu-item.active { color: var(--primary); background: #fff5f5; }
.menu-item i { width: 20px; }

.user-card { background: var(--white); border-radius: 8px; padding: 25px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.user-avatar { width: 80px; height: 80px; border-radius: 50%; background: #f0f0f0; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
.user-level { color: var(--primary); font-size: 13px; }

.order-tabs { background: var(--white); border-radius: 8px; }
.order-tabs-header { display: flex; border-bottom: 1px solid #eee; }
.order-tab { padding: 15px 25px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.order-tab:hover, .order-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.order-list { padding: 20px; }
.order-card { border: 1px solid #eee; border-radius: 8px; margin-bottom: 15px; overflow: hidden; }
.order-card-header { padding: 12px 15px; background: #fafafa; display: flex; justify-content: space-between; font-size: 13px; color: #666; }
.order-card-body { padding: 15px; display: flex; align-items: center; gap: 15px; }
.order-card-info { flex: 1; }
.order-card-name { font-size: 14px; margin-bottom: 5px; }
.order-card-price { color: var(--primary); font-weight: bold; }
.order-card-footer { padding: 12px 15px; background: #fafafa; display: flex; justify-content: flex-end; gap: 15px; }
.btn-small { padding: 6px 20px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-outline { border: 1px solid #ddd; background: white; color: #666; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { border: none; background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

/* ========== Footer ========== */
.footer-wrap { background: #333; color: #ccc; padding: 40px 0 20px; margin-top: 40px; }
.footer-service { display: flex; justify-content: space-around; margin-bottom: 30px; }
.footer-service dl { text-align: center; }
.footer-service dt { font-size: 16px; color: white; margin-bottom: 15px; }
.footer-service dd { margin-bottom: 8px; }
.footer-service a { color: #999; font-size: 13px; }
.footer-service a:hover { color: var(--primary-light); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #444; font-size: 13px; }
.footer-bottom a { color: #999; margin: 0 10px; }
.footer-bottom a:hover { color: var(--primary-light); }

/* ========== Toast ========== */
.msg-toast { position: fixed; top: 20%; left: 50%; transform: translateX(-50%) translateY(-20px); padding: 12px 30px; border-radius: 8px; font-size: 14px; z-index: 9999; opacity: 0; transition: all 0.3s; pointer-events: none; }
.msg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.msg-toast.success { background: rgba(0,0,0,0.8); color: white; }
.msg-toast.error { background: #f00; color: white; }

/* ========== Loading ========== */
.loading { text-align: center; padding: 50px; color: #999; }
.loading i { margin-right: 10px; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.empty-panel { text-align: center; padding: 80px 0; color: #999; }
.empty-panel i { font-size: 60px; margin-bottom: 20px; display: block; }
.empty-panel p { font-size: 14px; }

/* ========== 快捷入口 ========== */
.quick-entry { background: var(--white); padding: 20px; border-radius: 8px; margin: 20px 0; }
.entry-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; }
.entry-item { text-align: center; padding: 15px 10px; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.entry-item:hover { background: #fff5f5; }
.entry-item i { font-size: 28px; color: var(--primary); margin-bottom: 8px; display: block; }
.entry-item span { font-size: 13px; color: #666; }

/* ========== 分类推荐 ========== */
.category-block { background: var(--white); border-radius: 8px; margin: 20px 0; overflow: hidden; }
.category-block-header { padding: 15px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; justify-content: space-between; align-items: center; }
.category-block-header h3 { font-size: 18px; }
.category-block-header a { color: white; font-size: 13px; }
.category-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 20px; }

/* ========== 热销榜单 ========== */
.hot-rank { display: flex; flex-direction: column; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; cursor: pointer; }
.rank-item:hover { background: #fafafa; }
.rank-num { width: 24px; height: 24px; background: #999; color: white; border-radius: 50%; text-align: center; line-height: 24px; font-size: 12px; }
.rank-item:nth-child(1) .rank-num, .rank-item:nth-child(2) .rank-num, .rank-item:nth-child(3) .rank-num { background: var(--primary); }
.rank-img { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; }
.rank-img img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; }
.rank-name { font-size: 13px; color: #333; margin-bottom: 5px; line-height: 1.3; }
.rank-price { color: var(--primary); font-weight: bold; }

/* ========== 响应式补充 ========== */
@media (max-width: 1200px) {
  :root { --width: 100%; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-list { grid-template-columns: repeat(4, 1fr); }
}

/* ========== 购物车 ========== */
.cart-layout { display: flex; gap: 20px; }
.cart-main { flex: 1; }
.cart-sidebar { width: 320px; }
.cart-box { background: white; border-radius: 8px; overflow: hidden; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: #fafafa; border-bottom: 1px solid #eee; font-size: 14px; }
.cart-items { padding: 0; }
.cart-item { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; gap: 15px; }
.cart-item:hover { background: #fafafa; }
.cart-check { width: 18px; height: 18px; cursor: pointer; }
.cart-img { width: 80px; height: 80px; flex-shrink: 0; border-radius: 6px; overflow: hidden; border: 1px solid #f0f0f0; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; }
.cart-name { font-size: 14px; color: #333; margin-bottom: 5px; }
.cart-name a:hover { color: var(--primary); }
.cart-price { font-size: 14px; }
.cart-num { display: flex; align-items: center; }
.cart-num input { width: 40px; height: 30px; border: 1px solid #ddd; text-align: center; font-size: 14px; border-radius: 4px; }
.quantity-box { display: flex; align-items: center; gap: 10px; }
.quantity-btn { width: 30px; height: 30px; border: 1px solid #ddd; background: #f5f5f5; border-radius: 4px; cursor: pointer; font-size: 16px; }
.quantity-btn:hover { background: #eee; }
.quantity-input { width: 50px; height: 30px; border: 1px solid #ddd; text-align: center; border-radius: 4px; font-size: 14px; }
.cart-del { width: 40px; text-align: center; color: #ccc; cursor: pointer; font-size: 16px; }
.cart-del:hover { color: var(--primary); }
.cart-summary { background: white; border-radius: 8px; padding: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.summary-total { font-size: 16px; font-weight: bold; color: #333; margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; }
.summary-total span:last-child { color: var(--primary); font-size: 22px; }
.btn-checkout { width: 100%; height: 48px; background: var(--primary); color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; margin-top: 15px; transition: background .2s; }
.btn-checkout:hover:not(:disabled) { background: var(--primary-dark); }
.btn-checkout:disabled { background: #ccc; cursor: not-allowed; }

/* ========== 订单 ========== */
.order-layout { display: flex; gap: 20px; }
.order-main { flex: 1; }
.order-sidebar { width: 340px; }
.address-block { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.address-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.address-item { padding: 12px 15px; border: 2px solid #eee; border-radius: 6px; cursor: pointer; margin-bottom: 10px; transition: all .2s; }
.address-item:hover { border-color: #ddd; }
.address-item.active { border-color: var(--primary); background: #fff5f5; }
.address-name { font-weight: 500; margin-bottom: 3px; }
.address-detail { font-size: 13px; color: #666; }
.order-goods { background: white; border-radius: 8px; padding: 20px; }
.order-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.order-item:last-child { border-bottom: none; }
.order-item-img { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; border: 1px solid #f0f0f0; flex-shrink: 0; }
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; }
.order-item-name { font-size: 14px; color: #333; margin-bottom: 3px; }
.order-item-name a:hover { color: var(--primary); }
.order-item-price { font-size: 12px; color: #999; }
.order-card { background: white; border-radius: 8px; margin-bottom: 15px; overflow: hidden; border: 1px solid #eee; }
.order-card-header { display: flex; justify-content: space-between; padding: 12px 15px; background: #fafafa; font-size: 13px; color: #666; border-bottom: 1px solid #eee; }
.order-card-body { padding: 10px 15px; }
.order-card-footer { display: flex; justify-content: flex-end; align-items: center; gap: 15px; padding: 12px 15px; border-top: 1px solid #eee; font-size: 14px; }
.btn-small { padding: 6px 15px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-primary { background: var(--primary); color: white; border: none; }
.btn-primary:hover { background: var(--primary-dark); }
.order-tabs { }
.order-tabs-header { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.order-tab { padding: 10px 20px; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.order-tab:hover { color: var(--primary); }
.order-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.order-list { }
.order-list .empty-panel { padding: 60px; }

/* ========== 用户中心 ========== */
.user-layout { display: flex; gap: 20px; padding: 20px 0; }
.user-sidebar { width: 220px; flex-shrink: 0; }
.user-content { flex: 1; background: white; border-radius: 8px; padding: 20px; min-height: 500px; }
.user-card { background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 8px; padding: 20px; color: white; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 60px; height: 60px; background: rgba(255,255,255,0.3); border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 16px; font-weight: 500; margin-bottom: 3px; }
.user-level { font-size: 12px; opacity: 0.8; }
.user-menu { background: white; border-radius: 8px; overflow: hidden; }
.menu-title { padding: 12px 15px; font-size: 14px; color: #999; border-bottom: 1px solid #eee; }
.menu-item { padding: 12px 15px; cursor: pointer; font-size: 14px; color: #333; transition: all .2s; display: flex; align-items: center; gap: 10px; }
.menu-item:hover, .menu-item.active { background: #fff5f5; color: var(--primary); }
.menu-item i { width: 18px; text-align: center; }

/* ========== 详情页 ========== */
.detail-layout { display: flex; gap: 30px; margin-bottom: 30px; }
.detail-gallery { width: 420px; flex-shrink: 0; }
.gallery-main { width: 420px; height: 420px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fafafa; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumb { width: 70px; height: 70px; border: 2px solid #eee; border-radius: 4px; overflow: hidden; cursor: pointer; transition: border-color .2s; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-name { font-size: 22px; color: #333; line-height: 1.5; margin-bottom: 10px; }
.price-block { background: #fafafa; padding: 15px; border-radius: 6px; margin: 15px 0; }
.price-row { display: flex; align-items: baseline; margin-bottom: 8px; }
.price-row:last-child { margin-bottom: 0; }
.price-label { width: 80px; color: #999; font-size: 14px; }
.detail-price { font-size: 28px; color: var(--primary); font-weight: bold; }
.original-price { text-decoration: line-through; color: #999; font-size: 14px; }
.detail-specs { margin: 15px 0; }
.spec-item { margin-bottom: 12px; }
.spec-label { display: block; color: #666; font-size: 14px; margin-bottom: 8px; }
.spec-value { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-btn { padding: 6px 15px; border: 1px solid #ddd; border-radius: 4px; background: white; cursor: pointer; font-size: 13px; transition: all .2s; }
.spec-btn:hover { border-color: var(--primary); color: var(--primary); }
.spec-btn.active { border-color: var(--primary); background: var(--primary); color: white; }
.action-btns { display: flex; gap: 15px; margin-top: 20px; }
.btn-cart { flex: 1; height: 48px; border: 2px solid var(--primary); color: var(--primary); background: white; border-radius: 6px; font-size: 16px; cursor: pointer; transition: all .2s; }
.btn-cart:hover { background: #fff5f5; }
.btn-buy { flex: 1; height: 48px; border: none; background: var(--primary); color: white; border-radius: 6px; font-size: 16px; cursor: pointer; transition: background .2s; }
.btn-buy:hover { background: var(--primary-dark); }
.detail-tabs { background: white; border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.tab-nav { display: flex; border-bottom: 2px solid #eee; }
.tab-item { padding: 14px 30px; cursor: pointer; font-size: 15px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }

/* ========== Toast ========== */
.msg-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); padding: 10px 25px; border-radius: 6px; font-size: 14px; z-index: 9999; opacity: 0; transition: opacity .3s; pointer-events: none; }
.msg-toast.show { opacity: 1; }
.msg-toast.success { background: #4caf50; color: white; }
.msg-toast.error { background: #f44336; color: white; }
.loading { text-align: center; padding: 40px; color: #999; font-size: 14px; }
.loading i { margin-right: 5px; }
.empty-panel { text-align: center; padding: 60px; color: #999; font-size: 14px; }
.empty-panel i { font-size: 50px; display: block; margin-bottom: 15px; opacity: 0.3; }
.empty-panel p { margin: 10px 0; }
.sidebar-block { background: white; border-radius: 8px; overflow: hidden; margin-bottom: 15px; }
.sidebar-title { padding: 12px 15px; font-size: 14px; color: #333; font-weight: 500; border-bottom: 1px solid #eee; }
.sidebar-content { padding: 10px 0; }
.sidebar-item { padding: 8px 15px; font-size: 13px; color: #666; cursor: pointer; transition: all .2s; }
.sidebar-item:hover, .sidebar-item.active { background: #fff5f5; color: var(--primary); }
.sidebar-item a { display: flex; justify-content: space-between; color: inherit; }
.sidebar-item .count { color: #999; font-size: 12px; }
