/* ========================================
   商城模块统一样式 - 蓝色主题
   主色：#0C5FAF  辅色：#1869b8
   强调色：#e74c3c  背景：#f5f5f5  卡片：#ffffff
   ======================================== */

/* ---- 通用 ---- */
.shop-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 15px; }
.shop-wrap-narrow { max-width: 1100px; margin: 0 auto; padding: 20px 15px; }

/* ---- 面包屑 ---- */
.shop-breadcrumb { font-size: 14px; color: #666; margin-bottom: 15px; }
.shop-breadcrumb a { color: #0C5FAF; text-decoration: none; }
.shop-breadcrumb a:hover { text-decoration: underline; }
.shop-breadcrumb .sep { margin: 0 6px; color: #999; }

/* ---- 搜索框 ---- */
.search-box { background: #fff; padding: 15px 20px; border-radius: 6px; margin-bottom: 15px; display: flex; gap: 10px; align-items: center; }
.search-box input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; outline: none; }
.search-box input:focus { border-color: #0C5FAF; }
.search-box button { padding: 8px 22px; background: #0C5FAF; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: #1869b8; }

/* ---- 分类行 ---- */
.cate-row { background: #fff; padding: 10px 20px; border-radius: 6px; margin-bottom: 15px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cate-row .label { color: #999; margin-right: 10px; font-size: 13px; }
.cate-row a { padding: 5px 12px; color: #555; text-decoration: none; border-radius: 4px; font-size: 13px; border: 1px solid transparent; transition: all .15s; }
.cate-row a:hover { border-color: #0C5FAF; color: #0C5FAF; }
.cate-row a.active { border-color: #0C5FAF; color: #0C5FAF; background: #e8f0fe; }

/* ---- 筛选排序 ---- */
.filters { background: #fff; padding: 12px 20px; border-radius: 6px; margin-bottom: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .label { color: #999; margin-right: 10px; font-size: 13px; }
.filters a { padding: 4px 12px; color: #333; text-decoration: none; border-radius: 14px; font-size: 13px; transition: all .15s; }
.filters a:hover { color: #0C5FAF; }
.filters a.active { background: #0C5FAF; color: #fff; }

/* ---- 商品网格 ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.goods-card { background: #fff; border-radius: 6px; overflow: hidden; cursor: pointer; transition: all .15s; border: 1px solid transparent; text-decoration: none; color: #333; display: block; }
.goods-card:hover { transform: translateY(-3px); box-shadow: 0 4px 20px rgba(0,0,0,0.1); border-color: #0C5FAF; }
.goods-card .thumb { width: 100%; height: 200px; background: #f0f0f0; object-fit: cover; display: block; }
.goods-card .thumb.empty { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 40px; }
.goods-card .body { padding: 10px 12px; }
.goods-card .title { font-size: 14px; line-height: 1.4; color: #333; height: 40px; overflow: hidden; margin-bottom: 8px; }
.goods-card .price-row { display: flex; justify-content: space-between; align-items: center; }
.goods-card .price { color: #e74c3c; font-weight: 700; font-size: 18px; }
.goods-card .price small { font-size: 12px; font-weight: normal; color: #999; margin-left: 5px; }
.goods-card .sales { font-size: 12px; color: #999; }
.tag { display: inline-block; padding: 1px 6px; background: #e8f0fe; color: #0C5FAF; font-size: 11px; border-radius: 2px; margin-right: 4px; }

/* ---- 分页 ---- */
.pagination { text-align: center; padding: 20px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; margin: 0 2px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; text-decoration: none; color: #333; font-size: 13px; }
.pagination a.current, .pagination a:hover { background: #0C5FAF; color: #fff; border-color: #0C5FAF; }
.pagination .info { color: #999; margin-left: 10px; }

/* ---- 空状态 ---- */
.shop-empty { padding: 60px 20px; text-align: center; color: #999; background: #fff; border-radius: 6px; font-size: 15px; }
.shop-empty a { color: #0C5FAF; text-decoration: none; margin-left: 10px; }
.shop-empty a:hover { text-decoration: underline; }

/* ========================================
   商品详情页
   ======================================== */
.detail { background: #fff; border-radius: 8px; padding: 30px; display: flex; gap: 40px; margin-bottom: 20px; flex-wrap: wrap; }
.gallery { width: 400px; flex-shrink: 0; }
.gallery .main-img { width: 400px; height: 400px; background: #f5f5f5; object-fit: contain; border-radius: 4px; }
.gallery .main-img.empty { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 80px; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs img { width: 60px; height: 60px; object-fit: cover; border: 2px solid transparent; border-radius: 3px; cursor: pointer; transition: border-color .15s; }
.gallery .thumbs img:hover, .gallery .thumbs img.active { border-color: #0C5FAF; }

.info { flex: 1; min-width: 300px; }
.info .g-title { font-size: 22px; font-weight: 600; line-height: 1.4; margin: 0 0 15px; }
.info .g-summary { color: #666; font-size: 13px; line-height: 1.7; margin-bottom: 20px; padding: 10px 15px; background: #fafafa; border-radius: 4px; }
.price-block { background: linear-gradient(135deg, #0C5FAF, #1869b8); padding: 20px; border-radius: 6px; color: #fff; margin-bottom: 20px; }
.price-block .price { font-size: 36px; font-weight: 700; }
.price-block .price small { font-size: 14px; }
.price-block .market { text-decoration: line-through; opacity: 0.85; font-size: 14px; margin-left: 10px; }
.price-block .sales { margin-top: 10px; font-size: 13px; opacity: 0.95; }

.form-row { margin: 12px 0; display: flex; align-items: center; }
.form-row .label { width: 80px; color: #999; font-size: 13px; }
.form-row .value { flex: 1; }
.spec-select { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-select span { padding: 6px 15px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 13px; transition: all .15s; }
.spec-select span:hover { border-color: #0C5FAF; color: #0C5FAF; }
.spec-select span.active { border-color: #0C5FAF; color: #0C5FAF; background: #e8f0fe; }
.spec-select span.disabled { color: #ccc; cursor: not-allowed; background: #f5f5f5; }

.num-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.num-control button { width: 34px; height: 34px; background: #f5f5f5; border: none; cursor: pointer; font-size: 18px; }
.num-control button:hover { background: #e8e8e8; }
.num-control input { width: 60px; height: 34px; text-align: center; border: none; outline: none; font-size: 16px; }

.btns { margin-top: 25px; display: flex; gap: 12px; }
.btn-buy { flex: 1; padding: 14px; background: #0C5FAF; color: #fff; font-size: 16px; font-weight: 600; border: none; border-radius: 4px; cursor: pointer; transition: background .15s; }
.btn-buy:hover { background: #1869b8; }
.btn-cart { flex: 1; padding: 14px; background: #e67e22; color: #fff; font-size: 16px; font-weight: 600; border: none; border-radius: 4px; cursor: pointer; transition: background .15s; }
.btn-cart:hover { background: #d35400; }

.tabs { background: #fff; border-radius: 8px; padding: 20px; }
.tab-nav { display: flex; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.tab-nav a { padding: 12px 20px; text-decoration: none; color: #666; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.tab-nav a:hover { color: #0C5FAF; }
.tab-nav a.active { color: #0C5FAF; border-color: #0C5FAF; }
.tab-content { font-size: 14px; line-height: 1.8; color: #333; padding: 20px 0; min-height: 200px; }
.tab-content img { max-width: 100%; height: auto; }

.related { background: #fff; border-radius: 8px; padding: 20px; margin-top: 20px; }
.related h3 { margin: 0 0 15px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.related-item { text-decoration: none; color: #333; }
.related-item img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; background: #f5f5f5; }
.related-item .r-title { font-size: 13px; line-height: 1.4; margin: 6px 0; height: 38px; overflow: hidden; }
.related-item .r-price { color: #e74c3c; font-weight: 600; font-size: 14px; }

.notice { padding: 10px; background: #e8f0fe; border-radius: 4px; font-size: 13px; color: #0C5FAF; margin-bottom: 15px; }
.notice a { color: #0C5FAF; font-weight: 600; }

/* ========================================
   购物车
   ======================================== */
.cart-box { background: #fff; border-radius: 6px; padding: 30px; }
.cart-header { display: flex; align-items: center; padding: 15px 20px; background: #fafafa; font-size: 13px; color: #666; border-radius: 4px; margin-bottom: 10px; }
.cart-header div:nth-child(1) { flex: 2; }
.cart-header div:nth-child(2) { flex: 3; }
.cart-header div:nth-child(3) { width: 120px; text-align: center; }
.cart-header div:nth-child(4) { width: 120px; text-align: center; }
.cart-header div:nth-child(5) { width: 120px; text-align: center; }
.cart-header div:nth-child(6) { width: 100px; text-align: center; }

.cart-row { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; }
.cart-row .img-box { width: 80px; height: 80px; flex-shrink: 0; margin-right: 15px; }
.cart-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; background: #f5f5f5; }
.cart-row .cart-info { flex: 3; padding-right: 15px; }
.cart-row .cart-info .t { font-size: 14px; color: #333; margin-bottom: 6px; }
.cart-row .cart-info .s { color: #999; font-size: 12px; }
.cart-row .cart-price { width: 120px; text-align: center; color: #e74c3c; font-weight: 600; }
.cart-row .num-control { width: 120px; display: flex; align-items: center; justify-content: center; }
.cart-row .num-control button { width: 28px; height: 28px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.cart-row .num-control input { width: 40px; height: 28px; text-align: center; border: 1px solid #ddd; border-left: none; border-right: none; outline: none; }
.cart-row .subtotal { width: 120px; text-align: center; color: #e74c3c; font-weight: 700; font-size: 16px; }
.cart-row .action { width: 100px; text-align: center; }
.cart-row .action a { color: #999; cursor: pointer; text-decoration: none; }
.cart-row .action a:hover { color: #e74c3c; }

.cart-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px; margin-top: 15px; background: #e8f0fe; border-radius: 6px; }
.cart-footer .total { font-size: 14px; color: #666; }
.cart-footer .total .amount { color: #e74c3c; font-size: 26px; font-weight: 700; margin: 0 5px; }
.cart-footer button { padding: 12px 40px; background: #0C5FAF; color: #fff; border: none; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s; }
.cart-footer button:hover { background: #1869b8; }

/* ========================================
   订单列表
   ======================================== */
.order-card { background: #fff; border-radius: 6px; margin-bottom: 15px; overflow: hidden; }
.order-header { display: flex; padding: 12px 20px; background: #fafafa; font-size: 13px; color: #666; justify-content: space-between; align-items: center; }
.order-header .no { font-weight: 600; color: #333; font-family: monospace; }
.order-header .date { color: #999; }
.order-row { display: flex; padding: 20px; align-items: center; }
.order-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; background: #f5f5f5; margin-right: 15px; }
.order-row .info { flex: 3; padding-right: 15px; }
.order-row .info .t { font-size: 14px; margin-bottom: 4px; }
.order-row .info .s { color: #999; font-size: 12px; }
.order-row .qty { width: 100px; text-align: center; color: #666; }
.order-row .oprice { width: 100px; text-align: center; color: #e74c3c; font-weight: 600; }
.order-row .status { width: 120px; text-align: center; }
.order-row .action { width: 160px; text-align: center; }
.order-row .action a { display: inline-block; padding: 4px 12px; margin: 2px; border: 1px solid #ddd; border-radius: 3px; color: #333; text-decoration: none; font-size: 12px; transition: all .15s; }
.order-row .action a:hover { border-color: #0C5FAF; color: #0C5FAF; }
.order-row .action a.primary { background: #0C5FAF; color: #fff; border-color: #0C5FAF; }
.order-row .action a.primary:hover { background: #1869b8; }

.tag-pending { display: inline-block; padding: 3px 10px; background: #fff3e0; color: #ff9800; border-radius: 3px; font-size: 12px; }
.tag-shipping { display: inline-block; padding: 3px 10px; background: #e3f2fd; color: #2196f3; border-radius: 3px; font-size: 12px; }
.tag-completed { display: inline-block; padding: 3px 10px; background: #e8f5e9; color: #4caf50; border-radius: 3px; font-size: 12px; }
.tag-cancel { display: inline-block; padding: 3px 10px; background: #eee; color: #999; border-radius: 3px; font-size: 12px; }

/* ========================================
   订单详情
   ======================================== */
.status-bar { background: linear-gradient(135deg, #0C5FAF, #1869b8); color: #fff; padding: 30px; border-radius: 6px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.status-bar h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.status-bar p { margin: 0; opacity: 0.95; font-size: 13px; }
.status-bar .btn-group a { padding: 8px 18px; margin-left: 10px; background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; border-radius: 4px; border: 1px solid rgba(255,255,255,0.4); font-size: 13px; transition: all .15s; }
.status-bar .btn-group a:hover { background: rgba(255,255,255,0.35); }
.status-bar .btn-group a.primary { background: #fff; color: #0C5FAF; }
.status-bar .btn-group a.primary:hover { background: #f0f0f0; }

.section { background: #fff; padding: 20px 25px; border-radius: 6px; margin-bottom: 15px; }
.section h3 { margin: 0 0 15px; font-size: 16px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.section .srow { display: flex; padding: 8px 0; font-size: 14px; }
.section .srow .slabel { width: 100px; color: #666; }
.section .srow .sval { flex: 1; }

.item-row { display: flex; padding: 15px 0; border-bottom: 1px solid #f0f0f0; align-items: center; }
.item-row:last-child { border-bottom: none; }
.item-row img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; background: #f5f5f5; margin-right: 15px; }
.item-row .info { flex: 2; }
.item-row .info .t { font-size: 14px; margin-bottom: 4px; }
.item-row .info .s { font-size: 12px; color: #999; }
.item-row .iprice { width: 100px; text-align: center; color: #e74c3c; }
.item-row .iqty { width: 100px; text-align: center; color: #666; }
.item-row .itotal { width: 100px; text-align: center; font-weight: 600; color: #e74c3c; }

.price-summary { display: flex; justify-content: flex-end; padding: 20px; background: #fafafa; border-radius: 4px; }
.price-summary .inner { text-align: right; font-size: 14px; line-height: 2; }
.price-summary .inner .big { color: #e74c3c; font-size: 22px; font-weight: 700; }

.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-methods button { padding: 10px 20px; border: 2px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 14px; transition: all .15s; }
.pay-methods button:hover { border-color: #0C5FAF; color: #0C5FAF; }
.pay-methods button.active { border-color: #0C5FAF; color: #0C5FAF; background: #e8f0fe; }
.pay-btn { padding: 14px 40px; background: #0C5FAF; color: #fff; border: none; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 20px; transition: background .15s; }
.pay-btn:hover { background: #1869b8; }

/* ========================================
   支付完成
   ======================================== */
.pay-result { max-width: 600px; margin: 50px auto; padding: 40px 30px; background: #fff; border-radius: 8px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.pay-result .icon { font-size: 80px; margin-bottom: 20px; }
.pay-result h2 { margin: 0 0 15px; font-size: 24px; color: #4caf50; }
.pay-result p { color: #666; margin: 8px 0; font-size: 14px; }
.pay-result .amount { color: #e74c3c; font-size: 32px; font-weight: 700; margin: 20px 0; }
.pay-result .btn-row { margin-top: 30px; display: flex; gap: 12px; justify-content: center; }
.pay-result .btn-row a { padding: 12px 30px; text-decoration: none; border-radius: 4px; font-size: 14px; transition: all .15s; }
.pay-result .btn-primary { background: #0C5FAF; color: #fff; }
.pay-result .btn-primary:hover { background: #1869b8; }
.pay-result .btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #e0e0e0; }
.pay-result .btn-secondary:hover { border-color: #0C5FAF; color: #0C5FAF; }
