:root {
  /* Brand palette from the Branded Box logo: navy + rose pink */
  --kraft: #ce6e96;
  --kraft-dark: #233a60;
  --ink: #232a3a;
  --paper: #f5f6fa;
  --card: #ffffff;
  --line: #e2e4ee;
  --green: #2e7d32;
  --red: #c62828;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--kraft-dark); color: #fff; flex-wrap: wrap;
}
.bar nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bar a { color: #fff; text-decoration: none; opacity: .9; }
.bar a:hover { opacity: 1; text-decoration: underline; }
.brand { font-weight: 300; letter-spacing: 1px; color: inherit; }
.brand b { font-weight: 800; }
.brand em { font-style: normal; font-size: .7em; opacity: .8; margin-left: 4px; }
.brand.big { font-size: 1.6em; color: var(--kraft-dark); display: block; margin-bottom: 4px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 860px; }
.centerbox { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin: 10px 0; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card.login { width: 340px; text-align: center; }
.card.login form { text-align: left; }
h1 { font-size: 1.4em; margin: 12px 0 4px; }
h2 { font-size: 1.1em; margin: 20px 0 4px; }
h2.cat, h3.cat { margin: 18px 0 2px; color: var(--kraft-dark); font-size: 1em; text-transform: uppercase; letter-spacing: .5px; }
.muted { color: #667089; }
.small { font-size: .85em; }
.row { display: flex; align-items: center; gap: 10px; }
.row.item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.row.item:last-child { border-bottom: none; }
.grow { flex: 1; min-width: 0; }
.grow strong { display: block; }
.clickable { text-decoration: none; color: inherit; display: flex; }
.clickable:hover { border-color: var(--kraft); }
.price { white-space: nowrap; font-weight: 600; }
input.qty { width: 76px; padding: 8px; font-size: 1em; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
label { display: block; margin: 10px 0; font-size: .9em; color: #4a5570; }
label input, label textarea, label select {
  display: block; width: 100%; margin-top: 4px; padding: 10px; font-size: 1em;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
label.check { display: flex; align-items: center; gap: 8px; margin: 0; }
label.check input { width: auto; margin: 0; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 1em; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--kraft); border-color: var(--kraft); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--kraft-dark); }
.btn.wide { width: 100%; }
button.linklike { background: none; border: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; opacity: .9; }
.flash { padding: 12px 16px; text-align: center; font-weight: 500; }
.flash.ok { background: #e7f4e8; color: var(--green); }
.flash.error { background: #fdecea; color: var(--red); }
.status { font-size: .78em; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.status.new { background: #fff3e0; color: #b26a00; }
.status.invoiced { background: #e7f4e8; color: var(--green); }
table { width: 100%; border-collapse: collapse; font-size: .95em; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: .8em; text-transform: uppercase; letter-spacing: .5px; color: #667089; }
tfoot td { border-bottom: none; font-weight: 600; }
td.num, th.num { text-align: right; }
tr.inactive { opacity: .45; }
.stickybar {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin: 12px 0; box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 .span2 { grid-column: span 2; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } .grid2 .span2 { grid-column: span 1; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.foot { text-align: center; color: #9aa2b8; font-size: .8em; padding: 24px; }
.thumb {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: #eef0f6; border: 1px solid var(--line);
}
span.thumb.emoji { display: flex; align-items: center; justify-content: center; font-size: 22px; }
input.file { max-width: 180px; font-size: .8em; }
.btn.small { padding: 6px 12px; font-size: .85em; }
.btn[disabled] { opacity: .35; cursor: default; }
.favbtn {
  padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff;
  color: var(--kraft-dark); font-size: .9em; cursor: pointer; white-space: nowrap;
}
.favbtn.on { background: var(--kraft); border-color: var(--kraft); color: #fff; }
.poa { font-size: .8em; color: #9aa2b8; font-style: italic; white-space: nowrap; }
code { background: #eef0f6; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
ol li { margin: 6px 0; }
/* Logo */
.logo { height: 38px; width: auto; border-radius: 7px; display: block; }
.brandlink { display: flex; align-items: center; }
.logo.big { width: 210px; height: auto; margin: 0 auto 10px; }
/* Home screen */
.homehero { text-align: center; padding: 10px 0 2px; }
.homehero .logo.big { width: 240px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.tile:hover { border-color: var(--kraft); }
.tile-icon { font-size: 1.9em; }
.card.offer { border-left: 4px solid var(--kraft); }
.card.offer p { margin: 6px 0 0; }
.offerimg { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; display: block; }
.wordmark { color: #fff; font-weight: 800; letter-spacing: 1.5px; font-size: 1.05em; }
.brandlink { text-decoration: none; gap: 10px; }
/* Collapsible categories */
details.catgroup { margin: 10px 0; }
details.catgroup summary {
  cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; font-weight: 700; color: var(--kraft-dark); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
details.catgroup summary::-webkit-details-marker { display: none; }
details.catgroup summary::after { content: '▸'; color: var(--kraft); transition: transform .15s; }
details.catgroup[open] summary::after { transform: rotate(90deg); }
details.catgroup[open] summary { border-radius: 10px 10px 0 0; border-bottom: none; }
details.catgroup .card { margin: 0; border-radius: 0 0 10px 10px; }
/* Delivery days */
.daysrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
label.check.day { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; }
label.check.delivery { padding: 9px 0; border-bottom: 1px solid var(--line); }
label.check.delivery:last-child { border-bottom: none; }
.delivery-banner { background: #eef2fa; border-color: #c9d4ea; }
