/* ========== 商城全局样式 ========== */
*, *::before, *::after { box-sizing: border-box; }
body { margin:0; padding:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; background:#f8f9fa; color:#333; }

/* 头部 */
.shop-header { background:#2c3e50; color:#fff; }
.shop-header-inner { max-width:1200px; margin:0 auto; padding:15px 20px; display:flex; justify-content:space-between; align-items:center; }
.shop-logo a { color:#fff; text-decoration:none; font-size:22px; font-weight:700; letter-spacing:1px; }
.shop-nav a { color:#bdc3c7; text-decoration:none; margin-left:20px; font-size:14px; transition:color 0.2s; }
.shop-nav a:hover, .shop-nav a.active { color:#fff; }

/* 主体 */
.shop-body { max-width:1200px; margin:20px auto; padding:0 20px; display:flex; gap:25px; }

/* 侧边栏 */
.shop-sidebar { width:220px; flex-shrink:0; background:#fff; border-radius:8px; padding:20px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.shop-sidebar h3 { margin:0 0 12px; font-size:15px; color:#2c3e50; padding-bottom:8px; border-bottom:1px solid #eee; }
.category-list { list-style:none; padding:0; margin:0; }
.category-list li { margin-bottom:6px; }
.category-list a { display:block; padding:6px 10px; color:#555; text-decoration:none; font-size:13px; border-radius:4px; transition:all 0.2s; }
.category-list a:hover, .category-list a.active { background:#3498db; color:#fff; }
.sidebar-shipping { margin-top:15px; padding-top:10px; border-top:1px solid #eee; font-size:13px; color:#888; }

/* 主内容区 */
.shop-main { flex:1; min-width:0; }

/* 工具栏 */
.shop-toolbar { margin-bottom:20px; }
.search-form { display:flex; gap:8px; }
.search-form input { flex:1; padding:10px 14px; border:1px solid #d0d7de; border-radius:6px; font-size:14px; outline:none; }
.search-form input:focus { border-color:#3498db; }
.search-form button { padding:10px 20px; background:#3498db; color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:14px; }
.search-form button:hover { background:#2980b9; }

/* 产品网格 */
.product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:20px; }

/* 产品卡片 */
.product-card { background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.08); transition:transform 0.2s,box-shadow 0.2s; }
.product-card:hover { transform:translateY(-3px); box-shadow:0 6px 20px rgba(0,0,0,0.12); }
.product-image { display:block; height:200px; overflow:hidden; background:#f5f6f8; }
.product-image img { width:100%; height:100%; object-fit:cover; }
.no-image { display:flex; align-items:center; justify-content:center; height:200px; background:#f5f6f8; color:#bbb; font-size:14px; }
.product-info { padding:15px; }
.product-info h3 { margin:0 0 8px; font-size:14px; font-weight:600; }
.product-info h3 a { color:#2c3e50; text-decoration:none; }
.product-info h3 a:hover { color:#3498db; }
.product-price { margin-bottom:10px; min-height:22px; }
.price { font-size:18px; font-weight:700; color:#e74c3c; }
.price-na { font-size:12px; color:#999; font-style:italic; }
.btn-add-cart { width:100%; padding:8px 0; background:#27ae60; color:#fff; border:none; border-radius:4px; cursor:pointer; font-size:14px; transition:background 0.2s; }
.btn-add-cart:hover { background:#219a52; }

/* 空状态 */
.empty-state { text-align:center; padding:60px 20px; color:#999; }
.empty-state p { font-size:16px; }

/* 页脚 */
.shop-footer { text-align:center; padding:30px 20px; color:#888; font-size:13px; border-top:1px solid #e8e8e8; max-width:1200px; margin:30px auto 0; }

/* 产品详情页 */
.product-detail { display:flex; gap:30px; background:#fff; border-radius:8px; padding:25px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.product-detail-image { flex:0 0 400px; }
.product-detail-image img { width:100%; border-radius:6px; display:block; }
.product-detail-image .no-image { width:400px; height:300px; display:flex; align-items:center; justify-content:center; background:#f5f6f8; color:#bbb; border-radius:6px; }
.product-detail-info { flex:1; }
.product-detail-info h1 { margin:0 0 10px; font-size:24px; color:#2c3e50; }
.product-detail-info .product-price { font-size:28px; font-weight:700; color:#e74c3c; margin-bottom:15px; }
.product-detail-info .description { line-height:1.8; color:#555; margin-bottom:20px; }
.qty-control { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.qty-control input { width:70px; padding:8px; border:1px solid #ccc; border-radius:4px; text-align:center; font-size:16px; }
.btn-add-cart-lg { padding:12px 40px; background:#27ae60; color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:16px; }
.btn-add-cart-lg:hover { background:#219a52; }

/* 购物车页面 */
.cart-page { background:#fff; border-radius:8px; padding:25px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.cart-page h1 { margin:0 0 20px; font-size:22px; color:#2c3e50; }
.cart-table { width:100%; border-collapse:collapse; }
.cart-table th, .cart-table td { padding:12px; border-bottom:1px solid #eee; text-align:center; font-size:14px; }
.cart-table th { background:#f8f9fa; color:#555; font-weight:600; }
.cart-table .cart-product { text-align:left; }
.cart-table .cart-product a { color:#2c3e50; text-decoration:none; }
.cart-table .cart-product a:hover { color:#3498db; }
.cart-table .qty-input { width:60px; padding:6px; text-align:center; border:1px solid #ddd; border-radius:4px; }
.cart-remove { color:#e74c3c; text-decoration:none; font-size:12px; }
.cart-remove:hover { text-decoration:underline; }
.cart-summary { margin-top:20px; text-align:right; font-size:16px; padding-top:15px; border-top:2px solid #eee; }
.cart-summary .total-label { color:#888; }
.cart-summary .total-amount { font-size:24px; font-weight:700; color:#e74c3c; margin-left:10px; }
.cart-summary .btn-checkout { display:inline-block; margin-top:15px; padding:12px 40px; background:#3498db; color:#fff; text-decoration:none; border-radius:6px; font-size:16px; }
.cart-summary .btn-checkout:hover { background:#2980b9; }
.cart-empty { text-align:center; padding:60px 20px; color:#999; }
.cart-empty p { font-size:16px; }
.cart-empty .btn-continue { display:inline-block; margin-top:15px; padding:10px 30px; background:#3498db; color:#fff; text-decoration:none; border-radius:6px; }

/* 结账页面 */
.checkout-page { display:flex; gap:30px; }
.checkout-form { flex:1; background:#fff; border-radius:8px; padding:25px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.checkout-form h1 { margin:0 0 16px; font-size:18px; color:#2c3e50; }
.checkout-form h2 { font-size:16px; color:#2c3e50; margin:20px 0 10px; padding-bottom:8px; border-bottom:1px solid #eee; }
.form-row { margin-bottom:12px; }
.form-row label { display:block; font-size:13px; color:#555; margin-bottom:4px; }
.form-row input, .form-row select, .form-row textarea { width:100%; padding:10px; border:1px solid #d0d7de; border-radius:6px; font-size:14px; outline:none; }
.form-row input[type="radio"], .form-row input[type="checkbox"] { width:auto; vertical-align:middle; margin-right:6px; }
.form-row input:focus, .form-row select:focus { border-color:#3498db; }

/* 结账页支付方式与创建账户选项左对齐 */
.checkout-form .payment-method-label,
.checkout-form .account-create-label { display:flex; justify-content:flex-start; align-items:center; text-align:left; gap:10px; }
.checkout-form .payment-method-label input[type="radio"],
.checkout-form .account-create-label input[type="checkbox"] { margin:0; flex-shrink:0; }
.form-row-inline { display:flex; gap:12px; }
.form-row-inline .form-row { flex:1; }
.btn-place-order { width:100%; padding:14px; background:#27ae60; color:#fff; border:none; border-radius:6px; font-size:16px; font-weight:600; cursor:pointer; margin-top:15px; }
.btn-place-order:hover { background:#219a52; }

/* 支付方式选项 */
.payment-options { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.payment-option { display:flex; align-items:center; gap:10px; padding:12px 14px; border:1px solid #e0e0e0; border-radius:8px; cursor:pointer; transition:all 0.2s; background:#fff; }
.payment-option:hover { border-color:#3498db; }
.payment-option.selected { border-color:#3498db; background:#f0f7ff; }
.payment-option input[type='radio'] { margin:0; width:auto; flex-shrink:0; }
.payment-content { display:flex; align-items:center; gap:12px; flex-wrap:wrap; flex:1; }
.paypal-logo { font-size:18px; font-weight:bold; font-style:italic; letter-spacing:-0.5px; white-space:nowrap; }
.paypal-pay { color:#003087; }
.paypal-pal { color:#009cde; }
.worldfirst-logo { color:#d32f2f; font-weight:700; font-size:16px; white-space:nowrap; }
.stripe-logo { color:#635bff; font-weight:700; font-size:17px; white-space:nowrap; letter-spacing:-0.3px; }
.payment-desc { font-size:13px; color:#666; }
.payment-name { font-size:14px; font-weight:600; color:#333; }
.card-icons { display:flex; align-items:center; gap:5px; margin-left:auto; }
.card-icon { font-size:9px; font-weight:bold; padding:2px 6px; border-radius:3px; color:#fff; white-space:nowrap; }
.card-icon.visa { background:#1a1f71; }
.card-icon.mastercard { background:#eb001b; }
.card-icon.amex { background:#006fcf; }
.card-icon.discover { background:#ff6000; }
.payment-note { font-size:12px; color:#888; margin:4px 0 15px; }
.checkout-summary { width:38%; min-width:320px; max-width:420px; background:#fff; border-radius:8px; padding:25px; box-shadow:0 2px 8px rgba(0,0,0,0.08); position:sticky; top:80px; height:fit-content; max-height:calc(100vh - 100px); overflow-y:auto; }
.checkout-summary h3 { margin:0 0 15px; font-size:16px; color:#2c3e50; padding-bottom:8px; border-bottom:1px solid #eee; }
.checkout-summary h3 .currency-note { display:inline; font-size:12px; font-weight:normal; color:#888; margin-left:6px; }
.checkout-summary table { width:100%; }
.checkout-summary td { padding:8px 0; font-size:14px; vertical-align:top; }
.checkout-summary .cs-label { color:#888; }
.checkout-summary .cs-value { text-align:right; }
.checkout-summary .cs-total { font-size:22px; font-weight:700; color:#e74c3c; padding-top:10px; }
.checkout-summary .cs-divider td { padding:0; border-top:1px solid #eee; height:1px; }
.checkout-summary .cs-divider-total td { padding:0; border-top:2px solid #ddd; height:1px; }
.checkout-summary .cs-item td { padding:12px 0; border-bottom:1px solid #f0f0f0; }
.checkout-summary .cs-item-row { display:flex; align-items:center; gap:12px; }
.checkout-summary .cs-item-img { width:90px; height:90px; object-fit:cover; border-radius:6px; border:1px solid #eee; flex-shrink:0; }
.checkout-summary .cs-item-noimg { width:90px; height:90px; display:flex; align-items:center; justify-content:center; background:#f8f9fa; color:#999; font-size:11px; border-radius:6px; border:1px solid #eee; flex-shrink:0; }
.checkout-summary .cs-item-info { flex:1; min-width:0; }
.checkout-summary .cs-item-name { font-weight:600; color:#333; font-size:14px; line-height:1.4; }
.checkout-summary .cs-item-meta { font-size:12px; color:#888; margin-top:3px; }
.checkout-summary .cs-item-unit { font-size:12px; color:#999; margin-top:2px; }
.checkout-summary .cs-item-price { font-weight:600; color:#333; font-size:14px; text-align:right; white-space:nowrap; }

/* 登录页 */
.login-page { max-width:400px; margin:50px auto; background:#fff; border-radius:8px; padding:30px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.login-page h1 { margin:0 0 20px; font-size:22px; color:#2c3e50; text-align:center; }
.login-page .form-row { margin-bottom:15px; }
.login-page label { display:block; font-size:13px; color:#555; margin-bottom:4px; }
.login-page input { width:100%; padding:10px; border:1px solid #d0d7de; border-radius:6px; font-size:14px; outline:none; }
.login-page input:focus { border-color:#3498db; }
.login-page .btn-login { width:100%; padding:12px; background:#3498db; color:#fff; border:none; border-radius:6px; font-size:15px; cursor:pointer; }
.login-page .btn-login:hover { background:#2980b9; }
.login-page .login-error { background:#f8d7da; color:#721c24; padding:10px; border-radius:4px; margin-bottom:15px; font-size:13px; }
.login-page .login-success { background:#d4edda; color:#155724; padding:10px; border-radius:4px; margin-bottom:15px; font-size:13px; }
.login-page .login-switch { text-align:center; margin-top:15px; font-size:13px; color:#888; }
.login-page .login-switch a { color:#3498db; text-decoration:none; }

/* 账户页 */
.account-page { display:flex; gap:25px; }
.account-sidebar { width:200px; flex-shrink:0; background:#fff; border-radius:8px; padding:15px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.account-sidebar ul { list-style:none; padding:0; margin:0; }
.account-sidebar li a { display:block; padding:10px; color:#555; text-decoration:none; font-size:14px; border-radius:4px; }
.account-sidebar li a:hover, .account-sidebar li a.active { background:#f0f4f8; color:#2c3e50; }
.account-content { flex:1; background:#fff; border-radius:8px; padding:25px; box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.account-content h2 { margin:0 0 20px; font-size:18px; color:#2c3e50; }
.order-card { border:1px solid #eee; border-radius:6px; padding:15px; margin-bottom:12px; }
.order-card .order-header { display:flex; justify-content:space-between; margin-bottom:8px; }
.order-card .order-no { font-weight:600; color:#2c3e50; }
.order-card .order-total { color:#e74c3c; font-weight:600; }
.order-card .order-meta { font-size:13px; color:#888; }
.address-card { border:1px solid #eee; border-radius:6px; padding:12px; margin-bottom:8px; display:flex; justify-content:space-between; align-items:center; }
.address-card .addr-default { background:#3498db; color:#fff; padding:2px 8px; border-radius:3px; font-size:11px; }

/* 消息 */
.alert { padding:12px 16px; border-radius:6px; margin-bottom:15px; font-size:14px; }
.alert-success { background:#d4edda; color:#155724; }
.alert-error { background:#f8d7da; color:#721c24; }
.alert-info { background:#d1ecf1; color:#0c5460; }

/* 响应式 */
@media (max-width:768px) {
    .shop-body { flex-direction:column; }
    .shop-sidebar { width:100%; }
    .product-grid { grid-template-columns:repeat(2,1fr); }
    .product-detail { flex-direction:column; }
    .product-detail-image { flex:none; }
    .checkout-page { flex-direction:column; }
    .checkout-summary { width:100%; }
    .account-page { flex-direction:column; }
    .account-sidebar { width:100%; }
}

/* 结账页摘要 Total 高亮 */
.checkout-summary .total-highlight td { padding:8px 0; }
.checkout-summary .total-highlight .cs-total-label { font-size:16px; color:#333; font-weight:600; }
.checkout-summary .total-highlight .cs-total-value { font-size:24px; font-weight:700; color:#e74c3c; text-align:right; }

/* 结账页摘要 Item count badge */
.cs-item-count { font-size:12px; color:#888; font-weight:normal; margin-left:6px; }

/* Back to cart link */
.cs-back-link { margin-top:15px; padding-top:12px; border-top:1px solid #eee; }
.cs-back-link a { font-size:13px; color:#3498db; text-decoration:none; }
.cs-back-link a:hover { text-decoration:underline; }

/* 结账页响应式 */
@media (max-width:900px) {
    .checkout-page { flex-direction:column; }
    .checkout-summary { width:100%; max-width:100%; }
}

/* Summary Place Order */
.cs-summary-order-btn { width:100%; padding:12px; background:#27ae60; color:#fff; border:none; border-radius:6px; font-size:15px; font-weight:600; cursor:pointer; margin-top:12px; }
.cs-summary-order-btn:hover { background:#219a52; }
/* 安全图标 - 紧凑版 */
.shop-unified-secure-icon { font-size:16px; cursor:default; margin-left:6px; }

/* Tax 文本折行处理 */
.checkout-summary .cs-value.tax-text { font-size:12px; color:#999; white-space:normal; word-break:break-word; max-width:160px; }