/* ============================================================
   VP — Société de Vente Privée
   Clean, product-led design system in the spirit of Apple /
   Stripe / Shopify: white + light-grey surfaces, near-black
   ink, a single blue accent, hairline borders, sans-serif.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --card: #ffffff;
  --card-2: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --border: #e8e8ed;
  --border-strong: #d2d2d7;

  --accent: #0071e3;
  --accent-2: #0077ed;
  --accent-deep: #16294a;
  --accent-ink: #ffffff;
  --navy-grad: linear-gradient(180deg, #0077ed 0%, #0071e3 100%);
  --accent-soft: rgba(0, 113, 227, 0.08);

  --gold: #e8a33d; /* star ratings only */

  --success: #1d7d4f;
  --success-soft: #e8f5ee;
  --warning: #b45309;
  --warning-soft: #fdf1e0;
  --danger: #d70015;
  --danger-soft: #fdecee;
  --info: #0a66c2;
  --info-soft: #e8f0fb;
  --sale: #d70015;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.13);

  --nav-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Owner & driver tools — same system, slightly cooler grey */
body.owner, body.driver {
  --bg: #f5f5f7;
  --bg-2: #ebebee;
  --card: #ffffff;
  --card-2: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --border: #e5e5ea;
  --border-strong: #d1d1d6;
  --accent: #0071e3;
  --accent-2: #0077ed;
  --accent-deep: #16294a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --success: #15803d;
  --success-soft: #e6f4ea;
  --warning: #b45309;
  --warning-soft: #fdf1e0;
  --danger: #d70015;
  --danger-soft: #fdecee;
  --info: #0a66c2;
  --info-soft: #e8f0fb;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(0, 113, 227, 0.18); }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 600px; margin: 0 auto; padding: 0 20px; }

.page { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 32px); }
.page.no-nav { padding-bottom: 48px; }

.section { margin-top: 34px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.section-title {
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--muted);
}
.section-link { color: var(--accent); font-weight: 600; font-size: 13.5px; }

.page-title {
  font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
body.owner .topbar, body.driver .topbar {
  background: rgba(255, 255, 255, 0.86);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: 0.03em; color: var(--text); }
.brand small {
  display: block; font-size: 9px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.2em; text-transform: uppercase; margin-top: 2px;
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); flex: none;
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn .badge-dot {
  position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
  padding: 0 5px;
}
.spacer { flex: 1; }

/* ------------------------------------------------------------
   Announcement bar
   ------------------------------------------------------------ */
.announce {
  background: var(--accent-deep);
  color: rgba(255, 255, 255, 0.85); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.04em; text-align: center;
  padding: 9px 16px;
}
.announce strong { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------
   Hero — flagship spotlight (light stage, product-led)
   ------------------------------------------------------------ */
.spotlight {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
}
.spotlight-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 44px 28px 36px;
  display: grid; gap: 32px;
}
.spotlight-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.spotlight-title {
  font-size: clamp(34px, 7.5vw, 50px); font-weight: 650;
  line-height: 1.06; letter-spacing: -0.03em; margin-top: 12px;
  color: var(--text);
}
.spotlight-title span { color: var(--accent); }
.spotlight-sub {
  color: var(--muted); margin-top: 16px;
  font-size: 16px; line-height: 1.6; max-width: 470px;
}
.spotlight-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.btn-light {
  background: var(--text); color: #fff;
  border-radius: 980px; padding: 0 26px; min-height: 46px;
}
.btn-light:hover { background: #2d2d2f; }
.btn-ghost-light {
  background: transparent; color: var(--accent);
  border: none; padding: 0 6px; min-height: 46px;
}
.btn-ghost-light:hover { text-decoration: underline; }

/* Product spotlight */
.spotlight-product { display: block; }
.spotlight-stage {
  position: relative; border-radius: 20px; overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.1);
}
.spotlight-stage img {
  width: 100%; aspect-ratio: 16 / 11; object-fit: cover;
}
.spotlight-off {
  position: absolute; top: 12px; right: 12px;
  background: #fff; color: var(--sale);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.spotlight-info {
  margin-top: 14px; display: grid; gap: 3px;
}
.spotlight-brand {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint);
}
.spotlight-name {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.spotlight-price {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 21px; font-weight: 700; color: var(--text); margin-top: 6px;
}
.spotlight-old { font-size: 14px; color: var(--faint); text-decoration: line-through; }
.spotlight-arrow {
  margin-left: auto; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 16px;
  transition: background 0.2s, transform 0.2s;
}
.spotlight-product:hover .spotlight-arrow { background: var(--accent-deep); }

@media (min-width: 900px) {
  .spotlight-inner {
    grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px;
    padding: 56px 48px;
  }
  .spotlight-stage img { aspect-ratio: 1 / 1; }
}

/* ------------------------------------------------------------
   Search
   ------------------------------------------------------------ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 0 16px; height: 50px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar input {
  flex: 1; border: none; outline: none; background: none; font-size: 15px;
  min-width: 0; color: var(--text);
}
.search-bar input::placeholder { color: var(--faint); }
.search-bar svg { color: var(--faint); flex: none; }
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 15px;
  font-weight: 600; font-size: 15px; text-align: center;
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s, opacity 0.2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--navy-grad); color: #fff;
  box-shadow: 0 3px 12px rgba(0, 113, 227, 0.28);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(0, 113, 227, 0.32); }
.btn-ghost {
  background: var(--card); color: var(--text); border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-soft { background: var(--accent-soft); color: var(--accent-deep); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 11px; }
.btn-lg { min-height: 56px; font-size: 16px; border-radius: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.btn-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); flex: none;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card + .card { margin-top: 14px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.stat .value { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin-top: 5px; }
.stat .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ------------------------------------------------------------
   Product grid & cards — clean white, real photos first
   ------------------------------------------------------------ */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.product-thumb {
  position: relative; aspect-ratio: 1 / 1; background: var(--bg-2); overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name {
  font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.product-shop { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.product-price { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: 9px; }
.price-now { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.price-old { font-size: 12.5px; color: var(--faint); text-decoration: line-through; }

.discount-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--sale);
  color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  box-shadow: var(--shadow-sm); letter-spacing: 0.02em;
}
.stock-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-sm);
}
.stock-tag.out { color: var(--faint); }
.stock-tag.low { color: var(--warning); }
.cond-tag {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-deep); box-shadow: var(--shadow-sm);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}

.meta-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.meta-row .rating { color: var(--gold); font-weight: 700; }
.meta-row .divider { width: 1px; height: 12px; background: var(--border-strong); }

/* ------------------------------------------------------------
   Categories — photo tiles
   ------------------------------------------------------------ */
.cat-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 2px 2px 8px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-snap-type: x mandatory;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-tile {
  position: relative; flex: none; width: 138px;
  aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.25s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Emoji tiles — just the icon, name and count */
.cat-emoji-tile {
  width: 128px; aspect-ratio: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px 12px; text-align: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.cat-emoji-tile:hover {
  transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow);
}
.cat-emoji-tile.active {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.cat-emoji-big { font-size: 32px; line-height: 1; }
.cat-emoji-tile .cat-name {
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
}
.cat-emoji-tile .cat-count {
  font-size: 11.5px; color: var(--faint); font-weight: 500;
}

@media (min-width: 900px) {
  .cat-scroll { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; overflow: visible; }
  .cat-tile { width: auto; }
}

/* Horizontal product scroller */
.h-scroll {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 2px 2px 10px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-snap-type: x mandatory;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll .product-card { flex: none; width: 218px; scroll-snap-align: start; }
@media (min-width: 900px) {
  .h-scroll .product-card { width: 240px; }
}

/* Condition filter chips */
.chip-row {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 17px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-weight: 500;
  font-size: 14px; color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: var(--accent); color: #fff;
  border-color: transparent; font-weight: 600;
}
.chip .chip-emoji { font-size: 16px; }

/* ------------------------------------------------------------
   Trust strip
   ------------------------------------------------------------ */
.trust-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 26px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.trust-strip span {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.trust-strip .tk {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-grid; place-items: center;
  font-size: 11px; font-style: normal; font-weight: 800;
}

/* ------------------------------------------------------------
   Section headers (refined)
   ------------------------------------------------------------ */
.section-title-line {
  display: flex; align-items: center; gap: 10px;
}
.section-title-line::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--accent); flex: none;
}

/* ------------------------------------------------------------
   Shop cards
   ------------------------------------------------------------ */
.shop-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}
.shop-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.shop-logo {
  width: 56px; height: 56px; border-radius: 16px; overflow: hidden; flex: none;
  background: var(--accent-soft); display: grid; place-items: center;
  font-weight: 600; font-size: 22px; color: var(--accent-2);
  border: 1px solid var(--border);
}
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-meta { min-width: 0; flex: 1; }
.shop-name { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------
   Storefront
   ------------------------------------------------------------ */
.cover {
  height: 200px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--bg-2), var(--accent-soft) 70%);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, var(--bg) 100%);
}
.storefront-head { padding: 0 20px; position: relative; }
.storefront-logo {
  width: 80px; height: 80px; border-radius: 22px; margin-top: -40px;
  border: 3px solid var(--card); box-shadow: var(--shadow);
  background: var(--card); overflow: hidden; display: grid; place-items: center;
  font-weight: 700; font-size: 32px; color: var(--accent);
}
.storefront-logo img { width: 100%; height: 100%; object-fit: cover; }

.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex; gap: 13px; align-items: flex-start; padding: 11px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .ico { width: 20px; text-align: center; color: var(--faint); flex: none; margin-top: 1px; }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 500; font-size: 13.5px; margin-bottom: 7px; color: var(--muted); }
.form-label .hint { color: var(--faint); font-weight: 400; font-size: 12.5px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 50px; padding: 13px 15px;
  border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--card); outline: none; font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { min-height: 104px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--faint); }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }
.form-errors {
  background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 13.5px; margin-bottom: 18px;
}
.form-errors ul { list-style: none; }
.input-row { display: flex; gap: 12px; }
.input-row > * { flex: 1; }

select.input option { background: var(--card); color: var(--text); }

/* Image picker */
.image-picker { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.image-pick {
  width: 94px; height: 94px; border-radius: 15px; border: 1.5px dashed var(--border-strong);
  display: grid; place-items: center; color: var(--faint); flex: none;
  background: var(--card-2); font-size: 12px; text-align: center; padding: 6px;
  position: relative; overflow: hidden;
}
.image-pick img { width: 100%; height: 100%; object-fit: cover; }
.image-pick .remove-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff;
  font-size: 12px; display: grid; place-items: center;
}
.image-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* toggle */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; }
.switch-row .txt { font-weight: 500; font-size: 14.5px; }
.switch-row .sub { font-size: 12.5px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong);
  transition: 0.25s; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: 0.25s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ------------------------------------------------------------
   Status pills
   ------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-new { background: var(--info-soft); color: var(--info); }
.pill-confirmed, .pill-preparing { background: var(--warning-soft); color: var(--warning); }
.pill-ready, .pill-assigned { background: var(--accent-soft); color: var(--accent-deep); }
.pill-out_for_delivery, .pill-going_to_shop, .pill-picked_up, .pill-going_to_customer { background: var(--info-soft); color: var(--info); }
.pill-delivered { background: var(--success-soft); color: var(--success); }
.pill-cancelled, .pill-rejected, .pill-customer_unavailable { background: var(--danger-soft); color: var(--danger); }

.stock-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; }
.stock-dot { width: 9px; height: 9px; border-radius: 50%; }
.stock-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.stock-dot.low { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.stock-dot.out { background: var(--faint); box-shadow: 0 0 0 3px var(--border); }
.stock-ok { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--faint); }

/* ------------------------------------------------------------
   Bottom navigation (mobile owner/driver)
   ------------------------------------------------------------ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -8px 30px rgba(28, 27, 24, 0.06);
}
.bottom-nav-inner {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: stretch; height: var(--nav-h);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--faint); font-size: 10.5px; font-weight: 600;
  position: relative; -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--accent-deep); }
.nav-item.active::before {
  content: ""; position: absolute; top: 0; width: 34px; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--accent);
}
.nav-add { flex: none; width: var(--nav-h); display: grid; place-items: center; }
.nav-add .fab {
  width: 48px; height: 48px; border-radius: 17px; margin-top: -22px;
  background: var(--navy-grad); color: #fff;
  display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}
.nav-item .nav-badge {
  position: absolute; top: 5px; right: calc(50% - 24px);
  min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}

/* ------------------------------------------------------------
   Lists / rows
   ------------------------------------------------------------ */
.list { background: transparent; }
.list-row {
  display: flex; align-items: center; gap: 13px; padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row.clickable { transition: background 0.15s; }
.list-row.clickable:active { background: var(--bg-2); }
.list-emoji {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 20px; flex: none; overflow: hidden;
}
.list-emoji img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list-arrow { color: var(--faint); flex: none; font-size: 17px; }

.quick-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.quick-row .stock-dot { flex: none; }

/* ------------------------------------------------------------
   Timeline
   ------------------------------------------------------------ */
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.tl-step { display: flex; gap: 13px; position: relative; padding-bottom: 20px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--card); z-index: 1; }
.tl-line { width: 2px; flex: 1; background: var(--border-strong); margin: 2px 0; }
.tl-step:last-child .tl-line { display: none; }
.tl-step.done .tl-dot { background: var(--success); border-color: var(--success); }
.tl-step.done .tl-line { background: var(--success); }
.tl-step.current .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-step.cancelled .tl-dot { background: var(--danger); border-color: var(--danger); }
.tl-body { padding-top: 2px; }
.tl-title { font-weight: 500; font-size: 14px; }
.tl-step.done .tl-title { color: var(--muted); }
.tl-step.current .tl-title { color: var(--accent); font-weight: 600; }
.tl-time { font-size: 12px; color: var(--faint); margin-top: 1px; }

/* ------------------------------------------------------------
   Cart
   ------------------------------------------------------------ */
.cart-item { display: flex; gap: 14px; padding: 16px 18px; align-items: center; }
.cart-thumb { width: 68px; height: 68px; border-radius: 14px; overflow: hidden; background: var(--bg-2); flex: none; border: 1px solid var(--border); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qty-control {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border-strong); border-radius: 13px; overflow: hidden;
  background: var(--card); flex: none;
}
.qty-control button {
  width: 36px; height: 36px; font-size: 17px; font-weight: 500; color: var(--text);
  display: grid; place-items: center;
}
.qty-control button:active { background: var(--bg-2); }
.qty-control .qty { min-width: 32px; text-align: center; font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------
   Alerts & empty states
   ------------------------------------------------------------ */
.alert { padding: 13px 15px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }

.empty {
  text-align: center; padding: 56px 20px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty .empty-emoji { font-size: 46px; opacity: 0.9; }

/* ------------------------------------------------------------
   Product detail
   ------------------------------------------------------------ */
.product-detail-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); background: var(--bg-2); border: 1px solid var(--border);
}
.thumb-row { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb-row img {
  width: 68px; height: 68px; border-radius: 12px; object-fit: cover;
  border: 2px solid transparent; cursor: pointer; opacity: 0.75;
  transition: opacity 0.2s, border-color 0.2s;
}
.thumb-row img.active { border-color: var(--accent); opacity: 1; }

.price-big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.price-row .old { font-size: 16px; color: var(--faint); text-decoration: line-through; }
.sale-chip {
  background: var(--danger-soft); color: var(--sale); font-weight: 700; font-size: 12.5px;
  padding: 4px 10px; border-radius: 999px;
}

.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(35, 31, 24, 0.06);
  padding: 13px 20px calc(13px + var(--safe-bottom));
}
.sticky-cta-inner { max-width: 600px; margin: 0 auto; display: flex; gap: 12px; }

.order-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.order-summary-row.total {
  border-top: 1px solid var(--border-strong); margin-top: 8px; padding-top: 14px;
  font-weight: 600; font-size: 16.5px;
}

.seg { display: flex; background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 5px; gap: 4px; }
.seg button, .seg a {
  flex: 1; padding: 10px 8px; border-radius: 10px; font-weight: 500; font-size: 13px;
  color: var(--muted); text-align: center; transition: color 0.2s, background 0.2s;
}
.seg .active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 36px; border-radius: 8px 8px 4px 4px; background: var(--accent); min-height: 4px; }
.bar-col .bar-label { font-size: 10.5px; color: var(--muted); }
.bar-col .bar-val { font-size: 10px; color: var(--faint); }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.notif-item { display: flex; gap: 13px; padding: 15px 17px; border-bottom: 1px solid var(--border); }
.notif-item.unread { background: var(--accent-soft); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.notif-item.read .notif-dot { background: transparent; }

/* ------------------------------------------------------------
   Desktop refinement
   ------------------------------------------------------------ */
/* Desktop navigation for owner & driver tools (bottom nav is mobile-only) */
.desktop-nav {
  display: none;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .cover { height: 260px; }
  .topbar-inner { padding: 14px 28px; }
  .page { padding-bottom: 48px; }
  .bottom-nav { display: none; }
  .bottom-nav-spacer { display: none; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .spotlight-inner { padding: 64px 56px; }

  body.owner .desktop-nav, body.driver .desktop-nav { display: block; }
  .desktop-nav {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }
  .desktop-nav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; gap: 4px;
  }
  .desktop-nav a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 16px; font-size: 13.5px; font-weight: 600;
    color: var(--muted); border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }
  .desktop-nav a:hover { color: var(--text); }
.desktop-nav a.active {
  color: var(--accent-deep); border-bottom-color: var(--accent);
}
  .desktop-nav a .nav-badge {
    min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger);
    color: #fff; font-size: 10px; font-weight: 700;
    display: inline-grid; place-items: center; padding: 0 5px;
  }
.desktop-nav .nav-add-link {
  margin-left: auto;
  background: var(--navy-grad); color: #fff;
  border-radius: 11px; padding: 8px 16px; border-bottom: none;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}
  .desktop-nav .nav-add-link:hover { filter: brightness(1.06); color: var(--accent-ink); }
}

@media (min-width: 1120px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  margin-top: 56px; border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 34px 20px 40px;
  display: grid; gap: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-name { font-size: 19px; }
.footer-desc { color: var(--muted); font-size: 13.5px; margin-top: 12px; max-width: 320px; line-height: 1.55; }
.footer-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 13.5px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-row {
  display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 13.5px;
  padding: 7px 0;
}
.footer-row .ico { width: 18px; text-align: center; flex: none; font-size: 15px; }
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  font-size: 16px; transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 20px 28px; text-align: center;
  color: var(--faint); font-size: 12px;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
}

/* ------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------ */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------
   Design system — type scale & page scaffolding
   ------------------------------------------------------------ */
.h-page {
  font-size: 24px; font-weight: 650; letter-spacing: -0.02em;
  line-height: 1.2; color: var(--text);
}
.page-head {
  margin: 22px 0 6px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; max-width: 520px; }

.text-2 { color: var(--muted); font-size: 14px; line-height: 1.5; }
.text-3 { color: var(--faint); font-size: 12.5px; line-height: 1.5; }

/* Unified metrics panel — one surface, hairline dividers, no stacked boxes */
.metrics {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
}
.metric { padding: 18px 20px; position: relative; }
.metric-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
}
.metric-value {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  margin-top: 6px; color: var(--text);
}
.metric-value.warn { color: var(--warning); }
.metric-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.metrics .metric { border-bottom: 1px solid var(--border); }
.metrics .metric:nth-child(odd) { border-right: 1px solid var(--border); }
.metrics .metric:nth-last-child(-n+2) { border-bottom: none; }
.metric-link:hover .metric-value { color: var(--accent); }
@media (min-width: 640px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .metrics .metric { border-bottom: none; border-right: 1px solid var(--border); }
  .metrics .metric:nth-child(odd) { border-right: 1px solid var(--border); }
  .metrics .metric:last-child { border-right: none; }
}

/* Flat definition list (labeled info rows, no emoji icons) */
.def-list { display: flex; flex-direction: column; }
.def-row {
  display: flex; gap: 16px; padding: 11px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.def-row:last-child { border-bottom: none; }
.def-label {
  width: 96px; flex: none; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); padding-top: 2px;
}
.def-value { flex: 1; min-width: 0; }

/* Success mark (order confirmation) */
.success-mark {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 77, 0.15);
}

/* Inline edit icon (product list) */
.list-edit {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--faint); flex: none;
  border: 1px solid var(--border); background: var(--card);
  transition: color 0.2s, border-color 0.2s;
}
.list-edit:hover { color: var(--accent); border-color: var(--accent); }

/* Refined empty state — quiet, icon-free */
.empty { text-align: center; padding: 52px 20px; }
.empty .empty-title { font-weight: 600; font-size: 15px; color: var(--text); }
.empty .empty-sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; max-width: 340px; margin-left: auto; margin-right: auto; }
.empty .btn { margin-top: 18px; }

/* Language switcher */
.lang-switch { flex: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a1a1a6' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 30px 8px 12px;
  cursor: pointer;
}
.lang-switch select:hover { border-color: var(--border-strong); }

/* RTL adjustments */
html[dir="rtl"] .spotlight-arrow { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .search-bar svg { order: 2; }
html[dir="rtl"] .qty-control { direction: ltr; }
html[dir="rtl"] .section-title-line::before { order: -1; }

/* Utility */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.semibold { font-weight: 600; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
