* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f8f9fc; color: #1a1a2e; line-height: 1.6; }
.header { background: #fff; border-bottom: 1px solid #e8e8f0; padding: 0 20px; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; height: 60px; }
.logo { font-size: 20px; font-weight: 700; color: #4f46e5; text-decoration: none; }
.nav a { color: #555; text-decoration: none; margin-left: 24px; font-size: 14px; }
.nav a:hover { color: #4f46e5; }
.main { min-height: calc(100vh - 116px); padding: 24px 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.hero { text-align: center; padding: 32px 0 24px; }
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.hero p { color: #666; font-size: 15px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: 12px; border: 1px solid #e8e8f0; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(79,70,229,0.1); }
.product-img-placeholder { height: 140px; background: #f0f0f8; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.product-info { padding: 16px; }
.product-cat { font-size: 11px; color: #8b8bbd; margin-bottom: 4px; }
.product-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.product-desc { font-size: 13px; color: #888; margin-bottom: 12px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.price { font-size: 20px; font-weight: 700; color: #4f46e5; }
.stock { font-size: 12px; color: #999; }
.stock.out { color: #e53e3e; }
.btn-buy { display: block; text-align: center; padding: 10px; background: #4f46e5; color: #fff; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; }
.btn-buy:hover { background: #4338ca; }
.btn-buy.disabled { background: #ccc; pointer-events: none; }
.empty { text-align: center; padding: 60px; color: #999; grid-column: 1/-1; }
.back-link { display: inline-block; color: #4f46e5; text-decoration: none; font-size: 14px; margin-bottom: 20px; }
.product-detail { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; } }
.detail-img-placeholder { height: 200px; background: #f0f0f8; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 80px; }
.detail-info { margin-top: 20px; }
.detail-info h1 { font-size: 24px; font-weight: 700; margin: 8px 0; }
.detail-desc { color: #666; font-size: 14px; line-height: 1.7; }
.buy-box { background: #fff; border-radius: 12px; border: 1px solid #e8e8f0; padding: 24px; position: sticky; top: 80px; }
.buy-price { font-size: 32px; font-weight: 700; color: #4f46e5; margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; margin-top: 14px; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; background: #fff; color: #1a1a2e; }
input:focus, select:focus, textarea:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.qty-wrap { display: flex; align-items: center; gap: 8px; }
.qty-wrap button { width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 8px; font-size: 18px; cursor: pointer; background: #f8f8f8; }
.qty-wrap input { width: 70px; text-align: center; }
.total-line { text-align: right; font-size: 15px; color: #555; margin-top: 16px; margin-bottom: 12px; }
.btn-submit { width: 100%; padding: 12px; background: #4f46e5; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-submit:hover { background: #4338ca; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal.hidden { display: none; }
.modal-content { background: #fff; border-radius: 16px; padding: 32px; max-width: 420px; width: 90%; text-align: center; }
.modal-content h3 { font-size: 20px; margin-bottom: 16px; }
.modal-content p { font-size: 14px; color: #666; margin-bottom: 8px; }
.modal-btns { display: flex; gap: 12px; margin-top: 20px; }
.btn-cancel { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer; }
.btn-pay { flex: 1; padding: 10px; background: #4f46e5; color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.card-list { text-align: left; margin: 16px 0; }
.card-item { display: flex; align-items: center; justify-content: space-between; background: #f0f0f8; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.card-item span { font-size: 12px; color: #888; }
.card-item code { font-family: monospace; font-size: 14px; font-weight: 600; color: #4f46e5; word-break: break-all; }
.query-box { max-width: 600px; margin: 0 auto; background: #fff; border-radius: 12px; border: 1px solid #e8e8f0; padding: 32px; }
.query-box h2 { margin-bottom: 20px; }
.order-result { margin-top: 32px; border-top: 1px solid #eee; padding-top: 24px; }
.order-table { width: 100%; font-size: 14px; border-collapse: collapse; }
.order-table td { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.order-table td:first-child { color: #888; width: 100px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.alert-error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-refunded { background: #fee2e2; color: #991b1b; }
.footer { background: #fff; border-top: 1px solid #e8e8f0; padding: 16px 20px; text-align: center; }
.footer p { font-size: 13px; color: #999; }

body {
  background-image: url('/images/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.header { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); }
.footer { background: rgba(255,255,255,0.9); }
.product-card { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); }
.buy-box { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); }
.query-box { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); }
