/* ============================================================
   FRIP'1 - Composants UI officiels
   Boutons, cartes, chips, badges, inputs, top bars, etc.
   ============================================================ */

/* -------------------- Layout mobile-first (mockup phone) -------------------- */

.phone {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  padding-bottom: 96px; /* bottom nav */
  overflow-x: hidden;
}
.phone--dark { background: var(--frip-black); color: var(--frip-cream); }
.phone--nopad { padding-bottom: 0; }

/* -------------------- Top bar -------------------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  padding: var(--s-4) var(--s-5);
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.topbar--dark { background: var(--frip-black); border-bottom-color: #262626; }
.topbar__title {
  text-align: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.topbar__btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--text-primary);
  transition: background var(--t-fast);
}
.topbar__btn:hover { background: rgba(0,0,0,0.06); }
.topbar--dark .topbar__btn:hover { background: rgba(255,255,255,0.08); }

/* -------------------- Boutons -------------------- */

.btn {
  --btn-bg: var(--frip-lime);
  --btn-fg: var(--frip-black);
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 14px 20px;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: 0.02em;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 16px 24px; font-size: var(--fs-md); min-height: 54px; }
.btn--sm { padding: 10px 14px; font-size: var(--fs-sm); min-height: 40px; }
.btn--secondary {
  --btn-bg: var(--frip-black); --btn-fg: var(--frip-cream);
}
.btn--outline {
  --btn-bg: transparent; --btn-fg: var(--frip-black); --btn-bd: var(--frip-black);
}
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--text-primary); --btn-bd: transparent;
}
.btn--danger { --btn-bg: var(--error); --btn-fg: #fff; }
.btn--disabled, .btn[disabled] {
  --btn-bg: var(--frip-grey-lt); --btn-fg: var(--frip-grey);
  cursor: not-allowed; box-shadow: none; transform: none;
}
.btn__icon svg { width: 20px; height: 20px; }

/* -------------------- Chips / Badges / Pills -------------------- */

.chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: all var(--t-fast);
  cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); }
.chip--active {
  background: var(--frip-lime);
  border-color: var(--frip-lime);
  color: var(--frip-black);
  font-weight: 600;
}
.chip--dark { background: var(--frip-black); color: var(--frip-cream); border-color: var(--frip-black); }
.chip--dark.chip--active { background: var(--frip-lime); color: var(--frip-black); border-color: var(--frip-lime); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge--premium { background: var(--frip-black); color: var(--frip-lime); }
.badge--first   { background: var(--frip-lime); color: var(--frip-black); }
.badge--standard{ background: var(--surface-muted); color: var(--text-secondary); }
.badge--defect  { background: var(--warning-bg); color: #92400E; }
.badge--elite   { background: var(--frip-lime); color: var(--frip-black); }
.badge--top     { background: var(--frip-black); color: var(--frip-lime); }
.badge--verified{ background: var(--info-bg); color: var(--info); }
.badge--new     { background: var(--surface-muted); color: var(--text-secondary); }

/* Status chips (charte : réservé, payé, prêt, en collecte, livré, litige) */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  border: 1px solid transparent;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--pending { background: var(--warning-bg); color: #92400E; }
.status--paid    { background: var(--info-bg); color: var(--info); }
.status--ready   { background: var(--success-bg); color: var(--success); }
.status--pickup  { background: #EDE9FE; color: #6D28D9; }
.status--transit { background: var(--info-bg); color: var(--info); }
.status--delivered { background: var(--success-bg); color: var(--success); }
.status--dispute { background: var(--error-bg); color: var(--error); }
.status--reserved { background: var(--frip-lime); color: var(--frip-black); }
.status--cancelled { background: var(--surface-muted); color: var(--text-muted); }

/* -------------------- Cartes -------------------- */

.card {
  background: var(--surface-alt);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.card:hover { box-shadow: var(--shadow-md); }
.card__body { padding: var(--s-4); }
.card__head { padding: var(--s-4); border-bottom: 1px solid var(--border); }

/* Product card */
.product-card {
  background: var(--surface-alt);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  display: block;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-card__img {
  aspect-ratio: 3/4;
  width: 100%;
  object-fit: cover;
  background: var(--surface-muted);
}
.product-card__fav {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.product-card__fav:hover { background: #fff; }
.product-card__fav[data-active="true"] { background: var(--frip-lime); }
.product-card__body { padding: var(--s-3); }
.product-card__title {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin: 0 0 4px;
}
.product-card__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.product-card__price {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--fs-base);
}
.product-card__size {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.product-card__badge {
  position: absolute; top: 10px; left: 10px;
}

/* Grille produits */
.grid-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
}
@media (min-width: 640px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .grid-products { grid-template-columns: repeat(4, 1fr); }
}

/* Order card */
.order-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--s-3);
  align-items: center;
}
.order-card__img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-muted); }
.order-card__ref { font-size: var(--fs-xs); color: var(--text-muted); font-family: var(--font-title); }
.order-card__title { font-weight: 600; margin: 2px 0; }
.order-card__price { font-family: var(--font-title); font-weight: 700; }

/* -------------------- Formulaires -------------------- */

.field { display: block; margin-bottom: var(--s-4); }
.field__label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field__hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 6px;
}
.field__error {
  display: block;
  font-size: var(--fs-xs);
  color: var(--error);
  margin-top: 6px;
}
.input, .textarea, .select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  font-size: var(--fs-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  min-height: 48px;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--frip-black);
  box-shadow: 0 0 0 3px rgba(199,240,0,0.35);
  outline: none;
}
.textarea { min-height: 120px; resize: vertical; }
.input--dark, .textarea--dark {
  background: #1B1B1B; border-color: #333; color: var(--frip-cream);
}

/* Search bar */
.search {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 12px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  transition: border-color var(--t-fast);
}
.search:focus-within { border-color: var(--frip-black); box-shadow: 0 0 0 3px rgba(199,240,0,0.35); }
.search svg { flex-shrink: 0; }
.search input {
  border: 0; outline: 0; background: transparent; flex: 1;
  font-size: var(--fs-base);
}

/* OTP inputs */
.otp {
  display: flex; gap: var(--s-2); justify-content: center;
}
.otp input {
  width: 48px; height: 60px;
  text-align: center;
  font-family: var(--font-title);
  font-size: var(--fs-xl);
  font-weight: 700;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.otp input:focus { border-color: var(--frip-black); box-shadow: 0 0 0 3px rgba(199,240,0,0.35); outline: none; transform: translateY(-2px); }

/* Checkbox / Radio */
.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.check:hover { border-color: var(--border-strong); }
.check input { accent-color: var(--frip-black); margin-top: 3px; }
.check--selected { border-color: var(--frip-black); background: var(--surface); }

/* -------------------- Bottom Nav (Client) -------------------- */

/* ================================================================
   MENU INFÉRIEUR CAPSULE — Spec 4.1 cahier des charges (v3.1)
   Capsule noire flottante détachée du bord, onglet actif entouré
   d'une courbe organique lime, badges rouges ponctuels, hauteur
   72–80 px, zones tactiles ≥ 44 px, safe-area iOS/Android.
   ================================================================ */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  pointer-events: none; /* laisse passer les clics hors capsule */
}
.bottomnav__capsule {
  pointer-events: auto;
  background: var(--frip-black);
  border-radius: 40px;
  height: 74px;
  padding: 0 8px 0 6px;
  display: grid;
  grid-template-columns: 46px repeat(5, 1fr);
  align-items: center;
  gap: 2px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.35), 0 6px 18px -6px rgba(0,0,0,0.25);
  position: relative;
}

/* Badge de marque FRIP'1 à gauche de la capsule (non-navigation) */
.bottomnav__brand {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--frip-lime);
  color: var(--frip-black);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 12px -2px rgba(199,240,0,0.35);
  transition: transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottomnav__brand:hover,
.bottomnav__brand:focus-visible { transform: scale(1.06); }
.bottomnav__brand:active { transform: scale(0.94); }
.bottomnav__brand-badge {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--frip-black);
}
.bottomnav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  min-height: 44px;
  color: #8A8A8A;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 24px;
  transition: color .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bottomnav__label {
  color: inherit;
  line-height: 1;
}
.bottomnav__icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit;
  position: relative;
}
.bottomnav__icon svg { width: 22px; height: 22px; }

/* Hover / focus / tap : passe en cream doux, sans fond */
.bottomnav__item:hover,
.bottomnav__item:focus-visible {
  color: var(--frip-cream);
}
.bottomnav__item:active {
  transform: scale(0.94);
}

/* État ACTIF : courbe organique lime autour de l'icône
   (arc supérieur) + libellé cream + point lime sous le libellé */
.bottomnav__item--active {
  color: var(--frip-cream);
  font-weight: 600;
}
.bottomnav__item--active .bottomnav__icon {
  color: var(--frip-lime);
}
.bottomnav__item--active .bottomnav__icon::before {
  content: '';
  position: absolute;
  top: -22px; left: 50%; transform: translateX(-50%);
  width: 68px; height: 68px;
  border: 2.5px solid var(--frip-lime);
  border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 0 55%);
  pointer-events: none;
}
.bottomnav__item--active .bottomnav__dot {
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--frip-lime);
  border-radius: 50%;
}

/* Bouton central « Vendre » : légère surélévation, sans écraser la barre */
.bottomnav__center {
  position: relative; top: -8px;
}
.bottomnav__center .bottomnav__icon {
  width: 46px; height: 46px;
  background: var(--frip-lime);
  color: var(--frip-black);
  border-radius: 50%;
  box-shadow: 0 6px 16px -4px rgba(199,240,0,0.5);
}
.bottomnav__center .bottomnav__icon svg { width: 22px; height: 22px; }
.bottomnav__center.bottomnav__item--active .bottomnav__icon::before { display: none; }
.bottomnav__center:hover .bottomnav__icon { background: #D9FF33; }

/* Badge rouge ponctuel #E53935 (Messages/notifications) */
.bottomnav__badge {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: #E53935;
  color: #fff;
  border-radius: 9px;
  font-family: var(--font-title);
  font-weight: 700; font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--frip-black);
}

/* Item gated (visiteur) */
.bottomnav__item--gated { opacity: 0.5; cursor: pointer; }
.bottomnav__item--gated:hover { opacity: 0.75; }
.bottomnav__lock {
  position: absolute; bottom: -2px; right: -4px;
  font-size: 10px;
}

.product-card__fav--locked { cursor: pointer; }

/* Legacy compat — anciens sélecteurs conservés pour éviter la casse */
.bottomnav__center--old {
  position: relative; top: -14px;
}
.bottomnav__center--old .bottomnav__icon {
  width: 44px; height: 44px;
  background: var(--frip-black);
  color: var(--frip-lime);
  box-shadow: 0 8px 20px rgba(17,17,17,0.25);
}

/* -------------------- Timeline -------------------- */

.timeline { padding: var(--s-4) var(--s-5); }
.timeline__step {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px;
  padding-bottom: var(--s-5); position: relative;
}
.timeline__step:not(:last-child)::before {
  content: '';
  position: absolute; top: 32px; left: 15px; bottom: 0; width: 2px;
  background: var(--border);
}
.timeline__step--done::before { background: var(--frip-lime); }
.timeline__dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-weight: 700; font-size: var(--fs-xs);
  z-index: 1;
}
.timeline__step--done .timeline__dot { background: var(--frip-lime); border-color: var(--frip-lime); color: var(--frip-black); }
.timeline__step--current .timeline__dot { background: var(--frip-black); border-color: var(--frip-black); color: var(--frip-lime); }
.timeline__title { font-weight: 600; margin: 0 0 2px; }
.timeline__desc { font-size: var(--fs-sm); color: var(--text-muted); }
.timeline__time { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; font-family: var(--font-title); }

/* -------------------- Toast & Modal -------------------- */

.toast-wrap {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--frip-black); color: var(--frip-cream);
  padding: 12px 20px; border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease-out;
  pointer-events: auto;
  max-width: 90vw;
}
.toast--success { background: var(--success); color: #fff; }
.toast--error   { background: var(--error); color: #fff; }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,17,17,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 60;
  animation: fade-in .15s;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface-alt);
  width: 100%;
  max-width: var(--app-max);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--s-5);
  animation: slide-up .25s ease-out;
  max-height: 90vh; overflow: auto;
}
@media (min-width: 640px) { .modal { border-radius: var(--r-lg); } }
@keyframes slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-4); }
.modal__title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg); }
.modal__close {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-muted);
}

/* -------------------- Empty & Loading states -------------------- */

.empty {
  padding: var(--s-9) var(--s-5);
  text-align: center;
}
.empty__ico {
  width: 72px; height: 72px; margin: 0 auto var(--s-4);
  background: var(--surface-muted);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.empty__title { font-size: var(--fs-lg); margin: 0 0 var(--s-2); }
.empty__text { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--s-5); }

.skeleton {
  background: linear-gradient(90deg, #EEE 0%, #F5F5F5 50%, #EEE 100%);
  background-size: 200% 100%;
  animation: skl 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes skl { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* -------------------- Split cards (Order confirm etc.) -------------------- */

.summary {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.summary__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-size: var(--fs-sm);
}
.summary__row + .summary__row { border-top: 1px dashed var(--border); }
.summary__total {
  margin-top: var(--s-3); padding-top: var(--s-3); border-top: 2px solid var(--frip-black);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg);
}

/* Sticky bottom action bar */
.actionbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: var(--app-max);
  margin: 0 auto;
  padding: var(--s-3) var(--s-5) var(--s-4);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  z-index: 35;
  display: flex; gap: var(--s-3); align-items: center;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

/* -------------------- Segmented control -------------------- */

.segmented {
  display: inline-flex;
  background: var(--surface-muted);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 4px;
}
.segmented__btn {
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.segmented__btn--active {
  background: var(--frip-black); color: var(--frip-cream);
  box-shadow: var(--shadow-sm);
}

/* -------------------- Divider -------------------- */

.divider {
  height: 1px; background: var(--border); margin: var(--s-4) 0;
}
.dividerv { width: 1px; height: 100%; background: var(--border); }

/* -------------------- Chart bars (dashboard) -------------------- */

.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: var(--s-3) 0; }
.bar { flex: 1; background: var(--surface-muted); border-radius: 6px 6px 0 0; position: relative; }
.bar__fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--frip-lime);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(.2,.7,.2,1);
}
.bar__label { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-muted); font-family: var(--font-title); }

/* -------------------- KPI Tiles -------------------- */

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.kpi {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.kpi__label { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.kpi__value { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-xl); margin-top: 4px; }
.kpi__delta { font-size: var(--fs-xs); font-weight: 600; margin-top: 4px; }
.kpi__delta--up { color: var(--success); }
.kpi__delta--down { color: var(--error); }
.kpi--hero { grid-column: span 2; background: var(--frip-black); color: var(--frip-cream); border-color: var(--frip-black); }
.kpi--hero .kpi__label { color: var(--frip-grey); }
.kpi--hero .kpi__value { color: var(--frip-lime); font-size: var(--fs-2xl); }

/* -------------------- Landing (desktop-ish) -------------------- */

.landing {
  background: var(--frip-black); color: var(--frip-cream);
  min-height: 100vh;
}
.landing__hero {
  padding: var(--s-9) var(--s-5) var(--s-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing__hero::after {
  content: ''; position: absolute; bottom: -80px; right: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--frip-lime); opacity: 0.15; filter: blur(20px);
}
.landing__logo { max-width: 220px; margin: 0 auto var(--s-6); }
.landing__title {
  font-family: var(--font-title); font-weight: 800;
  font-size: clamp(28px, 8vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--s-3);
}
.landing__title em { font-style: normal; color: var(--frip-lime); }
.landing__sub {
  font-size: var(--fs-md); color: #DDD8CB;
  max-width: 360px; margin: 0 auto var(--s-7);
}

.roles {
  padding: var(--s-6) var(--s-5);
  display: grid; gap: var(--s-3);
}
.role {
  background: var(--frip-charcoal);
  border: 1px solid #333;
  border-radius: var(--r-md);
  padding: var(--s-5);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s-3);
  transition: transform var(--t-fast), border-color var(--t-fast);
  text-decoration: none;
  color: inherit;
}
.role:hover { border-color: var(--frip-lime); transform: translateY(-2px); }
.role__title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-md); }
.role__desc { font-size: var(--fs-sm); color: #B8B3A5; margin-top: 2px; }
.role__arrow {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--frip-lime); color: var(--frip-black);
  display: inline-flex; align-items: center; justify-content: center;
}

/* -------------------- Slogan bar (bottom of landing) -------------------- */
.slogan {
  padding: var(--s-6) var(--s-5) var(--s-8);
  text-align: center;
  color: var(--frip-grey);
  font-size: var(--fs-xs);
  border-top: 1px solid #262626;
}

/* -------------------- Header banner (marketplace) -------------------- */
.hero-banner {
  margin: var(--s-4) var(--s-5) 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--frip-black) 0%, #262626 100%);
  color: var(--frip-cream);
  padding: var(--s-5);
  position: relative;
}
.hero-banner::after {
  content: '1';
  position: absolute; bottom: -30px; right: -10px;
  font-family: var(--font-title); font-weight: 800;
  font-size: 180px; color: var(--frip-lime); opacity: 0.15;
  line-height: 1;
}
.hero-banner__label { font-size: var(--fs-xs); color: var(--frip-lime); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-banner__title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-xl); margin: var(--s-2) 0; }
.hero-banner__cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--s-3);
  padding: 8px 14px; border-radius: var(--r-full);
  background: var(--frip-lime); color: var(--frip-black);
  font-weight: 600; font-size: var(--fs-sm);
  position: relative; z-index: 2;
}

/* -------------------- Category scroller -------------------- */
.cat-scroll {
  display: flex; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll .chip { flex-shrink: 0; }

/* -------------------- Section header -------------------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--s-4) var(--s-5) 0;
}
.section-head__title { font-family: var(--font-title); font-weight: 700; font-size: var(--fs-md); }
.section-head__link { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.section-head__link:hover { color: var(--frip-black); }

/* -------------------- Seller info block -------------------- */
.seller-block {
  padding: var(--s-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: grid; grid-template-columns: 48px 1fr auto; gap: var(--s-3); align-items: center;
}
.seller-block__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--frip-black); color: var(--frip-lime);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-md);
}
.seller-block__name { font-weight: 600; }
.seller-block__meta { font-size: var(--fs-xs); color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

/* -------------------- QR box -------------------- */
.qr-box {
  background: var(--frip-cream);
  border: 2px solid var(--frip-black);
  padding: var(--s-4);
  border-radius: var(--r-md);
  text-align: center;
}
.qr-box__code {
  width: 180px; height: 180px; margin: 0 auto var(--s-3);
  background:
    linear-gradient(to right, var(--frip-black) 20%, transparent 20%, transparent 30%, var(--frip-black) 30%, var(--frip-black) 45%, transparent 45%, transparent 60%, var(--frip-black) 60%, var(--frip-black) 70%, transparent 70%),
    linear-gradient(to bottom, var(--frip-black) 15%, transparent 15%, transparent 30%, var(--frip-black) 30%, var(--frip-black) 40%, transparent 40%, transparent 55%, var(--frip-black) 55%, var(--frip-black) 65%, transparent 65%, transparent 75%, var(--frip-black) 75%);
  background-size: 100% 100%;
  background-blend-mode: multiply;
  border: 4px solid var(--frip-black);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.qr-box__code::before,
.qr-box__code::after {
  content: ''; position: absolute;
  width: 34px; height: 34px; border: 6px solid var(--frip-black); background: var(--frip-cream);
}
.qr-box__code::before { top: 10px; left: 10px; box-shadow: inset 0 0 0 4px var(--frip-cream), inset 0 0 0 8px var(--frip-black); }
.qr-box__code::after { top: 10px; right: 10px; box-shadow: inset 0 0 0 4px var(--frip-cream), inset 0 0 0 8px var(--frip-black); }

.qr-box__ref {
  font-family: var(--font-title); font-weight: 700; font-size: var(--fs-lg); letter-spacing: 0.05em;
}

/* -------------------- Rating stars -------------------- */
.stars { display: inline-flex; gap: 2px; color: var(--frip-lime); }
.stars svg { width: 14px; height: 14px; }

/* -------------------- Footer (institutional pages) -------------------- */
.footer {
  padding: var(--s-5) var(--s-5);
  background: var(--frip-black); color: var(--frip-grey);
  font-size: 11px; line-height: 1.45; text-align: center;
}
.footer strong { color: var(--frip-cream); font-family: var(--font-title); font-size: 12px; }
.footer a { color: var(--frip-lime); }
.footer .frip-copyright { font-size: 10px; opacity: 0.85; }

/* -------------------- Alerts inline -------------------- */
.alert {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid transparent;
}
.alert--info { background: var(--info-bg); color: var(--info); border-color: var(--info); }
.alert--success { background: var(--success-bg); color: #14532D; border-color: var(--success); }
.alert--warning { background: var(--warning-bg); color: #92400E; border-color: var(--warning); }
.alert--error { background: var(--error-bg); color: #7F1D1D; border-color: var(--error); }

/* -------------------- Tabs -------------------- */
.tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 var(--s-5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 14px 4px;
  margin-right: var(--s-5);
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab--active { color: var(--frip-black); border-bottom-color: var(--frip-black); }

/* -------------------- Fab -------------------- */
.fab {
  position: fixed; right: 20px; bottom: 100px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--frip-lime); color: var(--frip-black);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 40;
}

/* -------------------- Sticker style (small brand mark) -------------------- */
.sticker-one {
  display: inline-block;
  width: 44px; height: 44px;
  background: var(--frip-lime);
  color: var(--frip-black);
  border-radius: var(--r-xs);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  transform: skewX(-8deg);
  box-shadow: var(--shadow-sm);
}

/* -------------------- Utility: safe pad bottom -------------------- */
.pad-bottom-actionbar { padding-bottom: 96px; }
