/* ==========================================================================
   PullUp — Design System
   Sections:
     01. Tokens
     02. Reset
     03. Layout (header, main, footer, containers)
     04. Typography
     05. Buttons
     06. Forms
     07. Cards
     08. Badges & tags
     09. Progress & tiers
     10. Vote (PullUp War)
     11. Tabs
     12. Tables
     13. Notes (info, safe, warn, error)
     14. Steps & timeline
     15. Code block (collection codes)
     16. Payment options
     17. Met (dark stat tiles)
     18. Sheet (modal bottom panel)
     19. Toast
     20. Boom (celebration overlay)
     21. Responsive
     22. Motion preferences
     23. Header (site header, brand, search, user menu)
     24. Nav (top pills, bottom bar)
     25. Section-specific components (hero variants, cards, wallet, supplier)
     26. Utilities (input, empty, avatar, role option)
   ========================================================================== */


/* ==========================================================================
   01. TOKENS
   ========================================================================== */
:root {
  /* Colour */
  --bg:        #F5F2FC;
  --card:      #FFFFFF;
  --ink:       #17112B;
  --mute:      #756C8F;
  --line:      #E7E1F4;
  --dark:      #17112B;
  --soft:      #EFEAFB;

  --or:        #FF5A32;   /* orange — primary CTA */
  --pk:        #FF2F70;   /* pink — CTA gradient end */
  --gr:        #13825A;   /* green — success / bulk */
  --am:        #FFC233;   /* amber — progress / warning */

  /* Typography */
  --font-body: "Figtree", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;

  /* Radii */
  --r-sm:  11px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  28px;
  --r-full: 99px;

  /* Spacing scale */
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 14px;
  --sp-4: 18px;
  --sp-5: 22px;
  --sp-6: 28px;

  /* Effects */
  --shadow-cta:  0 4px 0 rgba(0, 0, 0, .2);
  --shadow-cta-active: 0 2px 0 rgba(0, 0, 0, .2);
  --shadow-sheet: 0 -8px 30px rgba(23, 17, 43, .18);

  /* Safe area (iOS notch) */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark mode — same token names, different values */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:    #0F0B1C;
    --card:  #1B1433;
    --ink:   #F4F0FF;
    --mute:  #A99FCB;
    --line:  #32285C;
    --dark:  #2A1F55;
    --soft:  #271D4D;
    --gr:    #3CD39A;
  }
}
:root[data-theme="dark"] {
  --bg:    #0F0B1C;
  --card:  #1B1433;
  --ink:   #F4F0FF;
  --mute:  #A99FCB;
  --line:  #32285C;
  --dark:  #2A1F55;
  --soft:  #271D4D;
  --gr:    #3CD39A;
}


/* ==========================================================================
   02. RESET
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.45 var(--font-body);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* iOS safe-area strip behind the header */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 60;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
}


/* ==========================================================================
   03. LAYOUT
   ========================================================================== */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.hin {
  max-width: 1140px;
  margin: auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

main {
  max-width: 1140px;
  margin: auto;
  padding: 18px 18px 120px;
}

/* Two-column layout (main + aside) */
.lay {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  gap: 20px;
  align-items: start;
}

.st { display: grid; gap: 14px; }

/* Grid helpers */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* Row helpers */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bw  { justify-content: space-between; }

/* Section title row */
.sec {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 6px 0;
}


/* ==========================================================================
   04. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 { margin: 0; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 800;
  margin: 8px 0 10px;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

h3 { font-size: 1.1rem; }

.mute  { color: var(--mute); }
.d     { font-family: var(--font-display); letter-spacing: -.03em; }
.ey    { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: #BFB3DD; }
.strong { font-weight: 800; }

/* Price display */
.pr {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.pr s {
  font-size: .85rem;
  color: var(--mute);
  font-weight: 500;
  margin-left: 6px;
}


/* ==========================================================================
   05. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--or), var(--pk));
  box-shadow: var(--shadow-cta);
  transition: transform .06s, box-shadow .06s;
}
.btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-cta-active);
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Size variants */
.btn.w   { width: 100%; }
.btn.sm  { padding: 8px 12px; font-size: .85rem; border-radius: var(--r-sm); }

/* Colour variants */
.btn.s { background: var(--soft); color: var(--ink); box-shadow: none; }
.btn.g { background: var(--gr);  color: #fff; }


/* ==========================================================================
   06. FORMS
   ========================================================================== */
input,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--or);
}

.field { margin: 12px 0; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 800;
  margin-bottom: 5px;
}

/* Chip row (category filters) */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
.chip {
  padding: 8px 15px;
  border-radius: var(--r-full);
  background: var(--card);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.chip.on {
  background: var(--ink);
  color: var(--bg);
  box-shadow: none;
}


/* ==========================================================================
   07. CARDS
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card.click {
  cursor: pointer;
  transition: transform .15s;
}
.card.click:active { transform: scale(.985); }

/* Hero (large banner) */
.hero {
  background: linear-gradient(125deg, #17112B, #2D1A52 55%, #7A1F55);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  right: -90px;
  top: -140px;
  background: #FF5A3230;
}
.hero p {
  color: #D9D1EE;
  max-width: 52ch;
  margin: 0 0 16px;
}

/* Art block (emoji tile inside cards) */
.art {
  height: 150px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 4.6rem;
  position: relative;
  margin-bottom: 12px;
}
.art .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fffffff0;
  color: #17112B;
}
.mega .art {
  height: 220px;
  font-size: 7rem;
}


/* ==========================================================================
   08. BADGES & TAGS
   ========================================================================== */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--soft);
  font-size: .72rem;
  font-weight: 800;
}
.tag.l   { background: #FF5A3222; color: var(--or); }
.tag.ok  { background: #16875B22; color: var(--gr); }
.tag.w   { background: #FFC23333; color: #9A6A00; }
.tag.err { background: #D0222233; color: #D02222; }

.chipw {
  background: #ffffff1c;
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: .85rem;
}


/* ==========================================================================
   09. PROGRESS & TIERS
   ========================================================================== */
.bar {
  position: relative;
  height: 12px;
  border-radius: 9px;
  background: var(--line);
  margin: 12px 0 8px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--am), var(--or), var(--pk));
  transition: width .5s;
}
.bar b {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--ink);
  opacity: .45;
}

.need b { color: var(--or); }

/* Tier ladder */
.tier {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 13px;
  margin-top: 6px;
  background: var(--bg);
  font-weight: 600;
}
.tier.cur { background: var(--ink); color: var(--bg); }
.tier.ok  { opacity: .55; }


/* ==========================================================================
   10. VOTE (PullUp War)
   ========================================================================== */
.vote {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-top: 8px;
  width: 100%;
}
.vote i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #FF5A3238, #FF2F7038);
  transition: width .5s;
}
.vote span { position: relative; }


/* ==========================================================================
   11. TABS (secondary navigation — desktop)
   ========================================================================== */
#tabs {
  max-width: 1140px;
  margin: auto;
  padding: 0 18px 10px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
#tabs button {
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--card);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--mute);
}
#tabs button.on {
  background: linear-gradient(90deg, var(--or), var(--pk));
  color: #fff;
  box-shadow: none;
}


/* ==========================================================================
   12. TABLES
   ========================================================================== */
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th,
.tbl td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.tbl th {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--mute);
}
.tw { overflow-x: auto; }


/* ==========================================================================
   13. NOTES (info, safe, warn, error)
   ========================================================================== */
.note {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: #2E7BD122;
  color: var(--ink);
  margin: 10px 0;
  font-size: .9rem;
}
.note.safe { background: #16875B22; }
.note.warn { background: #FFC23333; }
.note.err  { background: #D0222233; }


/* ==========================================================================
   14. STEPS & TIMELINE
   ========================================================================== */
.step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.step em {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--line);
  font-style: normal;
  font-size: .8rem;
  font-weight: 800;
  flex: none;
}
.step.ok  em { background: var(--gr); color: #fff; }
.step.now em { background: var(--am); color: #17112B; }


/* ==========================================================================
   15. CODE BLOCK (collection codes)
   ========================================================================== */
.code {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  background: var(--bg);
  border-radius: 16px;
  padding: 12px;
}


/* ==========================================================================
   16. PAYMENT OPTIONS
   ========================================================================== */
.pay {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  width: 100%;
  margin-top: 8px;
  font-weight: 700;
  background: var(--card);
}
.pay.on {
  border-color: var(--or);
  background: #FF5A3214;
}


/* ==========================================================================
   17. MET (dark stat tiles)
   ========================================================================== */
.met {
  background: var(--dark);
  color: #fff;
  border-radius: 18px;
  padding: 15px;
}
.met small {
  display: block;
  color: #B7ACD8;
}
.met strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -.03em;
}


/* ==========================================================================
   18. SHEET (bottom panel / modal)
   ========================================================================== */
#sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(15, 8, 35, .62);
}
#sheet.on { display: block; }

.pane {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  max-height: 93vh;
  overflow: auto;
  background: var(--card);
  border-radius: 30px 30px 0 0;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-sheet);
  animation: sheet-up .28s ease-out;
}
@keyframes sheet-up {
  from { transform: translate(-50%, 40px); opacity: 0; }
}

.x {
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  font-weight: 800;
}


/* ==========================================================================
   19. TOAST
   ========================================================================== */
#toast {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, -100px);
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: var(--r-full);
  font-weight: 700;
  transition: transform .3s;
  max-width: 92vw;
  text-align: center;
}
#toast.on { transform: translate(-50%, 0); }


/* ==========================================================================
   20. BOOM (celebration overlay)
   ========================================================================== */
#boom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: rgba(15, 8, 35, .88);
  text-align: center;
  color: #fff;
  padding: 24px;
  overflow: hidden;
}
#boom.on { display: grid; }
#boom h2 {
  font-size: 3.4rem;
  animation: pop .5s;
}
@keyframes pop {
  from { transform: scale(.3); opacity: 0; }
}

.cf {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  animation: fly 1.7s ease-out forwards;
}
@keyframes fly {
  to {
    transform: translate(var(--x), var(--y)) rotate(var(--r));
    opacity: 0;
  }
}


/* ==========================================================================
   21. RESPONSIVE (base)
   ========================================================================== */
@media (min-width: 640px) {
  .hin { padding: 10px 22px; }
  main { padding: 22px 22px 120px; }
}

@media (max-width: 800px) {
  .lay,
  .g2.r { grid-template-columns: 1fr; }
  .g4,
  .rc   { grid-template-columns: 1fr 1fr; }
  .g3   { grid-template-columns: 1fr; }

  .seg button span { display: none; }

  main { padding-bottom: 110px; }

  #tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 55;
    max-width: none;
    margin: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    border-top: 1px solid var(--line);
    justify-content: space-around;
    overflow: visible;
  }
  #tabs button {
    flex: 1;
    padding: 6px 2px;
    border-radius: 14px;
    box-shadow: none;
    background: none;
    font-size: .62rem;
    display: grid;
    justify-items: center;
    gap: 1px;
    color: var(--mute);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tabs button span { font-size: 1.25rem; }
  #tabs button.on {
    background: var(--soft);
    color: var(--ink);
  }
}


/* ==========================================================================
   22. MOTION PREFERENCES
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ==========================================================================
   23. HEADER (site header, brand, search, user menu)
   ========================================================================== */

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Brand: logo image always visible; wordmark hidden on mobile */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand__mark {
  display: block;           /* always visible */
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.brand__word {
  display: inline;            /* hidden on mobile */
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand__word i { font-style: normal; color: var(--or); }

/* Desktop: show wordmark next to logo */
@media (min-width: 768px) {
  .brand__word { display: inline; }
}

/* Search */
.search {
  display: none;
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 12px;
  height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
  border-color: var(--or);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--or) 15%, transparent);
}
.search__icon {
  width: 18px; height: 18px;
  color: var(--mute);
  flex: none;
}
.search__input {
  flex: 1;
  border: 0;
  background: none;
  padding: 0 8px;
  font-size: .9rem;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.search__input::placeholder { color: var(--mute); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear {
  border: 0;
  background: none;
  color: var(--mute);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  display: none;
}
.search__input:not(:placeholder-shown) + .search__clear { display: block; }

@media (min-width: 768px) {
  .search { display: flex; }
  .search-toggle { display: none; }
}

@media (max-width: 767px) {
  .search--open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 8px 18px;
    max-width: none;
    box-shadow: 0 8px 24px rgba(23, 17, 43, .12);
  }
}

.site-header__end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icon buttons (search toggle) */
.iconbtn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { background: var(--soft); }

/* User menu */
.usermenu { position: relative; }
.usermenu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s;
}
.usermenu__trigger:hover { background: var(--soft); }
.usermenu__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usermenu__chev {
  width: 14px; height: 14px;
  color: var(--mute);
  transition: transform .15s;
}
.usermenu.open .usermenu__chev { transform: rotate(180deg); }
.usermenu__user-icon {
  width: 24px; height: 24px;
  color: var(--ink);
}

/* Avatar */
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--or);
  color: #fff;
  font-weight: 800;
  flex: none;
}
.avatar--sm {
  width: 28px; height: 28px;
  font-size: .75rem;
}

/* Dropdown panel */
.usermenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(23, 17, 43, .12);
  padding: 6px;
  z-index: 60;
  display: grid;
  gap: 2px;
}
.usermenu__panel[hidden] { display: none; }
.usermenu__panel a,
.usermenu__panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.usermenu__panel a:hover,
.usermenu__panel button:hover { background: var(--soft); }
.usermenu__panel hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}
.usermenu__signout { color: var(--or); }

@media (max-width: 900px) {
  .usermenu__name { display: none; }
}


/* ==========================================================================
   24. NAV (top pills, bottom bar)
   ========================================================================== */
.topnav {
  display: none;
  gap: 4px;
  padding: 0 18px 8px;
  max-width: 1140px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .topnav { display: flex; }
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 700;
  color: var(--mute);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link.is-active { background: var(--or); color: #fff; }
.nav-ico { display: none; }

/* Bottom nav (mobile) */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottomnav__inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
  text-decoration: none;
}
.bottomnav a.is-active { color: var(--or); }
.bottomnav svg { width: 20px; height: 20px; }
@media (min-width: 768px) {
  .bottomnav { display: none; }
  main { padding-bottom: 48px; }
}


/* ==========================================================================
   25. SECTION-SPECIFIC COMPONENTS
   ========================================================================== */

/* Main container */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 18px 120px;
}
@media (min-width: 768px) {
  main { padding-bottom: 48px; }
}
.page-head { margin-bottom: 20px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0;
}
.page-head p { margin: 4px 0 0; color: var(--mute); }

/* Hero variants */
.hero--split {
  display: grid;
  gap: 40px;
  align-items: center;
  padding: 32px 0 64px;
  background: none;
  color: var(--ink);
  border-radius: 0;
  box-shadow: none;
}
@media (min-width: 768px) {
  .hero--split { grid-template-columns: 1fr 1fr; }
}
.hero--split::after { display: none; }
.hero--split h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  color: var(--ink);
  margin: 16px 0 20px;
}
.hero--split p {
  color: var(--mute);
  font-size: 1.125rem;
  max-width: 28em;
}
.hero--split .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero--cta {
  background: linear-gradient(125deg, var(--or), var(--pk));
  color: #fff;
  border-radius: var(--r-xl);
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 90, 50, .25);
}
.hero--cta h2 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  color: #fff;
  margin: 0 0 20px;
}
.hero--cta .btn { background: var(--ink); color: #fff; }

/* Pill / small note */
.pill-soft {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--soft);
  color: var(--mute);
  font-size: .75rem;
  font-weight: 700;
}

/* Floating card (hero) */
.hero-img-wrap {
  position: relative;
}
.hero-img-wrap > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}
.float-card {
  position: absolute;
  left: 16px; right: 16px; bottom: -32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(23, 17, 43, .12);
}
@media (min-width: 768px) {
  .float-card { left: 24px; right: auto; width: 320px; }
}
.float-card__top {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 700;
}
.float-card__savings { color: var(--gr); }
.float-card__bar {
  height: 10px;
  border-radius: 99px;
  background: var(--line);
  margin: 10px 0;
  overflow: hidden;
}
.float-card__bar i {
  display: block;
  height: 100%;
  background: var(--or);
  border-radius: 99px;
  transition: width .4s;
}
.float-card__foot {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--mute);
}

/* Step cards (How pooling works) */
.steps-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
}
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.step-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step-card__num {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--or);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.step-card__step {
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--mute);
}
.step-card h3 { font-size: 1rem; margin: 0 0 6px; }
.step-card p { font-size: .875rem; color: var(--mute); margin: 0; }

/* Product cards (Bulk / Supplier / Deals) */
.product-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
.product-card {
  display: block;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 24px;
  text-decoration: none;
  transition: transform .15s;
}
.product-card:hover { transform: translateY(-3px); }
.product-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 12px 0 6px;
}
.product-card p { opacity: .75; margin: 0 0 16px; font-size: .95rem; }
.product-card .arrow { font-weight: 700; color: var(--or); font-size: .95rem; }
.product-card svg { width: 28px; height: 28px; color: var(--or); }

/* Promises (3-column) */
.promises-grid {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 768px) {
  .promises-grid { grid-template-columns: repeat(3, 1fr); }
}
.promises-grid ul { list-style: none; padding: 0; margin: 12px 0 0; }
.promises-grid li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: .9rem;
  align-items: flex-start;
}
.promises-grid li svg {
  flex: none;
  width: 16px; height: 16px;
  color: var(--gr);
  margin-top: 2px;
}

/* Card row (deals list) */
.card--row {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}
.card--row:hover { transform: translateY(-2px); }
.card__thumb {
  width: 112px; height: 128px;
  flex: none;
  border-radius: 16px;
  object-fit: cover;
}
.card--row .card__body { flex: 1; min-width: 0; }

/* Card pool (bulk grid) */
.card--pool { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.card--pool .card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.card--pool .card__body { padding: 16px; }
.card__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .72rem;
  color: var(--mute);
  margin-bottom: 4px;
}
.card__meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  color: var(--mute);
  margin: 0;
}
.card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 4px 0 0;
}
.card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}
.card__price .amount {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.card__price .was {
  color: var(--mute);
  font-size: .8rem;
  text-decoration: line-through;
}
.card__foot {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--mute);
  margin: 8px 0 0;
}
.card__foot .push { color: var(--or); font-weight: 700; }

/* Chip row */
.chiprow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
  margin-bottom: 16px;
}
.chiprow::-webkit-scrollbar { display: none; }
.chiprow .chip {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.chiprow .chip.is-active {
  background: var(--or);
  border-color: var(--or);
  color: #fff;
}

/* Met grid (supplier metrics) */
.met-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .met-grid { grid-template-columns: repeat(4, 1fr); }
}
.met-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.met-tile small { display: block; color: var(--mute); font-size: .72rem; }
.met-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-top: 4px;
}

/* Supplier demand grid */
.demand-grid {
  display: grid;
  gap: 12px;
  margin: 12px 0 24px;
}
@media (min-width: 768px) {
  .demand-grid { grid-template-columns: repeat(2, 1fr); }
}
.demand-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}
.demand-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.demand-card__head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.demand-card__head small { color: var(--mute); font-size: .75rem; }
.demand-card p { margin: 6px 0 0; font-size: .875rem; color: var(--mute); }
.demand-card p b { color: var(--ink); }

/* Table (supplier active orders) */
.tbl-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mute);
  font-weight: 700;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td b { font-weight: 700; }
.tbl .pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--soft);
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink);
}

/* Wallet card */
.wallet-hero {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 24px;
}
.wallet-hero small { display: block; opacity: .7; font-size: .85rem; }
.wallet-hero .amount {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 4px 0 16px;
}
.escrow-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--or);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: .875rem;
}
.escrow-ribbon svg { width: 20px; height: 20px; flex: none; }
.escrow-ribbon b { margin-left: auto; }

/* Wallet transactions */
.tx-list { list-style: none; padding: 0; margin: 0; }
.tx-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}
.tx-list li:last-child { border-bottom: 0; }
.tx-list b { font-weight: 700; }
.tx-list small { display: block; color: var(--mute); font-size: .75rem; margin-top: 2px; }
.tx-list .amount.positive { color: var(--gr); }

/* Wallet top-up form */
.topup-form .pay-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.topup-form .pay-toggle button {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: .875rem;
  cursor: pointer;
}
.topup-form .pay-toggle button.on {
  border-color: var(--or);
  background: color-mix(in srgb, var(--or) 8%, var(--card));
}
.topup-form .chips { display: flex; gap: 8px; margin: 10px 0 14px; }
.topup-form .chips button {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--card);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}

/* Orders row */
.order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.order-row__body { flex: 1; min-width: 0; }
.order-row__meta { font-size: .72rem; color: var(--mute); margin: 0; }
.order-row__title { font-weight: 700; margin: 4px 0; }
.order-row__line { font-size: .875rem; color: var(--mute); margin: 0; }
.order-row__line b { color: var(--ink); }
.pill {
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  background: var(--soft);
}
.pill--pooling  { background: #FFC23333; color: #8A6300; }
.pill--shipped  { background: var(--ink); color: #fff; }
.pill--refunded { background: var(--line); color: var(--mute); }


/* ==========================================================================
   26. UTILITIES
   ========================================================================== */

/* Inputs (login, wallet topup) */
.input {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.input:focus {
  outline: none;
  border-color: var(--or);
}

/* Empty state */
.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 40px 20px;
  text-align: center;
  color: var(--mute);
}

/* Login role options */
.role-option {
  transition: border-color .15s, background .15s;
}
/* ==========================================================================
   SHARE PANEL
   ========================================================================== */
.share-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 16px;
}
.share-panel__head {
  margin-bottom: 12px;
}
.share-panel__head b {
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}
.share-panel__head small {
  display: block;
  color: var(--mute);
  font-size: .8rem;
  line-height: 1.4;
}
.share-panel__row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform .1s, filter .12s;
}
.share-btn:active {
  transform: scale(.94);
}
.share-btn:hover {
  filter: brightness(1.08);
}
.share-btn--wa { background: #25D366; }
.share-btn--x  { background: #000; }
.share-btn--fb { background: #1877F2; }
.share-btn--tg { background: #229ED9; }
.share-btn--native { background: var(--ink); }