/* webfoods.in — design system
   B2B food + supply marketplace for kitchens, cafes, cloud kitchens, hotels.
*/

:root {
  --brand: #0F5132;
  --brand-2: #0A3A23;
  --brand-tint: #E8F1EC;
  --brand-ink: #051A0F;

  --accent: #E8A317;
  --accent-tint: #FBEFCE;

  --bg: #FAFAF6;
  --surface: #FFFFFF;
  --surface-2: #F4F4EE;
  --ink: #0E1A14;
  --ink-2: #2A3A2F;
  --muted: #5E6B62;
  --muted-2: #8A958D;
  --line: #E5E8DF;
  --line-2: #EFF1E9;

  --danger: #B23A2F;
  --danger-tint: #FBE9E6;
  --success: #0F5132;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 0 rgba(14,26,20,0.04), 0 1px 2px rgba(14,26,20,0.04);
  --shadow-2: 0 2px 4px rgba(14,26,20,0.04), 0 8px 24px rgba(14,26,20,0.06);
  --shadow-3: 0 24px 48px -12px rgba(14,26,20,0.18);

  --container: 1280px;
  --gutter: 24px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Type scale */
.display-xl { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 5.5vw, 84px); line-height: 0.98; letter-spacing: -0.025em; }
.display-l  { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 4vw, 60px); line-height: 1.02; letter-spacing: -0.022em; }
.display-m  { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -0.018em; }
.display-s  { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.012em; }
.h1 { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.018em; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; }
.h3 { font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -0.005em; }
.body { font-size: 15px; line-height: 1.55; }
.small { font-size: 13px; line-height: 1.45; }
.tiny { font-size: 11px; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--brand); }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-2);
  font-weight: 500; font-size: 14.5px; letter-spacing: -0.005em;
  transition: background 120ms, color 120ms, border-color 120ms, transform 120ms;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-accent { background: var(--ink); color: #fff; }
.btn-accent:hover { background: var(--brand); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--r-1); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* Inputs */
.input, .select, .textarea {
  height: 44px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 0 14px;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; font-family: inherit; }
.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
.field + .field { margin-top: 14px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); }
.card-hover { transition: transform 160ms, box-shadow 160ms, border-color 160ms; }
.card-hover:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); transform: translateY(-2px); }

/* Badges / pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 500;
}
.pill-brand { background: var(--brand-tint); color: var(--brand); }
.pill-accent { background: var(--accent-tint); color: #6b4a0a; }
.pill-line { background: transparent; border: 1px solid var(--line); }
.pill-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Utility */
.flex { display: flex; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.py-section { padding-top: 80px; padding-bottom: 80px; }
.py-section-lg { padding-top: 120px; padding-bottom: 120px; }
.text-center { text-align: center; }

/* Image placeholders */
.ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--brand);
  position: relative;
  overflow: hidden;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,81,50,0.04), rgba(232,163,23,0.04));
  pointer-events: none;
}
.ph svg { max-width: 60%; max-height: 60%; position: relative; z-index: 1; }

/* Header */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,246,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-top { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
.hdr-strip { background: var(--ink); color: #d8e0d9; font-size: 12.5px; letter-spacing: -0.005em; }
.hdr-strip-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.hdr-strip a:hover { color: #fff; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.022em; color: var(--ink); }
.brand-mark .dot { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; font-family: var(--font-sans); flex-shrink: 0; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: var(--r-1); font-size: 14px; color: var(--ink-2); }
.nav a:hover, .nav a.active { background: var(--surface-2); color: var(--ink); }

.search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-2);
  transition: border-color 120ms, box-shadow 120ms;
  cursor: text;
}
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; font-size: 14px; }
.search .kbd { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.search svg { flex-shrink: 0; color: var(--muted); }

/* Mega category bar */
.catbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.catbar-inner { display: flex; align-items: center; gap: 2px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { padding: 8px 14px; border-radius: var(--r-1); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.catbar a:hover, .catbar a.active { background: var(--brand-tint); color: var(--brand); }
.catbar a.feature { color: var(--brand); font-weight: 600; }

/* Product card */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; transition: box-shadow 160ms, border-color 160ms; }
.pcard:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.pcard .pimg { aspect-ratio: 1/1; background: var(--surface-2); position: relative; overflow: hidden; display: block; }
.pcard .pimg .badge { position: absolute; top: 10px; left: 10px; }
.pcard .pbody { padding: 14px 14px 16px; }
.pcard .pbrand { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.pcard .ptitle { font-size: 14.5px; font-weight: 500; line-height: 1.35; margin: 4px 0 0; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.pcard .ppack { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-family: var(--font-mono); }
.pcard .pprice { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.pcard .pprice .v { font-family: var(--font-mono); font-weight: 600; font-size: 17px; }
.pcard .pprice .u { font-size: 12px; color: var(--muted); }
.pcard .pprice .locked { font-size: 13px; color: var(--brand); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.pcard .pfoot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pcard .qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line); border-radius: var(--r-1); overflow: hidden; }
.pcard .qty button { width: 32px; height: 100%; }
.pcard .qty button:hover { background: var(--surface-2); }
.pcard .qty input { width: 40px; text-align: center; border: 0; outline: 0; background: transparent; font-family: var(--font-mono); font-weight: 500; }

/* Footer */
.ftr { background: var(--ink); color: #c7d0c8; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 48px; padding: 64px 0 48px; }
.ftr h4 { color: #fff; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; margin: 0 0 16px; font-family: var(--font-sans); }
.ftr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ftr a:hover { color: #fff; }
.ftr-bot { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: #9aa49b; }

/* Sidebar / filters */
.side { border-right: 1px solid var(--line); padding-right: 24px; }
.side-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.side-section:first-child { padding-top: 0; }
.side-section h5 { font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.checkrow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; cursor: pointer; }
.checkrow input { accent-color: var(--brand); width: 15px; height: 15px; }
.checkrow .ct { margin-left: auto; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }

/* Section header */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.sec-head .eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--brand); }
.sec-head h2 { margin: 8px 0 0; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tbl td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper .step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.stepper .step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-family: var(--font-mono); font-weight: 600; }
.stepper .step.active { color: var(--ink); }
.stepper .step.active .n { background: var(--brand); color: #fff; }
.stepper .step.done .n { background: var(--brand); color: #fff; }
.stepper .sep { flex: 1; height: 1px; background: var(--line); }

/* Notice / alert */
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-tint); color: var(--brand); border-radius: var(--r-2); font-size: 13.5px; }
.notice-danger { background: var(--danger-tint); color: var(--danger); }

/* Login gate */
.lock-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 240ms ease-out both; }

/* Hero band */
.hero-band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--brand);
  color: #fff;
}
.hero-band .veil { position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 20%, rgba(232,163,23,0.22), transparent 40%),
  radial-gradient(circle at 10% 90%, rgba(255,255,255,0.07), transparent 40%);
}

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.marquee-track { display: flex; gap: 64px; align-items: center; padding: 18px 0; animation: scrollx 30s linear infinite; white-space: nowrap; }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 16px; }
.marquee-item .sep { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* Hero stat */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -0.018em; line-height: 1; }
.stat .l { font-size: 12.5px; color: var(--muted); }

/* Page wrap */
.page { min-height: calc(100vh - 200px); }

/* Breadcrumbs */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 20px 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--muted-2); }

/* Category grid card */
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 28px 20px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  transition: box-shadow 160ms, border-color 160ms, transform 160ms;
}
.cat-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); transform: translateY(-2px); }
.cat-card .cat-icon { width: 64px; height: 64px; color: var(--brand); }
.cat-card .cat-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.cat-card .cat-count { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }

/* Testimonial card */
.testi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 28px;
}
.testi-card .stars { display: flex; gap: 3px; color: var(--accent); margin-bottom: 16px; }
.testi-card blockquote { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.testi-card .author { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.testi-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.testi-card .author-name { font-weight: 600; font-size: 14px; }
.testi-card .author-role { font-size: 12.5px; color: var(--muted); }

/* How it works step */
.hiw-step { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hiw-step .num { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; font-family: var(--font-mono); flex-shrink: 0; }
.hiw-step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.hiw-step p { font-size: 14px; color: var(--muted-2); line-height: 1.55; }

/* Account sidebar */
.acct-sidebar { display: flex; flex-direction: column; gap: 2px; }
.acct-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-2); font-size: 14px; color: var(--ink-2); transition: background 120ms; }
.acct-sidebar a:hover { background: var(--surface-2); color: var(--ink); }
.acct-sidebar a.active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* Mobile nav bar */
.mob-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.mob-nav-inner { display: flex; }
.mob-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; font-size: 11px; color: var(--muted); }
.mob-nav a.active { color: var(--brand); }
.mob-nav a svg { width: 20px; height: 20px; }

/* Responsive guards */
@media (max-width: 980px) {
  .hide-md { display: none !important; }
  .ftr-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .mob-nav { display: block; }
  body { padding-bottom: 64px; }
  .container { padding: 0 16px; }
}
