/* menu/menu.css — FRAKTAL live wholesale menu.
   Layout: phone first, one column of product cards with a fixed order bar
   at the bottom; from 960px the order sheet moves to a sticky side panel and,
   from 1180px, the cards flow in two columns. One look (no dark theme). */
:root {
  --page: #F6F4EF;        /* cream page */
  --card: #FFFFFF;        /* product cards and strain rows */
  --ink: #16181A;
  --ink-2: #55534E;       /* descriptions, notes */
  --ink-3: #6A6862;       /* strain details */
  --line: #E2DED3;
  --line-2: #EFECE4;
  --header: #000000;
  --coral: #FF6F61;       /* buttons (dark text on it) */
  --coral-text: #D9473A;  /* prices on white */
  --coral-link: #B83A2B;  /* small coral text on cream/white */
  --teal: #65BAAF;
  --tag-bg: #FDE7C8;
  --tag-ink: #7A4300;
  --warn-bg: #FFF4E0;
  --warn-line: #C77700;
  --warn-ink: #3D2600;
  --muted-fill: #ECE9E1;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--header); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* heading kept for screen readers */
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- header + category bar ---------- */
.masthead { background: var(--header); color: #F6F4EF; }
.masthead-inner { max-width: 1240px; margin: 0 auto; padding-block: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.brand { font-family: var(--display); font-weight: 900; font-size: clamp(20px, calc(7.8vw - 3px), 32px); letter-spacing: 1px; margin: 0; line-height: 1; white-space: nowrap; } /* FRAKTAL WHOLESALE on one line, a touch smaller on narrow phones */

/* ---------- layout ---------- */
.layout { max-width: calc(1240px + 2 * max(16px, env(safe-area-inset-left, 0px))); margin: 0 auto; padding-block: 4px 140px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.aside { display: none; }
.group { display: flex; flex-direction: column; gap: 12px; padding-top: 34px; }
.group:first-child { padding-top: 14px; } /* Flower: no heading above it */
.group-title { margin: 0; display: flex; align-items: flex-start; gap: 12px; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.15; text-transform: uppercase; letter-spacing: 1px; }
/* a rule out to the right edge that turns down at the end: "products below" */
.group-title::after { content: ""; flex: 1 1 24px; min-width: 24px; height: 26px; margin-top: 0.55em; border: 2px solid #CFCAC0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.cards { display: flex; flex-direction: column; gap: 12px; }

/* ---------- product card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; break-inside: avoid; }
.card-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 14px; padding-right: 14px; }
.card-top > div { padding: 18px 0 14px; } /* name always starts the same distance from the card's top edge */
.photo { width: 150px; height: 150px; object-fit: contain; background: var(--card); }
.photo-missing { width: 150px; height: 150px; background: var(--muted-fill); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-2); }
.card-name { margin: 0; font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.2; text-wrap: balance; }
.card-price { margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--coral-text); }
.card-top { border-bottom: 1px solid var(--line-2); }
/* Product Specs sits under the price, lined up with the name; the text opens full width below */
.spec-btn { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-2); }
/* plain label in the Product Specs style, e.g. GROWN BY FRAKTAL (not clickable) */
.byline { margin-top: 12px; padding: 4px 0; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-2); }
.byline.note-title { margin: 0 0 4px; padding: 0; }
.info-dot { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 9px; border: 1.5px solid currentColor; font: italic 700 11px/1 Georgia, 'Times New Roman', serif; letter-spacing: 0; text-transform: none; }
.spec-btn[aria-expanded="true"] .info-dot { background: var(--ink-2); color: var(--card); border-color: var(--ink-2); } /* filled when open */
.spec-lines { padding: 10px 14px 12px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.row.row-note { display: block; min-height: 0; padding: 12px 0 6px; font-size: 12px; color: var(--ink-2); } /* e.g. flower packaging, listed after the strains */
.sold-out { padding: 14px; font-size: 14px; color: var(--ink-2); }
.rows { list-style: none; margin: 0; padding: 2px 14px 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: 0; }
.row-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; font-weight: 500; }
.row-detail { font-size: 12px; color: var(--ink-3); }
.row-type { font-size: 12px; font-weight: 400; color: var(--ink-3); } /* Indica / Sativa / Hybrid, styled like the detail line */
.row-price { color: var(--coral-text); font-weight: 600; } /* prices are always coral */
.tag { font-size: 11px; font-weight: 600; color: var(--tag-ink); background: var(--tag-bg); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.row.picked { background: linear-gradient(90deg, rgba(255, 111, 97, 0.08), rgba(255, 111, 97, 0)); }

/* ---------- packaging ---------- */
.pack-chip { margin-top: 6px; align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 10px; border: 1px solid var(--tag-bg); border-radius: 8px; background: #FFF7EA; font-size: 12px; font-weight: 600; color: var(--tag-ink); text-align: left; }
.pack-change { font-weight: 600; color: var(--coral-link); text-decoration: underline; text-underline-offset: 2px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(22, 24, 26, 0.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--page); border-radius: 18px 18px 0 0; padding: 20px max(16px, env(safe-area-inset-left, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.sheet h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 22px; }
.sheet-sub { margin: -4px 0 4px; font-size: 14px; color: var(--ink-2); }
.pack-options { display: flex; flex-direction: column; gap: 8px; }
.pack-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); font-size: 16px; font-weight: 600; text-align: left; }
.pack-option.on { border-color: var(--coral); }
.pack-price { font-weight: 700; color: var(--coral-text); white-space: nowrap; }
.sheet-cancel { min-height: 44px; border: 0; background: none; font-weight: 600; color: var(--ink-2); }
.panel-line small { display: block; font-size: 12px; color: var(--tag-ink); }

/* ---------- quantity stepper ---------- */
.stepper { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.step { width: 40px; height: 40px; border-radius: 20px; border: none; background: var(--coral); color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; }
.step.minus { background: var(--card); border: 1px solid #D9D4C7; font-weight: 500; }
.qty { width: 58px; height: 36px; border: 1px solid #D9D4C7; border-radius: 8px; background: var(--card); text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; padding: 0 4px; }
.qty-unit { font-size: 12px; color: var(--ink-2); margin-left: -2px; margin-right: 2px; }
.rows .step { width: 34px; height: 34px; border-radius: 17px; font-size: 18px; }
.rows .qty { width: 48px; height: 32px; font-size: 14px; }

/* ---------- printable menu button (end of the page, scrolls with it) ---------- */
.menu-pdf { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- order bar (phone) ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--card); border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.bar-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 999px; border: none; background: var(--coral); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.btn.wide { width: 100%; justify-content: space-between; }
.btn.wide span { white-space: nowrap; }
.bar .btn.wide { padding-inline: 16px; font-size: clamp(13px, 3.9vw, 15px); }
.btn.ghost { background: var(--card); border: 2px solid var(--coral); }
.btn.discard { background: var(--card); border: 2px solid #C0262D; color: #C0262D; font-weight: 600; }
.btn.discard.confirm { background: #FDECEC; }
.btn[aria-disabled="true"] { background: var(--muted-fill); color: var(--ink-2); border-color: transparent; pointer-events: none; }
.fine { font-size: 11px; color: var(--ink-2); text-align: center; }
.btn.hint { justify-content: center; cursor: default; } /* empty sheet: the bar is a prompt, not an action */

/* ---------- review sheet ---------- */
.review { position: fixed; inset: 0; z-index: 40; background: var(--page); overflow-y: auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: 0; } /* no bottom padding, so the pinned total sits on the screen edge */
.review-inner { max-width: 560px; margin: 0 auto; padding-block: 14px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.back { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 44px; border: none; background: none; padding: 0; font-weight: 600; font-size: 15px; color: var(--coral-link); }
.review h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 26px; }
.lines { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; list-style: none; margin: 0; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.line-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line.removed .line-what, .line.removed .line-product { color: var(--ink-3); text-decoration: line-through; }
.line.removed .line-est { color: var(--ink-3); font-weight: 500; }
.notes-box { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.notes-box textarea { font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid #D9D4C7; border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 84px; }
.review-hint { margin: -6px 0 0; font-size: 13px; color: var(--ink-2); }
.line-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line-what { font-size: 15px; font-weight: 600; }
.line-product { font-size: 13.5px; color: var(--ink-2); }
/* the strain is the bold line: plain product name, bold strain under it */
.line-what.plain { font-weight: 400; }
.line-product.strong { font-weight: 600; color: var(--ink); }
.line-est { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--coral-text); font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; font-weight: 600; }
.total strong { font-family: var(--display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
/* review: the estimated total stays pinned to the bottom of the screen while the lines scroll */
.lines .total { position: sticky; bottom: 0; z-index: 1; margin: 0 -14px -4px; padding: 14px; background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: 0 -6px 12px -8px rgba(22, 24, 26, 0.25); }
.disclaimer { background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; color: var(--warn-ink); }
.disclaimer h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.4px; }
.disclaimer p { margin: 0; font-size: 14px; line-height: 1.45; }
.send { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.manual { font-size: 13px; color: var(--ink-2); text-align: center; }
.manual a { color: var(--coral-link); }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; padding-bottom: 48px; align-items: start; }
  .aside { display: block; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); padding-top: 14px; }
  .bar { display: none; }
  .panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 160px); overflow-y: auto; }
  .panel h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: 0.6px; }
  .panel-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .panel-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
  .panel-line span:last-child { font-weight: 600; color: var(--coral-text); font-variant-numeric: tabular-nums; }
  .panel-empty { font-size: 14px; color: var(--ink-2); }
  .panel-contact { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
  .review { background: rgba(22, 24, 26, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px 0; }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 18px; }
  .review-inner { background: var(--page); border-radius: 18px; padding: 20px 24px 24px; margin-bottom: 40px; width: 100%; }
}
@media (min-width: 1180px) {
  .cards { display: block; column-count: 2; column-gap: 14px; }
  .cards .card { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
