:root { font-family: "PingFang SC", "Noto Sans SC", sans-serif; color: #1c140e; }
* { box-sizing: border-box; }
body { margin: 0; background: #f3eee6; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: #2a1b12; color: #fff; flex-wrap: wrap; }
.top a { color: #f0d2a6; text-decoration: none; margin-left: 10px; }
.top a[aria-current="page"] { color: #fff; font-weight: 700; }
.brand { font-weight: 800; }
main { padding: 16px; max-width: 960px; margin: 0 auto; }
.note, .card { background: #fff; padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; }
.muted { color: #7a6a5a; font-size: 13px; }
.price { font-size: 22px; font-weight: 800; }
.ref { color: #8a7b6c; font-size: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
button, .btn { background: #8a3b12; color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
button.sec { background: #6b635c; }
input, select { padding: 8px; border: 1px solid #d7cbbd; border-radius: 8px; width: 100%; margin: 6px 0 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
th, td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; vertical-align: top; }
.tag { display: inline-block; font-size: 11px; background: #efe2d2; border-radius: 999px; padding: 2px 8px; }
.pack { border: 2px dashed #8a3b12; padding: 10px; margin: 10px 0; background: #fff; }
@media print { .top, button, .no-print { display: none !important; } .pack { break-inside: avoid; } }

#purchase table, #shiplist table { margin: 10px 0; }
body.print-purchase .sheet-ship,
body.print-purchase .sheet-pack { display: none !important; }
body.print-ship .sheet-purchase,
body.print-ship .sheet-pack { display: none !important; }
body.print-pack .sheet-purchase,
body.print-pack .sheet-ship { display: none !important; }

.thumb { width:100%; aspect-ratio: 4 / 3; height:auto; object-fit:cover; object-position:center; border-radius:8px; margin-bottom:8px; background:#ddd; }
#products input[type=file] { padding:10px 0; }
@media (max-width: 640px) {
  button { min-height: 40px; }
}

.prod-row { display:flex; gap:12px; align-items:center; }
.thumb-sm { width:84px; height:63px; object-fit:cover; border-radius:8px; flex-shrink:0; background:#ddd; }
.prod-meta { flex:1; min-width:0; }
.lines { list-style:none; padding:0; margin:8px 0; }
.lines li { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:4px 0; font-size:13px; color:#7a6a5a; }
button.mini { padding:4px 10px; font-size:12px; }
.ops { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
#pprev { max-height:160px !important; }

label.filebtn { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; background:#6b3e2e; color:#fff; border-radius:8px; cursor:pointer; }
label.filebtn.sec { background:#8a7a6a; }
label.filebtn input { display:none; }

.site-foot { max-width: 960px; margin: 24px auto 0; padding: 16px; text-align: center; color: #7a6a5a; font-size: 12px; }
.site-foot a { color: #7a6a5a; }
@media print { .site-foot { display: none !important; } }

button:disabled { opacity: .45; pointer-events: none; background: #b7aea6; }
