* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; color: #222; line-height: 1.5; }
a { color: #ee4d2d; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; min-height: 70vh; }
.topbar { background: #ee4d2d; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #fff; margin-left: 14px; font-weight: 500; }
.topbar .brand { font-size: 20px; font-weight: 700; margin: 0; }
.badge { background: #fff; color: #ee4d2d; border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.footer { text-align: center; padding: 16px; color: #888; font-size: 13px; }

.card { background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.product { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.08); display: flex; flex-direction: column; color: inherit; }
.product:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.product img, .img-placeholder { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #eee; display: block; }
.product .info { padding: 10px; }
.product .name { font-size: 14px; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { color: #ee4d2d; font-weight: 700; }
.muted { color: #888; font-size: 13px; }

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail img { width: 100%; border-radius: 6px; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } }

button, .btn { background: #ee4d2d; color: #fff; border: 0; border-radius: 4px; padding: 10px 16px; font-size: 15px; cursor: pointer; display: inline-block; text-align: center; }
button:hover, .btn:hover { background: #d73211; text-decoration: none; }
button:disabled { background: #bbb; cursor: not-allowed; }
button.secondary { background: #fff; color: #ee4d2d; border: 1px solid #ee4d2d; }
button.danger { background: #c62828; }

input, textarea, select { width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 15px; font-family: inherit; margin-bottom: 12px; }
label { font-size: 14px; color: #555; display: block; }
.error { color: #c62828; margin: 8px 0; }
.success { color: #2e7d32; margin: 8px 0; }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; font-size: 14px; vertical-align: top; }

.status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #eee; }
.status.pending_payment { background: #fff3cd; color: #8a6d00; }
.status.payment_submitted { background: #d0ebff; color: #0b5394; }
.status.paid { background: #d4edda; color: #1e6b32; }
.status.shipped { background: #e2d6ff; color: #4b2a99; }
.status.completed { background: #c8e6c9; color: #1b5e20; }
.status.cancelled { background: #f8d7da; color: #842029; }

.cart-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.cart-row img, .cart-row .img-placeholder { width: 64px; height: 64px; border-radius: 4px; flex-shrink: 0; }
.cart-row .grow { flex: 1; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { padding: 2px 10px; }
.qty input { width: 60px; text-align: center; margin: 0; padding: 4px; }
.total { font-size: 18px; text-align: right; margin-top: 12px; }
.bank { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 6px; padding: 12px; margin: 12px 0; }
.stack > * + * { margin-top: 12px; }
