/* ==========================================================================
   Dropzyy — Design System
   1. Tokens & themes      6. Cards / product & vendor
   2. Reset & base         7. Forms
   3. Layout               8. Tables / lists / timeline
   4. App bar & nav        9. Overlays (modal, toast, sheet)
   5. Buttons & chips     10. Utilities & responsive
   ========================================================================== */

/* ---------------------------------- 1. TOKENS --------------------------- */
:root {
  /* --- Color palette (light-first) ---
     Brand: hot pink + orange, pulled from the Dropzyy moto icon.
     Ink is off-black, paper is crisp white — no more muted "safe" tones. */
  --ink: #16161A;
  --paper: #FFFFFF;
  --paper-raised: #FFFFFF;
  --dropzyy-flame: #FF2D6F;
  --dropzyy-tang: #FF6B1A;
  --dispatch-amber: #FF6B1A;
  --dropzyy-green: #2F7D4F; /* legacy token — success/semantic only */
  --route-blue: #4B78B4;
  --stamp-red: #D4614A;
  --ash: #E4E4EA;
  --ash-text: #5D5D66;

  /* Derived / functional */
  --bg: var(--paper);
  --surface: var(--paper-raised);
  --surface-2: #F5F5F7;
  --line: var(--ash);
  --muted: var(--ash-text);
  --ink-2: var(--ink);

  /* Status / semantic (keep for existing logic that references these) */
  /* Brand: Dropzyy hot pink (primary accent, from the moto icon).
     --route-blue is kept ONLY as the semantic info/status color. */
  --brand: var(--dropzyy-flame);
  --brand-600: #E61360;
  --brand-700: #C40E52;
  --brand-soft: #FFE7F0;
  --accent: var(--dispatch-amber);
  --accent-soft: #FFEAD9;
  --danger: var(--stamp-red);
  --danger-soft: #FBEDE9;
  --info: var(--route-blue);
  --info-soft: #E6ECF5;
  --success: #2F8F5B;
  --success-soft: #E7F3EC;

  /* --- Typography --- */
  --font-display: "Bricolage Grotesque", "Archivo", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;

  /* --- Spacing & radii --- */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --r-stub: 4px;

  --appbar-h: 60px;
  --maxw: 1180px;
  --container-pad: 20px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* --- Shadows (subtle, used sparingly) --- */
  --sh-1: 0 1px 2px rgba(32, 34, 43, .04);
  --sh-2: 0 6px 18px rgba(32, 34, 43, .06);
}

html[data-theme="dark"] {
  --ink: #E9EEF5;
  --paper: #12181F;
  --paper-raised: #1A222B;
  --dropzyy-flame: #FF5C8D;
  --dropzyy-tang: #FF8A3D;
  --dispatch-amber: #FF8A3D;
  --dropzyy-green: #55AE80;
  --route-blue: #5A8AC4;
  --stamp-red: #E07A6A;
  --ash: #3A404A;
  --ash-text: #8F9CAE;

  --bg: var(--paper);
  --surface: var(--paper-raised);
  --surface-2: #161E26;
  --line: var(--ash);
  --muted: var(--ash-text);
  --ink-2: var(--ink);

  --brand: var(--dropzyy-flame);
  --brand-600: #FF7BA6;
  --brand-700: #FF9BBB;
  --brand-soft: #38121F;
  --accent: var(--dispatch-amber);
  --accent-soft: #33200F;
  --danger: var(--stamp-red);
  --danger-soft: #2A1815;
  --info: var(--route-blue);
  --info-soft: #1A2535;
  --success: #4CAF7A;
  --success-soft: #15251B;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 8px 22px rgba(0, 0, 0, .45);
}

/* ---------------------------------- 2. RESET ---------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
}

h1, h2, h3, h4 {
  margin: 0 0 .4em;
  line-height: 1.1;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: break-word; /* long words/strings wrap instead of clipping */
  min-width: 0;
}
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Data / mono: only for real data (tracking numbers, ETAs, timestamps, coords) */
.data, .mono, [class*="__code"], [class*="__num"], [class*="__ref"],
.tracking__code, .eta, .stub__code, .coord, .timecode {
  font-family: var(--font-data);
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ash); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ash-text); }

/* ---------------------------------- 3. LAYOUT --------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
@media (max-width: 480px) {
  :root { --container-pad: 16px; }
}
@media (max-width: 360px) {
  :root { --container-pad: 14px; }
}

.app-main {
  flex: 1 0 auto;
  min-width: 0;
  /* Belt-and-braces: nothing routed into the main view may force the page wide */
  overflow-x: clip;
  /* Space between routed content and the footer — 16px is plenty */
  padding-bottom: 16px;
}

/* NOTE: padding-block (not the `padding:` shorthand) so it never clobbers the
   horizontal padding .container provides on `<section class="section container">`. */
.section { padding-block: 40px; }

.page-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
}
/* Flex items must be allowed to shrink so the header text wraps,
   and long strings break instead of overflowing the viewport */
.page-head > * { min-width: 0; }
.page-head h1, .page-head h2, .page-head p { overflow-wrap: break-word; }
.page-head p { margin: 0; color: var(--ash-text); }

/* Generic grid */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.grid--stats {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 640px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
  .grid--stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 380px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
}

/* Two-column split (hero copy + waybill stub) */
.split { display: grid; gap: 28px; grid-template-columns: 1.5fr 1fr; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.row { display: flex; gap: 10px; align-items: center; }
.row > * { min-width: 0; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }

/* Generic card (used by admin, modals, forms — keep light surface) */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 18px;
}
.card--pad-sm { padding: 13px; }
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -4px 0 14px;
}
.card__head h3 { margin: 0; }

.sticky-side { position: sticky; top: calc(var(--appbar-h) + 12px); }

/* Pull-quote / eyebrow utility for section intros */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: 10px;
}
.eyebrow--amber { color: var(--dispatch-amber); }
.eyebrow--red { color: var(--stamp-red); }

/* Muted helper text */
.muted { color: var(--ash-text); }
.ink-2 { color: var(--ink-2); }

/* Divider */
hr, .rule {
  border: 0; height: 1px;
  background: var(--line);
  margin: 18px 0;
}

/* ---------------------------------- 4. APP BAR -------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar__inner {
  height: var(--appbar-h);
  display: flex; align-items: center; gap: 12px;
}

/* Brand / logotype */
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-family: var(--font-display);
  letter-spacing: -0.02em; font-size: 1.1rem; color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand__logo {
  width: 32px; height: 32px; display: grid; place-items: center;
  font-size: 17px;
  background: var(--paper-raised);
  border: 1.5px solid var(--brand);
  border-radius: 7px;
  color: var(--brand);
}
.brand__text span { color: var(--brand); }
.brand--sm .brand__logo { width: 28px; height: 28px; font-size: 15px; border-radius: 6px; }
.brand--sm { font-size: 1rem; }

/* Top nav row — desktop */
.topnav {
  display: flex; gap: 4px; margin-left: 6px; flex: 1;
  align-items: center;
}
.topnav a {
  padding: 7px 12px; border-radius: var(--r-pill);
  font-weight: 600; font-size: .92rem; color: var(--ink-2);
  transition: background .12s var(--ease), color .12s var(--ease);
  white-space: nowrap;
}
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a.active { color: var(--brand); }
.topnav a.active::after {
  content: ''; display: block;
  height: 2px; width: 100%; left: 0; bottom: -2px;
  background: var(--brand);
  border-radius: 2px;
}

/* App bar actions (icon buttons, avatar, dropdowns) */
.appbar__actions {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.icon-btn {
  /* Anchor for .badge-count (cart & notification badges) — without this the
     absolute-positioned badge resolves against the fixed appbar and floats away */
  position: relative;
  width: 38px; height: 38px; border: 0; background: transparent;
  border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer; color: var(--ink-2);
  transition: background .12s var(--ease), color .12s var(--ease);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[hidden] { display: none; }

.badge-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 3px;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  color: var(--paper-raised); background: var(--stamp-red);
  border-radius: 999px;
  font-family: var(--font-data);
}

.avatar-btn {
  width: 38px; height: 38px; border: 0; background: transparent;
  border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s var(--ease);
}
.avatar-btn:hover { background: var(--surface-2); }
.avatar {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; background: var(--surface-2);
  color: var(--ink-2);
  transition: color .12s var(--ease);
}
/* Signed-out avatar shows the inline user icon (initials replace it when signed in) */
.avatar .ico { width: 16px; height: 16px; display: block; }
.avatar-btn:hover .avatar { color: var(--brand); }

/* Account dropdown menu items (icon + label, Dropzyy green hover) */
.dropdown__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent;
  border-radius: var(--r-sm);
  font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--ink-2); text-align: left; cursor: pointer; text-decoration: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.dropdown__item:hover { background: var(--brand-soft); color: var(--brand-700); }
.dropdown__item .ico {
  width: 16px; height: 16px; flex: 0 0 auto;
  color: var(--muted); transition: color .12s var(--ease);
}
.dropdown__item:hover .ico { color: var(--brand); }
.dropdown__meta { padding: 8px 10px 10px; font-size: .88rem; line-height: 1.45; }
.dropdown__meta b { font-size: .92rem; }
.dropdown__sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* Dropdown panels */
.dropdown { position: relative; }
.dropdown__panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-2);
  padding: 6px; z-index: 80;
}
.dropdown__panel--wide { min-width: 280px; }
.dropdown__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.dropdown__head strong { font-size: .9rem; color: var(--ink); }
.link-btn {
  background: transparent; border: 0; color: var(--brand);
  font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
  padding: 4px 6px; border-radius: 6px;
}
.link-btn:hover { background: var(--surface-2); }

.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 8px; border-radius: var(--r-sm);
  font-size: .86rem; color: var(--ink-2);
  border: 0; background: transparent; width: 100%;
  text-align: left;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item__time {
  font-size: .72rem; color: var(--ash-text);
  font-family: var(--font-data); margin-top: 2px;
}

@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

.notif-list { max-height: 330px; overflow: auto; }
.notif {
  display: flex; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer;
  border-left: 3px solid transparent;
}
.notif:hover { background: var(--surface-2); }
.notif--unread { border-left-color: var(--brand); background: var(--brand-soft); }
.notif__title { font-weight: 700; font-size: .9rem; }
.notif__body { font-size: .84rem; color: var(--muted); }
.notif__time { font-size: .74rem; color: var(--muted); }

/* Bottom nav (mobile) */
.bottomnav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  grid-auto-flow: column; grid-auto-columns: 1fr;
}
.bottomnav a {
  /* position: relative anchors each link's .badge-count (e.g. cart count)
     to its own icon instead of the page root */
  position: relative;
  display: grid; justify-items: center; gap: 2px; padding: 4px 2px; border-radius: 12px;
  font-size: .68rem; font-weight: 700; color: var(--muted);
}
.bottomnav a i { font-style: normal; font-size: 19px; line-height: 1; }
.bottomnav a.is-active { color: var(--brand); background: var(--brand-soft); }
.bottomnav .badge-count { top: 2px; right: 50%; margin-right: -22px; }

/* ---------------------------------- 5. BUTTONS -------------------------- */
.btn {
  --btn-bg: var(--brand); --btn-fg: var(--paper); --btn-bd: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 17px; border-radius: var(--r); border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: .93rem; cursor: pointer; white-space: nowrap;
  transition: background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease), box-shadow .12s var(--ease);
  line-height: 1;
}
.btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: var(--paper); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.btn--accent {
  --btn-bg: var(--dispatch-amber); --btn-fg: var(--paper); --btn-bd: var(--dispatch-amber);
  box-shadow: 0 1px 3px rgba(32,34,43,.08);
}
.btn--accent:hover {
  background: color-mix(in srgb, var(--dispatch-amber) 85%, black);
  border-color: color-mix(in srgb, var(--dispatch-amber) 85%, black);
  color: var(--paper);
}

.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line);
}
.btn--ghost:hover {
  --btn-bg: var(--surface-2); --btn-fg: var(--brand); --btn-bd: var(--brand);
}

.btn--soft {
  --btn-bg: var(--brand-soft); --btn-fg: var(--brand-700); --btn-bd: transparent;
}
.btn--soft:hover { --btn-bg: color-mix(in srgb, var(--brand-soft) 80%, transparent); }

.btn--sm { padding: 7px 13px; font-size: .84rem; min-height: 36px; }
.btn--lg { padding: 14px 24px; font-size: 1rem; }
.btn--block { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font-weight: 600; font-size: .85rem;
}
.link-btn:hover { text-decoration: underline; color: var(--brand-600); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .86rem; font-weight: 600; color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
  transition: border-color .12s, color .12s, background .12s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: var(--paper); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 800;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge--brand { background: var(--brand-soft); color: var(--brand-700); border-color: transparent; }
html[data-theme="dark"] .badge--brand { color: var(--brand); }
.badge--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge--warn { background: var(--accent-soft); color: #a15c00; border-color: transparent; }
html[data-theme="dark"] .badge--warn { color: var(--accent); }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); padding: 5px; border-radius: var(--r-pill); overflow-x: auto; }
.tabs button {
  border: 0; background: none; cursor: pointer; padding: 8px 15px; border-radius: var(--r-pill);
  font-weight: 700; font-size: .88rem; color: var(--muted); white-space: nowrap;
}
.tabs button.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }

/* ---------------------------------- 6. CARDS ---------------------------- */
/* showcase-card */
.showcase-card {
  min-width: 0; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.showcase-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.showcase-card__media {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--brand-soft));
}
.showcase-card__fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }
.showcase-card__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-card__media .badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.showcase-card__closed {
  position: absolute; inset: 0; background: rgba(8, 12, 16, .55); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; z-index: 2;
}
.showcase-card__body { padding: 14px; display: grid; gap: 8px; flex: 1; }
.showcase-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.showcase-card__top h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.showcase-card__top h3 a:hover { color: var(--brand); }
.showcase-card__rating {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.showcase-card__meta { font-size: .76rem; color: var(--muted); font-weight: 600; }
.showcase-card__desc {
  margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2;
}
.showcase-card__foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px;
}
.showcase-card__foot .btn { min-height: 40px; }
.showcase-card__hours { font-size: .74rem; font-weight: 700; min-width: 0; }
.showcase-card__hours.is-open { color: var(--success); }
.showcase-card__hours.is-closed { color: var(--danger); }

/* ======= DROPZYY HOMEPAGE SECTIONS ======= */

/* --- dropzyy-vendors --- */
.dropzyy-vendors { padding: 64px 0 52px; }
.dropzyy-vendors__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 28px;
}
.dropzyy-vendors__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--brand);
}
.dropzyy-vendors__head h2 {
  margin: 4px 0 6px; font-size: 1.65rem;
}
.dropzyy-vendors__head p {
  margin: 0; color: var(--muted); max-width: 48ch;
}
.dropzyy-vendors__grid {
  display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .dropzyy-vendors__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .dropzyy-vendors { padding: 48px 0 40px; }
  .dropzyy-vendors__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .dropzyy-vendors__head { margin-bottom: 20px; }
}
@media (max-width: 480px) {
  .dropzyy-vendors { padding: 36px 0 30px; }
  .dropzyy-vendors__grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .dropzyy-vendors__head h2 { font-size: 1.4rem; }
}

/* --- Popular on Campus — vendor carousel --- */
.vcarousel { min-width: 0; }
.vcarousel__viewport { overflow: hidden; }
.vcarousel__track {
  --vper: 4; --vgap: 18px;
  display: flex; gap: var(--vgap);
  transition: transform .45s var(--ease);
  will-change: transform;
}
.vcarousel__track > * { flex: 0 0 calc((100% - (var(--vper) - 1) * var(--vgap)) / var(--vper)); min-width: 0; }
@media (max-width: 1099px) { .vcarousel__track { --vper: 3; } }
@media (max-width: 820px) { .vcarousel__track { --vper: 2; } }
@media (max-width: 480px) { .vcarousel__track { --vper: 1; --vgap: 14px; } }
@media (prefers-reduced-motion: reduce) { .vcarousel__track { transition: none; } }
.vcarousel__controls {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-top: 22px;
}
.vcarousel__btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; padding: 0;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.vcarousel__btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.vcarousel__btn svg { width: 16px; height: 16px; display: block; }
.vcarousel__dots { display: flex; gap: 7px; align-items: center; }
.vcarousel__dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: var(--ash); cursor: pointer;
  transition: background .15s var(--ease), width .15s var(--ease);
}
.vcarousel__dot:hover { background: var(--ash-text); }
.vcarousel__dot.is-active { background: var(--brand); width: 20px; }

/* --- Featured Bookshop Materials --- */
.dropzyy-bookshop { padding: 0 0 64px; }
.dropzyy-bookshop__inner {
  display: grid; grid-template-columns: minmax(240px, 0.9fr) 2.1fr;
  gap: 44px; align-items: center;
}
.dropzyy-bookshop__eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--brand);
}
.dropzyy-bookshop__intro h2 { margin: 4px 0 8px; font-size: 1.65rem; }
.dropzyy-bookshop__intro p { margin: 0 0 18px; color: var(--muted); max-width: 40ch; }
.dropzyy-bookshop__grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .dropzyy-bookshop__inner { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}
@media (max-width: 480px) {
  .dropzyy-bookshop { padding-bottom: 48px; }
  .dropzyy-bookshop__grid { gap: 12px; }
}

/* --- dropzyy-features --- */
.dropzyy-features {
  background: var(--surface-2); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); padding: 56px 0;
}
.dropzyy-features__head { margin-bottom: 30px; }
.dropzyy-features__eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--brand);
  margin-bottom: 6px;
}
.dropzyy-features__head h2 { margin: 0 0 8px; font-size: 1.6rem; }
.dropzyy-features__head p { margin: 0; color: var(--muted); max-width: 48ch; }
.dropzyy-features__grid {
  display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr);
}
.dropzyy-feature {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: inherit; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.dropzyy-feature:hover {
  border-color: var(--brand); box-shadow: var(--sh-1);
}
.dropzyy-feature__icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 1.5rem; background: var(--brand-soft); border-radius: 12px;
}
.dropzyy-feature__title { font-weight: 700; font-size: .95rem; }
.dropzyy-feature__desc {
  font-size: .8rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-clamp: 2;
}
@media (max-width: 900px) {
  .dropzyy-features { padding: 44px 0; }
  .dropzyy-features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dropzyy-features { padding: 32px 0 36px; }
  .dropzyy-features__grid { grid-template-columns: 1fr; }
  .dropzyy-feature { padding: 14px; }
}

/* Small hero fixes: keep the search input from touching the section edges on small screens */
@media (max-width: 560px) {
  .dropzyy-hero__search { padding-left: var(--container-pad); padding-right: var(--container-pad); }
}
/* --- dropzyy-vendors --- */

/* --- dropzyy-hero — LIVE WAYBILL — two-zone layout --- */
.dropzyy-hero {
  background: var(--paper);
  background-image: radial-gradient(rgba(22, 22, 26, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.dropzyy-hero__inner {
  display: grid;
  /* Two explicit, non-overlapping columns: text left, visual right.
     minmax(0, …) lets each column shrink without overflowing. */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 4vw, 56px); /* ≥32px always — text never touches the visual */
  align-items: start;
}
.dropzyy-hero__copy,
.hero-text { min-width: 0; position: relative; }

/* Right column — holds the rider illustration above the live-tracking card */
.dropzyy-hero__visual,
.hero-visual {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

@keyframes waybillRouteFill {
  from { width: 0; }
  to { width: calc(100% - 32px); }
}

@keyframes waybillRouteMarker {
  from { left: 16px; }
  to { left: calc(100% - 16px); }
}

@keyframes waybillTruckMove {
  from { left: 16px; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  to { left: calc(100% - 16px); opacity: 0; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Runner dot travels the route line continuously — reads as live dispatch */
@keyframes routeRunner {
  0% { left: 16px; opacity: 0; }
  10% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 20px); opacity: 0; }
}

/* "On time" stamp breathes so the waybill feels live, not screenshotted */
@keyframes stampPulse {
  0%, 100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(-4deg) scale(1.09); }
}

/* Entrance */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Waybill stub — live tracking card. Lives entirely inside the right visual
   column: no negative margins or vertical offsets, so it can never bleed into
   or cover the headline/subtext at any width. Small tilt + hard shadow kept
   for character. */
.dropzyy-hero__waybill {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 10px 12px 0 0 var(--brand-soft);
  position: relative;
  width: 100%;
  max-width: 480px;
  transform: rotate(-2deg);
}

.dropzyy-hero__waybill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.dropzyy-hero__waybill-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dropzyy-hero__waybill-tag::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.dropzyy-hero__waybill-tag::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 7px;
  background: var(--line);
  margin-right: 3px;
}

.dropzyy-hero__waybill-tag span {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.dropzyy-hero__waybill-code {
  font-family: var(--font-data);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Route line */
.dropzyy-hero__waybill-route {
  position: relative;
  height: 32px;
  margin: 16px 0 14px;
  overflow: visible;
}

.dropzyy-hero__waybill-route-track {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--ash) 0 6px, transparent 6px 11px);
}

.dropzyy-hero__waybill-route-fill {
  position: absolute;
  top: 14px;
  left: 16px;
  height: 2px;
  width: 0;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
  /* animation applied via JS */
}

.dropzyy-hero__waybill-route-dot {
  position: absolute;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--brand);
  left: 16px;
  z-index: 2;
  transition: none;
}

.dropzyy-hero__waybill-route-marker {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(32,34,43,0.15);
  /* animation applied via JS */
}

.dropzyy-hero__waybill-route-marker-inner {
  font-size: 12px;
  line-height: 1;
}

.dropzyy-hero__waybill-route-truck {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  z-index: 4;
  /* animation applied via JS */
  filter: drop-shadow(0 2px 2px rgba(32,34,43,0.2));
}

.dropzyy-hero__waybill-route-origin,
.dropzyy-hero__waybill-route-dest {
  font-size: 0.68rem;
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dropzyy-hero__waybill-route-origin {
  position: absolute;
  bottom: -8px;
  left: 16px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.dropzyy-hero__waybill-route-dest {
  position: absolute;
  bottom: -8px;
  right: 16px;
  transform: translateX(50%);
  white-space: nowrap;
}

/* ETA counter */
.dropzyy-hero__waybill-eta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dropzyy-hero__waybill-status-text {
  font-size: 0.78rem;
  color: var(--ink-2);
  font-weight: 500;
}

.dropzyy-hero__waybill-eta-value {
  font-family: var(--font-data);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-left: auto;
}

/* Stamp — orange, pulsing */
.dropzyy-hero__waybill-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--paper);
  border: 2px solid var(--dropzyy-tang);
  color: var(--dropzyy-tang);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  transform: rotate(-4deg);
  box-shadow: 0 1px 2px rgba(32,34,43,0.08);
  line-height: 1.2;
  z-index: 5;
  font-family: var(--font-display);
  animation: stampPulse 1.8s ease-in-out infinite;
}

/* Small hero fix */
@media (max-width: 560px) {
  .dropzyy-hero__search { padding-left: var(--container-pad); padding-right: var(--container-pad); }
}

/* Mobile responsive for waybill */
@media (max-width: 768px) {
  .dropzyy-hero__waybill-route {
    height: 28px;
  }
  .dropzyy-hero__waybill-route-track {
    top: 12px;
  }
  .dropzyy-hero__waybill-route-fill {
    top: 12px;
  }
  .dropzyy-hero__waybill-route-dot {
    top: 7px;
  }
  .dropzyy-hero__waybill-route-marker {
    top: 45%;
  }
  .dropzyy-hero__waybill-route-truck {
    top: 45%;
  }
  .dropzyy-hero__waybill-route-origin,
  .dropzyy-hero__waybill-route-dest {
    bottom: -6px;
    font-size: 0.65rem;
  }
}

@media (max-width: 400px) {
  .dropzyy-hero__waybill {
    padding: 12px;
  }
  .dropzyy-hero__waybill-route {
    height: 26px;
  }
  .dropzyy-hero__waybill-route-track {
    top: 11px;
  }
}

/* --- dropzyy-vendors --- */
.cat {
  display: grid; gap: 6px; place-items: center; text-align: center;
  padding: 16px 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.cat:hover { transform: translateY(-3px); border-color: var(--brand); }
.cat__icon {
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 23px;
  border-radius: 14px; background: var(--brand-soft);
}
.cat b { font-size: .9rem; }
.cat small { color: var(--muted); font-size: .74rem; }

/* Vendor card */
.vcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-1); display: flex; flex-direction: column;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  min-width: 0;
}
.vcard .vcard__cover[style*="width:74px"] { flex: 0 0 auto; }
@media (max-width: 400px) {
  .card > .row .vcard__cover[style*="width:74px"] { width: 56px !important; height: 56px !important; font-size: 30px; }
  .card > .row h1 { font-size: 1.2rem; }
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.vcard__cover {
  height: 120px; display: grid; place-items: center; font-size: 46px; position: relative;
  overflow: hidden;
}
.vcard__cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; }
.vcard__cover img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard__body { padding: 14px; display: grid; gap: 7px; }
.vcard__body h3 { margin: 0; font-size: 1rem; }
.vcard__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); }
.vcard__cover .badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.vcard__closed { position: absolute; inset: 0; background: rgba(8, 12, 16, .55); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; z-index: 2; }
.vcard__desc {
  font-size: .78rem; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2;
}
.vcard__hours { font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard__hours.is-open { color: var(--success); }
.vcard__hours.is-closed { color: var(--danger); }

/* Product card */
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sh-1);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.pcard:hover { border-color: var(--brand); transform: translateY(-2px); }
.pcard__link { display: block; text-decoration: none; color: inherit; }
.pcard__link:hover .pcard__name { color: var(--brand); }
.pcard__thumb {
  height: 96px; border-radius: 12px; display: grid; place-items: center; font-size: 38px;
  background: linear-gradient(135deg, var(--surface-2), var(--brand-soft));
  position: relative; overflow: hidden;
}
.pcard__thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; }
.pcard__thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.pcard__name { font-weight: 700; font-size: .93rem; line-height: 1.3; }
.pcard__vendor { font-size: .74rem; color: var(--muted); font-weight: 600; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__desc {
  font-size: .79rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-weight: 800; color: var(--ink); }
.price--lg { font-size: 1.2rem; }

/* Product detail page */
.product-detail {
  display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 0;
  padding: 0; overflow: hidden;
}
.product-detail__media {
  position: relative; min-height: 280px;
  background: linear-gradient(135deg, var(--surface-2), var(--brand-soft));
}
.product-detail__fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; }
.product-detail__media img { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }
.product-detail__body { padding: 20px 24px 22px 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.product-detail__price { display: flex; align-items: baseline; gap: 10px; margin: 6px 0; }

/* Offline-catalog notice (Supabase catalog could not be refreshed) */
.catalog-offline {
  background: var(--accent-soft); color: #a15c00; padding: 10px 14px;
  border-radius: 12px; font-size: .82rem; font-weight: 600; margin-bottom: 14px;
}
html[data-theme="dark"] .catalog-offline { color: var(--accent); }

@media (max-width: 640px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-detail__media { min-height: 200px; }
  .product-detail__media img { min-height: 200px; }
  .product-detail__body { padding: 16px; }
}

/* Stat card */
.stat { background: var(--surface-white); border: 1px solid var(--line); border-radius: var(--r); padding: 15px; display: grid; gap: 3px; box-shadow: var(--sh-2); }
.stat__label { font-size: .76rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat__value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.stat__hint { font-size: .78rem; color: var(--muted); }
.stat--brand { background: linear-gradient(135deg, var(--brand-700), var(--brand)); border-color: transparent; color: #fff; }
.stat--brand .stat__label, .stat--brand .stat__hint { color: rgba(255, 255, 255, .85); }

/* Cart / order line item */
.line {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.line:last-child { border-bottom: 0; }
.line__thumb { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; font-size: 23px; background: var(--surface-2); flex: 0 0 auto; }
.line__main { flex: 1; min-width: 0; }
.line__name { font-weight: 700; font-size: .93rem; }
.line__sub { font-size: .79rem; color: var(--muted); }
@media (max-width: 400px) {
  .line { flex-wrap: wrap; }
  .line > .qty { order: 3; }
  .line > b { order: 4; margin-left: auto; }
  .line__main { flex-basis: calc(100% - 60px); }
}

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; font-weight: 800; color: var(--brand); }
.qty button:hover { background: var(--brand-soft); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; font-size: .88rem; }

.totals { display: grid; gap: 8px; font-size: .9rem; }
.totals > div { display: flex; justify-content: space-between; gap: 10px; }
.totals .totals__grand { border-top: 1px dashed var(--line); padding-top: 10px; font-size: 1.05rem; font-weight: 800; }

/* Stars */
.stars { display: inline-flex; gap: 1px; font-size: .9rem; letter-spacing: -1px; color: var(--accent); }
.stars--input button { background: none; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 0 2px; color: var(--line); }
.stars--input button.is-on { color: var(--accent); }

.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }

/* ---------------------------------- 7. FORMS ---------------------------- */
.field { display: grid; gap: 6px; }
.field > label { font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: .77rem; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  outline: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .col-2 { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.radio-card {
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  font-size: .88rem; font-weight: 600;
}
.radio-card input { accent-color: var(--brand); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.auth-wrap { max-width: 460px; margin: 34px auto; }
.auth-wrap .card { padding: 24px; }
.form-note { background: var(--info-soft); color: var(--info); padding: 10px 12px; border-radius: 10px; font-size: .85rem; font-weight: 600; }

/* ---------------------------------- 8. TABLES --------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.table th, table.table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table th { background: var(--surface-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.table tbody tr:hover { background: var(--surface-2); }
table.table tr:last-child td { border-bottom: 0; }

.empty { display: grid; place-items: center; gap: 8px; text-align: center; padding: 42px 18px; color: var(--muted); }
.empty__icon { font-size: 42px; }
.empty b { color: var(--ink); font-size: 1.05rem; }

/* Timeline */
.timeline { display: grid; gap: 0; margin: 4px 0; }
.tl {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding-bottom: 16px; position: relative;
}
.tl::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child { padding-bottom: 0; }
.tl:last-child::before { display: none; }
.tl__dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; z-index: 1;
}
.tl--done .tl__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.tl--now .tl__dot { background: var(--accent); border-color: var(--accent); color: #3b2600; animation: pulse 1.6s infinite; }
.tl b { font-size: .92rem; }
.tl small { color: var(--muted); font-size: .78rem; display: block; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------------------------------- 9. OVERLAYS ------------------------- */
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3);
  padding: 20px; animation: rise .22s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.toast-root { position: fixed; z-index: 120; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(400px, calc(100vw - 24px)); }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 12px 15px; border-radius: var(--r);
  box-shadow: var(--sh-3); font-size: .89rem; font-weight: 600;
  animation: toastIn .22s var(--ease);
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--info { background: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 780px) { .toast-root { bottom: 78px; } }

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------------------------------- 10. UTILITIES ----------------------- */
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.xs { font-size: .74rem; }
.b { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.scroll-x { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.scroll-x > * { flex: 0 0 240px; scroll-snap-align: start; }

@media (max-width: 780px) {
  :root { --appbar-h: 58px; }
  .topnav { display: none; }
  .bottomnav { display: grid; }
  /* Reserve ~56px — matches the trimmed nav's real height (~54-56px) so the
     footer never gets overlapped, with no dead gap above the nav */
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .card { padding: 15px; border-radius: var(--r); }
  .sticky-side { position: static; }
  .appbar__inner { gap: 8px; }
  .icon-btn { width: 36px; height: 36px; font-size: 15px; }
  .avatar { width: 36px; height: 36px; font-size: 13px; }
  .brand__logo { width: 30px; height: 30px; font-size: 16px; border-radius: 10px; }
  .brand__text { font-size: .98rem; }
  .section { padding-block: 20px; }
  .page-head { margin-bottom: 14px; }
  .grid { gap: 12px; }
  .dropdown__panel { position: fixed; left: 12px; right: 12px; top: calc(var(--appbar-h) + 8px); width: auto; min-width: 0; }
  .dropdown__panel--wide { width: auto; }
  .searchbar { padding: 5px 5px 5px 14px; }
  .searchbar input { font-size: .9rem; padding: 8px 0; }
  .searchbar .btn { padding: 9px 14px; font-size: .86rem; }
  .line { gap: 10px; }
  .line__thumb { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .qty button { width: 28px; height: 28px; }
  .qty span { min-width: 26px; font-size: .84rem; }
  .pcard { padding: 10px; }
  .pcard__thumb { height: 84px; font-size: 32px; }
  .pcard__name { font-size: .88rem; }
  .pcard__desc { font-size: .75rem; }
  .modal { width: 100%; max-height: 88vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .auth-wrap { margin: 22px auto; }
  .auth-wrap .card { padding: 18px; }
  .chips { margin-inline: calc(-1 * var(--container-pad)); padding-inline: var(--container-pad); }
  .scroll-x { margin-inline: calc(-1 * var(--container-pad)); padding-inline: var(--container-pad); }
  .appbar__inner { min-width: 0; }
  .appbar__actions { flex-shrink: 0; }
  .brand { flex-shrink: 0; }
  .searchbar { min-width: 0; }
  .searchbar .btn { flex-shrink: 0; }
  .pcard__foot { flex-wrap: wrap; }
  .pcard__foot .price { min-width: 0; }
  .vcard__meta { min-width: 0; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: .98rem; }
  .btn { padding: 10px 15px; font-size: .89rem; }
  .btn--sm { padding: 6px 11px; font-size: .8rem; }
  .card { padding: 13px; }
  .card--pad-sm { padding: 11px; }
  .page-head h1 { font-size: 1.35rem; }
  .pcard__foot .btn { padding: 6px 10px; font-size: .78rem; }
  .cat { padding: 13px 8px; }
  .cat__icon { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
  .cat b { font-size: .84rem; }
  .cat small { font-size: .7rem; }
  .stat { padding: 13px; }
  .stat__value { font-size: 1.25rem; }
  .vcard__cover { height: 100px; font-size: 38px; }
  .vcard__body { padding: 12px; }
  .vcard__body h3 { font-size: .92rem; }
  .vcard__meta { font-size: .74rem; gap: 6px; }
  .totals { font-size: .86rem; }
  .empty { padding: 32px 14px; }
  .empty__icon { font-size: 36px; }
  .toast { font-size: .84rem; padding: 11px 13px; }
  .form-grid { gap: 12px; }
  .avatar--lg { width: 46px; height: 46px; font-size: 17px; }
  .hero__stats { gap: 12px; }
  .hero__stat b { font-size: 1.05rem; }
  .hero__stat span { font-size: .68rem; }
  .page-head { align-items: flex-start; }
  .page-head .btn { width: 100%; }
  .card__head { flex-wrap: wrap; }
  .totals > div { gap: 8px; }
  .line__sub { overflow-wrap: anywhere; }
}

/* Footer — compact: tight vertical rhythm, links close together */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 16px; }
.footer__inner { display: grid; gap: 14px 28px; grid-template-columns: 1.4fr 1fr; padding-block: 16px; }
.footer__links { display: grid; gap: 0; align-content: start; font-size: .89rem; font-weight: 600; color: var(--ink-2); }
.footer__links a { padding: 3px 0; line-height: 1.35; }
.footer__links a:hover { color: var(--brand); }
.footer__base { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; padding-bottom: 12px; font-size: .78rem; }
/* Mobile footer: keep the two-column layout (brand | links) but compact it —
   smaller logo/text, tighter gaps — rather than shrinking the desktop layout.
   Declared AFTER the base rules so it actually wins the cascade. */
@media (max-width: 700px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 10px 16px; padding-block: 12px; }
  .footer .brand--sm { font-size: .92rem; gap: 6px; }
  .footer .brand--sm .brand__logo { width: 24px; height: 24px; font-size: 13px; }
  .footer__links { font-size: .84rem; }
  .footer__links a { padding: 2px 0; }
  .footer__base { padding-bottom: 10px; }
}
@media (max-width: 360px) {
  .footer__inner { grid-template-columns: 1fr; }
  .appbar__actions { gap: 4px; }
  .icon-btn { width: 34px; height: 34px; font-size: 14px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .brand__text { font-size: .92rem; }
  .brand__logo { width: 28px; height: 28px; font-size: 15px; }
  .searchbar .btn { padding: 8px 10px; font-size: .8rem; }
  .searchbar { padding-left: 12px; }
}

/* ==========================================================================
   DROPZYY HOMEPAGE — hero copy, actions & responsive (light, waybill-led)
   ========================================================================== */

.dropzyy-hero__title {
  margin: 8px 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 15ch;
  position: relative;
  z-index: 1;
}
.dropzyy-hero__title-hl { color: var(--brand); }

.dropzyy-hero__sub {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* Rider illustration — a normal flow element in the right visual column.
   No absolute positioning, so it can never sit behind/over the headline. */
.dropzyy-hero__art {
  display: block;
  width: min(360px, 100%);
  height: auto;
  pointer-events: none;
}
.dropzyy-hero__art .art-blob { fill: var(--brand-soft); }
.dropzyy-hero__art .art-ink {
  stroke: var(--ink); stroke-width: 6; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.dropzyy-hero__art .art-thin { stroke-width: 4.5; }
.dropzyy-hero__art .art-seat { stroke-width: 10; }
.dropzyy-hero__art .art-pink { fill: var(--brand); stroke: none; }
.dropzyy-hero__art .art-tang { fill: var(--dropzyy-tang); stroke: none; }
.dropzyy-hero__art .art-box { fill: var(--brand); stroke: var(--ink); stroke-width: 5; }
.dropzyy-hero__art .art-helmet { fill: var(--surface); stroke: var(--ink); stroke-width: 5; }
.dropzyy-hero__art .art-visor { stroke: var(--brand); stroke-width: 5; fill: none; stroke-linecap: round; }
.dropzyy-hero__art .art-speed { stroke: var(--brand); stroke-width: 5; fill: none; stroke-linecap: round; opacity: .85; }
.dropzyy-hero__art .art-ground { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; opacity: .15; }

.dropzyy-hero__actions,
.dropzyy-hero__hinted { position: relative; z-index: 1; }

.dropzyy-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* The ONLY full pill in the hero is the primary CTA — everything else stays sharp */
.dropzyy-hero__cta {
  border-radius: var(--r-pill);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 32%, transparent);
  font-weight: 700;
}
.dropzyy-hero__cta-2 {
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 700;
}
.dropzyy-hero__cta-2:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.dropzyy-hero__hinted {
  margin-top: 28px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .8rem; font-weight: 600; color: var(--muted);
}
.dropzyy-hero__hinted-label { margin-right: 2px; }
.dropzyy-hero__hinted-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; min-height: 36px;
  border-radius: 3px;
  background: var(--paper); border: 1.5px solid var(--line);
  color: var(--ink-2); text-decoration: none;
  font-size: .8rem; font-weight: 700;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.dropzyy-hero__hinted-chip .chip-ico {
  width: 17px; height: 17px; flex: 0 0 auto;
  fill: none; stroke: var(--brand);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.dropzyy-hero__hinted-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* Runner dot on the route line — live dispatch feel */
.dropzyy-hero__waybill-route-runner {
  position: absolute;
  top: 10px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
  z-index: 2;
  animation: routeRunner 3.4s cubic-bezier(.45,.05,.55,.95) infinite;
}

/* Staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .dropzyy-hero__copy > * { animation: heroRise .55s var(--ease) backwards; }
  .dropzyy-hero__copy > :nth-child(2) { animation-delay: .05s; }
  .dropzyy-hero__copy > :nth-child(3) { animation-delay: .1s; }
  .dropzyy-hero__copy > :nth-child(4) { animation-delay: .16s; }
  .dropzyy-hero__copy > :nth-child(5) { animation-delay: .22s; }
  .dropzyy-hero__copy > :nth-child(6) { animation-delay: .28s; }
}

/* Hero stacks below the waybill stub on tablets / small screens.
   Everything is in normal flow, so nothing can overlap the text. */
@media (max-width: 900px) {
  .dropzyy-hero { padding: 44px 0 40px; }
  .dropzyy-hero__inner { grid-template-columns: 1fr; gap: 34px; }
  .dropzyy-hero__title { font-size: clamp(1.9rem, 6.8vw, 2.5rem); }
  .dropzyy-hero__visual { align-items: center; }
  .dropzyy-hero__waybill {
    transform: rotate(-1.2deg);
    box-shadow: 7px 8px 0 0 var(--brand-soft);
  }
  .dropzyy-hero__art { width: min(260px, 72%); }
}
/* Full-width stacked CTAs on phones */
@media (max-width: 560px) {
  .dropzyy-hero__actions { flex-direction: column; align-items: stretch; }
  .dropzyy-hero__actions .btn { width: 100%; }
  .dropzyy-hero__art { width: min(220px, 80%); }
  .dropzyy-hero__waybill { max-width: 100%; }
}

/* Reduced motion: kill the loops, keep the layout honest */
@media (prefers-reduced-motion: reduce) {
  .dropzyy-hero__waybill-route-runner { animation: none; opacity: 0; }
  .dropzyy-hero__waybill-stamp { animation: none; }
  .dropzyy-hero__copy > * { animation: none; }
  .dropzyy-hero__waybill { transform: none; }
}

