/* Dlala web — deep emerald + gold branding, RTL-first */
:root {
  --emerald: #0b6b4f;
  --emerald-dark: #085c43;
  --emerald-light: #e8f0ec;
  --gold: #d4a017;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --bg: #f7f8f7;
  --card: #ffffff;
  --line: #e5e7eb;
  --red: #dc2626;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* header */
#site-header {
  background: var(--emerald);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 2px; font-weight: 800; font-size: 22px; }
.logo-d {
  background: #fff; color: var(--emerald);
  width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.logo-dot { color: var(--gold); font-size: 26px; line-height: 1; }
.logo-name { margin-inline-start: 6px; letter-spacing: .5px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 8px; opacity: .85; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.nav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.nav a.active { background: rgba(255,255,255,.18); opacity: 1; font-weight: 700; }
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.4);
  color: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px;
}
.lang-btn.active { background: #fff; color: var(--emerald); font-weight: 700; }

/* hamburger + side drawer (mobile, like leboncoin) */
.hamburger {
  display: none; background: none; border: none; color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; padding: 8px;
}
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 90;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; bottom: 0; width: min(320px, 85vw);
  background: #fff; z-index: 95; display: flex; flex-direction: column;
  transition: transform .25s ease; box-shadow: 0 0 24px rgba(0,0,0,.2);
}
[dir="rtl"] .drawer { right: 0; transform: translateX(100%); }
[dir="ltr"] .drawer { left: 0; transform: translateX(-100%); }
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--emerald);
}
.drawer-head .logo { color: #fff; }
.drawer-close {
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; padding: 8px; line-height: 1;
}
.drawer-nav { display: flex; flex-direction: column; padding: 8px; overflow-y: auto; flex: 1; }
.drawer-nav a {
  padding: 14px 12px; border-radius: 8px; color: var(--ink);
  font-weight: 600; font-size: 16px;
}
.drawer-nav a.active { background: #e8f5ee; color: var(--emerald); }
.drawer-lang {
  display: flex; gap: 8px; padding: 16px; border-top: 1px solid var(--line);
}
.drawer-lang .lang-btn {
  flex: 1; border-color: var(--emerald); color: var(--emerald);
  padding: 8px; font-size: 14px;
}
.drawer-lang .lang-btn.active { background: var(--emerald); color: #fff; }
body.drawer-open { overflow: hidden; }

/* layout */
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px; width: 100%; flex: 1; }
#site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 24px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 16px;
  display: flex; justify-content: space-between; color: var(--muted); font-size: 13px;
}

/* search + filters */
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.search-bar input {
  flex: 1; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.btn {
  background: var(--emerald); color: #fff; border: none;
  padding: 12px 20px; border-radius: var(--radius); font-weight: 700; font-size: 15px;
}
.btn:hover { background: var(--emerald-dark); }
.btn-secondary { background: #fff; color: var(--emerald); border: 1px solid var(--emerald); }
.btn-danger { background: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }

.filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
  background: #fff; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line);
}
.filters select, .filters input {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; }
/* HOM-6 (16 Sep 2026): save-search action row — right-aligned, below filters. */
.search-actions { display: flex; justify-content: flex-end; margin: -8px 0 14px; }
.chip {
  white-space: nowrap; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 14px;
}
.chip.active { background: var(--emerald); color: #fff; border-color: var(--emerald); font-weight: 700; }

/* cards grid */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: block; transition: transform .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.card-img { position: relative; aspect-ratio: 4/3; background: var(--emerald-light); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px; }
.card-price { font-weight: 800; color: var(--emerald); font-size: 16px; }
.price-num { font-variant-numeric: tabular-nums; }
.card-title {
  font-size: 14px; margin: 4px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.card-meta { font-size: 12px; color: var(--muted); }
.card-meta.dim { margin-top: 2px; }
.badge {
  position: absolute; top: 8px; inset-inline-start: 8px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; color: #fff;
}
.badge-sold { background: var(--red); }
.badge-reduced { background: var(--gold); color: #1a1a1a; }
.badge-wholesale { background: #7b5ea7; }
.badge-drop { background: #0b6b4f; }
.badge-own { background: #0b6b4f; }
.card-img .badge-wholesale, .card-img .badge-drop { inset-inline-start: auto; inset-inline-end: 8px; }
/* HOM-4 (16 Sep 2026): "yours" marker — end side, below the wholesale slot
   so it never overlaps the sold/wholesale/reduced badges. */
.card-img .badge-own { inset-inline-start: auto; inset-inline-end: 8px; top: 34px; }
.badge-inline { position: static; display: inline-block; }
/* HOM-5 (16 Sep 2026): favorite heart on feed cards — start side, above the
   image; the button (not the card link) receives the tap via a delegated
   handler (CSP forbids inline onclick). */
.fav-heart {
  position: absolute; inset-inline-start: 8px; top: 8px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: #666; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.fav-heart.on { color: #e0245e; }
.fav-heart:disabled { opacity: .6; }
/* FAV-4/FAV-5 (16 Sep 2026): favorites pagination footer + orphan card. */
.fav-footer { text-align: center; padding: 14px 0 24px; }
.fav-count { color: var(--dim, #777); font-size: 13px; margin-bottom: 8px; }
.card-orphan { opacity: .65; border: 1px dashed #bbb; }
.fav-orphan { position: relative; }

/* detail */
.detail { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
.detail > * { min-width: 0; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.gallery { position: relative; overflow: hidden; background: #e9f0ed; border-radius: var(--radius); aspect-ratio: 4/3; }
/* LIS-9 (16 Sep 2026): shimmer placeholder while the main photo streams in. */
.gallery::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); animation: dlShimmer 1.1s linear infinite; pointer-events: none; }
.gallery.ld::after { display: none; }
/* GAL-1 (v61): fixed 4:3 gallery — the image is contained whole, never
   cropped. Portrait photos show fully with side letterbox; tapping opens
   the lightbox for the full portrait view. Page dimensions stay stable. */
.gallery img { display: block; position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--line); cursor: zoom-in; }
@keyframes dlShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumbs img.active { border-color: var(--emerald); }
.detail-side .price { font-size: 26px; font-weight: 800; color: var(--emerald); margin: 8px 0; }
.detail-side h1 { font-size: 20px; }
.seller-card, .detail-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-top: 14px;
}
.stat-row { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-top: 10px; }
.desc { white-space: pre-wrap; line-height: 1.7; }

/* forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 640px; }
.form label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 14px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
}
.form textarea { min-height: 110px; resize: vertical; }
/* AUT-1 (16 Sep 2026): inline field-rule hints. */
.form .hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.photo-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
/* PUB-7 (16 Sep 2026): reorder/remove controls on new-photo previews. */
.photo-preview .pp-item { position: relative; width: 84px; height: 84px; }.photo-preview .pp-mv, .photo-preview .pp-del {
  position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(17,24,39,.82); color: #fff; border: 2px solid #fff;
  cursor: pointer; font-size: 11px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.photo-preview .pp-del { top: -10px; inset-inline-end: -8px; background: #b91c1c; }
.photo-preview .pp-mv { bottom: -8px; }
.photo-preview .pp-mv-l { inset-inline-start: 4px; }
.photo-preview .pp-mv-r { inset-inline-end: 4px; }
/* PUB-7 cross-group cover (16 Sep 2026): new-photo cover marker/button. */
.photo-preview .pp-cover {
  position: absolute; top: 2px; inset-inline-start: 2px;
  background: #f5a623; color: #fff; font-size: 13px; line-height: 1;
  padding: 3px 5px; border-radius: 6px;
}
.photo-preview .pp-cover-btn {
  position: absolute; bottom: 2px; inset-inline-start: 2px;
  background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 6px;
  font-size: 13px; line-height: 1; padding: 4px 6px; cursor: pointer;
}

/* LIS-8 (16 Sep 2026): fullscreen photo viewer. */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-img {
  max-width: 96vw; max-height: 92vh; object-fit: contain;
  border-radius: 8px;
  touch-action: none; /* LBZ-1: the lightbox owns all touch gestures */
}
.lightbox .lb-close {
  position: absolute; top: 14px; inset-inline-end: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; border: 0;
  font-size: 18px; cursor: pointer;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; border: 0;
  font-size: 18px; cursor: pointer;
}
.lightbox .lb-prev { inset-inline-start: 10px; }
.lightbox .lb-next { inset-inline-end: 10px; }
.lightbox .lb-count {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; background: rgba(0,0,0,.5);
  padding: 4px 12px; border-radius: 12px;
}
.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-ok { background: #dcfce7; color: #166534; }
.alert-info { background: #e0f2fe; color: #075985; }

/* misc */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty p { margin-top: 8px; font-size: 14px; }
.spinner { text-align: center; padding: 40px; color: var(--muted); }
.config-error {
  max-width: 640px; margin: 80px auto; padding: 24px;
  background: #fee2e2; color: #991b1b; border-radius: 12px; text-align: center;
}
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.toolbar h2 { font-size: 20px; }
.count { color: var(--muted); font-size: 13px; }
.fav-btn {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: 15px;
}
.fav-btn.on { border-color: var(--red); color: var(--red); }
/* Fav-button loading state (16 Sep 2026): the button renders before the
   favorite status is known — never show a definitive ♡/♥ until the check
   resolves, or users see a false state that flips. */
.fav-btn.fav-loading { opacity: .55; }
.app-nudge {
  background: var(--emerald-light); border: 1px solid var(--emerald);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.app-nudge strong { color: var(--emerald); }

/* mobile header: hamburger + drawer, no wrapped nav row */
@media (max-width: 640px) {
  .header-inner { gap: 10px; padding: 10px 12px; }
  .hamburger { display: inline-flex; align-items: center; }
  .logo { font-size: 19px; }
  .logo-d { width: 30px; height: 30px; font-size: 19px; }
  .logo-name { display: none; }
  /* Language switcher visible in header on mobile (16 Sep 2026):
     opposite the hamburger, parallel at the top. */
  .lang-switch { display: flex; margin-inline-start: auto; }
  .lang-btn {
    padding: 5px 9px; font-size: 12px; font-weight: 700;
    border-radius: 8px; border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.12); color: #fff;
  }
  .lang-btn.active { background: #fff; color: var(--emerald); }
  .nav { display: none; }
  .account-menu { display: none; } /* drawer owns the account entries on mobile */
  main { padding: 14px 12px; }
}

/* ===== web chat (conversations/chat) ===== */
/* ===== Dlala web chat (namespaced) — mobile-first, RTL-safe =====
   Integration: append to css/style.css. Uses existing tokens (--primary,
   .btn, .btn-primary, .btn-sm, .toolbar, .empty, .spinner, .lang-btn). */

.conv-list { display: flex; flex-direction: column; gap: 8px; }
.conv-item {
  position: relative; display: flex; align-items: stretch;
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px; overflow: hidden;
}
.conv-link {
  flex: 1; display: flex; gap: 10px; padding: 10px;
  text-decoration: none; color: inherit; min-width: 0;
}
.conv-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: var(--chip, #f3f4f6); display: flex; align-items: center;
  justify-content: center; font-size: 24px; overflow: hidden;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { color: var(--muted, #6b7280); font-size: 12px; flex: 0 0 auto; }
.conv-listing { color: var(--muted, #6b7280); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.conv-preview { color: var(--muted, #6b7280); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.conv-unread {
  background: var(--primary, #0b6b4f); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 22px; height: 22px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.conv-hide {
  background: none; border: none; color: var(--muted, #9ca3af);
  font-size: 14px; padding: 8px 12px; cursor: pointer; align-self: flex-start;
}
.conv-hide:hover { color: #ef4444; }
.conv-support { border-inline-start: 3px solid var(--primary, #0b6b4f); }

/* ===== chat page ===== */
body.chat-page { display: flex; flex-direction: column; height: 100dvh; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--card, #fff); border-bottom: 1px solid var(--border, #e5e7eb);
  position: sticky; top: 0; z-index: 20;
}
.chat-back {
  background: none; border: none; font-size: 30px; line-height: 1; cursor: pointer;
  color: var(--primary, #0b6b4f); padding: 0 6px;
}
[dir="rtl"] .chat-back { transform: scaleX(-1); }
.chat-head-main { flex: 1; min-width: 0; }
.chat-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-listing-chip { margin-top: 2px; }
.chat-listing-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; font-size: 12px; }
.chat-listing-link img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
/* CHA-5 (16 Sep 2026): deleted-listing chip — plain text, dimmed. */
.chat-listing-deleted { color: var(--muted); font-style: italic; }
/* CHA-9 (16 Sep 2026): empty-thread "say hello" placeholder. */
.chat-empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.chat-empty-ico { font-size: 40px; display: block; margin-bottom: 12px; }
.chat-empty p { margin: 0; font-size: 14px; }
/* CHA-7 (16 Sep 2026): undo toast after hiding a conversation. */
.toast-undo { display: flex; align-items: center; gap: 12px; }
.toast-undo-btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 6px 14px; font-weight: 700; cursor: pointer; }
/* PUB-13 (16 Sep 2026): character counters under publish fields. */
.char-count { font-size: 11px; color: var(--muted); text-align: end; margin: -6px 0 8px; }
.chat-lang .lang-btn { padding: 4px 8px; font-size: 11px; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 12px; }
.chat-thread-note {
  text-align: center; font-size: 12px; color: var(--muted, #6b7280);
  background: var(--chip, #f3f4f6); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px;
}

.msg-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.msg.other { justify-content: flex-start; }
.msg-bubble {
  max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 15px;
  overflow-wrap: anywhere; background: var(--chip, #f3f4f6); color: inherit;
}
.msg.me .msg-bubble { background: var(--primary, #0b6b4f); color: #fff; }
.msg-text { white-space: pre-wrap; }
.msg-meta { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: 2px; font-size: 11px; opacity: 0.7; }
.msg-photo { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; margin-bottom: 4px; }
.msg-sys { display: flex; justify-content: center; margin: 6px 0; }
.msg-sys span {
  background: var(--chip, #f3f4f6); color: var(--muted, #6b7280); font-size: 12px;
  border-radius: 12px; padding: 4px 12px; max-width: 90%; text-align: center;
}
.day-sep { display: flex; justify-content: center; margin: 8px 0 4px; }
.day-sep span { font-size: 11px; color: var(--muted, #6b7280); background: var(--chip, #f3f4f6); border-radius: 10px; padding: 2px 10px; }

/* proposals */
.proposal-card { min-width: 180px; }
.proposal-amount { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.proposal-status { font-size: 12px; margin-bottom: 6px; }
.st-pending { color: #fbbf24; }
.st-accepted { color: #34d399; }
.st-refused { color: #f87171; }
.msg.other .st-pending { color: #b45309; }
.proposal-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.proposal-form { background: var(--card, #fff); border-top: 1px solid var(--border, #e5e7eb); padding: 10px 12px; }
.proposal-form-title { font-weight: 700; margin-bottom: 8px; }
.proposal-form-row { display: flex; gap: 8px; align-items: center; }
.proposal-input { flex: 1; min-width: 0; }

/* phone + deal panels */
#phonePanel, #dealPanel { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.chat-notice {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px;
  padding: 10px 12px; font-size: 14px;
}
.notice-ok { background: #ecfdf5; border-color: #6ee7b7; }
.notice-blocked { background: #fef2f2; border-color: #fca5a5; }
.notice-deal { background: #eff6ff; border-color: #93c5fd; }
.notice-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.notice-form { display: flex; gap: 8px; margin-top: 8px; }
.phone-input { flex: 1; min-width: 0; }

/* composer */
.composer {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--card, #fff); border-top: 1px solid var(--border, #e5e7eb);
  position: sticky; bottom: 0; z-index: 20;
}
.chat-scam-hint { width: 100%; font-size: 11px; color: var(--muted, #6b7280); text-align: center; padding: 2px 4px; }
.composer-input { flex: 1; min-width: 0; }
.icon-btn {
  background: var(--chip, #f3f4f6); border: none; border-radius: 50%;
  width: 42px; height: 42px; font-size: 20px; cursor: pointer; flex: 0 0 auto;
}
.toast {
  position: fixed; bottom: 80px; inset-inline: 16px; z-index: 100;
  background: #111827; color: #fff; border-radius: 10px; padding: 10px 16px;
  text-align: center; opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* nav unread badge */
.nav-badge {
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px; margin-inline-start: 4px; vertical-align: middle;
}

@media (min-width: 768px) {
  .msg-bubble { max-width: 60%; }
  .chat-main { max-width: 720px; margin-inline: auto; width: 100%; }
  .proposal-form, .composer { max-width: 720px; margin-inline: auto; width: 100%; }
}

/* ===== platform banner (Android/iOS) ===== */
/* Requires i18n keys: getApp, appBannerSub, iosBannerSub, comingSoon, dismiss. */

#appBanner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--emerald);
  color: #fff;
  padding: 10px 12px;
}
#appBanner .appb-logo { display: inline-flex; align-items: center; }
#appBanner .appb-logo .logo-d { width: 30px; height: 30px; font-size: 18px; }
#appBanner .appb-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}
#appBanner .appb-text strong { font-size: 14px; }
#appBanner .appb-cta {
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  background: #fff;
  color: var(--emerald);
  flex-shrink: 0;
}
#appBanner .appb-cta:hover { background: #f0f0f0; }
#appBanner .appb-badges { display: inline-flex; gap: 8px; flex-shrink: 0; }
#appBanner .appb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 13px; font-weight: 600;
  background: #fff; color: var(--emerald);
  border: 0; border-radius: 8px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
#appBanner .appb-badge:hover { background: #f0f0f0; }
#appBanner .appb-badge svg { flex-shrink: 0; }
.appb-x {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 16px;
  padding: 6px 8px;
  cursor: pointer;
  opacity: 0.85;
  flex-shrink: 0;
}
.appb-x:hover { opacity: 1; }

/* ===== marketplace depth (alerts/seller/ratings) ===== */
/* =====================================================================
   Dlala marketplace depth — design system additions (merge into css/style.css)
   Design directive (Zak): modern classifieds look, RTL-first, ≥44px touch
   targets, skeleton loading, friendly empty states, 150–250ms transitions.
   All spacing uses logical properties (inline-start/end) for Arabic RTL.
   ===================================================================== */

/* ---------- base: touch targets, transitions, typography ---------------- */
.btn, .chip, .fav-btn, button.dlg-close {
  min-height: 44px;
  transition: background-color 180ms ease, color 180ms ease,
              border-color 180ms ease, transform 150ms ease,
              box-shadow 200ms ease;
}
.btn:active, .chip:active, .fav-btn:active { transform: scale(.97); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
input, select, textarea {
  min-height: 44px;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(11, 107, 79, .12);
}
body { line-height: 1.6; }
h1 { font-size: 24px; line-height: 1.35; }
h2 { font-size: 20px; line-height: 1.4; }
h3 { font-size: 17px; line-height: 1.45; }
h4 { font-size: 15px; line-height: 1.5; }

/* ---------- cards: soft shadow, hover lift ------------------------------- */
.card {
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(16, 24, 20, .06);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(16, 24, 20, .10);
}
.card-price {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1px;
}
.card-title { line-height: 1.45; }
.grid { gap: 14px; }

/* ---------- wanted ads ---------------------------------------------------- */
.badge-wanted {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, .35);
  letter-spacing: .2px;
}
.card-img { position: relative; }
.card-img .badge-wanted {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
}
.mode-toggle {
  display: flex; gap: 0;
  background: var(--emerald-light);
  border-radius: 12px; padding: 4px; margin-bottom: 8px;
}
.mode-toggle .chip {
  flex: 1; border: none; background: transparent;
  min-height: 44px; font-weight: 700; font-size: 14px;
  color: var(--emerald);
}
.mode-toggle .chip.active {
  background: #fff; color: var(--emerald);
  box-shadow: 0 2px 8px rgba(11, 107, 79, .18);
}
.wanted-hint {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px; line-height: 1.6;
  margin: 0 0 14px;
}
.matches-section { margin-top: 26px; }
.matches-section h3 {
  margin-bottom: 12px;
  padding-inline-start: 4px;
  border-inline-start: 3px solid #7c3aed;
}

/* ---------- skeleton loading (shimmer, direction-agnostic) ---------------- */
@keyframes skel-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skel {
  border-radius: 10px;
  background: linear-gradient(90deg, #eef1ee 25%, #e2e8e3 50%, #eef1ee 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
.skel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.skel-card .skel-img { height: 0; aspect-ratio: 4/3; border-radius: 0; }
.skel-card .skel-body { padding: 10px 12px; display: grid; gap: 8px; }
.skel-line { height: 14px; }
.skel-line.w60 { width: 60%; }
.skel-line.w40 { width: 40%; }
.skel-line.w80 { width: 80%; }
.skel-detail { display: grid; gap: 12px; }
.skel-detail .skel-hero { aspect-ratio: 4/3; border-radius: var(--radius); }
.skel-profile {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 16px;
}
.skel-avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }

/* ---------- friendly empty states ---------------------------------------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 12px 0;
}
.empty-state .es-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.empty-state .btn { min-width: 180px; }

/* ---------- inline errors -------------------------------------------------- */
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.alert { animation: fade-slide-in 200ms ease; }
.field-err {
  color: #991b1b; font-size: 13px; margin-top: 4px;
  animation: fade-slide-in 200ms ease;
}

/* ---------- dialogs -------------------------------------------------------- */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 20, 16, .55);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fade-slide-in 180ms ease;
}
.dlg {
  background: var(--card); color: var(--text);
  border-radius: 16px; max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .30);
  animation: dlg-pop 200ms ease;
}
@keyframes dlg-pop {
  from { opacity: 0; transform: scale(.96) translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.dlg h3 { margin: 0 0 12px; font-size: 18px; }
.dlg label { display: block; font-weight: 700; font-size: 14px; margin: 10px 0 4px; }
.dlg textarea { width: 100%; min-height: 96px; resize: vertical; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.stars { display: flex; gap: 6px; font-size: 36px; }
.stars button {
  background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px;
  color: #d1d5db; padding: 0; line-height: 1;
  transition: color 150ms ease, transform 150ms ease;
}
.stars button.on { color: #f59e0b; }
.stars button:active { transform: scale(1.15); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row .btn { flex: 1; min-width: 120px; }

/* 0.0.0.14 (17 Sep 2026, Zak): listing meta as labeled pairs, two per row,
   in the original place under the price. */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0 4px; }
.mg-item { color: var(--muted); font-size: 13.5px; }
.mg-item b { color: var(--ink); font-weight: 600; }
.mg-full { grid-column: 1 / -1; }
/* ---------- seller page ---------------------------------------------------- */
/* 0.0.0.10 (17 Sep 2026, Zak): center the text inside the seller-card
   buttons ("Voir la page" was off-center). Kept in 0.0.0.11 — only the
   meta table was reverted. */
.detail .seller-card .btn { text-align: center; }
.seller-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(16, 24, 20, .06);
  padding: 18px;
  margin-bottom: 16px;
}
.seller-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.seller-head .avatar, .seller-head img.avatar {
  width: 68px; height: 68px; font-size: 28px;
  border-radius: 50%;
  background: var(--emerald-light); color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--emerald);
}
img.avatar.big, .avatar.big {
  width: 68px; height: 68px; font-size: 28px;
  border-radius: 50%;
  background: var(--emerald-light); color: var(--emerald);
  display: inline-flex; align-items: center; justify-content: center;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--emerald);
}
.seller-head .uname { color: var(--muted); font-size: 13px; }
.seller-head .sname { font-size: 20px; font-weight: 800; line-height: 1.35; }
.seller-stats { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.seller-actions { margin-inline-start: auto; display: flex; gap: 8px; }
.rating-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 20, .05);
}
.rating-item .stars-line { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }
.rating-item .who { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rating-item p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.6; }

/* ---------- alerts ---------------------------------------------------------- */
.alert-card, .notif-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 20, .05);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.alert-card:hover { box-shadow: 0 4px 14px rgba(16, 24, 20, .08); }
.alert-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alert-card .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.alert-card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.notif-card.unread {
  border-inline-start: 3px solid var(--emerald);
  background: #f4faf7;
}
.notif-card .when { color: var(--muted); font-size: 12px; margin-top: 4px; }
.search-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .search-form .row2 { grid-template-columns: 1fr; } }

/* ---------- account danger zone -------------------------------------------- */
.privacy-section {
  margin-top: 28px; padding: 18px;
  border: 1px solid #e5e7eb; border-radius: var(--radius); background: #f9fafb;
}
.privacy-section h3 { color: #374151; margin: 0 0 8px; font-size: 16px; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover { background: #991b1b; }
.terms-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: 14px; line-height: 1.6; }
.terms-row input { margin-top: 4px; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--emerald); }

/* ---------- photo editor (edit listing) ------------------------------------- */
.photo-editor { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.photo-editor .pe-item { position: relative; width: 88px; height: 88px; }
.photo-editor img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; }
.photo-editor .pe-del {
  position: absolute; top: -10px; inset-inline-end: -10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #b91c1c; color: #fff; border: 2px solid #fff; cursor: pointer;
  font-size: 14px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform 150ms ease;
}
.photo-editor .pe-del:active { transform: scale(.9); }
/* PUB-7 (16 Sep 2026): reorder + set-as-cover controls on the photo editor. */
.photo-editor .pe-ctrl {
  position: absolute; bottom: -8px; inset-inline-start: 4px;
  display: flex; gap: 4px;
}
.photo-editor .pe-mv, .photo-editor .pe-cover-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(17,24,39,.82); color: #fff; border: 2px solid #fff;
  cursor: pointer; font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); padding: 0;
}
.photo-editor .pe-cover-btn { background: rgba(217,119,6,.9); }
.photo-editor .pe-cover {
  position: absolute; top: -10px; inset-inline-start: -6px;
  color: #f59e0b; font-size: 22px; text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ---------- listing detail polish ------------------------------------------- */
.detail-side .price {
  font-size: 28px; font-weight: 800; color: var(--emerald);
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}
.detail-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.detail-actions .btn, .detail-actions .fav-btn { flex: 1 1 140px; }
/* v100 (16 Sep 2026, Zak-approved mockup): every listing action button looks
   like "Contacter le vendeur" — solid emerald, white text, slightly smaller.
   Scoped to the listing page only; the owner's delete button stays red. */
.detail-actions .btn:not(.btn-danger), .detail-actions .fav-btn,
.seller-card .btn {
  background: var(--emerald); color: #fff; border: none;
  padding: 10px 14px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px;
}
.detail-actions .btn:not(.btn-danger):hover, .detail-actions .fav-btn:hover,
.seller-card .btn:hover { background: var(--emerald-dark); }
.detail-actions .fav-btn.on { border: none; color: #fff; }
.seller-card .btn { flex: 1; }
/* LIS-11 (17 Sep 2026, Zak-approved mockup): listing actions live in a compact
   card — grid 2 columns; primary actions (offer, contact) solid emerald,
   secondary (fav, share, report) light. Scoped to the listing page. */
.detail .actions-card { padding: 10px; }
.detail .actions-card .detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 0; }
.detail .actions-card .detail-actions .btn,
.detail .actions-card .detail-actions .fav-btn { padding: 8px 4px; font-size: 12.5px; border-radius: 8px; margin: 0; }
.detail .actions-card #offerBtn { order: 1; }
.detail .actions-card #contactBtn { order: 2; }
.detail .actions-card #favBtn { order: 3; background: #eef4f1; color: var(--emerald); }
.detail .actions-card #favBtn:hover { background: #dfe9e4; }
.detail .actions-card #favBtn.on { background: var(--emerald); color: #fff; }
.detail .actions-card #shareBtn { order: 4; background: #eef4f1; color: var(--emerald); }
.detail .actions-card #shareBtn:hover { background: #dfe9e4; }
.detail .actions-card #repAdBtn { order: 5; grid-column: 1 / -1; background: #eef4f1; color: var(--emerald); }
.detail .actions-card #repAdBtn:hover { background: #dfe9e4; }
.detail .actions-card #editBtn { order: 6; }
.detail .actions-card #delBtn { order: 7; }
/* LIS-11: compact seller card on the listing page (mockup round 2). */
.detail .seller-card { padding: 10px; }
.detail .seller-card h3 { font-size: 13px; margin-bottom: 4px; }
.detail .seller-card .follow-btn { padding: 6px 12px; font-size: 12px; }
.detail .seller-card .btn { padding: 8px; font-size: 12.5px; border-radius: 8px; }
.detail .seller-card #repUserBtn { background: #eef4f1; color: var(--emerald); }
.detail .seller-card #repUserBtn:hover { background: #dfe9e4; }
/* LIS-11: mobile section order — photos, title/price/meta, actions card,
   seller card, description, details, similar. Column wrappers are flattened
   with display:contents so every section can be ordered individually. */
@media (max-width: 860px) {
  .detail { display: flex; flex-direction: column; }
  .detail > div { display: contents; }
  .detail > div > * { min-width: 0; }
  .detail .gallery { order: 1; }
  .detail .thumbs { order: 2; }
  .detail-side h1 { order: 3; }
  .detail-side .price { order: 4; }
  .detail-side .card-meta { order: 5; }
  /* 0.0.0.14: meta-grid MUST have the same mobile order as the price
     block it replaced — without this it defaults to order:0 and jumps
     above the gallery (the mistake Zak forbade). */
  .detail-side .meta-grid { order: 5; }
  .detail-side .stat-row { order: 6; }
  .detail .actions-card { order: 7; }
  .detail .seller-card { order: 8; }
  .detail #rateBox { order: 9; }
  .detail .desc-box { order: 10; }
  .detail .answers-box { order: 11; }
  .detail #matchesBox { order: 12; }
}
.seller-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 20, .05);
}

/* ---------- bell badge (nav bell added in app.js — see snippet-nav-market.txt) */
.bell { position: relative; text-decoration: none; font-size: 20px; min-width: 44px; min-height: 44px;
        display: inline-flex; align-items: center; justify-content: center; }
.bell .badge {
  position: absolute; top: 4px; inset-inline-end: 4px;
  background: #b91c1c; color: #fff; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
  border: 2px solid #fff;
  animation: badge-pop 200ms ease;
}
@keyframes badge-pop {
  from { transform: scale(.4); } to { transform: scale(1); }
}

/* ---------- detail page gallery thumbs: bigger tap areas ---------------------- */
.thumbs img { width: 76px; height: 76px; }
.thumbs { display: flex; gap: 8px; }

/* ---------- reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
  .btn, .chip, .fav-btn, .card, .dlg, .dlg-overlay, .alert { animation: none; transition: none; }
}

/* Tips ticker — auto-rotating safety tips (15 Sep 2026, ported from the Android app) */
.tips-ticker {
  display: flex; align-items: center; gap: 8px;
  background: #fff8e6; border: 1px solid #f0dfae; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 12px; cursor: pointer;
  font-size: 13px; color: #6b5518; min-height: 20px;
}
.tips-icon { flex-shrink: 0; }
.tips-text { transition: opacity .35s ease, transform .35s ease; }
.tips-text.tips-out { opacity: 0; transform: translateY(6px); }
.tips-text.tips-in { opacity: 1; transform: translateY(0); }

/* AUTH: button loading spinner (auth.js / account.js setAuthLoading) */
.btn-spinner {
  display: inline-block;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: .65;
  vertical-align: -.15em;
  margin-inline-end: 6px;
  animation: btnspin .7s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }
.btn[aria-busy="true"] { cursor: wait; }

/* PUBLISH — publish flow: progress indicator, photo hints/notices */
#pubProg { margin: 12px 0 2px; }
.pp-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.pp-fill { height: 100%; background: #0b6b4f; border-radius: 4px; transition: width .2s ease; }
.pp-label { margin-top: 6px; font-size: 13px; color: #4b5563; }
.photo-hint { font-size: 12px; color: #6b7280; margin: 2px 0 6px; }
.photo-warn { margin-top: 8px; font-size: 13px; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 8px; padding: 8px 10px; }
@media (prefers-color-scheme: dark) {
  .pp-bar { background: #374151; }
  .pp-label { color: #9ca3af; }
  .photo-hint { color: #9ca3af; }
  .photo-warn { color: #fcd34d; background: #3f2f0b; border-color: #92600e; }
}

/* CORE — core-area fixes (feed/listing/i18n), namespaced to avoid collisions */
/* Thumbnail strip: never overflow a 390px viewport — with 5+ photos the
   fixed 76px thumbs overflowed; horizontal scroll keeps them reachable. */
.thumbs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.thumbs img { flex: 0 0 auto; }
/* M13: subtle notice shown when the price index is missing/building and the
   feed fell back to client-side sorting — informational, never an error. */
.notice-subtle {
  grid-column: 1 / -1;
  margin: 4px 2px 10px;
  padding: 8px 12px;
  font-size: 13px;
  text-align: center;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
@media (prefers-color-scheme: dark) {
  .notice-subtle { color: #9ca3af; background: #1f2937; border-color: #374151; }
}

/* SOCIAL (chat / conversations / favorites / alerts repair, 15 Sep 2026) */
/* Persistent send-status bar on chat.html: sits between the thread and the
   composer. .info = transient progress (sending photo); default = failed
   send with a retry button. */
.chat-status {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 12px; font-size: 14px; text-align: center;
  background: #fef2f2; border-top: 1px solid #fca5a5; color: #991b1b;
}
.chat-status.info { background: #eff6ff; border-top-color: #93c5fd; color: #1e40af; }
.chat-status .btn { flex: 0 0 auto; }
/* "New messages" pill: appears when a message arrives while the user is
   reading history; taps scroll to the bottom. */
.new-msg-pill {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%);
  z-index: 40; border: none; cursor: pointer;
  background: #0b6b4f; color: #fff; font-size: 13px; font-weight: 700;
  border-radius: 999px; padding: 8px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.new-msg-pill:active { transform: translateX(-50%) scale(0.97); }
@media (prefers-color-scheme: dark) {
  .chat-status { background: #3f1d1d; border-top-color: #7f1d1d; color: #fecaca; }
  .chat-status.info { background: #1e3a5f; border-top-color: #1e40af; color: #bfdbfe; }
}

/* ===== nav repair (v54) — drawer identity, organized menu, touch targets ===== */
.drawer-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.drawer-identity {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; background: #f8faf9; border-bottom: 1px solid var(--line);
  min-height: 80px; color: var(--ink);
}
a.drawer-identity { cursor: pointer; }
.drawer-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  background: var(--emerald-light); color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; overflow: hidden;
}
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-id-meta { flex: 1; min-width: 0; }
.drawer-id-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-id-user { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-identity-err .drawer-id-name { font-size: 14px; font-weight: 600; }
.unverified-badge {
  display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700;
  background: #fef3c7; color: #92400e; border: 1px solid #f59e0b;
  padding: 2px 8px; border-radius: 999px;
}
/* identity skeleton shimmer */
.skel { position: relative; overflow: hidden; background: #e5e7eb !important; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: skel-shimmer 1.2s infinite;
}
@keyframes skel-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-line { height: 14px; border-radius: 6px; margin: 5px 0; }
.skel-line.short { width: 55%; }
/* danger-zone entry (delete account) — clearly visible, separated */
.drawer-danger {
  color: var(--red) !important; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px; border-radius: 8px; font-size: 16px; min-height: 52px;
}
.drawer-danger:hover { background: #fee2e2; }
.drawer-danger.active { background: #fee2e2; }
/* prominent logout pinned at the drawer bottom */
.drawer-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.drawer-logout-btn { width: 100%; min-height: 52px; font-size: 16px; }
/* drawer group labels (v54 nav reorganization, 16 Sep 2026) */
.drawer-group-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 14px 12px 6px;
}
.drawer-nav > .drawer-group-label:first-child { padding-top: 6px; }
/* drawer entries that run JS instead of navigating (support thread) */
button.drawer-link {
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; width: 100%; text-align: start;
  padding: 14px 12px; border-radius: 8px; color: var(--ink);
  font-weight: 600; font-size: 16px; min-height: 52px;
}
button.drawer-link:hover { background: #eef3f0; }
/* app promo banner must never collide with the open drawer */
body.drawer-open #appBanner { display: none; }
/* desktop account dropdown (>640px) — carries the 7 drawer entries + logout */
.account-menu { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.account-toggle {
  background: none; border: none; color: #fff; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  min-height: 44px; cursor: pointer; border-radius: 8px; white-space: nowrap;
  max-width: 220px;
}
.account-toggle:hover { background: rgba(255,255,255,.12); }
.account-toggle.active { background: rgba(255,255,255,.18); }
.account-toggle-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px;
}
.account-toggle .caret { font-size: 11px; opacity: .8; transition: transform .15s; flex-shrink: 0; }
.account-menu.open .account-toggle .caret { transform: rotate(180deg); }
.account-dropdown {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 230px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
  padding: 6px; display: none; z-index: 120;
}
.account-menu.open .account-dropdown { display: block; }
.account-dropdown a {
  display: flex; align-items: center; padding: 12px; border-radius: 8px;
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none;
  min-height: 48px;
}
.account-dropdown a:hover { background: #eef3f0; }
.account-dropdown a.active { background: #e8f5ee; color: var(--emerald); font-weight: 700; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.acct-logout-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 48px;
  background: none; border: none; color: var(--red);
  font-weight: 700; font-size: 15px; padding: 12px; border-radius: 8px; cursor: pointer;
}
.acct-logout-btn:hover { background: #fee2e2; }
/* account page sections */
.acc-section { margin-bottom: 26px; scroll-margin-top: 76px; }
.acc-h { font-size: 20px; margin-bottom: 12px; }
.acc-h.danger { color: var(--red); }
.acc-danger .privacy-section { border: 2px solid #fecaca; border-radius: var(--radius); padding: 16px; background: #fff7f7; }
.settings-lang { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.settings-lang-btn { min-height: 44px; min-width: 64px; }
/* Settings page: grouped rows with consistent spacing/alignment */
.settings-sub { font-size: 15px; margin: 16px 0 4px; color: #374151; }
.settings-list { display: flex; flex-direction: column; }
.settings-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 4px; min-height: 56px;
  background: none; border: 0; border-bottom: 1px solid #e5e7eb;
  font: inherit; color: inherit; text-align: start; text-decoration: none;
  cursor: pointer;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row-ico { font-size: 20px; flex: 0 0 auto; }
.settings-row-txt { flex: 1 1 auto; display: flex; flex-direction: column; }
.settings-row-title { font-weight: 600; }
.settings-row-desc { font-size: 13px; color: #6b7280; margin-top: 2px; }
.settings-row-go { color: #9ca3af; flex: 0 0 auto; font-size: 18px; }
[dir="ltr"] .settings-row-go { transform: scaleX(-1); }
/* touch targets ≥44px across the chrome */
.drawer-nav a { min-height: 52px; display: flex; align-items: center; }
.drawer-close { min-width: 44px; min-height: 44px; }
.drawer-lang .lang-btn { min-height: 44px; font-size: 14px; }
#site-header .lang-btn { min-height: 44px; min-width: 44px; }
.hamburger { min-width: 44px; min-height: 44px; justify-content: center; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; }
/* 390px: identity never overflows, labels ellipsize */
@media (max-width: 640px) {
  .drawer-identity { padding: 12px; }
  .drawer-avatar { width: 48px; height: 48px; font-size: 22px; }
  /* NAV-8 (16 Sep 2026): the desktop .account-menu{display:flex} rule sits
     ABOVE this block, so the mobile hide MUST live down here — same
     specificity means file order wins, and an earlier hide loses. */
  .account-menu { display: none; }
}

/* VIT-1 (16 Sep 2026): Vitrine showcase card in the home feed.
   Design 2 — Light Gold Elegance (chosen by Zak 16 Sep 2026). */
/* Vitrine — Minimal Editorial (Design 3, chosen by Zak 16 Sep 2026) */
.vitrine-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 12px;
  margin: 4px 0;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .07);
  /* Full-width horizontal (16 Sep 2026): spans the entire feed grid */
  grid-column: 1 / -1;
}
.vitrine-head {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit;
}
.vitrine-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vitrine-name {
  font-weight: 800; font-size: 20px; color: #111; letter-spacing: -.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vitrine-name em { font-style: normal; color: #0a5c3e; }
.vitrine-name .vbadge { color: #0a5c3e; font-size: 14px; }
.vitrine-meta { display: flex; gap: 8px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.vitrine-card .pro-badge {
  color: #fff; background: #111; border: none;
  border-radius: 20px; padding: 3px 12px; margin-inline-start: 0;
}
.vitrine-sub { color: #888; font-size: 11px; }
.vitrine-tag { display: none; }
.vitrine-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 10px;
}
.vitrine-thumb {
  display: block; border-radius: 12px; overflow: hidden;
  aspect-ratio: 1; background: #f4f5f7;
  transition: transform .15s;
}
.vitrine-thumb:hover { transform: scale(1.04); }
.vitrine-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vitrine-cta {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid #f0f0f0;
  text-decoration: none; color: inherit;
}
.vitrine-cta span:first-child { font-size: 13px; font-weight: 700; color: #111; }
.vitrine-arrow {
  width: 34px; height: 34px; border-radius: 50%; background: #111; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none;
}
/* Pro-merchant gold badge (16 Sep 2026) */
.pro-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #5c4510; background: linear-gradient(135deg, #f6e7bd, #e8c96a);
  border: 1px solid #d9b64a; border-radius: 12px;
  padding: 1px 8px; margin-inline-start: 4px; white-space: nowrap;
}
/* Pro store cover banner */
.seller-card-pro { overflow: hidden; }
.store-cover {
  height: 120px; background-size: cover; background-position: center;
  margin: -16px -16px 12px -16px;
}
.store-bio {
  color: var(--muted); font-size: 14px; margin: 6px 0 0; line-height: 1.5;
}
/* Pro store category tabs */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cat-tab {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13px; cursor: pointer; color: var(--text);
}
.cat-tab.active {
  background: var(--emerald); color: #fff; border-color: var(--emerald);
  font-weight: 700;
}
.seller-search {
  flex: 1 1 200px; min-width: 160px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); color: var(--text); font-size: 13px;
}
/* Seller page tabs (16 Sep 2026) */
.seller-tabs { display: flex; gap: 8px; }
.seller-tab {
  flex: 1; padding: 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text);
}
.seller-tab.active {
  background: var(--emerald); color: #fff; border-color: var(--emerald);
}
/* Royal Gold Boutique — Design A (chosen by Zak 16 Sep 2026) */
/* Elegant storefront: compact, refined, gold-on-cream luxury */
.boutique-hero {
  border-radius: 16px; overflow: hidden; margin-bottom: 4px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217,182,74,.14) 0, transparent 55%),
    linear-gradient(180deg, #fffdf8 0%, #fbf4e0 100%);
  border: 1.5px solid #d9b64a;
  box-shadow: 0 4px 16px rgba(217, 182, 74, .22), inset 0 1px 0 #fff;
  position: relative;
}
.boutique-hero::before {
  content: ''; display: block; height: 4px;
  background: linear-gradient(90deg, #b8942e, #f3d67c 30%, #d9b64a 50%, #f3d67c 70%, #b8942e);
}
.boutique-hero-top {
  text-align: center; padding: 10px 14px 8px;
}
.boutique-welcome {
  font-size: 12px; color: #8a6d2b; letter-spacing: .5px; font-weight: 600;
  padding-top: 2px;
}
.boutique-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px; font-weight: 700; color: #2e2408;
  margin: 4px 0 1px; letter-spacing: .5px;
}
.boutique-uname {
  font-size: 11px; color: #a08c4a; margin-bottom: 6px; letter-spacing: .3px;
}
.boutique-rule {
  display: flex; align-items: center; gap: 8px;
  margin: 2px auto 8px; max-width: 220px;
}
.boutique-rule::before, .boutique-rule::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, #d9b64a, transparent);
}
.boutique-rule span { color: #d9b64a; font-size: 10px; }
.boutique-badges {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.boutique-badges .pro-badge {
  font-size: 10px; padding: 3px 12px; letter-spacing: .3px;
  box-shadow: 0 1px 4px rgba(184,148,46,.35);
}
.delivery-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: #0a5c3e; background: linear-gradient(180deg, #f2faf5, #e4f2e9);
  border: 1px solid #0a5c3e; border-radius: 12px;
  padding: 3px 12px; white-space: nowrap; letter-spacing: .2px;
}
.boutique-foot {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px 12px 12px;
}
.boutique-since {
  font-size: 10.5px; color: #b3a05e; letter-spacing: .3px;
  border-top: 1px solid #eee2bc; padding-top: 7px;
}
.boutique-bio-box {
  margin: 6px 10px 0; padding: 6px 8px;
  background: #fff; border: 1px solid #f0e6c8; border-radius: 8px;
  font-size: 11px; color: #5a4d20; line-height: 1.45; text-align: center;
}
.boutique-stats-box {
  display: flex; justify-content: center; gap: 8px;
  margin: 8px 12px 10px;
}
.boutique-stat {
  flex: 1; max-width: 110px; text-align: center;
  background: #fff; border: 1px solid #e8d9a8; border-radius: 10px;
  padding: 6px 4px;
}
.boutique-stat b { display: block; font-size: 15px; color: #7a5c14; }
.boutique-stat span { font-size: 10px; color: #a08c4a; }
.boutique-search {
  border-radius: 12px; padding: 11px 14px; font-size: 14px;
  border: 1.5px solid #d9b64a; background: #fff;
  box-shadow: 0 2px 8px rgba(217,182,74,.15);
}
.boutique-search:focus { outline: none; border-color: #b8942e; box-shadow: 0 2px 12px rgba(217,182,74,.3); }
.store-grid .card {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 2px solid #d9b64a;
  box-shadow: 0 3px 12px rgba(217, 182, 74, .25);
  transition: transform .15s, box-shadow .15s;
}
.store-grid .card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(217,182,74,.35); }
.store-grid .card-price { color: #7a5c14; }
.store-grid .card-title { color: #4a3d15; }
.store-grid .card-meta { color: #a08c4a; }
/* Ordinary seller ads header */
.seller-ads-hero {
  text-align: center; padding: 18px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); margin-bottom: 4px;
}
.seller-ads-title { font-size: 19px; font-weight: 800; }
.seller-ads-count { color: var(--muted); font-size: 13px; margin-top: 4px; }
/* Legacy store-hero (replaced by boutique-hero) */
.store-hero-card {
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #0a5c3e 0%, #0e7a52 100%);
  color: #fff; box-shadow: 0 4px 16px rgba(10, 92, 62, .25);
}
.store-hero-cover {
  height: 120px; background-size: cover; background-position: center;
}
.store-hero-body { padding: 16px; }
.store-hero-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.store-hero-title .pro-badge { font-size: 12px; }
.store-hero-bio { font-size: 14px; opacity: .9; margin: 8px 0; line-height: 1.5; }
.store-hero-count { font-size: 13px; opacity: .8; margin-top: 8px; }
.store-grid .card { border: 1.5px solid #d9b64a; }
/* Pro store analytics (private to merchant) */
.analytics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.analytics-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px; text-align: center;
}
.analytics-num { font-size: 22px; font-weight: 800; color: var(--emerald); }
.analytics-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.analytics-top { display: flex; flex-direction: column; gap: 6px; }
.analytics-top-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px;
}
.analytics-top-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.analytics-top-views { color: var(--muted); white-space: nowrap; }
.vitrine-grid {
  display: flex; gap: 8px; overflow-x: auto; margin-top: 10px;
  padding-bottom: 4px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.vitrine-grid::-webkit-scrollbar { height: 4px; }
.vitrine-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.vitrine-thumb {
  display: block; flex: 0 0 120px; width: 120px; aspect-ratio: 1;
  border-radius: 8px; overflow: hidden; scroll-snap-align: start;
  background: #eef3f0; border: 1px solid var(--line);
}
.vitrine-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* v101 (16 Sep 2026, Zak-approved): follow system.
   - Follow button on the vitrine card header, opposite the store name.
   - Likes badge overlaid on the mini-listing thumbnail.
   - Price + condition caption under each mini-listing. */
a.vitrine-id { text-decoration: none; color: inherit; }
.follow-btn {
  flex: 0 0 auto; margin-inline-start: auto;
  background: var(--emerald); color: #fff; border: none;
  padding: 8px 14px; border-radius: 20px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.follow-btn:hover { background: var(--emerald-dark); }
.follow-btn.on {
  background: #e7f2ec; color: var(--emerald);
  border: 1px solid var(--emerald);
}
.vitrine-thumb { position: relative; }
.badge-likes { background: rgba(0, 0, 0, .55); }
.vitrine-mini { flex: 0 0 120px; width: 120px; }
.vitrine-mini .vitrine-thumb { flex: none; width: 100%; }
.vitrine-mini-info {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 6px; font-size: 12px; line-height: 1.3;
}
.vitrine-mini-price { font-weight: 800; color: #111; }
.vitrine-mini-price .price-num { font-weight: 800; }
.vitrine-mini-cond { color: var(--muted); }
/* 16 Sep 2026 (Zak): publish date next to the condition on vitrine minis,
   and a tappable favorite heart on the thumbnail (smaller than the
   feed-card heart, still a 30px touch target). */
.vitrine-mini-meta { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.vitrine-mini-date { color: var(--muted); font-size: 11px; }
.fav-heart.vitrine-fav {
  width: 30px; height: 30px; font-size: 15px;
  inset-inline-start: 6px; top: 6px;
}
/* My-follows rows (my-follows.html) */
.follow-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
}
.follow-row .follow-id { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.follow-row .follow-name { font-weight: 800; font-size: 16px; }
.follow-row .follow-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.follow-row .btn-sm { flex: 0 0 auto; }
/* v101 follow-notif (Zak, 16 Sep 2026): recent-followers list on the owner's
   own profile page — avatar + name rows linking to each follower. */
.recent-followers { display: flex; flex-direction: column; gap: 8px; }
.rf-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
}
.rf-row .avatar { width: 36px; height: 36px; font-size: 16px; flex: 0 0 auto; }
.rf-name { font-weight: 700; font-size: 14px; }
.rf-name .uname { color: var(--muted); font-weight: 400; font-size: 12px; }

/* v101 ext (Zak, 16 Sep 2026): «جديد من متابَعيك» section — latest listings
   from followed users, last 7 days, max 3 per user. Horizontal snap row
   near the top of the default feed. */
.follows-section { margin: 0 0 18px; }
.follows-title {
  font-size: 16px; font-weight: 800; margin: 2px 2px 10px;
  display: flex; align-items: center; gap: 6px;
}
.follows-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.follows-row .card {
  flex: 0 0 172px; width: 172px; scroll-snap-align: start;
}
/* "جديد" badge inside متابعاتي rows — replaces push notifications. */
.badge-new {
  display: inline-block; background: var(--emerald); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px;
  margin-inline-start: 7px; vertical-align: middle; white-space: nowrap;
}

/* P2 (16 Sep 2026): chat photo with fallback */
.msg-photo-wrap {
  width: 200px; height: 150px; border-radius: 8px;
  background-color: #f0f0f0;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.msg-photo-wrap.has-photo .msg-photo-fallback { display: none; }
.msg-photo-fallback {
  font-size: 12px; color: var(--muted);
  padding: 8px; text-align: center;
}

/* Store verification review (admin) — 16 Sep 2026 */
.store-req {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 12px; background: #fff;
}
.store-req-head { font-size: 16px; margin-bottom: 8px; }
.cond-list { list-style: none; margin: 0 0 8px; padding: 0; }
.cond-list li { padding: 4px 0; font-size: 14px; }
.cond-ok .cond-mark { color: #0b6b4f; font-weight: bold; }
.cond-bad { color: #b3261e; }
.cond-bad .cond-mark { font-weight: bold; }
.cond-detail { color: var(--muted); font-size: 12px; }
.cond-manual-title { font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.cond-manual-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
label.cond-manual { display: flex; align-items: center; gap: 8px; font-size: 14px;
  color: var(--ink); padding: 6px 4px; cursor: pointer; }
label.cond-manual input[type="checkbox"] { width: 18px; height: 18px; accent-color: #0b6b4f; flex: none; }
.store-req-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.store-req-actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* v101 fix (16 Sep 2026): the follow button must be visible on the pro
   boutique tab — sellerBox (which holds the profile-card follow button)
   is hidden there, so the hero carries its own follow row. */
.boutique-followrow {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 10px 0 4px; flex-wrap: wrap;
}
.boutique-fcount { font-size: 13px; opacity: .9; }
.boutique-fcount b { font-weight: 800; }

/* 0.0.0.3 (Zak): the old centered "welcome" hero was too tall and
   disorganized, and the follow button floated mid-card. Compact hero:
   identity row, meta row, then a full-width follow button in a clear spot. */
.boutique-compact { padding: 16px 18px; }
/* 0.0.0.5 (Zak): remove the long gold line at the top of the card. */
.boutique-compact::before { display: none; }
.bh-idrow { display: flex; align-items: center; gap: 12px; }
.bh-idrow .avatar { width: 60px; height: 60px; font-size: 26px; flex: none; }
.bh-id { min-width: 0; }
.bh-name {
  font-size: 19px; font-weight: 800; color: #2e2408;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.bh-name .pro-badge { font-size: 10px; }
.bh-sub { font-size: 12.5px; color: #8a6d2b; margin-top: 2px; }
.bh-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #eee2bc;
  font-size: 12.5px; color: #8a6d2b;
}
.bh-meta .boutique-fcount { font-size: 12.5px; }
.bh-follow { width: 100%; margin-top: 10px; padding: 12px; font-size: 16px; }
/* 0.0.0.9 (17 Sep 2026): rich pro store page (approved mockup) — cover
   banner, overlapping store logo, bio. */
.boutique-store { padding: 0 0 16px; }
.store-cover-hero {
  height: 110px; border-radius: 14px 14px 0 0;
  background-size: cover; background-position: center;
  background-color: #0d5c3f;
}
.boutique-store .bh-idrow { padding: 0 18px; align-items: flex-end; }
.boutique-store .bh-overlap { margin-top: -30px; }
.store-logo {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  object-fit: cover; border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); background: #0d5c3f;
}
.store-logo-letter {
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
}
.store-bio-hero {
  font-size: 13px; color: #6b5a2e; margin: 6px 0 0; line-height: 1.5;
}
.boutique-store .bh-meta { margin: 10px 18px 0; }
