/* Uniflora Wholesale portal. Retro tokens: cream, yellow, orange, burnt, ink.
   The CSP allows no inline styles, so everything visual is a class here. */
:root {
  --cream: #f7f0dd;
  --ray: #efe5c6;
  --yellow: #ffbb40;
  --orange: #f7941d;
  --burnt: #b8480f;
  --ink: #161616;
  --ink-2: #3a3a3a;
  --muted: #5d5d5d;
  --line: #d9cfb1;
  --white: #ffffff;
  --green: #1f6b2c;
  --red: #a3261d;
  --radius: 16px;
  --display: "Bowlby One", "Cooper Black", Georgia, serif;
  --head: Figtree, Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--cream); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: var(--ink); }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Header */
.site-head { background: var(--ink); color: var(--cream); border-bottom: 4px solid var(--orange); }
.head-row { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { text-decoration: none; color: var(--cream); display: flex; flex-direction: column; line-height: 1.05; }
.brand-mark { font-family: var(--display); font-size: 22px; letter-spacing: 0.5px; color: var(--yellow); }
.brand-sub { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cream); opacity: 0.85; }
.top-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.top-nav a {
  color: var(--cream); text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.top-nav a:hover { background: #2b2b2b; }
.top-nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }
.head-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.head-company { font-size: 13px; color: var(--cream); opacity: 0.9; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Layout */
.app { flex: 1; padding: 28px 0 48px; }
.app:focus { outline: none; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
.kicker { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--burnt); font-weight: 700; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 22px; box-shadow: 5px 5px 0 var(--ink);
}
.card + .card { margin-top: 22px; }
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.section { margin-top: 34px; }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--head); font-weight: 800; font-size: 16px;
  background: var(--ink); color: var(--white); border: 2px solid var(--ink);
  border-radius: 999px; padding: 12px 24px; min-height: 48px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #000; }
.btn.accent { background: var(--yellow); color: var(--ink); }
.btn.accent:hover { background: var(--orange); }
.btn.ghost { background: transparent; color: var(--ink); }
.site-head .btn.ghost { color: var(--cream); border-color: var(--cream); }
.site-head .btn.ghost:hover { background: #2b2b2b; }
.btn.small { font-size: 14px; padding: 6px 16px; min-height: 40px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

label.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin: 0 0 5px; }
.field .hint { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: 12px; padding: 11px 14px; min-height: 48px;
}
input.code {
  font-family: var(--head); font-weight: 800; font-size: 30px; letter-spacing: 10px; text-align: center;
}
.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.cols { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
fieldset { border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px 6px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.error { background: #fbe6e3; border: 2px solid var(--red); color: var(--red); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-weight: 600; font-size: 15px; }
.notice { background: var(--ray); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 15px; }

/* Sign-in */
.signin {
  min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    repeating-conic-gradient(from 0deg at 50% 118%, var(--cream) 0deg 7deg, var(--ray) 7deg 14deg);
  margin-top: -28px;
}
.signin-card { width: 100%; max-width: 440px; }
.signin-title { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; color: var(--ink); margin: 0 0 4px; text-shadow: 3px 3px 0 var(--yellow); }
.signin-sub { font-family: var(--head); font-weight: 700; font-size: 16px; margin: 0 0 18px; color: var(--ink-2); }
.stripes { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 0 0 20px; border: 2px solid var(--ink); }
.stripes i { flex: 1; }
.stripes i:nth-child(1) { background: var(--yellow); }
.stripes i:nth-child(2) { background: var(--orange); }
.stripes i:nth-child(3) { background: var(--burnt); }

/* Home */
.hero { background: var(--ink); color: var(--cream); border-radius: var(--radius); padding: 28px; border-bottom: 8px solid var(--orange); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--yellow); }
.hero p { color: var(--cream); margin: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 2px solid var(--ink); background: var(--white); }
.pill.soon { background: var(--ray); border-color: var(--line); color: var(--muted); }
.pill.on { background: #dff3e2; border-color: var(--green); color: var(--green); }
.pill.off { background: #eee; border-color: #999; color: #555; }
.pill.role { background: var(--yellow); }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts li:last-child { border-bottom: 0; }
.facts b { font-weight: 600; text-align: right; }
.tile h3 { margin-bottom: 6px; }
.tile p { font-size: 15px; color: var(--ink-2); }
.promo { background: var(--yellow); }
.promo.alt { background: var(--white); }

/* People */
.people { width: 100%; border-collapse: collapse; }
.people th { text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.people td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.people tr.off td { color: var(--muted); }
.people .who b { display: block; }
.people .who { min-width: 230px; }
.people .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-foot { background: var(--ink); color: var(--cream); padding: 24px 0 28px; border-top: 4px solid var(--orange); }
.site-foot a { color: var(--yellow); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 16px; margin: 0 0 8px; }
.foot-brand img { background: var(--white); border-radius: 8px; padding: 3px; width: 62px; height: auto; }
.foot-small { font-size: 13px; margin: 0 0 10px; }
.foot-warning { font-size: 11px; line-height: 1.5; color: #c9c2ad; margin: 0; max-width: 900px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--white); border: 2px solid var(--yellow); border-radius: 999px;
  padding: 10px 20px; font-weight: 600; font-size: 15px; z-index: 20; max-width: calc(100vw - 32px);
}

@media (max-width: 640px) {
  h1 { font-size: 25px; }
  .signin-title { font-size: 36px; }
  .hero h1 { font-size: 27px; }
  .head-company { display: none; }
  .card { padding: 18px; box-shadow: 3px 3px 0 var(--ink); }
  .people thead { display: none; }
  .people, .people tbody, .people tr, .people td { display: block; width: 100%; }
  .people tr { border-bottom: 2px solid var(--ink); padding: 10px 0; }
  .people td { border: 0; padding: 3px 0; }
}

/* Catalog */
.pgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pcard {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink);
}
.pcard:hover { box-shadow: 6px 6px 0 var(--orange); }
.pcard-img { aspect-ratio: 1 / 1; background: var(--ray); display: flex; align-items: center; justify-content: center; border-bottom: 2px solid var(--ink); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-body h3 { font-size: 15px; margin: 0; }
.pcard-body p { margin: 0; }
.pcard-price { font-family: var(--head); font-weight: 800; font-size: 19px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; min-height: 0; }
.pills:empty { display: none; }
.instock { color: var(--green); font-weight: 600; }
.filters .cols { gap: 12px 16px; margin-bottom: 12px; }
.filters .check { margin: 0; }
.filters { margin-top: 12px; }
.product { display: grid; gap: 26px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.photo-big { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 12px; background: var(--ray); display: block; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.thumb { padding: 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; width: 58px; height: 58px; background: var(--ray); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.price-big { font-family: var(--head); font-weight: 800; font-size: 30px; margin: 4px 0 2px; }
.actions { margin-top: 14px; gap: 8px; }
.block { display: block; }
.desc { white-space: pre-line; font-size: 15px; color: var(--ink-2); margin: 0; }
.batches td { vertical-align: middle; }
.linkish.small { font-size: 13px; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(22, 22, 22, 0.7); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-panel { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); width: 100%; max-width: 980px; height: min(92vh, 1100px); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 2px solid var(--ink); background: var(--yellow); flex-wrap: wrap; }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; min-width: 160px; }
.modal-body { flex: 1; display: flex; flex-direction: column; padding: 12px 16px 16px; min-height: 0; }
.lab-frame { flex: 1; width: 100%; border: 2px solid var(--line); border-radius: 10px; min-height: 0; }
@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .modal { padding: 0; }
  .modal-panel { height: 100dvh; border-radius: 0; border: 0; }
}
@media (max-width: 640px) {
  .batches td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
}

/* Cart and checkout */
input.qty { width: 84px; text-align: center; padding-left: 8px; padding-right: 8px; }
.addbox { margin-top: 14px; gap: 10px; }
.cartlines td { vertical-align: middle; }
.lineerr { display: block; color: var(--red) !important; font-weight: 600; }
.totals li.grand { font-size: 18px; border-top: 2px solid var(--ink); }
.totals li.grand b { font-family: var(--head); font-weight: 800; }
.choice { padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--ray); }
p.tight { margin: 0 0 4px; }
.grid.two > div > .card + .card { margin-top: 22px; }

/* Orders and invoices */
.pill.warn { background: #fdecc8; border-color: var(--burnt); color: var(--burnt); }
h1 .pill { vertical-align: middle; font-family: var(--body); }
p.actions { margin: 12px 0 0; }
@media print {
  .site-head, .site-foot, .noprint, .toast, .skip { display: none !important; }
  body { background: #fff; }
  .card, .hero { box-shadow: none; border-width: 1px; }
  .app { padding: 0; }
}

/* Case discounts (v10.362.0) */
.tierbox { margin: 0 0 14px; }
.tierline { font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.tierbar { padding: 0 2px 30px; }
.tierbar-track { position: relative; height: 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); }
.tierbar-fill { height: 100%; background: var(--orange); border-radius: 999px; min-width: 0; transition: width 0.25s ease; }
.tierbar-mark { position: absolute; top: -5px; width: 2px; height: 24px; background: var(--ink); }
.tierbar-mark span { position: absolute; top: 28px; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--muted); }
.tierbar-mark.end span { transform: translateX(-100%); }
.tierbar-mark.hit span { color: var(--green); }
.addbox { margin: 0 0 14px; }
.addbox .row { align-items: center; }
@media (max-width: 520px) {
  .tierbar-mark span { font-size: 11px; }
  .tierbar-mark:first-of-type span { transform: translateX(-30%); }
}
/* Messages (v10.362.0) */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 85%; border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--white); }
.msg.mine { align-self: flex-end; background: var(--ray); border-color: var(--ink); }
.msg.them { align-self: flex-start; }
.msg-head { margin: 0 0 4px; font-size: 14px; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); resize: vertical; }
