/* ErphpDown 商城 - 前台样式 */

.eshop { max-width: 1200px; margin: 20px auto; padding: 0 15px; color: #333; line-height: 1.7; }
.eshop a { color: inherit; text-decoration: none; }
.eshop * { box-sizing: border-box; }

.eshop-title { font-size: 18px; font-weight: 600; margin: 24px 0 14px; padding-left: 10px; border-left: 4px solid #e54343; }
.eshop-empty { padding: 40px; text-align: center; color: #999; }

/* 分类条 */
.eshop-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.eshop-cats a { padding: 5px 14px; border-radius: 20px; background: #f4f4f4; color: #666; font-size: 13px; }
.eshop-cats a:hover { background: #ececec; }
.eshop-cats a.active { background: #e54343; color: #fff; }

/* 商品网格 */
.eshop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eshop-cols-2 { grid-template-columns: repeat(2, 1fr); }
.eshop-cols-3 { grid-template-columns: repeat(3, 1fr); }
.eshop-cols-5 { grid-template-columns: repeat(5, 1fr); }

.eshop-card { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; transition: .2s; }
.eshop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.eshop-card-thumb { display: block; position: relative; padding-top: 100%; background: #fafafa; }
.eshop-card-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.eshop-card-body { padding: 12px; }
.eshop-card-title { font-size: 14px; font-weight: 500; margin: 0 0 6px; height: 40px; overflow: hidden; }
.eshop-card-desc { font-size: 12px; color: #999; margin: 0 0 8px; height: 36px; overflow: hidden; }
.eshop-card-price { margin-bottom: 10px; }
.eshop-price { color: #e54343; font-size: 18px; font-weight: 600; }
.eshop-price-lg { font-size: 28px; }
.eshop-origin { color: #bbb; font-size: 13px; text-decoration: line-through; margin-left: 6px; }
.eshop-badge { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 3px; }
.eshop-badge-out { background: #999; }

/* 按钮 */
.eshop-btn { display: inline-block; padding: 8px 18px; background: #e54343; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; text-align: center; transition: .2s; }
.eshop-btn:hover { background: #d13b3b; color: #fff; }
.eshop-btn-sm { padding: 5px 12px; font-size: 13px; }
.eshop-btn-lg { padding: 12px 32px; font-size: 16px; }
.eshop-btn-outline { background: #fff; color: #e54343; border: 1px solid #e54343; }
.eshop-btn-outline:hover { background: #fff2f2; color: #e54343; }
.eshop-btn[disabled] { background: #ccc; cursor: not-allowed; }
.eshop-link { color: #e54343; cursor: pointer; background: none; border: none; padding: 0; font-size: 13px; }

/* 详情 */
.eshop-breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; }
.eshop-breadcrumb a { color: #999; }
.eshop-detail { display: grid; grid-template-columns: 440px 1fr; gap: 30px; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #eee; }
.eshop-gallery-main { border: 1px solid #eee; border-radius: 6px; overflow: hidden; background: #fafafa; }
.eshop-gallery-main img { width: 100%; display: block; }
.eshop-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.eshop-gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border: 2px solid #eee; border-radius: 4px; cursor: pointer; }
.eshop-gallery-thumbs img.active { border-color: #e54343; }

.eshop-info h1 { font-size: 22px; margin: 0 0 10px; }
.eshop-product-excerpt { color: #888; font-size: 14px; background: #fafafa; padding: 10px 12px; border-radius: 4px; }
.eshop-pricebox { background: #fff8f8; padding: 14px 16px; border-radius: 6px; margin: 14px 0; }
.eshop-meta { list-style: none; margin: 0 0 16px; padding: 0; font-size: 13px; color: #777; }
.eshop-meta li { display: inline-block; margin-right: 20px; }
.eshop-buybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 数量 */
.eshop-qty { display: inline-flex; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.eshop-qty button { width: 32px; height: 32px; border: none; background: #f5f5f5; cursor: pointer; font-size: 16px; line-height: 1; }
.eshop-qty button:hover { background: #eaeaea; }
.eshop-qty input { width: 48px; height: 32px; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; text-align: center; font-size: 14px; }
.eshop-qty-lg button { width: 40px; height: 40px; }
.eshop-qty-lg input { width: 56px; height: 40px; }

.eshop-content { margin-top: 24px; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #eee; }
.eshop-post-content img { max-width: 100%; height: auto; }

/* 表格 */
.eshop-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.eshop-table th { background: #fafafa; padding: 10px; text-align: left; font-weight: 500; border-bottom: 1px solid #eee; }
.eshop-table td { padding: 12px 10px; border-bottom: 1px solid #f2f2f2; vertical-align: middle; }
.eshop-cart-item { display: flex; align-items: center; gap: 10px; }
.eshop-cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }

/* 购物车 / 结算 */
.eshop-cart-form, .eshop-checkout-goods { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 16px; }
.eshop-cart-total { text-align: right; padding: 16px 10px 0; }
.eshop-cart-total p { margin: 4px 0; }
.eshop-grand { font-size: 15px; }
.eshop-grand strong { color: #e54343; font-size: 20px; }
.eshop-empty-box { text-align: center; padding: 60px 20px; background: #fff; border-radius: 8px; }
.eshop-empty-box p { color: #999; margin-bottom: 16px; }

/* 表单 */
.eshop-form { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; }
.eshop-row { margin-bottom: 14px; }
.eshop-row label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.eshop-row label em { color: #e54343; font-style: normal; }
.eshop-row input, .eshop-row textarea { width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.eshop-row input:focus, .eshop-row textarea:focus { border-color: #e54343; outline: none; }
.eshop-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* 支付方式 */
.eshop-paytypes { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.eshop-paytype { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 14px; }
.eshop-paytype.active { border-color: #e54343; background: #fff8f8; }
.eshop-paytype small { color: #999; font-size: 12px; }
.eshop-submit { width: 100%; margin-top: 10px; }
.eshop-tip { font-size: 13px; color: #888; background: #fafafa; padding: 10px 12px; border-radius: 4px; margin: 12px 0; }
.eshop-tip-warn { background: #fff6e6; color: #a86b00; }

/* 状态 */
.eshop-status { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; background: #f0f0f0; color: #888; }
.eshop-status-0 { background: #fff4e5; color: #d48806; }
.eshop-status-1 { background: #e6f4ff; color: #0958d9; }
.eshop-status-2 { background: #f6ffed; color: #389e0d; }
.eshop-status-3 { background: #f0f0f0; color: #555; }
.eshop-status-4, .eshop-status--1 { background: #f5f5f5; color: #aaa; }

/* 我的订单 */
.eshop-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.eshop-filters a { padding: 5px 14px; border-radius: 20px; background: #f4f4f4; font-size: 13px; color: #666; }
.eshop-filters a.active { background: #e54343; color: #fff; }
.eshop-order-table, .eshop-order-detail .eshop-table { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.eshop-order-num-cell { font-size: 12px; color: #888; }
.eshop-order-detail .eshop-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.eshop-detail-block { background: #fafafa; padding: 14px 16px; border-radius: 6px; }
.eshop-detail-block h3 { font-size: 14px; margin: 0 0 10px; }
.eshop-detail-block p { margin: 4px 0; font-size: 13px; color: #555; }

/* 分页 */
.eshop-pagination { text-align: center; margin: 24px 0; }
.eshop-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #eee; border-radius: 4px; color: #666; font-size: 13px; }
.eshop-pagination .page-numbers.current { background: #e54343; color: #fff; border-color: #e54343; }

/* 支付弹窗 */
.eshop-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.eshop-modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.eshop-modal-box { position: relative; width: 380px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.eshop-modal-head { padding: 14px 18px; font-size: 16px; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.eshop-modal-close { float: right; cursor: pointer; color: #999; font-size: 20px; line-height: 1; }
.eshop-modal-body { padding: 20px; text-align: center; }
.eshop-pay-amount { font-size: 14px; color: #666; }
.eshop-pay-amount strong { color: #e54343; font-size: 24px; }
.eshop-qrcodes { display: flex; gap: 14px; justify-content: center; margin: 16px 0; }
.eshop-qr { display: none; }
.eshop-qr img { width: 150px; height: 150px; border: 1px solid #eee; padding: 6px; background: #fff; }
.eshop-qr p { font-size: 12px; color: #888; margin: 6px 0 0; }
.eshop-pay-tip { font-size: 13px; color: #e54343; }
.eshop-order-num { font-size: 12px; color: #aaa; margin: 0; }

/* 提示气泡 */
.eshop-toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 20px; border-radius: 4px; z-index: 100000; font-size: 14px; }

/* 嵌入个人中心时去掉外框间距 */
.eshop-user-panel { max-width: 100%; margin: 0; padding: 0; }
.eshop-user-panel .eshop-table { border: 1px solid #eee; }
.eshop-user-panel .eshop-title:first-child { margin-top: 0; }

/* 响应式 */
@media (max-width: 900px) {
	.eshop-grid, .eshop-cols-4 { grid-template-columns: repeat(2, 1fr); }
	.eshop-detail { grid-template-columns: 1fr; }
	.eshop-order-detail .eshop-detail-grid { grid-template-columns: 1fr; }
	.eshop-row-3 { grid-template-columns: 1fr; }
	.eshop-card-title { height: auto; }
}
@media (max-width: 520px) {
	.eshop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.eshop-card-desc { display: none; }
}
