/* ==========================================================================
   Header
   ========================================================================== */

/* One sticky container for the whole header — both rows move and stick
   together as a single rigid unit. (Two independently-sticky rows sharing
   a plain, non-positioned parent is a known sticky-positioning trap: the
   second row's stick range ends up confined and it silently scrolls away
   with the page instead of stopping under row 1.) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 247, 250, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(245, 247, 250, 0.98); }

.site-header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.site-header-row .container { display: flex; align-items: center; gap: var(--space-6); }

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.brand-word { font-weight: 800; font-size: var(--text-lg); color: var(--navy); }
.footer-brand .brand-word, .footer-bottom .brand-word { color: #fff; }

/* Real Souqly mark (assets/brand/logo-icon-white.png), recolored via CSS
   mask so the one asset serves both the navy header and the white footer —
   see buildBrand() in js/nav.js for why this replaced a generic bag icon. */
.brand-mark {
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--navy);
  -webkit-mask-image: url('../assets/brand/logo-icon-white.png');
  mask-image: url('../assets/brand/logo-icon-white.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.footer-brand .brand-mark, .footer-bottom .brand-mark { background-color: #fff; }

.header-search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding-inline: var(--space-4);
  height: 44px;
  color: var(--muted);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.header-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 59, 102, 0.1); }
.header-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
}

.header-actions { display: flex; align-items: center; gap: var(--space-3); margin-inline-start: auto; flex-shrink: 0; }

.nav-text-link { font-size: var(--text-sm); font-weight: 700; color: var(--ink); white-space: nowrap; }
.nav-text-link:hover { color: var(--navy); }

.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  position: relative;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav-icon-link:hover { background: var(--bg-soft); color: var(--navy); }
.nav-bell-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  min-width: 16px;
  height: 16px;
  padding-inline: 3px;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  border: 2px solid #fff;
}
.mkt-bell-link { color: rgba(255, 255, 255, 0.9); }
.mkt-bell-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.mkt-bell-link .nav-bell-badge { border-color: var(--navy, #123B66); }

.sell-cta { flex-shrink: 0; }

.lang-switch { position: relative; }
.lang-switch-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem; font-size: var(--text-xs); font-weight: 700; color: var(--ink); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.lang-switch-btn:hover { border-color: var(--navy); background: var(--bg-soft); }
.lang-switch-btn svg { width: 13px; height: 13px; color: var(--muted); transition: transform var(--dur-fast) var(--ease-out); }
.lang-switch.is-open .lang-switch-btn svg { transform: rotate(180deg); }
.lang-menu {
  /* display:none (not just opacity:0) — an absolutely-positioned dropdown
     still contributes to the page's scrollable overflow even at opacity 0
     when it isn't display:none, which was inflating scrollHeight and
     leaving a gap of --bg below the footer on short-content pages. */
  display: none;
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: var(--space-2); min-width: 150px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 10;
}
.lang-switch.is-open .lang-menu { display: block; opacity: 1; transform: none; }
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; text-align: start; padding: var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}
.lang-menu button:hover { background: var(--bg-soft); }
.lang-menu button[aria-checked="true"] { color: var(--navy); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: flex; }

.mobile-nav {
  /* Falls back to --header-h (fixed token) before JS has measured the real,
     possibly-taller (homepage's search line wraps below the tablet
     breakpoint) header via syncHeaderHeight(). */
  position: fixed; inset: var(--header-total-h, var(--header-h)) 0 0 0; background: var(--bg); z-index: 90;
  padding: var(--space-6) var(--space-5) var(--space-8);
  display: none; flex-direction: column; gap: var(--space-2); overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.mobile-nav.is-open { display: flex; opacity: 1; transform: none; }
.mobile-nav a { font-size: var(--text-lg); font-weight: 700; padding-block: var(--space-3); border-bottom: 1px solid var(--border); }
.mobile-nav .btn { margin-top: var(--space-4); align-self: flex-start; }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .nav-toggle { display: flex; }
  .header-search { max-width: none; }
}
@media (min-width: 901px) {
  .mobile-nav { display: none !important; }
}
@media (max-width: 560px) {
  .header-search { display: none; }
  .site-header-row .container { gap: var(--space-3); }
}

/* ==========================================================================
   Unified marketplace search bar (Home's header-integrated search)
   ========================================================================== */

.market-search {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem;
  display: flex;
  align-items: stretch;
  gap: 2px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.market-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 59, 102, 0.1); }

.market-search-input {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-inline: var(--space-4);
  color: var(--muted);
  /* !important: form controls contribute their intrinsic default size
     (search inputs behave like size="20", ~170px) to a flex ancestor's
     automatic minimum size regardless of this min-width — plain 0 here
     is silently ignored by that calculation, so the search bar overflows
     its own row once labeled sub-controls (location/filters/submit) don't
     leave enough room. Forcing it is the documented fix for nested flex
     containers wrapping <input>. */
  min-width: 0 !important;
}
.market-search-input input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
  min-width: 0;
}

.market-search-divider { width: 1px; background: var(--border); margin-block: var(--space-2); flex-shrink: 0; }

.location-picker { position: relative; flex-shrink: 0; }
.location-picker-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  padding-inline: var(--space-4);
  border: none;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
  max-width: 180px;
}
.location-picker-btn:hover { background: var(--bg-soft); }
.location-picker-btn .location-picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-picker-btn svg:first-child { color: var(--muted); flex-shrink: 0; }
.location-picker-btn svg:last-child { color: var(--muted-soft); flex-shrink: 0; transition: transform var(--dur-fast) var(--ease-out); }
.location-picker.is-open .location-picker-btn svg:last-child { transform: rotate(180deg); }

.location-picker-panel {
  /* display:none by default — see the identical note on .lang-menu above;
     an absolute-positioned panel still inflates page scrollHeight at
     opacity:0 if it isn't also taken out of layout. */
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  width: 320px;
  max-width: 88vw;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 50;
  overflow: hidden;
  flex-direction: column;
}
.location-picker.is-open .location-picker-panel { display: flex; opacity: 1; transform: none; }

.location-picker-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}
.location-picker-search input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: var(--text-sm); color: var(--ink); }

.location-picker-list { max-height: 320px; overflow-y: auto; padding: var(--space-2); }
.location-picker-group-title {
  font-size: var(--text-2xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
  padding: var(--space-3) var(--space-3) var(--space-1);
}
.location-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3);
  border: none;
  background: none;
  text-align: start;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.location-picker-option:hover { background: var(--bg-soft); }
.location-picker-option.is-active { color: var(--navy); font-weight: 700; }
.location-picker-option.is-active svg { color: var(--navy); }
.location-picker-empty { padding: var(--space-5); text-align: center; color: var(--muted); font-size: var(--text-sm); }

.market-filters-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  padding-inline: var(--space-4);
  border: none;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.market-filters-btn:hover { background: var(--bg-soft); }
.market-filters-btn svg { color: var(--muted); }
.market-filters-btn .filter-count-badge {
  background: var(--navy);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
}

.market-search-submit { flex-shrink: 0; }

/* ==========================================================================
   Page header (search / category / favorites / messages / account)
   ========================================================================== */

.page-header { padding-block: var(--space-7) var(--space-5); }
.page-title { font-size: var(--text-2xl); }
.page-subtitle { margin-top: var(--space-2); color: var(--muted); font-size: var(--text-sm); }
.results-count { font-size: var(--text-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }

/* ==========================================================================
   Home marketplace header — implements Figma "Redesign Marketplace Header"
   (file eYiRmuVye72KT7Hnc7mYHw, node 1:2) faithfully. Colors, sizes and
   spacing below are the exact Figma values, not the shared design tokens —
   this frame defines its own palette (navy shades, price red, link blue)
   distinct from the rest of the site, scoped entirely to Home so no other
   page's header/tokens change.
   ========================================================================== */

.mkt-header {
  background: #1a3d6b;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}
.mkt-header.is-scrolled { background: #1a3d6b; border-bottom-color: transparent; }

.mkt-header-row-inner,
.mkt-nav-row-inner {
  display: flex;
  align-items: center;
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: 12px;
}
.mkt-header-row-inner { gap: 8px; padding-block: 8px; }
.mkt-nav-row { background: #122d52; }
/* overflow-x:auto without overflow-y here would compute overflow-y to
   "auto" too (CSS Overflow spec), clipping the "Tout"/all-categories
   dropdown menu — it's an absolutely-positioned descendant much taller
   than this 43.5px row. Desktop nav content fits within the 1500px cap
   without needing to scroll at all; the mobile media query below adds
   scroll only where the row can actually overflow. */
.mkt-nav-row-inner { height: 43.5px; gap: 2px; }
.mkt-nav-row-inner::-webkit-scrollbar { display: none; }

.mkt-brand { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 2px; flex-shrink: 0; }
.mkt-brand-mark { width: 28px; height: 28px; background-color: #fff; flex-shrink: 0; }
.mkt-brand-word { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; color: #fff; }
.mkt-brand-tld { font-weight: 600; font-size: 10px; color: rgba(255, 255, 255, 0.65); align-self: flex-end; margin-bottom: 2px; }

.mkt-btn-label { display: block; font-size: 11px; color: #ccc; line-height: 1.2; white-space: nowrap; }
.mkt-link, .mkt-location, .mkt-lang-btn, .mkt-account-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 6px 8px; border-radius: 2px; border: 2px solid transparent; background: none; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.mkt-link:hover, .mkt-location:hover, .mkt-lang-btn:hover, .mkt-account-btn:hover { border-color: rgba(255, 255, 255, 0.4); }
.mkt-link-value, .mkt-location-value, .mkt-account-value {
  display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap;
}
.mkt-location-value .location-picker { flex-shrink: 0; }
.mkt-location-value .location-picker-btn { padding: 0; height: auto; color: #fff; font-size: 13px; font-weight: 700; max-width: 140px; }
.mkt-location-value .location-picker-btn:hover { background: none; }
.mkt-location-value .location-picker-btn svg { color: #fff; }
.mkt-location-value .location-picker-panel { inset-inline-start: 0; color: var(--ink); }
.mkt-link-2line { text-decoration: none; }
.mkt-account-value svg { color: #fff; }
.mkt-lang-btn svg { color: #fff; margin-inline-start: 2px; }

/* Search — "Tout" category scope + input + submit as one visual unit. */
.mkt-search { flex: 662 0 0; min-width: 0; height: 42px; display: flex; border-radius: 4px; overflow: hidden; }
.mkt-search-scope {
  flex-shrink: 0; width: 60px; border: none; background: #f3f3f3; color: #131921; font: inherit; font-size: 12px;
  font-weight: 500; text-align: center; padding-inline: 6px; cursor: pointer; border-inline-end: 1px solid #ddd;
}
.mkt-search-input {
  flex: 1; min-width: 0; border: none; background: #fff; padding-inline: 14px; font: inherit; font-size: 14px; color: #131921;
}
.mkt-search-input:focus { outline: none; }
.mkt-search-submit {
  flex-shrink: 0; width: 46px; border: none; background: #f3f3f3; color: #131921; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mkt-search-submit:hover { background: #e3e3e3; }

.mkt-dropdown { position: relative; }
.mkt-dropdown-menu {
  display: none; position: absolute; inset-inline-start: 0; top: calc(100% + 8px);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: var(--space-2); min-width: 200px; z-index: 20;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mkt-dropdown.is-open .mkt-dropdown-menu { display: block; opacity: 1; transform: none; }
.mkt-dropdown-menu button, .mkt-dropdown-menu a {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; text-align: start; padding: var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; color: var(--ink); cursor: pointer;
}
.mkt-dropdown-menu button:hover, .mkt-dropdown-menu a:hover { background: var(--bg-soft); }
.mkt-dropdown-menu button[aria-checked="true"] { color: var(--navy); }
.mkt-dropdown-menu .mkt-menu-divider { border-top: 1px solid var(--border); margin: var(--space-2) 0; }

.mkt-nav-link {
  display: flex; align-items: center; gap: 6px; height: 100%; padding-inline: 12px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: #fff; border-radius: 2px; border: 2px solid transparent; white-space: nowrap;
  background: none; cursor: pointer;
}
.mkt-nav-link:hover { border-color: rgba(255, 255, 255, 0.4); }
.mkt-all-btn { font-weight: 700; }
.mkt-all-menu { min-width: 220px; max-height: 60vh; overflow-y: auto; }

.mkt-nav-toggle { display: none; border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* width:100% is load-bearing here, not decorative: #main is a column flex
   container (base.css), and a flex item combining margin-inline:auto with
   the default stretch alignment falls back to shrink-to-fit content sizing
   instead of actually stretching — width:100% pins it to the container's
   full size first, then max-width/margin-inline:auto center-cap it normally. */
.mkt-page-margin { width: 100%; max-width: 1500px; margin-inline: auto; padding: 20px 12px; }

/* ---- Hero ---- */
.mkt-hero {
  position: relative; overflow: hidden; border-radius: 8px; padding: 40px 48px;
  background: linear-gradient(168deg, #1a2744 0%, #0d3b6e 100%);
}
.mkt-hero-eyebrow { font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.mkt-hero h1 { margin-top: 8px; font-weight: 800; font-size: 32px; letter-spacing: -0.5px; line-height: 1.2; color: #fff; max-width: 640px; }
.mkt-hero p { margin-top: 12px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.75); max-width: 480px; }
.mkt-hero-cta {
  margin-top: 24px; display: inline-flex; align-items: center; justify-content: center;
  height: 45px; padding-inline: 29px; border-radius: 4px; background: #fff; color: #1a3d6b;
  font-weight: 700; font-size: 14px; position: relative; z-index: 1;
  transition: transform var(--dur-fast) var(--ease-out);
}
.mkt-hero-cta:hover { transform: translateY(-1px); }
.mkt-hero-decor { position: absolute; border-radius: 999px; background: rgba(255, 153, 0, 0.12); pointer-events: none; }
.mkt-hero-decor-1 { width: 260px; height: 260px; top: -30px; inset-inline-end: -20px; }
.mkt-hero-decor-2 { width: 200px; height: 200px; top: 170px; inset-inline-end: -10px; background: rgba(255, 153, 0, 0.08); }

/* ---- Category pill row ---- */
.mkt-pill-row { display: flex; gap: 10px; padding-block: 28px 0; overflow-x: auto; scrollbar-width: none; }
.mkt-pill-row::-webkit-scrollbar { display: none; }
.mkt-pill {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  height: 37.5px; padding-inline: 16px; border-radius: 20px; border: 1px solid #ddd; background: #fff;
  font-size: 13px; font-weight: 500; color: #131921; white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.mkt-pill:hover { border-color: #1a3d6b; background: #f3f3f3; }

/* ---- Section heading row ---- */
.mkt-section-heading { display: flex; align-items: center; justify-content: space-between; padding-block: 28px 16px; gap: var(--space-4); flex-wrap: wrap; }
.mkt-section-heading h2 { font-size: 20px; font-weight: 700; color: #131921; }
.mkt-section-heading a { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: #0066c0; }
.mkt-section-heading a:hover { text-decoration: underline; }

/* ---- Product grid & card (Home-only visual; shared .listing-card is
   unchanged and still used by Search/Favorites/Listing Details) ---- */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mkt-card {
  display: block; background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.mkt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.mkt-card-image { position: relative; height: 160px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-soft); }
.mkt-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.mkt-card:hover .mkt-card-image img { transform: scale(1.04); }
.mkt-card-image .icon { color: var(--muted-soft); }
.mkt-card-badge {
  position: absolute; top: var(--space-2); inset-inline-start: var(--space-2);
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--radius-pill); letter-spacing: 0.02em;
}
.mkt-card-body { padding: 12px; }
.mkt-card-title {
  font-size: 14px; font-weight: 600; color: #131921; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.mkt-card-price { margin-top: 6px; font-size: 18px; font-weight: 800; color: #b12704; }
.mkt-card-meta { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.mkt-card-location { font-size: 12px; color: #767676; display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-card-time { margin-top: 6px; font-size: 11px; color: #999; }

.mkt-card.skeleton-card { pointer-events: none; }
.mkt-card-image.skeleton-block { border-radius: 0; }

@media (max-width: 900px) {
  .mkt-nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .mkt-header-row-inner { flex-wrap: wrap; }
  .mkt-search { flex-basis: 100%; order: 5; }
  .mkt-link, .mkt-account-btn { display: none; }
  .mkt-hero { padding: 28px 20px; }
  .mkt-hero h1 { font-size: 24px; }
  .mkt-hero p { display: none; }
  .mkt-grid { grid-template-columns: repeat(2, 1fr); }
  /* Only scoped to mobile: the full category list is always reachable via
     the hamburger drawer here, so the "Tout" dropdown being clipped by this
     same scroll container (unavoidable — see the desktop rule above) isn't
     a dead end. */
  .mkt-nav-row-inner { overflow-x: auto; }
}
@media (max-width: 560px) {
  .mkt-location .mkt-btn-label { display: none; }
}

/* ==========================================================================
   Listing grid & card
   ========================================================================== */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.listing-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }

.card-image { position: relative; aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.listing-card:hover .card-image img { transform: scale(1.04); }
.card-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted-soft); }

.card-favorite {
  position: absolute;
  top: var(--space-2);
  inset-inline-end: var(--space-2);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.card-favorite:hover { transform: scale(1.08); }
.card-favorite:active { transform: scale(0.94); }
.card-favorite.is-active { color: var(--red); }
.card-favorite.is-pending { opacity: 0.6; }

.card-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.card-price { font-weight: 800; font-size: var(--text-base); color: var(--ink); }
.card-title {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.card-location {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-2xs);
  color: var(--muted-soft);
}
.card-location .icon { color: var(--muted-soft); }

@media (max-width: 560px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}

/* ==========================================================================
   Mobile filter drawer (shared shell — used by Search Results' sidebar)
   ========================================================================== */

.filter-drawer-overlay {
  position: fixed; inset: 0; background: var(--overlay, rgba(12, 29, 43, 0.4));
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out);
}
.filter-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.filter-drawer {
  position: fixed; inset-inline-end: 0; top: 0; bottom: 0; width: min(340px, 88vw);
  background: var(--bg); z-index: 201; padding: var(--space-5);
  transform: translateX(100%); transition: transform var(--dur-base) var(--ease-out);
  overflow-y: auto; display: flex; flex-direction: column;
}
[dir="rtl"] .filter-drawer { transform: translateX(-100%); }
.filter-drawer.is-open { transform: none; }
.filter-drawer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.filter-drawer-footer { margin-top: auto; padding-top: var(--space-5); display: flex; gap: var(--space-3); }

/* ==========================================================================
   Shared seller identity bits (also used by account.js)
   ========================================================================== */

.seller-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--text-base); flex-shrink: 0;
}
.seller-menu-wrap { position: relative; flex-shrink: 0; }
.seller-menu {
  display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: var(--space-2); min-width: 200px;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  z-index: 20;
}
.seller-menu-wrap.is-open .seller-menu { display: block; opacity: 1; transform: none; }
.seller-menu button {
  display: flex; align-items: center; gap: var(--space-2); width: 100%; white-space: nowrap;
  background: none; border: none; text-align: start; padding: var(--space-3);
  border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; color: var(--ink); cursor: pointer;
}
.seller-menu button:hover { background: var(--bg-soft); }
.seller-menu button.is-danger { color: var(--red); }

/* ==========================================================================
   Sell form
   ========================================================================== */

.sell-form { max-width: 640px; margin-inline: auto; display: grid; gap: var(--space-7); }
.sell-photo-input {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  max-width: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  color: var(--muted);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.sell-photo-input:hover { border-color: var(--navy); background: var(--bg-soft); }
.sell-photo-input img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sell-photo-input input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sell-photo-remove {
  position: absolute; top: var(--space-2); inset-inline-end: var(--space-2); z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(12,29,43,0.65); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.sell-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) { .sell-grid-2 { grid-template-columns: 1fr; } }
.sell-notice { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--amber-bg); color: #7C4A08; font-size: var(--text-xs); }
.sell-preview-card { margin-top: var(--space-2); }

/* ==========================================================================
   Messages
   ========================================================================== */

.messages-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-height: 60vh; background: var(--card); }
@media (max-width: 1024px) { .messages-layout { grid-template-columns: 280px 1fr; } }
@media (max-width: 780px) {
  .messages-layout { grid-template-columns: 1fr; }
  /* Master-detail on mobile: only one panel shows at a time, driven by
     data-active (set in js/pages/messages.js), not a scaled-down desktop layout. */
  .messages-layout[data-active="thread"] .conversation-list { display: none; }
  .messages-layout:not([data-active="thread"]) .thread-panel { display: none; }
}
.thread-back { display: none; }
@media (max-width: 780px) { .thread-back { display: inline-flex; } }

/* ---- Inbox (conversation list) ---- */
.conversation-list { display: flex; flex-direction: column; border-inline-end: 1px solid var(--border); overflow: hidden; }
.conv-list-header { flex-shrink: 0; padding: 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.conv-search { position: relative; }
.conv-search input {
  width: 100%; box-sizing: border-box; height: 38.5px; padding: 8px 12px 8px 32px; font: inherit; font-size: 13px;
  color: #1a1a1a; background: #fff; border: 1.5px solid #e0e0e0; border-radius: 9px;
}
[dir="rtl"] .conv-search input { padding: 8px 32px 8px 12px; }
.conv-search input:focus { outline: none; border-color: #1a3d6b; box-shadow: 0 0 0 3px rgba(26, 61, 107, 0.12); }
.conv-search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none; }
.conv-filter-tabs { display: flex; gap: 6px; }
.conv-filter-tab {
  padding: 6px 13.5px; border-radius: 8px; border: none; background: transparent; color: #666; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.conv-filter-tab:hover { background: #f0f4f9; }
.conv-filter-tab.is-active { background: #1a3d6b; color: #fff; }
.conv-filter-tab .conv-filter-count { font-size: 11px; opacity: 0.85; }

.conversation-rows { flex: 1; overflow-y: auto; }
.conversation-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border);
  border-inline-start: 3px solid transparent; cursor: pointer; transition: background var(--dur-fast) var(--ease-out);
}
.conversation-row:hover { background: #f7f9fc; }
.conversation-row.is-active { background: #e8f0fb; border-inline-start-color: #1a3d6b; }
.conversation-row .conv-avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 800;
  background: linear-gradient(135deg, #1a3d6b 0%, #2a5fa8 100%);
}
.conversation-row .conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conversation-row .conv-info { flex: 1; min-width: 0; }
.conversation-row .conv-info-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.conversation-row .conv-title { font-weight: 600; font-size: 14px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-row.is-unread .conv-title { font-weight: 800; }
.conversation-row .conv-preview { font-size: 13px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conversation-row.is-unread .conv-preview { color: #1a1a1a; font-weight: 600; }
.conversation-row .conv-product-line { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #bbb; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-row .conv-product-line svg { flex-shrink: 0; }
.conversation-row .conv-time { font-size: 11px; color: #bbb; flex-shrink: 0; }
.conversation-row.is-unread .conv-time { color: #1a3d6b; font-weight: 700; }
.conv-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1a3d6b; flex-shrink: 0; }

/* ---- Thread panel ---- */
.thread-panel { display: flex; flex-direction: column; height: 100%; }
.thread-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.thread-header .conv-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800; background: linear-gradient(135deg, #1a3d6b 0%, #2a5fa8 100%);
}
.thread-header .conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-header-name { font-weight: 700; font-size: 15px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.thread-product-card { display: flex; flex-direction: column; gap: 7px; background: #fafbfc; border-bottom: 1px solid #eaeaea; padding: 10px 16px; flex-shrink: 0; }
.thread-product-label { font-size: 11px; font-weight: 700; color: #6b7280; letter-spacing: 0.55px; text-transform: uppercase; }
.thread-product-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #eaeaea; border-radius: 10px; padding: 10px 12px; }
.thread-product-thumb { width: 42px; height: 42px; border-radius: 8px; background: #e8f5e9; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thread-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thread-product-info { flex: 1; min-width: 0; }
.thread-product-title { font-size: 13px; font-weight: 700; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-product-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.thread-product-price { font-size: 14px; font-weight: 900; color: #c0392b; }
.thread-product-condition { background: #f3f4f6; color: #6b7280; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.thread-product-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #1a3d6b; text-decoration: none; flex-shrink: 0; }
.thread-product-link:hover { text-decoration: underline; }

.thread-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.thread-date-divider { display: flex; align-items: center; gap: 12px; margin: 10px 0; color: #999; font-size: 12px; font-weight: 600; }
.thread-date-divider::before, .thread-date-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.msg-bubble-row { display: flex; padding-block: 2px; }
.msg-bubble-row.is-own { justify-content: flex-end; }
.msg-bubble-row.is-other { justify-content: flex-start; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.msg-bubble.is-own { background: #1a3d6b; color: #fff; border-end-end-radius: 4px; }
.msg-bubble.is-other { background: #f3f4f6; color: #1a1a1a; border-end-start-radius: 4px; }
.msg-bubble img { max-width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; }
.msg-bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; font-size: 11px; }
.msg-bubble.is-own .msg-bubble-meta { color: rgba(255, 255, 255, 0.55); }
.msg-bubble.is-other .msg-bubble-meta { color: #9ca3af; }
.msg-bubble-meta svg { flex-shrink: 0; }
.msg-bubble.is-own .msg-bubble-meta .icon.is-read { color: #7ec8ff; }

.thread-composer-wrap { border-top: 1px solid #eaeaea; padding: 12px 16px; flex-shrink: 0; }
.thread-composer {
  display: flex; align-items: flex-end; gap: 8px; background: #f9fafb; border: 1.5px solid #eaeaea; border-radius: 12px;
  padding: 6px 6px 6px 10px;
}
[dir="rtl"] .thread-composer { padding: 6px 10px 6px 6px; }
.thread-composer-tools { display: flex; gap: 2px; flex-shrink: 0; }
.thread-composer-tools button {
  width: 34px; height: 34px; border-radius: 8px; border: none; background: none; color: #666; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.thread-composer-tools button:hover { background: #eef1f5; }
.thread-composer textarea {
  flex: 1; min-width: 0; border: none; background: none; resize: none; font: inherit; font-size: 14px; line-height: 1.5;
  padding: 8px 4px; max-height: 120px;
}
.thread-composer textarea:focus { outline: none; }
.thread-composer-send {
  width: 36px; height: 36px; border-radius: 9px; border: none; background: #e5e7eb; color: #9ca3af; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.thread-composer-send.is-ready { background: #1a3d6b; color: #fff; cursor: pointer; }
.thread-composer-send:disabled { cursor: default; }
[dir="rtl"] .thread-composer-send svg { transform: scaleX(-1); }
.thread-attachment-preview { display: flex; align-items: center; gap: 8px; padding: 8px 0 0; }
.thread-attachment-preview img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.thread-attachment-remove { border: none; background: #f0f0f0; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; }

@media (max-width: 480px) {
  .msg-bubble { max-width: 82%; }
  .thread-product-row { flex-wrap: wrap; }
  .thread-product-link { margin-inline-start: auto; }
}

/* ==========================================================================
   Account
   ========================================================================== */

.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-8); align-items: start; }
@media (max-width: 780px) { .account-layout { grid-template-columns: 1fr; } }
.account-sidebar { padding: var(--space-5); position: sticky; top: calc(var(--header-h) + var(--space-5)); }
.account-identity { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); }
.account-nav { display: grid; gap: var(--space-1); }
.account-nav a, .account-nav button {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  background: none; border: none; text-align: start; cursor: pointer; width: 100%;
}
.account-nav a:hover, .account-nav button:hover { background: var(--bg-soft); }
.account-nav a.is-active { background: var(--navy); color: #fff; }

/* ==========================================================================
   Auth forms
   ========================================================================== */

.auth-banner { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; }
.auth-banner-error { background: #FDEDED; color: #A32626; }
.auth-banner-success { background: var(--green-bg); color: #146C36; }

/* ==========================================================================
   Auth V2 — Login / Signup / Forgot-Reset password
   (Figma eYiRmuVye72KT7Hnc7mYHw, node 69:4329 "signup & login")
   ========================================================================== */
.auth-v2 { min-height: calc(100vh - 0px); display: flex; align-items: stretch; background: #f0f4f8; }
.auth-v2-left { width: 440px; flex-shrink: 0; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(140deg, #122d52 8%, #1a3d6b 46%, #2756a8 92%); }
.auth-v2-left-blob { position: absolute; border-radius: 999px; background: rgba(255,255,255,0.05); pointer-events: none; }
.auth-v2-left-blob-1 { width: 320px; height: 320px; right: -120px; top: -80px; }
.auth-v2-left-blob-2 { width: 260px; height: 260px; left: -100px; bottom: 40px; background: rgba(255,255,255,0.04); }
.auth-v2-left-inner { position: relative; padding: 48px 44px; display: flex; flex-direction: column; height: 100%; }
.auth-v2-brand { display: flex; align-items: center; gap: 12px; }
.auth-v2-brand-mark { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-v2-brand-name { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.auth-v2-mock { position: relative; height: 168px; margin-top: 100px; background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.2); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-v2-mock-row { display: flex; align-items: center; gap: 14px; }
.auth-v2-mock-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.auth-v2-mock-icon.is-dim { background: rgba(255,255,255,0.1); }
.auth-v2-mock-lines { flex: 1; min-width: 0; }
.auth-v2-mock-line { height: 9px; border-radius: 4px; background: rgba(255,255,255,0.3); width: 60%; }
.auth-v2-mock-line.is-short { height: 7px; width: 40%; margin-top: 7px; background: rgba(255,255,255,0.15); }
.auth-v2-mock-check { width: 24px; height: 24px; border-radius: 12px; background: #16a34a; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.auth-v2-mock-divider { height: 1px; background: rgba(255,255,255,0.1); }
.auth-v2-mock-badge { position: absolute; left: 50%; transform: translateX(-50%); bottom: -14px; display: flex; align-items: center; gap: 6px; background: #16a34a; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 14px 6px 10px; border-radius: 20px; box-shadow: 0 4px 8px rgba(22,163,74,0.4); white-space: nowrap; }
.auth-v2-headline { margin-top: 44px; font-size: 28px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.2; }
.auth-v2-features { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-v2-feature { display: flex; align-items: center; gap: 12px; }
.auth-v2-feature-icon { width: 28px; height: 28px; border-radius: 14px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-v2-feature-text { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.85); }
.auth-v2-left-footer { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; gap: 8px; }
.auth-v2-left-footer-dot { width: 6px; height: 6px; border-radius: 3px; background: #4ade80; flex-shrink: 0; }
.auth-v2-left-footer-text { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.55); }

.auth-v2-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.auth-v2-topbar { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 20px 48px; display: flex; align-items: center; gap: 14px; }
.auth-v2-lang-switch { display: flex; gap: 4px; }
.auth-v2-lang-btn { background: #fff; border: 1.5px solid #e2e8f0; color: #64748b; font-weight: 500; font-size: 12px; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.auth-v2-lang-btn.is-active { background: #e8f0fb; border-color: #1a3d6b; color: #1a3d6b; font-weight: 700; }
.auth-v2-home-btn { background: #fff; border: 1.5px solid #e2e8f0; color: #64748b; font-weight: 600; font-size: 12px; padding: 6px 14px; border-radius: 8px; text-decoration: none; }
.auth-v2-home-btn:hover { border-color: #1a3d6b; color: #1a3d6b; }

.auth-v2-card-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 48px; min-height: 0; }
.auth-v2-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); max-width: 420px; width: 420px; padding: 40px 44px; }
.auth-v2-card h1 { font-size: 26px; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; margin: 0; }
.auth-v2-card-subtitle { margin-top: 6px; font-size: 14px; color: #64748b; }
.auth-v2-back-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; margin-bottom: 20px; color: #1a3d6b; font-weight: 700; font-size: 13px; cursor: pointer; }
[dir="rtl"] .auth-v2-back-link svg { transform: scaleX(-1); }

.auth-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; border: 2px solid #e2e8f0; border-radius: 12px; padding: 11px 0; font-size: 14px; font-weight: 600; color: #0f172a; cursor: pointer; margin-top: 28px; }
.auth-google-btn:hover { border-color: #cbd5e1; background: #fafbfc; }
.auth-v2-card > .auth-google-btn:first-child,
.auth-v2-card > *:first-child.auth-google-btn { margin-top: 0; }
.auth-or-divider { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.auth-or-divider::before, .auth-or-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.auth-or-divider span { font-size: 12px; font-weight: 600; color: #64748b; }

.auth-field { margin-top: 18px; }
.auth-field:first-of-type { margin-top: 22px; }
.auth-field label { display: block; font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 7px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; display: flex; pointer-events: none; }
.auth-input-wrap input { width: 100%; height: 47px; background: #fafbfc; border: 2px solid #e2e8f0; border-radius: 10px; padding-inline-start: 42px; padding-inline-end: 14px; font-size: 14px; color: #0f172a; }
.auth-input-wrap input::placeholder { color: rgba(15,23,42,0.4); }
.auth-input-wrap input:focus { outline: none; border-color: #1a3d6b; background: #fff; }
.auth-input-wrap.has-toggle input { padding-inline-end: 42px; }
.auth-input-toggle { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94a3b8; display: flex; cursor: pointer; padding: 0; }
.auth-field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.auth-field-row label { margin: 0; }
.auth-inline-link { background: none; border: none; padding: 0; color: #1a3d6b; font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: none; }

.auth-remember-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.auth-checkbox { width: 18px; height: 18px; border: 2px solid #e2e8f0; border-radius: 5px; accent-color: #1a3d6b; cursor: pointer; }
.auth-remember-row label { font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; }

.auth-primary-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 49px; background: #1a3d6b; color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 4px rgba(26,61,107,0.15); margin-top: 24px; text-decoration: none; }
.auth-primary-btn:hover:not(:disabled) { background: #16335c; }
.auth-primary-btn:disabled { opacity: 0.7; cursor: default; }

.auth-consent-text { margin-top: 18px; font-size: 12px; line-height: 19.2px; color: #64748b; text-align: center; }
.auth-consent-text strong { color: #1a3d6b; font-weight: 700; }

.auth-switch-line { margin-top: 20px; text-align: center; font-size: 13px; color: #64748b; }
.auth-switch-line a, .auth-switch-line button.auth-inline-link { font-weight: 800; font-size: 13px; }

.auth-icon-badge { width: 54px; height: 54px; border-radius: 14px; background: #e8f0fb; color: #1a3d6b; display: flex; align-items: center; justify-content: center; }
.auth-icon-badge.is-round { width: 80px; height: 80px; border-radius: 40px; margin-inline: auto; }
.auth-v2-card h2 { font-size: 24px; font-weight: 900; color: #0f172a; margin: 18px 0 0; }
.auth-v2-card-text { margin-top: 6px; font-size: 14px; line-height: 22.4px; color: #64748b; }
.auth-v2-card-text.is-center { text-align: center; }
.auth-v2-step-center { text-align: center; }
.auth-v2-step-center h2 { margin-top: 24px; }
.auth-v2-email-highlight { margin-top: 8px; font-size: 14px; font-weight: 700; color: #1a3d6b; text-align: center; }
.auth-secondary-link-row { margin-top: 16px; text-align: center; }
.auth-secondary-link-row button.auth-inline-link { font-weight: 500; color: #64748b; font-size: 13px; }

.auth-otp-row { display: flex; gap: 8px; justify-content: center; margin-top: 22px; direction: ltr; }
.auth-otp-digit { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 800; background: #fafbfc; border: 2px solid #e2e8f0; border-radius: 10px; color: #0f172a; }
.auth-otp-digit:focus { outline: none; border-color: #1a3d6b; background: #fff; }

.auth-v2-step { display: none; }
.auth-v2-step.is-active { display: block; }

@media (max-width: 900px) {
  .auth-v2 { flex-direction: column; min-height: 100vh; }
  .auth-v2-left { width: 100%; }
  .auth-v2-left-inner { padding: 32px 28px; }
  .auth-v2-mock, .auth-v2-headline, .auth-v2-features, .auth-v2-left-footer { display: none; }
  .auth-v2-topbar { padding: 16px 20px; flex-wrap: wrap; }
  .auth-v2-card-wrap { padding: 28px 16px 40px; }
  .auth-v2-card { width: 100%; max-width: 420px; padding: 32px 24px; }
}
@media (max-width: 480px) {
  .auth-v2-left-inner { padding: 24px 20px; }
  .auth-v2-card { padding: 28px 18px; border-radius: 16px; }
  .auth-v2-card h1 { font-size: 22px; }
  .auth-otp-digit { width: 40px; height: 48px; font-size: 20px; }
}

/* ==========================================================================
   Small "take it with you" download strip (near footer, not dominant)
   ========================================================================== */

.download-strip { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.download-strip .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding-block: var(--space-6); flex-wrap: wrap; }
.download-strip-copy h3 { font-size: var(--text-lg); }
.download-strip-copy p { margin-top: 4px; color: var(--muted); font-size: var(--text-sm); }
.download-strip-badges { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.store-soon-badge {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 0.6rem 1rem; border-radius: var(--radius-md);
  background: var(--card); border: 1px solid var(--border);
  font-size: var(--text-xs); font-weight: 700; color: var(--muted);
}
.store-soon-badge .soon-tag { font-size: var(--text-2xs); font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: 0.03em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); padding-block: var(--space-9) var(--space-6); }
.footer-top { display: grid; grid-template-columns: minmax(0, 260px) repeat(3, minmax(0, 1fr)) minmax(0, 200px); gap: var(--space-7); padding-bottom: var(--space-7); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: var(--space-3); font-size: var(--text-sm); }
.footer-col h4 { color: #fff; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: var(--space-3); }
.footer-col ul { display: grid; gap: var(--space-2); }
.footer-col a { font-size: var(--text-sm); transition: color var(--dur-fast) var(--ease-out); }
.footer-col a:hover { color: #fff; }
.footer-download h4 { color: #fff; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: var(--space-3); }
.footer-store-badges { display: grid; gap: var(--space-2); }
.footer-store-badges .store-soon-badge { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); color: var(--on-navy-muted); }
.footer-store-badges .soon-tag { color: #F0B856; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-5); font-size: var(--text-xs); flex-wrap: wrap; }
.footer-bottom .lang-switch-btn { border-color: rgba(255,255,255,0.18); color: #fff; }
.footer-bottom .lang-menu { color: var(--ink); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-download { grid-column: span 2; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand, .footer-download { grid-column: span 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Product Details (Figma "Redesign Marketplace Header" file, node 18:2 /
   18:477 / 18:977 — Description / Characteristics / Seller tab states).
   Namespaced `pd-` like `mkt-` is for Home, since this is the same distinct
   visual language (navy #1a3d6b, 12px card radius, #e8e8e8 borders) rather
   than the older var(--navy)/var(--radius-lg) system the rest of the site
   still uses pre-redesign.
   ========================================================================== */

.pd-breadcrumb-bar { background: #fff; border-bottom: 1px solid #e8e8e8; }
.pd-breadcrumb-inner {
  max-width: 1280px; margin-inline: auto; box-sizing: border-box;
  padding: 10px 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.pd-crumb-back { font-size: 13px; font-weight: 600; color: #1a3d6b; background: none; border: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.pd-crumb-back:hover { text-decoration: underline; }
.pd-crumb-back svg { flex-shrink: 0; }
[dir="rtl"] .pd-crumb-back svg { transform: scaleX(-1); }
.pd-crumb-sep { font-size: 13px; color: #666; }
[dir="rtl"] .pd-crumb-sep { display: inline-block; transform: scaleX(-1); }
.pd-crumb-link { font-size: 13px; color: #666; }
.pd-crumb-link:hover { color: #1a3d6b; }
.pd-crumb-current { font-size: 13px; font-weight: 500; color: #333; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pd-main { max-width: 1280px; margin-inline: auto; box-sizing: border-box; padding: 24px 20px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }

.pd-card {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
}

/* ---- gallery ---- */
.pd-gallery { overflow: hidden; }
.pd-gallery-main { position: relative; aspect-ratio: 834 / 420; background: var(--bg-soft); overflow: hidden; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery-main .card-image-placeholder { width: 100%; height: 100%; }
.pd-gallery-actions { position: absolute; top: 16px; inset-inline-end: 16px; display: flex; flex-direction: column; gap: 8px; }
.pd-gallery-actions .icon-btn { width: 40px; height: 40px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.15); border: none; }
.pd-gallery-actions .icon-btn.is-active { color: #e53935; }
.pd-gallery-counter {
  position: absolute; bottom: 16px; inset-inline-end: 16px; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
}
.pd-gallery-thumbs { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #f0f0f0; overflow-x: auto; }
.pd-gallery-thumb {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: 8px; border: 2px solid #e8e8e8; background: #f5f5f5;
  overflow: hidden; cursor: pointer; padding: 0;
}
.pd-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery-thumb.is-active { border-color: #1a3d6b; }

/* ---- tabs ---- */
.pd-tabs-bar { display: flex; border-bottom: 1px solid #e8e8e8; }
.pd-tab {
  flex: 1; padding-block: 14px; background: none; border: none; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 500; color: #666; cursor: pointer; text-align: center;
}
.pd-tab:hover { color: #1a3d6b; }
.pd-tab.is-active { color: #1a3d6b; font-weight: 700; border-bottom-color: #1a3d6b; }
.pd-tab-panel { padding: 20px 24px; }

.pd-description-text { color: #333; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.pd-tag-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.pd-tag { background: #f0f4f9; color: #1a3d6b; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 20px; }

.pd-spec-table { display: flex; flex-direction: column; }
.pd-spec-row { display: flex; border-bottom: 1px solid #f0f0f0; }
.pd-spec-row:nth-child(odd) { background: #f8f9fa; }
.pd-spec-label, .pd-spec-value { flex: 1; min-width: 0; padding: 10px 12px; font-size: 13px; }
.pd-spec-label { color: #666; font-weight: 500; }
.pd-spec-value { color: #222; font-weight: 600; }

.pd-seller-tab-header { display: flex; align-items: center; gap: 16px; }
.pd-seller-tab-header .seller-avatar { width: 60px; height: 60px; font-size: 20px; background: #e8f0fb; color: #1a3d6b; }
.pd-seller-tab-name-row { display: flex; align-items: center; gap: 8px; }
.pd-seller-tab-name { font-size: 16px; font-weight: 700; color: #222; }
.pd-seller-tab-meta { margin-top: 6px; font-size: 12px; color: #888; }
.pd-seller-tab-cta {
  display: block; width: 100%; text-align: center; background: #e8f0fb; border: 1px solid #1a3d6b; color: #1a3d6b;
  font-size: 13px; font-weight: 600; padding: 13px; border-radius: 8px; cursor: pointer;
}
.pd-seller-tab-cta:hover { background: #dbe7f9; }

/* ---- safety + report ---- */
.pd-safety { background: #fffbe6; border: 1px solid #ffe58f; padding: 16px 20px; display: flex; gap: 10px; margin-top: 20px; }
.pd-safety-icon { flex-shrink: 0; color: #b8860b; margin-top: 2px; }
.pd-safety-title { font-size: 13px; font-weight: 700; color: #7d5a00; }
.pd-safety-list { margin-top: 6px; padding-inline-start: 16px; display: grid; gap: 6px; }
.pd-safety-list li { font-size: 12px; color: #8a6d00; line-height: 1.7; }

.pd-report-link {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  padding: 0; cursor: pointer; color: #e53935; font-size: 13px; font-weight: 500;
}
.pd-report-link:hover { text-decoration: underline; }

/* ---- right column: summary / location / seller ---- */
.pd-summary-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-total-h, 105px) + 16px); }

.pd-summary-card { padding: 24px; }
.pd-title { font-size: 20px; font-weight: 800; color: #1a1a1a; line-height: 1.3; }
.pd-badges-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.pd-ref { font-size: 12px; color: #999; }
.pd-sold-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; background: #fee2e2; color: #dc2626; font-size: 11px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; }
.pd-price { padding-top: 16px; font-size: 32px; font-weight: 900; color: #c0392b; letter-spacing: -1px; }
.pd-price-currency { font-size: 18px; font-weight: 600; }
.pd-price-sub { margin-top: 6px; font-size: 12px; color: #888; }

.pd-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }
.pd-btn { border-radius: 8px; font-size: 15px; font-weight: 700; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; width: 100%; }
.pd-btn-primary { background: #1a3d6b; color: #fff; border: none; }
.pd-btn-primary:hover { background: #163457; }
.pd-btn-primary.is-active { background: #16a34a; }
.pd-btn-primary.is-active:hover { background: #128a3e; }
.pd-btn-secondary { background: #fff; color: #1a3d6b; border: 2px solid #1a3d6b; }
.pd-btn-secondary:hover { background: #f0f4f9; }
.pd-btn-tertiary { background: #f8f9fa; color: #555; border: 1px solid #e8e8e8; font-size: 13px; font-weight: 600; padding: 11px; }
.pd-btn-tertiary:hover { background: #f0f0f0; }
.pd-btn-tertiary.is-active { color: #e53935; border-color: #f3c9c8; background: #fdeeee; }
.pd-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pd-meta-row { margin-top: 16px; padding-top: 12px; border-top: 1px solid #f0f0f0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #999; }
.pd-meta-item { display: flex; align-items: center; gap: 4px; }
.pd-meta-time { margin-inline-start: auto; }

.pd-location-card { padding: 16px 20px; }
.pd-card-title { font-size: 13px; font-weight: 700; color: #333; }
.pd-location-row { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.pd-location-icon { width: 36px; height: 36px; border-radius: 8px; background: #e8f0fb; color: #1a3d6b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pd-location-city { font-size: 14px; font-weight: 700; color: #222; }
.pd-location-sub { margin-top: 2px; font-size: 12px; color: #888; }
.pd-map-placeholder {
  margin-top: 10px; height: 110px; border-radius: 8px; border: 1px solid #d0dcf0;
  background: linear-gradient(161deg, #e8f0fb 0%, #c8d8f0 100%);
  display: flex; align-items: center; justify-content: center; color: #1a3d6b;
}

.pd-seller-card { padding: 16px 20px; }
.pd-seller-row { display: flex; align-items: center; gap: 12px; }
.pd-seller-name { font-size: 14px; font-weight: 700; color: #222; }
.pd-seller-info { flex: 1; min-width: 0; }
.pd-seller-sub { margin-top: 2px; font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- similar listings ---- */
.pd-related { max-width: 1280px; margin-inline: auto; box-sizing: border-box; padding: 0 20px 40px; }
.pd-related-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.pd-related-title { font-size: 18px; font-weight: 800; color: #1a1a1a; }
.pd-related-link { font-size: 13px; font-weight: 600; color: #1a3d6b; }
.pd-related-link:hover { text-decoration: underline; }
.pd-related-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pd-related-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; }
.pd-related-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.pd-related-card-image { height: 130px; background: var(--bg-soft); overflow: hidden; }
.pd-related-card-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-related-card-body { padding: 10px 12px; }
.pd-related-card-title { font-size: 13px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-related-card-price { margin-top: 4px; font-size: 16px; font-weight: 800; color: #c0392b; }
.pd-related-card-location { margin-top: 6px; font-size: 11px; color: #999; display: flex; align-items: center; gap: 3px; }

/* ---- responsive ---- */
@media (max-width: 1024px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-summary-col { position: static; }
  .pd-related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .pd-main { padding: 16px 12px; }
  .pd-breadcrumb-inner { padding: 8px 12px; }
  .pd-related { padding: 0 12px 32px; }
  .pd-tab { font-size: 12.5px; padding-block: 12px; }
  .pd-tab-panel { padding: 16px; }
  .pd-summary-card, .pd-location-card, .pd-seller-card { padding: 16px; }
  .pd-price { font-size: 26px; }
  .pd-title { font-size: 18px; }
  .pd-gallery-thumb { width: 60px; height: 60px; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ==========================================================================
   Search Results (Figma "Redesign Marketplace Header" file, node 28:1492) —
   same visual language as .mkt-* / .pd-* (navy #1a3d6b, #e8e8e8 borders,
   #f8f9fa/white surfaces), namespaced `sr-` for this page's own layout.
   ========================================================================== */

.sr-breadcrumb-inner {
  max-width: 1400px; margin-inline: auto; box-sizing: border-box;
  padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sr-crumb-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #1a3d6b; background: none; border: none; padding: 0; cursor: pointer; }
.sr-crumb-back:hover { text-decoration: underline; }
[dir="rtl"] .sr-crumb-back svg { transform: scaleX(-1); }
.sr-crumb-sep { font-size: 16px; color: #ccc; }
[dir="rtl"] .sr-crumb-sep { display: inline-block; transform: scaleX(-1); }
.sr-crumb-current { font-size: 13px; font-weight: 600; color: #333; }
.sr-crumb-count { font-size: 13px; color: #888; }

.sr-layout { max-width: 1400px; margin-inline: auto; box-sizing: border-box; padding: 20px; display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }

/* ---- sidebar ---- */
.sr-sidebar { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 20px; position: sticky; top: calc(var(--header-total-h, 105px) + 16px); }
.sr-sidebar-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #1a1a1a; }
.sr-filter-section { border-bottom: 1px solid #efefef; padding-bottom: 16px; margin-top: 16px; }
.sr-sidebar-title + .sr-filter-section { margin-top: 18px; }
.sr-filter-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; background: none; border: none; cursor: pointer; }
.sr-filter-title { font-size: 13px; font-weight: 700; color: #1a1a1a; letter-spacing: 0.13px; }
.sr-filter-chevron { display: flex; color: #999; transition: transform var(--dur-fast) var(--ease-out); }
.sr-filter-chevron.is-open { transform: rotate(180deg); }
.sr-filter-body { display: flex; flex-direction: column; gap: 2px; }

.sr-cat-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 6px; background: none; border: none; cursor: pointer;
  font-size: 13px; color: #444; text-align: start;
}
.sr-cat-row:hover { background: #f8f9fa; }
.sr-cat-row.is-active { background: #e8f0fb; }
.sr-cat-row.is-active > span:first-child { color: #1a3d6b; font-weight: 700; }
.sr-cat-count { font-size: 11px; color: #bbb; }

.sr-location-filter .location-picker-btn { background: #f8f9fa; border: 1px solid #e8e8e8; border-radius: 8px; height: 38px; padding: 8px 12px; font-size: 13px; color: #333; }
.sr-location-filter .location-picker-btn:hover { background: #f0f0f0; }
.sr-location-filter .location-picker-panel { width: 260px; }

.sr-price-row { display: flex; align-items: center; gap: 8px; }
.sr-price-input {
  flex: 1; min-width: 0; height: 35.5px; border: 1px solid #e8e8e8; border-radius: 7px;
  padding: 7px 10px; font-size: 13px; color: #333; font: inherit;
}
.sr-price-input::placeholder { color: rgba(0, 0, 0, 0.5); }
.sr-price-dash { font-size: 12px; color: #aaa; flex-shrink: 0; }
.sr-price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sr-price-preset {
  background: #f8f8f8; border: 1px solid #e0e0e0; border-radius: 14px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: #555; cursor: pointer;
}
.sr-price-preset:hover { border-color: #1a3d6b; }
.sr-price-preset.is-active { background: #e8f0fb; border-color: #1a3d6b; color: #1a3d6b; }

.sr-check-row { display: flex; align-items: center; gap: 8px; padding-block: 5px; font-size: 13px; color: #333; }
.sr-check-row input[type="checkbox"] { width: 16px; height: 16px; border-radius: 4px; accent-color: #1a3d6b; flex-shrink: 0; }
.sr-check-row.is-disabled { opacity: 0.55; cursor: not-allowed; }
.sr-check-row .sr-cat-count { margin-inline-start: auto; }
.sr-coming-soon { margin-top: 4px; font-size: 11px; color: #999; font-style: italic; }

/* ---- toolbar ---- */
.sr-toolbar { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sr-result-count { font-size: 13px; color: #555; }
.sr-result-count strong { color: #1a1a1a; font-weight: 700; }
.sr-toolbar-spacer { flex: 1; }
.sr-sort-label { font-size: 12px; color: #888; }
.sr-sort-group { display: flex; gap: 6px; flex-wrap: wrap; }
.sr-sort-btn {
  background: #fff; border: 1.5px solid #e0e0e0; border-radius: 20px; padding: 6px 12px;
  font-size: 12px; font-weight: 500; color: #555; cursor: pointer;
}
.sr-sort-btn:hover:not(:disabled) { border-color: #1a3d6b; }
.sr-sort-btn.is-active { background: #e8f0fb; border-color: #1a3d6b; color: #1a3d6b; font-weight: 700; }
.sr-sort-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.sr-view-toggle { display: flex; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; height: 28px; width: 70px; flex-shrink: 0; }
.sr-view-btn { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; color: #555; border: none; cursor: pointer; }
.sr-view-btn.is-active { background: #1a3d6b; color: #fff; }
.sr-mobile-filters-btn {
  display: none; align-items: center; gap: 6px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; font-weight: 600; color: #333; cursor: pointer;
}

/* ---- product grid ---- */
.sr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.sr-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.sr-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.sr-card-image { position: relative; height: 160px; background: var(--bg-soft); overflow: hidden; }
.sr-card-image img { width: 100%; height: 100%; object-fit: cover; }
.sr-card-body { padding: 12px; }
.sr-card-title { font-size: 13px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-card-price { margin-top: 4px; font-size: 19px; font-weight: 900; color: #c0392b; letter-spacing: -0.5px; }
.sr-card-meta-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sr-card-location { font-size: 12px; color: #888; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-card-time { margin-top: 6px; font-size: 11px; color: #bbb; }

.sr-grid.is-list { grid-template-columns: 1fr; }
.sr-grid.is-list .sr-card { flex-direction: row; }
.sr-grid.is-list .sr-card-image { width: 200px; height: auto; flex-shrink: 0; }
.sr-grid.is-list .sr-card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ---- pagination / load more ---- */
.sr-pagination { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 28px; }
.sr-progress-wrap { width: 360px; max-width: 100%; }
.sr-progress-labels { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #888; }
.sr-progress-pct { color: #1a3d6b; font-weight: 600; }
.sr-progress-track { margin-top: 6px; height: 4px; border-radius: 2px; background: #e8e8e8; overflow: hidden; }
.sr-progress-fill { height: 4px; border-radius: 2px; background: #1a3d6b; }
.sr-load-more-btn { background: #fff; border: 2px solid #1a3d6b; border-radius: 8px; padding: 12px 36px; font-size: 14px; font-weight: 700; color: #1a3d6b; cursor: pointer; }
.sr-load-more-btn:hover { background: #f0f4f9; }
.sr-page-buttons { display: flex; gap: 6px; }
.sr-page-btn { width: 34px; height: 34px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #555; background: #fff; border: 1px solid #e0e0e0; cursor: pointer; }
.sr-page-btn.is-active { background: #1a3d6b; color: #fff; border-color: #1a3d6b; font-weight: 700; }

/* ---- responsive ---- */
@media (max-width: 1024px) {
  .sr-layout { grid-template-columns: 1fr; padding: 16px; }
  /* Scoped to .sr-layout's own sidebar only — the same .sr-sidebar markup is
     reused inside #sr-filter-drawer-body and must stay visible there. */
  .sr-layout > .sr-sidebar { display: none; }
  .sr-mobile-filters-btn { display: inline-flex; }
  .sr-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .sr-breadcrumb-inner { padding: 10px 12px; }
  .sr-layout { padding: 12px; gap: 12px; }
  .sr-toolbar { padding: 10px 12px; }
  .sr-sort-label { display: none; }
  .sr-sort-group { overflow-x: auto; flex-wrap: nowrap; }
  .sr-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sr-grid.is-list .sr-card-image { width: 120px; }
}

@media (max-width: 420px) {
  .sr-grid { grid-template-columns: 1fr; }
}

/* The mobile drawer hosts the same sidebar markup as the desktop column —
   undo the sticky/border/width chrome that only makes sense inline. */
#sr-filter-drawer-body .sr-sidebar { position: static; border: none; padding: 0; }

.sr-cat-row-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sr-cat-row-label svg { flex-shrink: 0; color: inherit; }

/* ==========================================================================
   Category Listing (Figma node 34:2978) — hero, subcategory nav, active
   filters. Reuses every .sr-* class above for sidebar/toolbar/grid/pagination.
   ========================================================================== */

.cat-hero {
  position: relative; overflow: hidden;
  background-image: linear-gradient(175deg, #1a3d6b 0%, #1565c0 100%);
}
.cat-hero-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.18); pointer-events: none; }
.cat-hero-decor { position: absolute; border-radius: 50%; pointer-events: none; }
.cat-hero-decor-1 { inset-inline-end: -60px; top: -60px; width: 280px; height: 280px; background: rgba(255, 255, 255, 0.06); }
.cat-hero-decor-2 { inset-inline-end: 80px; top: 34px; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.04); }
.cat-hero-inner {
  position: relative; max-width: 1400px; margin-inline: auto; box-sizing: border-box;
  padding: 32px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cat-hero-icon {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.cat-hero-text { flex: 1; min-width: 240px; }
.cat-hero-title { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.5px; line-height: 1.2; }
.cat-hero-desc { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.78); max-width: 520px; }
.cat-hero-meta { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.cat-hero-meta-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.cat-hero-meta-item svg { color: #fff; flex-shrink: 0; }
.cat-hero-meta-item strong { color: #fff; font-weight: 700; }
.cat-hero-search {
  flex-shrink: 0; width: 300px; max-width: 100%; height: 41.5px; display: flex; overflow: hidden;
  border-radius: 8px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25);
}
.cat-hero-search-input {
  flex: 1; min-width: 0; border: none; background: none; outline: none; padding: 10px 14px;
  font: inherit; font-size: 13px; color: #fff;
}
.cat-hero-search-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.cat-hero-search-btn { flex-shrink: 0; border: none; background: rgba(255, 255, 255, 0.2); padding-inline: 14px; color: #fff; cursor: pointer; display: flex; align-items: center; }
.cat-hero-search-btn:hover { background: rgba(255, 255, 255, 0.3); }

.cat-subnav { background: #fff; border-bottom: 1px solid #efefef; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.cat-subnav-inner {
  max-width: 1400px; margin-inline: auto; box-sizing: border-box; padding: 12px 20px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.cat-subnav-inner::-webkit-scrollbar { display: none; }
.cat-subnav-pill {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px; height: 34.5px; padding: 7px 14px;
  border-radius: 20px; border: 1.5px solid #e8e8e8; background: #fff; color: #444;
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.cat-subnav-pill:hover { border-color: #1a3d6b; }
.cat-subnav-pill.is-active { background: #1a3d6b; border-color: #1a3d6b; color: #fff; font-weight: 700; }
.cat-subnav-count { background: #f0f0f0; color: #888; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 10px; }
.cat-subnav-pill.is-active .cat-subnav-count { background: rgba(255, 255, 255, 0.25); color: #fff; }

.cat-active-filters { background: #fff; border-bottom: 1px solid #efefef; }
.cat-active-filters-inner { max-width: 1400px; margin-inline: auto; box-sizing: border-box; padding: 8px 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cat-active-filters-label { font-size: 12px; font-weight: 600; color: #888; }
.cat-filter-chip { display: inline-flex; align-items: center; gap: 4px; background: #e8f0fb; color: #1a3d6b; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.cat-filter-chip-remove { display: flex; align-items: center; justify-content: center; background: none; border: none; color: #1a3d6b; cursor: pointer; padding: 2px; }
.cat-filter-reset { background: none; border: none; padding: 3px 6px; font-size: 12px; font-weight: 700; color: #e53935; cursor: pointer; }
.cat-filter-reset:hover { text-decoration: underline; }

.cat-empty-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }
.cat-empty-suggestions { margin-top: var(--space-2); }
.cat-empty-suggestions-title { font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.cat-empty-suggestions-row { margin-top: var(--space-2); display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.cat-empty-suggestion { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid #e8e8e8; background: #fff; color: #1a3d6b; font-size: 13px; font-weight: 600; }
.cat-empty-suggestion:hover { border-color: #1a3d6b; background: #f0f4f9; }

@media (max-width: 1024px) {
  .cat-hero-inner { padding: 24px 16px; gap: 16px; }
  .cat-hero-search { width: 100%; }
  .cat-subnav-inner, .cat-active-filters-inner { padding: 10px 16px; }
}

@media (max-width: 640px) {
  .cat-hero-icon { width: 56px; height: 56px; border-radius: 12px; }
  .cat-hero-icon svg { width: 26px; height: 26px; }
  .cat-hero-title { font-size: 22px; }
  .cat-hero-desc { display: none; }
  .cat-hero-inner { padding: 20px 12px; }
  .cat-subnav-inner, .cat-active-filters-inner { padding: 8px 12px; }
  .cat-subnav-pill { padding: 6px 12px; font-size: 12.5px; }
}

/* ==========================================================================
   Create Listing (.cl-*) — Figma "Publier une annonce" 4-step wizard
   ========================================================================== */

.cl-page { max-width: 900px; margin-inline: auto; padding: 24px 20px 64px; box-sizing: border-box; }
.cl-page-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 4px 20px; }
.cl-back-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: #1a3d6b; font-size: 13px; font-weight: 600; text-decoration: none; }
.cl-back-link:hover { background: #f0f4f9; }
.cl-heading { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 900; color: #1a1a1a; letter-spacing: -0.2px; margin: 0; }
.cl-heading svg { color: #1a3d6b; }

.cl-wrap { display: flex; flex-direction: column; gap: 20px; }

/* Draft banner */
.cl-draft-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
  background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #1a3d6b; font-weight: 600;
}
.cl-draft-banner-actions { display: flex; gap: 8px; }

/* Step bar */
.cl-stepbar-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); padding: 20px 28px; }
.cl-stepbar { display: flex; align-items: flex-start; }
.cl-step-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; min-width: 64px; }
.cl-step-circle {
  width: 32px; height: 32px; border-radius: 16px; background: #e8e8e8; color: #aaa;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.cl-step-circle.is-active { background: #1a3d6b; color: #fff; }
.cl-step-circle.is-done { background: #1a3d6b; color: #fff; }
.cl-step-label { font-size: 11px; font-weight: 500; color: #aaa; text-align: center; white-space: nowrap; }
.cl-step-label.is-active { color: #1a3d6b; font-weight: 700; }
.cl-step-connector { flex: 1; height: 2px; background: #e8e8e8; margin-top: 16px; min-width: 20px; }
.cl-step-connector.is-done { background: #1a3d6b; }

/* Section cards */
.cl-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); overflow: hidden; transition: border-color var(--dur-fast) var(--ease-out); }
.cl-card.has-error { border-color: #e53935; }
.cl-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: #fafbfc; border-bottom: 1px solid #f0f0f0; }
.cl-card-icon { width: 32px; height: 32px; border-radius: 8px; background: #e8f0fb; color: #1a3d6b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cl-card-title { font-size: 15px; font-weight: 800; color: #1a1a1a; margin: 0; }
.cl-card-body { padding: 20px; display: flex; flex-direction: column; gap: 24px; }

.cl-field { display: flex; flex-direction: column; gap: 0; }
.cl-field-label { font-size: 13px; font-weight: 700; color: #1a1a1a; letter-spacing: 0.13px; margin-bottom: 6px; }
.cl-field-meta-row { display: flex; justify-content: flex-end; }
.cl-counter { font-size: 11px; color: #bbb; padding-top: 5px; }
.cl-field .field-hint { padding-top: 5px; }
.cl-field-error { margin-top: 6px; }

.cl-input, .cl-textarea, .cl-select {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: #1a1a1a;
  background: #fff; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 11px 14px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.cl-input::placeholder, .cl-textarea::placeholder { color: rgba(26, 26, 26, 0.5); }
.cl-input:focus, .cl-textarea:focus, .cl-select:focus { outline: none; border-color: #1a3d6b; box-shadow: 0 0 0 3px rgba(26, 61, 107, 0.12); }
.cl-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.cl-select { cursor: pointer; }

/* Category grid (step 1) */
.cl-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cl-category-btn {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: #fff; border: 2px solid #e8e8e8; border-radius: 10px; color: #333; font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: start; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cl-category-btn svg { color: #1a3d6b; flex-shrink: 0; }
.cl-category-btn:hover { border-color: #b9c9dd; }
.cl-category-btn.is-active { border-color: #1a3d6b; background: #e8f0fb; font-weight: 700; }
.cl-category-check { position: absolute; inset-inline-end: 10px; top: 10px; color: #1a3d6b; }

/* Subcategory grid (step 1, appears under the selected category) */
.cl-subcategory-label { margin-top: 18px; }
.cl-subcategory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cl-subcategory-btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 10px 12px; background: #fff; border: 1.5px solid #e0e0e0; border-radius: 10px;
  color: #333; font-size: 13px; font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cl-subcategory-btn:hover { border-color: #b9c9dd; }
.cl-subcategory-btn.is-active { border-color: #1a3d6b; background: #e8f0fb; color: #1a3d6b; font-weight: 700; }

/* Photos (step 2) */
.cl-photos-hint-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.cl-photos-count { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #999; }
.cl-photos-count.is-met { color: #16a34a; }
.cl-photos-min-required {
  display: inline-flex; align-self: flex-start; font-size: 11px; font-weight: 700; color: #b45309;
  background: #fef3c7; padding: 3px 10px; border-radius: 999px; margin: 0;
}
.cl-dropzone { background: #fafbfc; border: 2px dashed #d0d7e3; border-radius: 12px; padding: 20px; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.cl-dropzone.is-dragover { border-color: #1a3d6b; background: #eef4fb; }
.cl-dropzone.has-photos { border-style: solid; }
.cl-dropzone-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px; color: #444; }
.cl-dropzone-empty svg { color: #9aa7b8; margin-bottom: 4px; }
.cl-dropzone-title { font-size: 14px; font-weight: 700; color: #444; margin: 0; }
.cl-dropzone-or { font-size: 13px; color: #888; margin: 0; }
.cl-dropzone-empty .btn { margin-top: 4px; }
.cl-dropzone-format { font-size: 11px; color: #bbb; margin-top: 8px; }
.cl-photo-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.cl-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.cl-photo-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #eef1f4; border: 1px solid #e8e8e8; }
.cl-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-photo-primary-badge {
  position: absolute; inset-inline-start: 6px; top: 6px; background: #1a3d6b; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
}
.cl-photo-remove {
  position: absolute; inset-inline-end: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(20, 20, 20, 0.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cl-photo-remove:hover { background: rgba(20, 20, 20, 0.85); }
.cl-photo-make-primary {
  position: absolute; inset-inline: 0; bottom: 0; border: none; background: rgba(26, 61, 107, 0.85); color: #fff;
  font-size: 10px; font-weight: 700; padding: 5px 4px; cursor: pointer; opacity: 0; transition: opacity var(--dur-fast) var(--ease-out);
}
.cl-photo-tile:hover .cl-photo-make-primary { opacity: 1; }
.cl-photo-grip {
  position: absolute; inset-inline-start: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(20, 20, 20, 0.6); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: grab; z-index: 2; touch-action: none;
}
.cl-photo-grip:hover { background: rgba(20, 20, 20, 0.85); }
.cl-photo-grip:active { cursor: grabbing; }
.cl-photo-tile.is-dragging { opacity: 0.45; outline: 2px dashed #1a3d6b; outline-offset: -2px; }
.cl-photo-overlay {
  position: absolute; inset: 0; background: rgba(10, 10, 10, 0.55); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 600; text-align: center; padding: 8px;
}
.cl-photo-overlay.is-error { background: rgba(163, 38, 38, 0.82); }
.cl-photo-spinner {
  width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: cl-spin 0.75s linear infinite;
}
@keyframes cl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cl-photo-spinner { animation: none; } }
.cl-photo-retry-btn { border: 1px solid rgba(255, 255, 255, 0.7); background: transparent; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.cl-photo-retry-btn:hover { background: rgba(255, 255, 255, 0.15); }
.cl-photo-add-tile {
  aspect-ratio: 1; border: 2px dashed #d0d7e3; border-radius: 10px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; color: #1a3d6b; font-size: 11px; font-weight: 700; cursor: pointer; background: #fff;
}
.cl-photo-add-tile:hover { border-color: #1a3d6b; background: #f5f9fd; }

/* Condition selector (step 2) */
.cl-condition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-condition-btn {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
  background: #fff; border: 2px solid #e8e8e8; border-radius: 10px; padding: 14px 34px 14px 14px; text-align: start; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
[dir="rtl"] .cl-condition-btn { padding: 14px 14px 14px 34px; }
.cl-condition-btn svg { color: #1a3d6b; }
.cl-condition-btn:hover { border-color: #b9c9dd; }
.cl-condition-btn.is-active { border-color: #1a3d6b; background: #e8f0fb; }
.cl-condition-text { display: flex; flex-direction: column; gap: 2px; }
.cl-condition-name { font-size: 13px; font-weight: 700; color: #1a1a1a; }
.cl-condition-desc { font-size: 11px; color: #888; }
.cl-condition-check { position: absolute; inset-inline-end: 12px; top: 14px; color: #1a3d6b; }

/* Price (step 3) */
.cl-price-input-row { position: relative; }
.cl-price-input { padding-inline-end: 46px; }
.cl-price-suffix { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: #888; }
.cl-price-suggestions-label { font-size: 12px; font-weight: 600; color: #555; margin: 0 0 10px; }
.cl-price-chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cl-price-chip {
  height: 30px; padding-inline: 14px; border-radius: 999px; border: 1.5px solid #e0e0e0; background: #fff;
  color: #444; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cl-price-chip:hover { border-color: #1a3d6b; }
.cl-price-chip.is-active { background: #1a3d6b; border-color: #1a3d6b; color: #fff; }

.cl-checkbox-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.cl-checkbox-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 1px; accent-color: #1a3d6b; flex-shrink: 0; }
.cl-checkbox-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.cl-checkbox-row .field-hint { margin-top: 2px; }

/* Segmented control — Price type, Delivery coverage, Delivery price type */
.cl-segmented { display: inline-flex; border: 1.5px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.cl-segmented-btn {
  padding: 10px 18px; border: none; background: #fff; color: #444; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cl-segmented-btn + .cl-segmented-btn { border-inline-start: 1.5px solid #e0e0e0; }
.cl-segmented-btn.is-active { background: #1a3d6b; color: #fff; }
.cl-segmented-btn:not(.is-active):hover { background: #f5f7fa; }

/* ON/OFF toggle switch — "Livraison disponible ?" */
.cl-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.cl-toggle { position: relative; display: inline-flex; flex-shrink: 0; }
.cl-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cl-toggle-track {
  display: block; width: 44px; height: 26px; border-radius: 999px; background: #d8dce2;
  transition: background var(--dur-fast) var(--ease-out);
}
.cl-toggle-thumb {
  display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--dur-fast) var(--ease-out);
}
.cl-toggle input:checked + .cl-toggle-track { background: #1a3d6b; }
.cl-toggle input:checked + .cl-toggle-track .cl-toggle-thumb { transform: translateX(18px); }
[dir="rtl"] .cl-toggle input:checked + .cl-toggle-track .cl-toggle-thumb { transform: translateX(-18px); }
.cl-toggle input:focus-visible + .cl-toggle-track { outline: 2px solid #1a3d6b; outline-offset: 2px; }

/* Delivery wilaya multi-select — mirrors the location-picker/commune-panel
   dropdown language (white card, border, shadow) with checkbox rows. */
.cl-multiselect { position: relative; }
.cl-multiselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box;
  height: 46px; padding-inline: 14px; background: #fff; border: 1.5px solid #e0e0e0; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 14px; color: rgba(26, 26, 26, 0.5); text-align: start;
}
.cl-multiselect-btn svg { flex-shrink: 0; color: #999; transition: transform var(--dur-fast) var(--ease-out); }
.cl-multiselect.has-value .cl-multiselect-btn { color: #1a1a1a; font-weight: 600; }
.cl-multiselect.is-open .cl-multiselect-btn { border-color: #1a3d6b; }
.cl-multiselect.is-open .cl-multiselect-btn svg { transform: rotate(180deg); }
.cl-multiselect-panel {
  display: none; position: absolute; top: calc(100% + 6px); inset-inline: 0; max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12); z-index: 20; padding: 6px;
}
.cl-multiselect.is-open .cl-multiselect-panel { display: block; }
.cl-multiselect-option { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: #1a1a1a; }
.cl-multiselect-option:hover { background: #f0f4f9; }
.cl-multiselect-option input[type="checkbox"] { width: 17px; height: 17px; accent-color: #1a3d6b; flex-shrink: 0; }

/* Location & delivery (step 3) */
.cl-wilaya-field .location-picker { width: 100%; }
.cl-wilaya-field .location-picker-btn {
  width: 100%; max-width: none; height: 46px; box-sizing: border-box; border: 1.5px solid #e0e0e0; border-radius: 8px; background: #fff;
  padding-inline: 14px; font-size: 14px; color: #1a1a1a; justify-content: space-between;
}
.cl-wilaya-field .location-picker-btn svg:first-child { display: none; }
.cl-wilaya-field .location-picker-btn .location-picker-label { color: rgba(26, 26, 26, 0.5); font-weight: 500; }
.cl-wilaya-field .location-picker-btn.has-value .location-picker-label { color: #1a1a1a; font-weight: 600; }
.cl-wilaya-field .location-picker.is-open .location-picker-btn,
.cl-wilaya-field .location-picker-btn:hover { border-color: #1a3d6b; }
.cl-wilaya-field .location-picker-panel { width: 100%; }

/* Commune searchable combobox — inert (panel never opens) until
   js/communes.js has a real dataset for the selected wilaya; the plain
   .cl-input below it is the fallback in the meantime. */
.cl-commune-field { position: relative; }
.cl-commune-panel {
  display: none; position: absolute; top: calc(100% + 6px); inset-inline: 0; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12); z-index: 20; padding: 6px;
}
.cl-commune-panel.is-open { display: block; }
.cl-commune-option {
  display: block; width: 100%; padding: 9px 10px; border: none; background: none; text-align: start; font: inherit;
  font-size: 13.5px; color: #1a1a1a; border-radius: 6px; cursor: pointer;
}
.cl-commune-option:hover { background: #f0f4f9; }
.cl-commune-empty { padding: 12px 10px; text-align: center; color: #999; font-size: 13px; }

.cl-delivery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cl-delivery-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px;
  background: #fff; border: 2px solid #e8e8e8; border-radius: 10px; color: #444; font-size: 12px; font-weight: 600; text-align: center; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cl-delivery-btn svg { color: #1a3d6b; }
.cl-delivery-btn:hover { border-color: #b9c9dd; }
.cl-delivery-btn.is-active { border-color: #1a3d6b; background: #e8f0fb; font-weight: 700; }
.cl-phone-row { display: flex; align-items: stretch; border: 1.5px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.cl-phone-row:focus-within { border-color: #1a3d6b; box-shadow: 0 0 0 3px rgba(26, 61, 107, 0.12); }
.cl-phone-prefix { display: flex; align-items: center; padding-inline: 12px; background: #f5f5f5; color: #555; font-size: 13px; font-weight: 700; border-inline-end: 1.5px solid #e0e0e0; }
.cl-phone-row .cl-input { border: none; border-radius: 0; }
.cl-phone-row .cl-input:focus { box-shadow: none; }

/* Preview (step 4) */
.cl-preview-subtitle { font-size: 12px; color: #888; margin: -12px 0 0; }
.cl-preview-grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.cl-preview-card { background: #fff; border: 2px solid #e8e8e8; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.cl-preview-image { position: relative; height: 180px; background: #eef1f4; }
.cl-preview-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-preview-image .card-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #b7c0cb; }
.cl-preview-condition-badge { position: absolute; inset-inline-start: 10px; top: 10px; background: #1a3d6b; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.cl-preview-fav { position: absolute; inset-inline-end: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #333; display: flex; align-items: center; justify-content: center; }
.cl-preview-body { padding: 12px; }
.cl-preview-title { font-size: 13px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.cl-preview-price-row { margin-top: 4px; }
.cl-preview-price { font-size: 20px; font-weight: 900; color: #c0392b; }
.cl-preview-negotiable { font-size: 11px; color: #888; font-weight: 500; }
.cl-preview-meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cl-preview-location { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #888; }
.cl-preview-seller-badge { background: #e8f0fb; color: #1a3d6b; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.cl-preview-time { margin-top: 6px; font-size: 11px; color: #bbb; }

.cl-summary-list { display: flex; flex-direction: column; gap: 10px; }
.cl-summary-row { display: flex; gap: 8px; background: #f8f9fa; border-radius: 8px; padding: 8px 12px; }
.cl-summary-label { min-width: 90px; flex-shrink: 0; font-size: 12px; font-weight: 600; color: #888; }
.cl-summary-value { font-size: 12px; font-weight: 500; color: #1a1a1a; }

.cl-tips-box { display: flex; gap: 10px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 10px; padding: 14px 16px; }
.cl-tips-box svg { color: #b45309; flex-shrink: 0; }
.cl-tips-title { font-size: 13px; font-weight: 700; color: #7d5a00; margin: 0; }
.cl-tips-list { margin: 4px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
.cl-tips-list li { font-size: 12px; color: #8a6d00; line-height: 1.4; }

/* Notice (photo upload not configured) */
.cl-notice { display: flex; gap: 10px; background: #fef3c7; border: 1px solid #fde68a; border-radius: 10px; padding: 14px 16px; color: #7d5a00; font-size: 13px; }
.cl-notice svg { color: #b45309; flex-shrink: 0; }

/* CTA bar */
.cl-cta-bar { background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cl-cta-spacer { flex: 1; }
.cl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 28px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); white-space: nowrap; }
.cl-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.cl-btn-primary { background: #1a3d6b; color: #fff; }
.cl-btn-primary:hover:not(:disabled) { background: #16345c; }
.cl-btn-ghost { background: #f5f5f5; border: 1px solid #e0e0e0; color: #555; }
.cl-btn-ghost:hover:not(:disabled) { background: #eee; }
.cl-btn-outline { background: #fff; border: 2px solid #1a3d6b; color: #1a3d6b; }
.cl-btn-outline:hover:not(:disabled) { background: #eef4fb; }

/* Success screen */
.cl-success-block { padding-block: 64px; }
.cl-success-icon { background: #e7f6ed; color: #16a34a; }
.cl-success-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; margin-top: var(--space-2); }

/* Directional icons that must mirror in RTL */
[dir="rtl"] .cl-back-link svg,
[dir="rtl"] .cl-heading svg,
[dir="rtl"] .cl-btn-ghost svg { transform: scaleX(-1); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .cl-page { padding: 20px 16px 56px; }
  .cl-stepbar-card { padding: 16px; }
  .cl-step-item { min-width: 52px; }
  .cl-step-label { font-size: 10px; }
  .cl-preview-grid { grid-template-columns: 1fr; }
  .cl-preview-card { max-width: 320px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .cl-subcategory-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .cl-category-grid { grid-template-columns: repeat(2, 1fr); }
  .cl-subcategory-grid { grid-template-columns: repeat(2, 1fr); }
  .cl-condition-grid { grid-template-columns: 1fr; }
  .cl-delivery-grid { grid-template-columns: 1fr; }
  .cl-card-body { padding: 16px; gap: 20px; }
  .cl-stepbar { overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 480px) {
  .cl-category-grid { grid-template-columns: 1fr; }
  .cl-step-label { display: none; }
  .cl-step-connector { margin-top: 0; align-self: center; }
  .cl-cta-bar { flex-direction: column; align-items: stretch; }
  .cl-cta-spacer { display: none; }
  .cl-btn { width: 100%; }
  .cl-photo-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .cl-preview-image { height: 160px; }
}

/* ==================================================
   Favorites / Wishlist page (Figma: Favorites/Wishlist, node 49:55)
   ================================================== */
.fav-header { background: #fff; border-bottom: 1px solid #efefef; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.fav-header-inner {
  max-width: 1100px; margin-inline: auto; box-sizing: border-box; padding: 13px 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.fav-title { flex: 1; min-width: 200px; font-size: 20px; }
.fav-count-badge { background: #e8f0fb; color: #1a3d6b; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 10px; margin-inline-start: 4px; }
.fav-search { position: relative; flex-shrink: 0; width: 220px; max-width: 100%; }
.fav-search input {
  width: 100%; box-sizing: border-box; height: 38.5px; padding: 8px 12px 8px 32px; font: inherit; font-size: 13px;
  color: #1a1a1a; background: #fff; border: 1.5px solid #e0e0e0; border-radius: 9px;
}
[dir="rtl"] .fav-search input { padding: 8px 32px 8px 12px; }
.fav-search input:focus { outline: none; border-color: #1a3d6b; box-shadow: 0 0 0 3px rgba(26, 61, 107, 0.12); }
.fav-search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none; }

.fav-content { max-width: 1100px; margin-inline: auto; box-sizing: border-box; padding: 24px 20px 64px; }
.fav-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fav-toolbar .cat-subnav-inner { padding: 0; flex: 1; min-width: 0; width: 100%; max-width: 100%; }
.fav-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fav-sort { width: 187px; height: 33.5px; padding-block: 6px; font-size: 12px; }
.fav-summary-count { font-size: 13px; color: #666; margin: 16px 0 14px; }

.fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fav-grid.is-list { grid-template-columns: 1fr; }
.fav-grid.is-list .fav-card { flex-direction: row; }
.fav-grid.is-list .fav-card-image { width: 200px; height: auto; flex-shrink: 0; }
.fav-grid.is-list .fav-card-body { flex: 1; }

.fav-card { background: #fff; border: 1px solid #ebebeb; border-radius: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); overflow: hidden; display: flex; flex-direction: column; }
.fav-card-image { position: relative; height: 168px; background: var(--bg-soft); flex-shrink: 0; }
.fav-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-card-badge-delivery {
  position: absolute; inset-inline-start: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(22, 163, 74, 0.9); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.fav-card-body { padding: 13px 14px; display: flex; flex-direction: column; gap: 6px; }
.fav-card-title {
  font-size: 13px; font-weight: 700; color: #1a1a1a; line-height: 1.35; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fav-card-condition { display: inline-flex; align-self: flex-start; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.fav-card-condition.is-new { background: #e8f5e9; color: #16a34a; }
.fav-card-condition.is-like_new { background: #e8f0fb; color: #1a3d6b; }
.fav-card-condition.is-good { background: #fff7e6; color: #d97706; }
.fav-card-condition.is-fair { background: #f0f0f0; color: #666; }
.fav-card-price { font-size: 18px; font-weight: 900; color: #c0392b; letter-spacing: -0.5px; }
.fav-card-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fav-card-location { display: inline-flex; align-items: center; gap: 3px; color: #999; font-size: 11px; }
.fav-card-time { color: #bbb; font-size: 11px; flex-shrink: 0; }
.fav-card-seller { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.fav-card-seller-avatar {
  display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px;
  background: #e8f0fb; color: #1a3d6b; font-size: 10px; font-weight: 800; flex-shrink: 0;
}
.fav-card-seller-name { color: #666; font-size: 11px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-card-actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #f0f0f0; }
.fav-card-contact {
  flex: 1; background: #1a3d6b; color: #fff; border: none; border-radius: 8px; padding: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; text-align: center;
}
.fav-card-contact:hover { background: #15325a; }
.fav-card-contact:disabled { opacity: 0.6; cursor: default; }

.fav-no-matches { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: #666; }
.fav-no-matches p { margin: 6px 0 14px; }

@media (max-width: 1024px) {
  .fav-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .fav-header-inner { padding: 12px 16px; }
  .fav-search { width: 100%; order: 3; }
  .fav-content { padding: 16px 16px 48px; }
  .fav-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fav-grid.is-list .fav-card-image { width: 120px; }
}
@media (max-width: 480px) {
  .fav-grid { grid-template-columns: 1fr; }
  .fav-toolbar { flex-direction: column; align-items: stretch; }
  .fav-toolbar-actions { justify-content: space-between; }
  .fav-sort { width: auto; flex: 1; }
}

/* ==========================================================================
   Profile / My Account (Figma eYiRmuVye72KT7Hnc7mYHw, node 50:1243)
   ========================================================================== */
.profile-topbar { background: #fff; border-bottom: 1px solid #efefef; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.profile-topbar-inner { max-width: 1100px; margin: 0 auto; padding: 13px 20px; display: flex; align-items: center; gap: 12px; }
.profile-back-link { display: inline-flex; align-items: center; gap: 6px; color: #1a3d6b; font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.profile-back-link:hover { background: #f5f7fa; }
.profile-topbar-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 800; color: #1a1a1a; margin: 0; }
[dir="rtl"] .profile-back-link svg { transform: scaleX(-1); }

.profile-page-body { background: #f5f6f8; padding-block: var(--space-6) 64px; }
.profile-page-inner { max-width: 1100px; margin: 0 auto; padding-inline: 20px; display: flex; flex-direction: column; gap: 16px; }

.profile-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 28px 32px; background: linear-gradient(170deg, #1a3d6b 0%, #2a5fa8 60%, #1e4a8a 100%); }
.profile-hero-bg-blob { position: absolute; border-radius: 999px; background: rgba(255,255,255,0.05); pointer-events: none; }
.profile-hero-blob-1 { width: 200px; height: 200px; right: -60px; top: -40px; }
.profile-hero-blob-2 { width: 160px; height: 160px; right: 60px; top: 84px; background: rgba(255,255,255,0.04); }
.profile-hero-row { position: relative; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-hero-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-hero-avatar { width: 80px; height: 80px; border-radius: 40px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 25.6px; letter-spacing: -0.5px; }
.profile-hero-avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 12px; background: #fff; border: none; display: flex; align-items: center; justify-content: center; color: #1a3d6b; cursor: pointer; box-shadow: 0 2px 3px rgba(0,0,0,0.2); }
[dir="rtl"] .profile-hero-avatar-edit { right: auto; left: -2px; }
.profile-hero-info { flex: 1 1 320px; min-width: 0; color: #fff; }
.profile-hero-name-row { display: flex; align-items: center; gap: 8px; }
.profile-hero-name { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; margin: 0; color: #fff; }
.profile-hero-meta { padding-top: 4px; font-size: 13px; color: rgba(255,255,255,0.7); }
.profile-hero-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.profile-hero-edit-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.3); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 18px; border-radius: 10px; cursor: pointer; }
.profile-hero-edit-btn:hover { background: rgba(255,255,255,0.24); }
.profile-hero-logout-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.25); color: #fff; border-radius: 10px; cursor: pointer; }
.profile-hero-logout-btn:hover { background: rgba(255,255,255,0.2); }

.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: #fff; border: 1px solid #ebebeb; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.stat-card-top { display: flex; align-items: center; gap: 8px; }
.stat-card-icon { display: inline-flex; color: #1a1a1a; }
.stat-card-value { font-size: 22px; font-weight: 900; color: #1a1a1a; }
.stat-card-label { padding-top: 6px; font-size: 12px; font-weight: 700; color: #555; }
.stat-card-sub { padding-top: 2px; font-size: 11px; color: #bbb; }

.profile-content-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
/* Grid tracks default to min-width:auto (content's intrinsic min size), which
   lets a wide child (e.g. the status-tabs row) force the 1fr column past the
   viewport instead of wrapping — min-width:0 lets it shrink/wrap normally. */
.profile-content-layout > div { min-width: 0; }
.profile-sidebar { background: #fff; border: 1px solid #ebebeb; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); overflow: hidden; position: sticky; top: calc(var(--header-h, 0px) + 16px); }
.profile-sidebar-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; background: none; border: none; border-inline-start: 3px solid transparent; border-top: 1px solid transparent; color: #555; font-weight: 500; font-size: 13px; text-align: start; cursor: pointer; }
.profile-sidebar-item:not(:first-child) { border-top-color: #f0f0f0; }
.profile-sidebar-item:hover { background: #fafbfc; }
.profile-sidebar-item.is-active { background: #e8f0fb; border-inline-start-color: #1a3d6b; color: #1a3d6b; font-weight: 700; }

.profile-listings-panel { min-width: 0; }
.listing-status-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 14px; }
.listing-status-tab { background: #fff; border: 1.5px solid #e0e0e0; color: #555; font-weight: 500; font-size: 12px; padding: 7px 14px; border-radius: 20px; cursor: pointer; }
.listing-status-tab.is-active { background: #1a3d6b; border-color: #1a3d6b; color: #fff; font-weight: 700; }

.profile-listing-rows { display: flex; flex-direction: column; gap: 12px; }
.profile-listing-card { display: flex; background: #fff; border: 1px solid #ebebeb; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden; }
.profile-listing-thumb { width: 90px; flex-shrink: 0; background: #f5f6f8; display: flex; align-items: center; justify-content: center; color: #bbb; }
.profile-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.profile-listing-body { flex: 1; min-width: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.profile-listing-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.profile-listing-title-col { min-width: 0; }
.profile-listing-title { font-size: 14px; font-weight: 700; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-listing-tags { display: flex; align-items: center; gap: 8px; padding-top: 4px; flex-wrap: wrap; }
.profile-listing-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.profile-listing-badge.is-active { background: #e8f5e9; color: #16a34a; }
.profile-listing-badge.is-pending { background: #fff7e6; color: #b45309; }
.profile-listing-badge.is-rejected { background: #fff0f0; color: #e53935; }
.profile-listing-tag { font-size: 11px; color: #bbb; }
.profile-listing-price { flex-shrink: 0; font-size: 17px; font-weight: 900; letter-spacing: -0.5px; color: #c0392b; }
.profile-listing-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.profile-listing-facts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-listing-fact { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #6b7280; }
.profile-listing-date { color: #ccc; }
.profile-listing-actions { display: flex; align-items: center; gap: 6px; }
.profile-listing-btn { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #e0e0e0; color: #666; font-weight: 600; font-size: 12px; padding: 6px 11px; border-radius: 7px; text-decoration: none; cursor: pointer; }
.profile-listing-btn:hover { border-color: #bbb; }
.profile-listing-btn-danger { background: #fff0f0; border-color: #fecaca; color: #e53935; padding: 6px 9px; }

.sell-cta-banner { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #e8f0fb; border: 1.5px dashed #1a3d6b; border-radius: 12px; padding: 16px; color: #1a3d6b; font-weight: 600; font-size: 13px; }
.sell-cta-banner .btn { display: inline-flex; align-items: center; gap: 6px; }

.profile-section-card { background: #fff; border: 1px solid #ebebeb; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); overflow: hidden; margin-bottom: 16px; }
.profile-section-card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: #fafbfc; border-bottom: 1px solid #f0f0f0; }
.profile-section-card-icon { width: 30px; height: 30px; border-radius: 8px; background: #e8f0fb; color: #1a3d6b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-section-card-title { font-size: 15px; font-weight: 800; color: #1a1a1a; margin: 0; }
.profile-section-card-body { padding: 20px; }
.profile-section-card .state-block { padding: 24px 0; }

.acct-review-summary { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; color: #f59e0b; }
.acct-review-summary strong { color: #1a1a1a; font-size: 16px; }
.acct-review-summary span { color: #6b7280; font-size: 13px; }
.acct-review-list { padding: 6px 20px; }
.acct-review-row { padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.acct-review-row:last-child { border-bottom: none; }
.acct-review-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acct-review-stars { display: inline-flex; gap: 2px; color: #f59e0b; }
.acct-review-date { color: #9aa3af; font-size: 11px; }
.acct-review-meta { margin-top: 4px; font-size: 12.5px; color: #6b7280; font-weight: 600; }
.acct-review-comment { margin-top: 4px; font-size: 13px; color: #374151; }

.profile-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 800px; }
.profile-settings-grid input:disabled { background: #f7f8fa; color: #888; }
.profile-settings-save-row { display: flex; justify-content: flex-end; padding-top: 18px; }

.profile-danger-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff0f0; border: 1px solid #fecaca; border-radius: 12px; padding: 16px 20px; }
.profile-danger-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.profile-danger-text { padding-top: 3px; font-size: 12px; color: #6b7280; }

.profile-password-form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.pwd-input-wrap { position: relative; }
.pwd-input-wrap input { width: 100%; padding-inline-end: 40px; }
.pwd-toggle-btn { position: absolute; inset-inline-end: 13px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #888; cursor: pointer; display: flex; }

.profile-2fa-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.profile-2fa-status { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: #1a1a1a; }
.profile-2fa-dot { width: 8px; height: 8px; border-radius: 4px; background: #e0e0e0; }
.profile-2fa-unavailable { font-size: 12px; font-weight: 700; color: #bbb; background: #f5f6f8; padding: 6px 12px; border-radius: 20px; }

@media (max-width: 1024px) {
  .profile-content-layout { grid-template-columns: 180px 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .profile-content-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; display: flex; overflow-x: auto; width: 100%; max-width: 100%; }
  .profile-sidebar-item { border-top: none; border-inline-start: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .profile-sidebar-item:not(:first-child) { border-top-color: transparent; }
  .profile-sidebar-item.is-active { border-inline-start-color: transparent; border-bottom-color: #1a3d6b; }
}
@media (max-width: 640px) {
  .profile-hero { padding: 20px; }
  .profile-hero-row { gap: 14px; }
  .profile-hero-actions { width: 100%; justify-content: flex-end; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .profile-listing-card { flex-direction: column; }
  .profile-listing-thumb { width: 100%; height: 120px; }
  .profile-listing-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .profile-listing-price { align-self: flex-start; }
  .profile-listing-bottom { flex-direction: column; align-items: stretch; }
  .profile-listing-actions { justify-content: flex-end; }
  .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-topbar-title { font-size: 15px; }
  .profile-back-link span, .profile-back-link { font-size: 12px; }
}
@media (max-width: 420px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .profile-page-inner { padding-inline: 14px; }
}

/* ==========================================================================
   Notifications (Figma eYiRmuVye72KT7Hnc7mYHw, node 78:7309)
   ========================================================================== */
.notif-topbar { background: #fff; border-bottom: 1px solid #eaeaea; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.notif-topbar-inner { max-width: 860px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notif-back-link { color: #1a3d6b; font-weight: 600; font-size: 13px; text-decoration: none; }
.notif-back-link:hover { text-decoration: underline; }
.notif-topbar-divider { width: 1px; height: 22px; background: #eaeaea; flex-shrink: 0; }
.notif-topbar-title-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: #1a1a1a; }
.notif-topbar-title { font-size: 17px; font-weight: 900; color: #1a1a1a; margin: 0; }
.notif-topbar-count { background: #1a3d6b; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px; }
.notif-topbar-actions { display: flex; align-items: center; gap: 6px; }
.notif-action-btn { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1.5px solid #eaeaea; color: #1a3d6b; font-weight: 700; font-size: 12px; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.notif-action-btn:hover { border-color: #1a3d6b; }
.notif-action-danger { border-color: #fecaca; color: #e53935; }
.notif-action-danger:hover { border-color: #e53935; }
.notif-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: #fff; border: 1.5px solid #eaeaea; color: #6b7280; border-radius: 8px; cursor: pointer; }
.notif-icon-btn:hover { border-color: #1a3d6b; color: #1a3d6b; }

.notif-page-body { background: #f5f6f8; padding-block: var(--space-6) 64px; }
.notif-page-inner { max-width: 860px; margin: 0 auto; padding-inline: 20px; display: flex; flex-direction: column; gap: 16px; }

.notif-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.notif-stat-card { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; box-shadow: 0 1px 1.5px rgba(0,0,0,0.04); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.notif-stat-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #1a3d6b; flex-shrink: 0; }
.notif-stat-value { font-size: 20px; font-weight: 900; color: #1a3d6b; line-height: 1; }
.notif-stat-label { font-size: 11px; font-weight: 500; color: #6b7280; margin-top: 2px; }

.notif-tabs-card { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; box-shadow: 0 1px 1.5px rgba(0,0,0,0.04); padding: 10px 14px; }
.notif-tabs-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.notif-tab { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; background: #fff; border: 1.5px solid #eaeaea; color: #6b7280; font-weight: 500; font-size: 12px; padding: 7px 14px; border-radius: 20px; cursor: pointer; white-space: nowrap; }
.notif-tab.is-active { background: #1a3d6b; border-color: #1a3d6b; color: #fff; font-weight: 700; }
.notif-tab-count { background: #f3f4f6; color: #6b7280; font-weight: 700; font-size: 10px; padding: 1px 5px; border-radius: 8px; }
.notif-tab.is-active .notif-tab-count { background: rgba(255,255,255,0.25); color: #fff; }

.notif-list-panel { display: flex; flex-direction: column; gap: 4px; }
.notif-date-heading { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #9aa3af; padding: 10px 4px 4px; }
.notif-card-rows { display: flex; flex-direction: column; gap: 1px; background: #fff; border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 1.5px rgba(0,0,0,0.04); }
.notif-card-rows + .notif-date-heading { margin-top: 8px; }

.notif-card { position: relative; display: flex; gap: 14px; padding: 15px 18px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.notif-card:last-child { border-bottom: none; }
.notif-card.is-unread { background: #e8f0fb; border-inline-start: 3px solid #1a3d6b; }
.notif-unread-dot { position: absolute; inset-inline-start: 6px; top: 18px; width: 7px; height: 7px; border-radius: 3.5px; background: #1a3d6b; }
.notif-card-avatar-col { position: relative; flex-shrink: 0; }
.notif-card-avatar { width: 42px; height: 42px; border-radius: 21px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14.7px; }
.notif-card-type-icon { position: absolute; left: 22px; top: 22px; width: 24px; height: 24px; border-radius: 12px; background: #e8f0fb; display: flex; align-items: center; justify-content: center; color: #1a3d6b; border: 2px solid #fff; }
[dir="rtl"] .notif-card-type-icon { left: auto; right: 22px; }
.notif-card-body { flex: 1; min-width: 0; }
.notif-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.notif-card-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.notif-card-time { font-size: 11px; color: #bbb; flex-shrink: 0; white-space: nowrap; }
.notif-card-text { margin-top: 3px; font-size: 13px; color: #374151; }
.notif-card-actions { margin-top: 10px; }
.notif-reply-btn { display: inline-flex; align-items: center; background: #1a3d6b; color: #fff; font-weight: 700; font-size: 12px; padding: 6px 14px; border-radius: 8px; text-decoration: none; }
.notif-reply-btn:hover { background: #16335c; }
.notif-card-tag { margin-top: 8px; display: inline-flex; background: #e8f0fb; color: #1a3d6b; font-weight: 700; font-size: 10px; letter-spacing: 0.3px; padding: 2px 7px; border-radius: 4px; }

@media (max-width: 640px) {
  .notif-topbar-inner { padding: 10px 14px; }
  .notif-topbar-actions { width: 100%; justify-content: flex-end; }
  .notif-page-inner { padding-inline: 12px; }
  .notif-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .notif-card { padding: 13px 14px; gap: 10px; }
  .notif-card-top { flex-direction: column; gap: 2px; }
}

/* ==========================================================================
   Orders / Order Detail / Reviews — Figma "cart/order/reviews" (node 84:8681,
   Dev Mode). No Cart or Checkout screens exist in that Figma section — only
   Orders, Order Detail (buyer + review flow), My Sales, and seller Order
   Detail (status actions) are designed, so only those are implemented here.
   ========================================================================== */

.ord-topbar { background: #fff; border-bottom: 1px solid #eaeaea; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.ord-topbar-inner { max-width: 900px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ord-back-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: #1a3d6b; font-size: 13px; font-weight: 700; text-decoration: none; background: none; border: none; cursor: pointer; }
.ord-back-link:hover { background: #f0f4f9; }
.ord-topbar-divider { width: 1px; height: 22px; background: #eaeaea; flex-shrink: 0; }
.ord-topbar-title { flex: 1; min-width: 0; font-size: 19px; font-weight: 900; color: #0f172a; margin: 0; }
.ord-topbar-title.is-sub { font-size: 17px; font-weight: 800; }

.ord-lang-pills { display: flex; gap: 6px; }
.ord-lang-pill { padding: 6px 12px; border-radius: 9px; border: 1.5px solid var(--border); background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.ord-lang-pill[aria-checked="true"] { background: #e8f0fb; border-color: var(--navy); color: var(--navy); }

.ord-role-toggle { display: flex; gap: 8px; }
.ord-role-btn { padding: 9px 18px; border-radius: 20px; border: 1.5px solid var(--border); background: #fff; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.ord-role-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.ord-page-body { background: #f5f6f8; padding-block: var(--space-6) 64px; min-height: calc(100vh - var(--header-total-h, 140px)); }
.ord-page-inner { max-width: 900px; margin: 0 auto; padding-inline: 20px; }

.ord-filter-bar { background: #fff; border: 1px solid #eaeaea; border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); padding: 12px 16px; margin-bottom: 16px; }
.ord-filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ord-filter-tab { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; background: #fff; border: 1.5px solid var(--border); color: var(--muted); font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 20px; cursor: pointer; white-space: nowrap; }
.ord-filter-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.ord-filter-count { background: #f3f4f6; color: var(--muted); font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 9px; }
.ord-filter-tab.is-active .ord-filter-count { background: rgba(255, 255, 255, 0.25); color: #fff; }

.ord-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ord-stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ord-stat-dot { width: 10px; height: 10px; border-radius: 50%; }
.ord-stat-value { font-size: 20px; font-weight: 900; color: #0f172a; }
.ord-stat-label { font-size: 12px; color: var(--muted); }

.ord-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); overflow: hidden; margin-bottom: 14px; text-decoration: none; display: block; color: inherit; }
.ord-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f0f5fc; border-bottom: 1px solid var(--border); padding: 14px 18px; }
.ord-card-ref { font-weight: 800; color: var(--navy); font-size: 14px; }
.ord-card-date { color: var(--muted); font-size: 12px; margin-inline-start: 8px; }
.ord-card-body { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.ord-card-thumb { width: 56px; height: 56px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); flex-shrink: 0; }
.ord-card-info { flex: 1; min-width: 0; }
.ord-card-title { font-weight: 700; color: #0f172a; font-size: 14.5px; }
.ord-card-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ord-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ord-card-price { font-weight: 900; color: var(--navy); font-size: 16px; }
.ord-card-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ord-card-banner { display: flex; align-items: center; gap: 10px; background: #fffbeb; border-top: 1px solid var(--border); padding: 12px 18px; color: #92400e; font-size: 13px; font-weight: 600; }

.ord-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; }
.ord-badge-pending { background: #fef3c7; color: #d97706; }
.ord-badge-confirmed { background: #e8f0fb; color: #1a3d6b; }
.ord-badge-shipped { background: #ede9fe; color: #7c3aed; }
.ord-badge-delivered { background: #dcfce7; color: #16a34a; }
.ord-badge-cancelled { background: #fee2e2; color: #dc2626; }

.ord-detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ord-detail-header .ord-badge { margin-inline-start: auto; }
.ord-summary-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.ord-summary-ref { font-weight: 900; color: var(--navy); font-size: 18px; }
.ord-summary-date { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ord-summary-total-label { color: var(--muted); font-size: 12.5px; text-align: end; }
.ord-summary-total-value { font-weight: 900; color: var(--navy); font-size: 22px; text-align: end; }

.ord-item-group { margin-bottom: 20px; }
.ord-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ord-grid { grid-template-columns: 1fr; } }
.ord-panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); overflow: hidden; }
.ord-panel-head { background: #f0f5fc; border-bottom: 1px solid var(--border); padding: 12px 18px; font-weight: 800; font-size: 13.5px; color: #0f172a; }
.ord-panel-body { padding: 16px 18px; }

.ord-product-row { display: flex; gap: 14px; align-items: flex-start; }
.ord-product-thumb { width: 56px; height: 56px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; border: 1px solid var(--border); flex-shrink: 0; }
.ord-product-info { flex: 1; min-width: 0; }
.ord-product-title { font-weight: 700; color: #0f172a; font-size: 14.5px; }
.ord-product-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ord-product-price { font-weight: 800; color: var(--navy); font-size: 15px; white-space: nowrap; }
.ord-line-rows { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ord-line-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ord-line-row strong { color: #0f172a; font-weight: 600; }
.ord-line-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.ord-line-total strong:first-child { color: #0f172a; font-weight: 800; font-size: 14px; }
.ord-line-total strong:last-child { color: var(--navy); font-weight: 900; font-size: 16px; }

.ord-timeline { display: flex; flex-direction: column; }
.ord-timeline-step { display: flex; gap: 14px; position: relative; padding-bottom: 26px; }
.ord-timeline-step:last-child { padding-bottom: 0; }
.ord-timeline-step::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: #e2e8f0; }
.ord-timeline-step:last-child::before { display: none; }
.ord-timeline-step.is-line-done::before { background: var(--navy); }
.ord-timeline-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--navy); color: #fff; border: 2px solid var(--navy); z-index: 1; }
.ord-timeline-dot.is-done { background: #16a34a; border-color: #16a34a; }
.ord-timeline-dot.is-future { background: #fff; color: #cbd5e1; border-color: #e2e8f0; }
.ord-timeline-label { font-weight: 700; color: #0f172a; font-size: 14px; }
.ord-timeline-label.is-future { color: #94a3b8; }
.ord-timeline-time { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ord-timeline-cancelled { display: flex; gap: 14px; align-items: flex-start; }
.ord-timeline-reason { color: var(--muted); font-size: 13px; margin-top: 6px; }

.ord-delivery-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ord-delivery-row:last-child { margin-bottom: 0; }
.ord-delivery-row svg { color: var(--navy); flex-shrink: 0; margin-top: 2px; }
.ord-delivery-text { font-size: 13.5px; color: #0f172a; }

.ord-seller-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ord-seller-avatar { width: 48px; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 18px; flex-shrink: 0; background: linear-gradient(135deg, #1a3d6b 0%, #2756a8 100%); }
.ord-seller-info { flex: 1; min-width: 0; }
.ord-seller-name { font-weight: 800; color: #0f172a; font-size: 14.5px; }
.ord-seller-rating { display: flex; align-items: center; gap: 2px; margin-top: 3px; color: #f59e0b; }
.ord-seller-rating-value { color: var(--muted); font-size: 12px; margin-inline-start: 4px; }
.ord-seller-contact { display: inline-flex; align-items: center; gap: 6px; background: #e8f0fb; border: 1.5px solid var(--navy); color: var(--navy); font-weight: 700; font-size: 12.5px; padding: 9px 14px; border-radius: 10px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.ord-seller-contact:hover { background: #dbe8f9; }

.ord-review-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; font-weight: 800; font-size: 13.5px; padding: 12px 20px; border-radius: 12px; border: none; cursor: pointer; box-shadow: 0 4px 10px rgba(26, 61, 107, 0.2); text-decoration: none; }
.ord-review-cta:hover { background: #16335c; }
.ord-review-display { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; color: #f59e0b; }
.ord-review-comment { color: var(--muted); font-size: 12.5px; margin-inline-start: 8px; }

.ord-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #eef4fb; border: 1px solid #d7e6f7; border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.ord-action-text strong { display: block; color: #0f172a; font-size: 14px; font-weight: 800; }
.ord-action-text span { color: var(--muted); font-size: 12.5px; }
.ord-action-btn { border: none; border-radius: 11px; padding: 11px 20px; font-weight: 800; font-size: 13px; color: #fff; cursor: pointer; white-space: nowrap; }
.ord-action-btn.is-confirm { background: var(--navy); }
.ord-action-btn.is-confirm:hover { background: #16335c; }
.ord-action-btn.is-ship { background: #7c3aed; }
.ord-action-btn.is-ship:hover { background: #6d28d9; }
.ord-action-btn.is-deliver { background: #16a34a; }
.ord-action-btn.is-deliver:hover { background: #128a3e; }
.ord-action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Review modal — extends .modal-overlay/.modal-card from components.css */
.ord-review-modal { max-width: 560px; padding: 0; overflow: hidden; }
.ord-review-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--border); }
.ord-review-modal-title { font-size: 18px; font-weight: 800; color: #0f172a; margin: 0; }
.ord-review-modal-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ord-review-modal-close { width: 36px; height: 36px; border-radius: 50%; background: #f1f5f9; border: none; display: flex; align-items: center; justify-content: center; color: #475569; cursor: pointer; flex-shrink: 0; }
.ord-review-modal-body { padding: 22px 26px 26px; }
.ord-review-product { display: flex; align-items: center; gap: 14px; background: #f0f5fc; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; }
.ord-review-product-thumb { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; border: 1px solid var(--border); flex-shrink: 0; }
.ord-review-product-title { font-weight: 700; color: #0f172a; font-size: 14px; }
.ord-review-product-seller { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ord-review-label { font-weight: 700; color: #0f172a; font-size: 14px; margin-bottom: 10px; }
.ord-star-picker { display: flex; gap: 6px; margin-bottom: 22px; }
.ord-star-picker button { background: none; border: none; padding: 2px; cursor: pointer; color: #cbd5e1; }
.ord-star-picker button.is-active, .ord-star-picker button.is-hover { color: #f5a623; }
.ord-review-textarea { width: 100%; background: #fafbfc; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 13.5px; color: #0f172a; min-height: 110px; resize: vertical; }
.ord-review-textarea:focus { outline: none; border-color: var(--navy); }
.ord-review-count { text-align: end; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.ord-review-submit { width: 100%; margin-top: 20px; background: var(--navy); color: #fff; border: none; border-radius: 13px; padding: 15px; font-weight: 800; font-size: 14.5px; cursor: pointer; }
.ord-review-submit:hover:not(:disabled) { background: #16335c; }
.ord-review-submit:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 640px) {
  .ord-topbar-inner { padding: 10px 14px; }
  .ord-page-inner { padding-inline: 12px; }
  .ord-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .ord-card-body { flex-wrap: wrap; }
  .ord-card-side { align-items: flex-start; width: 100%; }
  .ord-summary-card { flex-direction: column; align-items: flex-start; }
  .ord-summary-total-label, .ord-summary-total-value { text-align: start; }
  .ord-action-bar { flex-direction: column; align-items: stretch; }
  .ord-action-btn { width: 100%; }
}

/* ==========================================================================
   Cart / Checkout — no Figma screen exists for either (see js/pages/cart.js
   and checkout.js file comments), so this reuses the existing Souqly visual
   system: .ord-topbar/.ord-page-body (Orders' page shell), .pd-grid/
   .pd-summary-col (Product Details' sticky sidebar layout), .cl-field/
   .cl-input/.cl-textarea (Create Listing's form fields), and .pd-btn for
   buttons. Only the item-row and summary-line layouts below are new.
   ========================================================================== */

.cart-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.cart-item { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.cart-item.is-unavailable { opacity: 0.65; }
.cart-item-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f3f4f6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 700; color: #0f172a; font-size: 14.5px; text-decoration: none; display: block; }
.cart-item-title:hover { text-decoration: underline; }
.cart-item-seller { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cart-item-unavailable-text { color: #dc2626; font-size: 12px; font-weight: 700; margin-top: 4px; }
.cart-item-price { font-weight: 900; color: var(--navy); font-size: 16px; white-space: nowrap; margin-inline: 16px; }
.cart-item-remove { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: #dc2626; cursor: pointer; flex-shrink: 0; }
.cart-item-remove:hover { background: #fdeeee; border-color: #f3c9c8; }
.cart-item-remove:disabled { opacity: 0.5; cursor: not-allowed; }

.cart-unavailable-banner { display: flex; align-items: flex-start; gap: 10px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; color: #92400e; font-size: 13px; font-weight: 600; }
.cart-unavailable-banner svg { flex-shrink: 0; margin-top: 1px; }

.cart-summary-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); padding: 20px; position: sticky; top: calc(var(--header-total-h, 105px) + 16px); }
.cart-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); padding: 6px 0; }
.cart-summary-row strong { color: #0f172a; font-weight: 700; }
.cart-summary-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cart-summary-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; }
.cart-summary-total strong:first-child { font-size: 15px; font-weight: 800; color: #0f172a; }
.cart-summary-total strong:last-child { font-size: 20px; font-weight: 900; color: var(--navy); }

.checkout-summary-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.checkout-summary-item:last-of-type { border-bottom: none; }
.checkout-summary-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f3f4f6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.checkout-summary-info { flex: 1; min-width: 0; font-size: 12.5px; }
.checkout-summary-title { font-weight: 600; color: #0f172a; }
.checkout-summary-fee { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.checkout-summary-price { font-weight: 800; color: #0f172a; font-size: 13px; white-space: nowrap; }

.checkout-blocked-list { background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.checkout-blocked-title { color: #b91c1c; font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.checkout-blocked-item { color: #b91c1c; font-size: 12.5px; padding: 2px 0; }

.checkout-place-btn { margin-top: 18px; }

.btn-disabled-link { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.btn-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(220, 38, 38, 0.25); border-top-color: #dc2626; animation: cl-spin 0.75s linear infinite; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation: none; } }

@media (max-width: 640px) {
  .cart-item { flex-wrap: wrap; }
  .cart-item-price { margin-inline: 0; order: 3; }
  .cart-summary-card { position: static; }
}
