/* ============================================================
   SEDEO — Multi-vendor grocery platform
   Design system & shared styles
   ============================================================
   Tokens
   - Primary violet: oklch(40% 0.22 295)  → ink-on-light brand
   - Deep violet:    oklch(28% 0.18 295)  → headings, deep surfaces
   - Promo red:      oklch(62% 0.22 25)   → discounts, urgency, key CTAs
   - Cream:          oklch(98% 0.01 90)   → soft background
   - Paper:          #ffffff
   - Ink:            oklch(18% 0.02 295)  → body text
   - Mute:           oklch(55% 0.02 295)  → secondary text
   - Line:           oklch(92% 0.005 295) → hairlines
   Type
   - Display: 'Instrument Serif', italic for tone
   - UI body: 'Plus Jakarta Sans'
   - Mono:    'JetBrains Mono' for placeholders, codes, prices runtime
   ============================================================ */

:root {
  --violet: #4318b8;
  --violet-700: #3a13a0;
  --violet-900: #1f0a55;
  --violet-50: #f1ecff;
  --violet-100: #e3d7ff;
  --red: #e23046;
  --red-700: #b8202f;
  --cream: #faf7f2;
  --paper: #ffffff;
  --ink: #15102a;
  --mute: #6b6480;
  --line: #ebe7f0;
  --line-strong: #d8d1e2;
  --ok: #2f8e5c;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(31, 10, 85, 0.06);
  --shadow:    0 6px 24px -8px rgba(31, 10, 85, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(31, 10, 85, 0.28);

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1280px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01' on, 'cv11' on;
  font-size: 15px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--violet-900);
  color: rgba(255,255,255,0.9);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.topbar .container {
  display: flex; gap: 24px;
  align-items: center; justify-content: space-between;
  padding-top: 9px; padding-bottom: 9px;
}
.topbar .marquee { display: flex; gap: 22px; align-items: center; }
.topbar .marquee span::before {
  content: '●'; color: var(--red);
  margin-right: 8px; font-size: 9px; vertical-align: 2px;
}
.topbar .langs { display: flex; gap: 16px; }
.topbar .langs a { opacity: 0.6; }
.topbar .langs a.active { opacity: 1; font-weight: 600; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--violet-900);
  line-height: 1;
}
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); transform: translateY(-4px); }
.brand small {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--mute);
  margin-left: 8px;
  text-transform: uppercase;
  align-self: center;
  border-left: 1px solid var(--line-strong);
  padding-left: 8px;
}

.searchbar {
  display: flex; align-items: center;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  gap: 8px;
}
.searchbar svg { flex: none; opacity: 0.55; }
.searchbar input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 14.5px; padding: 8px 0;
}
.searchbar .scope {
  display: flex; align-items: center; gap: 4px;
  background: white; border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px;
  border: 1px solid var(--line); color: var(--ink);
}
.searchbar .go {
  background: var(--violet); color: white;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
}

.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-actions .iconbtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  color: var(--ink); font-size: 13.5px; font-weight: 500;
  position: relative;
}
.nav-actions .iconbtn:hover { background: var(--cream); }
.nav-actions .iconbtn .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--red); color: white;
  font-size: 10px; font-weight: 700;
  height: 18px; min-width: 18px; padding: 0 5px;
  border-radius: 999px; display: grid; place-items: center;
}

.megabar {
  border-top: 1px solid var(--line);
  background: white;
}
.megabar .container {
  display: flex; gap: 4px;
  overflow-x: auto;
  padding-top: 6px; padding-bottom: 6px;
}
.megabar a {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.megabar a:hover { background: var(--violet-50); color: var(--violet); }
.megabar a.active { background: var(--violet); color: white; }
.megabar a.promo { color: var(--red); font-weight: 600; }
.megabar a.promo::before { content: '◆'; font-size: 8px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 600; font-size: 14.5px;
  background: var(--violet); color: white;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--violet-700); }
.btn:active { transform: translateY(1px); }
.btn.btn-red { background: var(--red); }
.btn.btn-red:hover { background: var(--red-700); }
.btn.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.btn-ghost:hover { background: var(--cream); }
.btn.btn-dark { background: var(--violet-900); }
.btn.btn-block { width: 100%; }
.btn.btn-lg { height: 56px; padding: 0 28px; font-size: 15.5px; }
.btn.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ── PILLS / CHIPS ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--violet-50); color: var(--violet);
  border: 1px solid var(--violet-100);
}
.pill.pill-red { background: #ffe9eb; color: var(--red); border-color: #ffd2d6; }
.pill.pill-line { background: white; color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
.pill.pill-dark { background: var(--violet-900); color: white; border: 0; }
.pill.pill-ok { background: #e3f5ec; color: var(--ok); border-color: #c0e7d2; }

/* ── PRODUCT CARD ── */
.prod {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
}
.prod:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.prod .ph { aspect-ratio: 1 / 1; background: var(--cream); position: relative; }
.prod .vendor-tag {
  position: absolute; top: 10px; left: 10px;
  background: white; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px 4px 4px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
}
.prod .vendor-tag .swatch {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; color: white; font-weight: 800;
}
.prod .promo-tag {
  position: absolute; top: 10px; right: 10px;
  background: var(--red); color: white;
  font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 4px 8px;
}
.prod .heart {
  position: absolute; bottom: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: white; border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--mute);
}
.prod .heart:hover { color: var(--red); border-color: var(--red); }
.prod .body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.prod .name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.prod .meta { color: var(--mute); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.prod .price-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 6px;
}
.prod .price { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--violet-900); }
.prod .price-was {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--mute); text-decoration: line-through;
}
.prod .add {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--violet-900); color: white;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1;
}
.prod .add:hover { background: var(--violet); }

/* ── SVG striped placeholder ── */
.placeholder {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -38deg,
    var(--cream) 0 14px,
    #f0eae0 14px 28px
  );
  display: grid; place-items: center;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}
.placeholder.dark {
  background: repeating-linear-gradient(
    -38deg,
    var(--violet-900) 0 14px,
    #2a1466 14px 28px
  );
  color: rgba(255,255,255,0.65);
}
.placeholder.violet {
  background: repeating-linear-gradient(
    -38deg,
    var(--violet-50) 0 14px,
    #e8defc 14px 28px
  );
  color: var(--violet);
}

/* ── SECTIONS ── */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 36px; gap: 24px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--violet-900);
  max-width: 18ch;
  line-height: 1;
}
.section-head .lead { color: var(--mute); max-width: 36ch; font-size: 15px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--violet); }

/* ── FOOTER ── */
.footer {
  background: var(--violet-900);
  color: rgba(255,255,255,0.85);
  padding: 80px 0 28px;
  margin-top: 80px;
}
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: white; }
.footer .grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
}
.footer h5 {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.footer .brand { color: white; font-size: 36px; }
.footer .brand small { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.18); }
.footer .blurb { color: rgba(255,255,255,0.6); margin-top: 16px; max-width: 28ch; font-size: 13px; }
.footer .legal {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  color: rgba(255,255,255,0.5); font-size: 12px;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}
.footer .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.footer .badges .pay {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ── FORMS ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.field .hint { font-size: 12px; color: var(--mute); }
.field input, .field select, .field textarea {
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 16px;
  background: white;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { min-height: 110px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px var(--violet-50);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── CARDS ── */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card.solid { background: var(--cream); border-color: transparent; }
.card.dark { background: var(--violet-900); color: white; border-color: transparent; }

/* ── UTIL ── */
.muted { color: var(--mute); }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); font-style: italic; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .footer .grid { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .site-header .container { grid-template-columns: auto 1fr; row-gap: 12px; }
  .site-header .searchbar { grid-column: 1 / -1; order: 3; }
  .section { padding: 56px 0; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer .grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .topbar .marquee span:nth-child(n+3) { display: none; }
}
@media (max-width: 520px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer .grid { grid-template-columns: 1fr; gap: 28px; }
  .container { padding: 0 18px; }
}
