/* The ordering website: the shop front of MAN Distribution, in the colours of its promo flyers. */
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(fonts/manrope-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url(fonts/manrope-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Saira Stencil One"; font-weight: 400; font-display: swap; src: url(fonts/saira-stencil-one-latin-400-normal.woff2) format("woff2"); }

:root {
  --green: #0a5a28;
  --deep: #053a18;
  --leaf: #e7f2ea;
  --red: #d7141a;
  --red-deep: #8a0006;
  --yellow: #ffe100;
  --ink: #14140f;
  --muted: #5d5a52;
  --line: #e3e0d8;
  --paper: #f2f5f1;
  --sheet: #ffffff;
  --good: #1e6f43;
  --bad: #b3261e;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 "Manrope", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); padding: 8px 12px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.loading { text-align: center; padding: 80px 16px; color: var(--muted); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--deep); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand svg { width: 52px; height: 26px; }
.brand-words { display: flex; flex-direction: column; line-height: 1; }
.brand-man { font: 25px/0.9 "Saira Stencil One", sans-serif; letter-spacing: .04em; }
.brand-dist { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 6px; color: rgba(255, 255, 255, .86); }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .14); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: 999px; flex: none; }
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn:hover { background: #fff07a; }
.cart-btn .n { background: var(--red); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px 0; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 10px 6px; overflow-x: auto; }
  .nav a { flex: 1; text-align: center; padding: 8px 6px; white-space: nowrap; }
  .cart-btn { padding: 8px 12px; }
}

/* ---------- Home ---------- */
.hero { color: #fff; background: radial-gradient(ellipse at 80% -10%, #138a3d 0%, var(--green) 40%, var(--deep) 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 22px); pointer-events: none; }
.hero-in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 56px 16px 64px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 700; letter-spacing: -0.025em; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { font-size: 18px; color: rgba(255, 255, 255, .88); max-width: 34em; margin: 18px 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 8px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; background: var(--sheet); color: var(--ink); border-color: var(--line); }
.btn:hover { border-color: var(--ink); }
.btn.go { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn.go:hover { background: #fff07a; border-color: #fff07a; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn.ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn.dark { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.dark:hover { background: var(--green); border-color: var(--green); }
.btn.big { min-height: 56px; font-size: 17px; width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.hero-card { background: var(--sheet); color: var(--ink); border-radius: 14px; padding: 22px; box-shadow: 0 24px 50px rgba(0, 0, 0, .3); transform: rotate(1.5deg); }
.hero-card .tagline { display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; transform: skewX(-8deg); box-shadow: 3px 3px 0 var(--red-deep); }
.hero-card h2 { font-size: 24px; margin: 14px 0 4px; }
.hero-card .ends { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.hero-card ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.hero-card li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.hero-card li span { font-weight: 600; }
.hero-card li b { font-size: 19px; }
.hero-card .btn { width: 100%; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 36px 16px 40px; gap: 28px; }
  .hero-card { transform: none; }
}

.strip { background: var(--red); color: #fff; }
.strip-in { max-width: var(--wrap); margin: 0 auto; padding: 12px 16px; display: flex; gap: 10px 18px; align-items: center; justify-content: center; flex-wrap: wrap; font-weight: 700; text-align: center; }
.strip-in .when { background: var(--yellow); color: var(--ink); padding: 3px 10px; border-radius: 4px; }

.section { max-width: var(--wrap); margin: 0 auto; padding: 44px 16px 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-head a { font-weight: 700; color: var(--green); text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: var(--yellow); font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Product cards ---------- */
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { flex: 1 1 260px; position: relative; }
.search input { width: 100%; min-height: 48px; border: 1px solid #cfcabf; border-radius: 8px; padding: 0 14px 0 42px; font-size: 17px; background: var(--sheet); }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(10, 90, 40, .18); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfcabf; background: var(--sheet); font-weight: 600; font-size: 15px; cursor: pointer; }
.chip.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.count-line { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 10px 12px; }
  .card-name { font-size: 15px; }
  .add { flex-direction: column; }
  .add .btn, .add .btn.pal { flex: none; width: 100%; }
  .price { font-size: 20px; }
}
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; position: relative; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(20, 20, 15, .08); border-color: #d3cfc5; }
.card.picked { border-color: var(--green); box-shadow: 0 0 0 2px var(--green) inset; }
.pic { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.pic img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pic.none { background: var(--leaf); }
.pic.none span { font-weight: 700; font-size: 26px; color: var(--green); text-align: center; padding: 0 14px; line-height: 1.1; opacity: .75; }
.pic.out img, .pic.out span { opacity: .45; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; transform: skewX(-8deg); box-shadow: 2px 2px 0 var(--red-deep); }
.badge.out { background: var(--ink); box-shadow: none; transform: none; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.stock { font-size: 13px; color: var(--muted); }
.stock.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; }
.stock.no { color: var(--bad); font-weight: 600; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.promo { background: var(--yellow); padding: 0 6px; border-radius: 4px; }
.was { color: var(--muted); text-decoration: line-through; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.per { font-size: 13px; color: var(--muted); flex-basis: 100%; margin-top: -6px; }
.deal { font-size: 13px; color: var(--red-deep); font-weight: 600; line-height: 1.35; }
.deal .money { font-size: 17px; }
.add { display: flex; gap: 6px; }
.add .btn { min-height: 44px; padding: 0 10px; font-size: 15px; flex: 1; }
.add .btn.pal { flex: 0 0 auto; }
.stepper { display: flex; align-items: stretch; border: 2px solid var(--green); border-radius: 8px; overflow: hidden; height: 44px; }
.stepper button { width: 44px; border: 0; background: var(--leaf); color: var(--green); font-size: 22px; font-weight: 700; cursor: pointer; flex: none; }
.stepper button:hover { background: #d4e9da; }
.stepper input { flex: 1; min-width: 0; border: 0; text-align: center; font-weight: 700; font-size: 17px; }
.stepper input:focus { outline: none; background: #fffbe0; }
.in-cart { font-size: 13px; color: var(--green); font-weight: 600; }
.in-cart .warn { color: var(--bad); }
.empty { background: var(--sheet); border: 1px dashed #cfcabf; border-radius: 12px; padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- Order (cart) ---------- */
.order-page { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .order-page { grid-template-columns: 1fr; } }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.panel h2 { font-size: 20px; margin-bottom: 12px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line:last-child { border-bottom: 0; }
.line .thumb { width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.line .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.line .thumb span { font-weight: 700; color: var(--green); font-size: 13px; text-align: center; padding: 2px; }
.line-name { font-weight: 700; }
.line-parts { font-size: 14px; color: var(--muted); margin-top: 2px; }
.line-parts .tag { color: var(--red-deep); font-weight: 700; }
.line-parts .money, .hint .money { font-size: 17px; color: var(--ink); }
.line .stepper { width: 150px; margin-top: 10px; }
.line-end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.line-end b { font-size: 18px; }
.textlink { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 14px; }
.textlink:hover { color: var(--ink); }
.hint { background: #fff8cc; border: 1px solid #f0dc6a; border-radius: 8px; padding: 10px 12px; font-size: 15px; margin-bottom: 10px; }
.sum { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.sum.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 12px; }
.sum.total b { font-size: 26px; }
.small { font-size: 14px; color: var(--muted); }
.field { display: block; margin-top: 12px; font-weight: 600; font-size: 15px; }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 10px 12px; border: 1px solid #cfcabf; border-radius: 8px; font-size: 17px; font-weight: 400; background: #fff; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(10, 90, 40, .18); }
.who { background: var(--leaf); border-radius: 8px; padding: 10px 12px; font-size: 15px; margin-top: 12px; }
.error { color: var(--bad); font-weight: 600; margin: 10px 0 0; }

/* ---------- Sent orders ---------- */
.orders { display: grid; gap: 12px; max-width: 760px; }
.sent-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sent-no { font: 20px/1 "Saira Stencil One", sans-serif; letter-spacing: .03em; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--paper); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.status.new { color: #8a4b08; background: #fdf0d5; }
.status.invoiced { color: var(--good); background: #dff3e5; }
.status.declined { color: var(--bad); background: #fde7e4; }
.status.cancelled { color: var(--muted); }
.orders ul { margin: 10px 0; padding-left: 20px; }
.orders .row { display: flex; gap: 8px; flex-wrap: wrap; }
.orders .row .btn { min-height: 42px; font-size: 15px; }

/* ---------- Bottom bar on phones, footer, toast ---------- */
#bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--sheet); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); display: none; }
#bar.show { display: block; }
#bar .btn { max-width: 560px; margin: 0 auto; display: flex; }
body.has-bar .foot { padding-bottom: 96px; }
.foot { background: var(--deep); color: rgba(255, 255, 255, .85); margin-top: 56px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 36px 16px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; font-size: 15px; }
.foot h3 { color: #fff; font-size: 15px; margin-bottom: 10px; letter-spacing: .04em; text-transform: uppercase; }
.foot a { color: var(--yellow); text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot p { margin: 0 0 6px; }
.foot .brand-man { font-size: 30px; color: #fff; }
.foot .tag { color: var(--yellow); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin-top: 6px; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .12); }
.foot-base div { max-width: var(--wrap); margin: 0 auto; padding: 14px 16px; font-size: 13px; color: rgba(255, 255, 255, .65); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 60; max-width: calc(100vw - 32px); transition: transform .2s, opacity .2s; pointer-events: none; opacity: 0; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.err { background: var(--bad); }
body.has-bar #toast { bottom: 96px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .hero-card { transform: none; } }
