/* ============================================================
   Searchold — design system
   Warm editorial palette · light/dark · RTL-safe
   ============================================================ */
:root {
  --font: "Manrope", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f7f2ea;
  --surface: #fffdf9;
  --surface-2: #f3ece0;
  --surface-3: #e8ddcb;
  --text: #211a15;
  --muted: #6e6258;
  --border: #e9dfd0;
  --border-strong: #d7c9b5;

  --primary: #9a3412;
  --primary-hover: #7c2d12;
  --primary-soft: #ffedd5;
  --primary-grad: linear-gradient(135deg, #b94e22 0%, #8a2c0f 85%);
  --accent: #b7791f;
  --accent-soft: #faf0d6;
  --danger: #cf3324;
  --success: #0f7b5a;
  --star: #e0a72e;

  --shadow-sm: 0 1px 2px rgba(64, 42, 20, .05), 0 2px 8px -2px rgba(64, 42, 20, .07);
  --shadow: 0 2px 6px rgba(64, 42, 20, .05), 0 20px 44px -20px rgba(64, 42, 20, .28);
  --shadow-lg: 0 4px 10px rgba(64, 42, 20, .06), 0 32px 64px -24px rgba(64, 42, 20, .38);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --max: 1260px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14100c;
  --surface: #1f1913;
  --surface-2: #2a2219;
  --surface-3: #372c20;
  --text: #f7f0e6;
  --muted: #b3a594;
  --border: #342a1f;
  --border-strong: #4b3c2c;

  --primary: #f5a153;
  --primary-hover: #ffb877;
  --primary-soft: #3a2414;
  --primary-grad: linear-gradient(135deg, #ffb26b 0%, #ef8a3a 85%);
  --accent: #eebc63;
  --accent-soft: #332612;
  --danger: #f87171;
  --success: #34d399;
  --star: #f2c14e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 2px 8px rgba(0, 0, 0, .4), 0 24px 48px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .55), 0 40px 80px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .chip.active,
[data-theme="dark"] .avatar,
[data-theme="dark"] .badge.featured { color: #1b1208; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 8% -6%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 62%),
    radial-gradient(900px 460px at 96% 2%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 500 15.5px/1.65 var(--font);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.035em; line-height: 1.18; margin-top: 0; }
p { margin-top: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.container { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; }
.muted { color: var(--muted); }
.link {
  appearance: none; border: 0; background: none; color: var(--primary);
  font-weight: 700; font-size: 14px; white-space: nowrap; padding: 6px 2px;
  display: inline-flex; align-items: center; gap: 6px; transition: gap .18s ease, color .18s ease;
}
.link:hover { gap: 10px; color: var(--primary-hover); }

/* ---------- boot ---------- */
.boot-screen {
  min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: radial-gradient(700px 380px at 50% 30%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%);
}
.boot-logo { width: 250px; max-width: 80vw; animation: pulse 1.4s ease-in-out infinite alternate; }
.boot-text { color: var(--muted); letter-spacing: .24em; text-transform: uppercase; font-size: 10.5px; font-weight: 700; }
@keyframes pulse { to { opacity: .4; transform: scale(.95); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14px;
  white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  text-align: center; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.99); }
.btn-primary {
  background: var(--primary-grad); color: #fff; border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 22px -12px color-mix(in srgb, var(--primary) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 14px 28px -12px color-mix(in srgb, var(--primary) 70%, transparent); filter: brightness(1.04); }
.btn-outline { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--surface); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15.5px; }
.btn-block { width: 100%; }
label:has(input[name="plan"]:checked) { border-color: var(--primary) !important; background: var(--primary-soft); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  font-size: 17px; transition: .18s ease; flex: none;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); transform: translateY(-1px); }
.icon-btn.active { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  transition: box-shadow .22s ease, background .22s ease;
}
.site-header.scrolled { background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 12px 30px -18px rgba(50, 30, 10, .45); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 800; letter-spacing: -.045em; flex: none; }
.brand b { color: var(--primary); font-weight: inherit; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; flex: none; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.brand small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-top: -1px; }

.header-search {
  display: flex; align-items: center; flex: 1; max-width: 560px; position: relative;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 999px;
  padding: 4px; transition: .2s ease;
}
.header-search:focus-within { background: var(--surface); border-color: var(--border-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.header-search input {
  width: 100%; border: 0; background: transparent; outline: none; min-width: 0;
  padding: 8px 14px 8px 38px; padding-inline-start: 38px; padding-inline-end: 12px; font-size: 14px;
}
.header-search input::placeholder { color: var(--muted); }
.header-search .search-icon { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.header-search .btn { padding: 7px 16px; font-size: 13px; }
.header-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.country-label { display: none; }
.country-select, .lang-select, .currency-select {
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 650;
  max-width: 150px; outline: none; transition: .18s ease;
}
.country-select:hover, .lang-select:hover, .currency-select:hover { border-color: var(--border-strong); background: var(--surface); }
.country-select { background: var(--primary-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); font-weight: 700; }
.country-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.lang-select, .currency-select { max-width: 128px; }
.mobile-only { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 76px 0 56px;
  background:
    radial-gradient(920px 420px at 50% -45%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(640px 320px at 88% 8%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%),
    var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.2px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 72%);
  opacity: .5;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 840px; margin-inline: auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em; margin-bottom: 22px;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
}
.hero h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -.045em; margin: 0 0 18px; }
.hero h1 span {
  display: inline-block;
  background: var(--primary-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(15px, 1.9vw, 18.5px); max-width: 620px; margin: 0 auto 30px; line-height: 1.65; }
.hero-search {
  display: flex; gap: 8px; padding: 7px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow); max-width: 680px; margin: 0 auto 22px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.hero-search:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.hero-search input { flex: 1; border: 0; background: transparent; padding: 10px 20px; outline: none; min-width: 0; font-size: 15px; }
.hero-search input::placeholder { color: var(--muted); }
.hero-search .btn { min-width: 150px; }
.hero-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip {
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 72%, transparent); color: var(--muted);
  font-size: 12.5px; font-weight: 600; transition: .18s ease; backdrop-filter: blur(6px);
}
.chip:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--surface); transform: translateY(-1px); }
.chip.active { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.stat { text-align: center; padding-inline: 34px; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat b {
  display: block; font-size: 30px; letter-spacing: -.04em; line-height: 1.15;
  background: var(--primary-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- sections ---------- */
main { animation: pageIn .4s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.section { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.035em; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- trending ---------- */
.trend-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.trend-item {
  display: flex; align-items: center; gap: 13px; padding: 16px 20px; min-width: 200px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: .2s ease; scroll-snap-align: start; box-shadow: var(--shadow-sm);
}
.trend-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--surface); transform: translateY(-2px); box-shadow: var(--shadow); }
.trend-item .emoji { font-size: 27px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); flex: none; }
.trend-item b { display: block; font-size: 13.5px; }
.trend-item small { color: var(--muted); font-size: 12px; }
.trend-rank {
  margin-inline-start: auto; min-width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 11.5px; font-weight: 800;
}

/* ---------- categories ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card {
  display: grid; place-items: center; gap: 10px; padding: 22px 12px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: .22s ease; box-shadow: var(--shadow-sm);
}
.category-card .emoji {
  font-size: 30px; width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 18px; background: var(--surface-2); transition: .22s ease;
}
.category-card span:not(.emoji) { font-size: 13px; font-weight: 650; line-height: 1.3; }
.category-card:hover, .category-card.selected {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--surface); transform: translateY(-3px); box-shadow: var(--shadow);
}
.category-card:hover .emoji, .category-card.selected .emoji { background: var(--primary-soft); transform: scale(1.06) rotate(-3deg); }

/* ---------- listing cards ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex; flex-direction: column; cursor: pointer; box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-3); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 42%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(24, 14, 6, .28));
  opacity: .8;
}
.card-badges { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.badge {
  padding: 5px 10px; border-radius: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  background: rgba(255, 253, 248, .95); color: #2a1d12; backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(30, 18, 8, .16); display: inline-flex; align-items: center; gap: 4px;
}
.badge.sold { background: #241a12; color: #fff; }
.badge.new { background: var(--success); color: #fff; }
.badge.featured { background: linear-gradient(135deg, #f7dd92, #e9b949); color: #5b3d05; }
.badge.verified { background: color-mix(in srgb, var(--success) 13%, var(--surface)); color: var(--success); box-shadow: none; border: 1px solid color-mix(in srgb, var(--success) 28%, transparent); }
.badge.rated { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.heart {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px; width: 38px; height: 38px; z-index: 1;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 253, 248, .82);
  color: #4b3a2c; font-size: 18px; display: grid; place-items: center;
  backdrop-filter: blur(10px); transition: .2s ease; box-shadow: 0 4px 14px rgba(30, 18, 8, .18);
}
.heart:hover { transform: scale(1.12); color: #e11d48; }
.heart.active { color: #e11d48; }
.flag {
  position: absolute; inset-block-end: 10px; inset-inline-end: 10px; z-index: 1; font-size: 16px;
  width: 30px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: rgba(255, 253, 248, .86); backdrop-filter: blur(8px); box-shadow: 0 2px 8px rgba(30, 18, 8, .18);
}
.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px;
}
.card-price { font-size: 20px; font-weight: 800; letter-spacing: -.035em; color: var(--primary); line-height: 1.2; }
.card-price small { display: block; font-size: 11px; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.card-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11px; font-weight: 600; margin-top: auto; padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}
.card-meta span:last-child { white-space: nowrap; }

/* ---------- search / filters ---------- */
.search-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search-top h1 { font-size: clamp(23px, 3vw, 30px); margin: 0; letter-spacing: -.035em; }
.filter-bar {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 24px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}
.filter-bar select, .filter-bar input {
  padding: 9px 12px; border: 1px solid transparent; border-radius: 10px;
  background: var(--surface-2); outline: none; font-size: 13px; min-width: 120px; transition: .16s ease;
}
.filter-bar select:hover, .filter-bar input:hover { background: var(--surface-3); }
.filter-bar select:focus, .filter-bar input:focus { background: var(--surface); border-color: var(--border-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
.filter-bar input[type="number"] { width: 110px; }
.filter-bar .price-range { display: flex; gap: 6px; align-items: center; }
.sort-wrap { margin-inline-start: auto; }
.empty { text-align: center; padding: 64px 24px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.empty .emoji { font-size: 46px; display: block; margin-bottom: 14px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty .btn { margin: 6px 4px 0; }
.sold-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px;
  background: var(--surface-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: .16s ease;
}
.sold-toggle:hover { background: var(--surface-3); }
.sold-toggle input { accent-color: var(--primary); width: 15px; height: 15px; }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 40px; align-items: start; }
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #0f0c09; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.thumbs img { width: 80px; height: 64px; object-fit: cover; border-radius: 12px; border: 2px solid transparent; cursor: pointer; transition: .16s ease; opacity: .85; }
.thumbs img:hover { opacity: 1; transform: translateY(-1px); }
.thumbs img.active { border-color: var(--primary); opacity: 1; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.detail-info h1 { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -.04em; margin: 12px 0 14px; }
.detail-price { font-size: clamp(30px, 3.4vw, 38px); font-weight: 800; color: var(--primary); letter-spacing: -.045em; line-height: 1.15; }
.detail-price small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 18px; }
.detail-tags .badge { background: var(--surface-2); color: var(--text); font-size: 11.5px; font-weight: 650; box-shadow: none; padding: 6px 11px; }
.detail-desc { white-space: pre-wrap; line-height: 1.85; color: var(--text); margin: 20px 0 28px; font-size: 15px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.seller-card {
  display: flex; gap: 15px; align-items: center; padding: 17px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, var(--surface)), var(--surface));
  margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px; flex: none;
  background: var(--primary-grad); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary) 80%, transparent);
}
.seller-card b { display: block; }
.seller-card small, .seller-card .stars span { color: var(--muted); }
.safety {
  display: flex; gap: 13px; padding: 17px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); font-size: 13px; line-height: 1.65;
}
.safety-alert {
  display: flex; gap: 15px; align-items: flex-start; padding: 20px 22px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 8%, var(--surface)), var(--surface));
  line-height: 1.65; box-shadow: var(--shadow-sm);
}
.safety-alert b { display: block; color: var(--danger); font-size: 15.5px; margin-bottom: 3px; }
.safety-alert p { margin: 0; font-size: 13px; color: var(--text); }
.safety-icon { font-size: 22px; line-height: 1; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--danger) 11%, transparent); }

/* ---------- ratings & reviews ---------- */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 15px; line-height: 1; }
.stars .star.filled { color: var(--star); }
.stars span:not(.star) { margin-inline-start: 6px; font-size: 12px; }
.reviews { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.reviews h3 { margin: 0 0 14px; font-size: 17px; }
.review-item { padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 9px; }
.review-item b { display: block; margin-top: 5px; font-size: 13px; }
.review-item p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.rating-picker { display: flex; justify-content: center; gap: 8px; margin: 6px 0 22px; }
.rating-option {
  display: grid; place-items: center; gap: 2px; width: 52px; padding: 9px 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: .16s ease; position: relative;
}
.rating-option input { position: absolute; opacity: 0; pointer-events: none; }
.rating-option span { font-size: 25px; line-height: 1; color: var(--muted); transition: .16s ease; }
.rating-option small { font-size: 11px; color: var(--muted); }
.rating-option:hover, .rating-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.rating-option:has(input:checked) span, .rating-option:hover span { color: var(--star); transform: scale(1.08); }
.profile-rating { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-rating small { color: var(--muted); font-size: 11px; }
.profile-rating span { font-size: 12px; color: var(--muted); margin-inline-start: 6px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 650; }
.required { color: var(--danger); }
.required-note { display: block; color: var(--danger); font-weight: 600; margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: .16s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.field .hint { font-size: 11px; color: var(--muted); }
.form-card {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.form-head { margin-bottom: 24px; }
.form-head h1 { margin: 0 0 5px; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.035em; }
.form-head p { margin: 0; color: var(--muted); font-size: 14px; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 30px; text-align: center;
  background: var(--surface-2); transition: .18s ease; cursor: pointer;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.invalid { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.dropzone .emoji { font-size: 32px; display: block; }
.dropzone b { display: block; margin: 6px 0 2px; }
.dropzone small { color: var(--muted); }
.rules-box {
  margin-bottom: 22px; padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 6%, var(--surface)), var(--surface));
}
.rules-box .rules-head { font-weight: 800; font-size: 15px; margin-bottom: 6px; color: var(--danger); }
.rules-box p { margin: 0; font-size: 13px; line-height: 1.7; }
.rules-box-compact { margin-bottom: 16px; padding: 13px 15px; border-radius: var(--radius-sm); }
.rules-box-compact p { font-size: 12.5px; }
.rules-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.rules-accept {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 24px; padding: 15px 17px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 13px; line-height: 1.65; cursor: pointer; transition: .16s ease;
}
.rules-accept:hover { border-color: var(--primary); }
.rules-accept input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.biz-card { display: grid; gap: 4px; padding: 14px 15px; margin-top: 10px; border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--success) 6%, var(--surface)); font-size: 13px; }
.biz-card small { color: var(--muted); }
.biz-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.biz-form select, .biz-form input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; }
.biz-form select:focus, .biz-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
.biz-form input { flex: 1; min-width: 140px; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.preview { position: relative; width: 86px; height: 70px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button { position: absolute; inset-block-start: 3px; inset-inline-end: 3px; border: 0; border-radius: 50%; width: 22px; height: 22px; background: rgba(15, 10, 6, .7); color: #fff; font-size: 12px; line-height: 1; }
.preview.main { outline: 3px solid var(--primary); }
.preview.main::after { content: "★"; position: absolute; inset-block-end: 2px; inset-inline-start: 4px; color: var(--star); font-size: 12px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(26, 16, 8, .58);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  display: grid; place-items: center; padding: 20px; animation: fade .2s ease;
}
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg); animation: pop .26s cubic-bezier(.2, .8, .2, 1);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.modal-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.modal-switch button { border: 0; background: none; color: var(--primary); font-weight: 700; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* lightbox / zoom image if used */
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(10, 7, 4, .92); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; }

/* ---------- toast ---------- */
#toast-root { position: fixed; inset-block-end: 24px; inset-inline-end: 24px; z-index: 200; display: grid; gap: 10px; pointer-events: none; }
.toast {
  padding: 13px 18px; border-radius: 14px; background: #241a12; color: #fff; box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 600; animation: slide .28s cubic-bezier(.2, .8, .2, 1); max-width: 340px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.toast.error { background: #a92f22; }
.toast.success { background: #0c6b50; }
@keyframes slide { from { opacity: 0; transform: translateX(30px); } }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 26px; align-items: start; }
.profile-side {
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.profile-side::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 90px;
  background: radial-gradient(420px 120px at 50% 0, color-mix(in srgb, var(--primary) 16%, transparent), transparent 75%);
  pointer-events: none;
}
.profile-side .avatar { width: 80px; height: 80px; font-size: 30px; margin: 0 auto 14px; position: relative; }
.profile-side h2 { margin: 0 0 4px; font-size: 21px; }
.profile-side small { color: var(--muted); }
.mini-stats { display: flex; justify-content: center; gap: 22px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.mini-stats b { display: block; font-size: 20px; letter-spacing: -.03em; }
.mini-stats span { font-size: 11px; color: var(--muted); font-weight: 650; }
.tab-bar { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 11px 16px; border: 0; background: none; font-weight: 700; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; transition: .16s ease; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-color: var(--primary); }
.saved-search { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 9px; box-shadow: var(--shadow-sm); }
.saved-search b { font-size: 14px; }
.saved-search small { color: var(--muted); }
.saved-search .spacer { flex: 1; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 64px; border-top: 1px solid var(--border); position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface-2) 70%, var(--surface)) 100%);
}
.site-footer::before {
  content: ""; position: absolute; inset-block-start: -1px; inset-inline: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 55%, transparent), transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr; gap: 44px; padding: 52px 0 36px; }
.footer-grid .brand { font-size: 22px; }
.footer-grid h3 { font-size: 11px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.footer-grid p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.75; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 12px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-company { color: var(--muted); font-size: 12px; padding-top: 4px; }
.footer-prefs { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-prefs select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  font-size: 12px; max-width: 150px; outline: none; transition: .16s ease;
}
.footer-prefs select:hover { border-color: var(--border-strong); }
.footer-prefs select:focus { border-color: var(--primary); }
.footer-legal { display: flex; gap: 18px; justify-content: center; padding: 16px 0 22px; font-size: 12px; flex-wrap: wrap; }
.footer-legal a { color: var(--muted); text-decoration: none; transition: .16s ease; }
.footer-legal a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- cookie bar ---------- */
.cookie-bar {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 15px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); font-size: 13px; max-width: 900px; margin-inline: auto;
}
.cookie-bar span { flex: 1 1 320px; }
.cookie-bar a { color: var(--primary); font-weight: 650; }

/* ---------- misc lists ---------- */
.msg-btn, .note-btn { position: relative; }
.nav-badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1; pointer-events: none;
  box-shadow: 0 2px 6px rgba(30, 10, 5, .35);
}
.photo-manage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-manage:empty { display: none; }
.photo-thumb { position: relative; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 999px; border: 0;
  background: rgba(20, 12, 6, .74); color: #fff; font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.photo-remove:hover { background: var(--danger); }
.admin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; }
.admin-row-main { flex: 1 1 240px; min-width: 0; }
.admin-row-main b { overflow-wrap: anywhere; }
.admin-row .badge { margin-inline-start: 6px; }

/* ---------- notifications ---------- */
.notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow: auto; }
.note-item { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.note-item.unread { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: inset 3px 0 0 var(--primary); }
.note-icon { font-size: 18px; flex: none; }
.note-body { flex: 1 1 auto; min-width: 0; }
.note-body b { display: block; overflow-wrap: anywhere; }
.note-body small { color: var(--muted); display: block; margin-top: 2px; }

/* ---------- analytics ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-grid > div { padding: 18px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: center; box-shadow: var(--shadow-sm); }
.stats-grid b { display: block; font-size: 23px; letter-spacing: -.03em; }
.stats-grid span { font-size: 11.5px; color: var(--muted); font-weight: 650; }

/* ---------- public seller page ---------- */
.seller-link { color: inherit; text-decoration: none; }
.seller-link:hover { color: var(--primary); text-decoration: underline; }
.seller-hero {
  display: flex; align-items: center; gap: 20px; padding: 26px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, var(--surface)), var(--surface));
  box-shadow: var(--shadow-sm);
}
.seller-hero .avatar { width: 80px; height: 80px; font-size: 30px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .country-select { display: none; } }
@media (max-width: 1120px) {
  .currency-select { display: none; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; gap: 10px; min-height: 0; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .header-actions [data-action="open-favorites"] { display: none; }
  .header-actions > a.btn-primary { width: 40px; height: 40px; padding: 0; font-size: 0; border-radius: 50%; }
  .header-actions > a.btn-primary::before { content: "＋"; font-size: 19px; line-height: 1; }
}
@media (max-width: 940px) {
  .detail { grid-template-columns: 1fr; gap: 26px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-side { text-align: left; }
  .profile-side .avatar { margin-inline-start: 0; }
  .mini-stats { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero { padding: 58px 0 44px; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { width: min(var(--max), calc(100% - 28px)); }
  .header-inner { flex-wrap: wrap; padding-block: 8px; gap: 8px; min-height: 0; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { gap: 2px; flex-wrap: nowrap; }
  .header-actions [data-action="open-favorites"] { display: none; }
  .header-actions .icon-btn { width: 34px; height: 34px; font-size: 15px; }
  .header-actions > a.btn-primary { width: 34px; height: 34px; padding: 0; font-size: 0; border-radius: 50%; }
  .header-actions > a.btn-primary::before { content: "＋"; font-size: 18px; line-height: 1; }
  .header-actions .btn-outline[data-action="open-profile"] { width: 34px; height: 34px; padding: 0; font-size: 0; border-radius: 50%; }
  .header-actions .btn-outline[data-action="open-profile"]::before { content: "👤"; font-size: 14px; line-height: 1; }
  .country-select { display: none; }
  .lang-select, .currency-select { display: none; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand { font-size: 19px; gap: 8px; }
  .hero { padding: 46px 0 34px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 42px); }
  .hero-search { flex-direction: column; border-radius: var(--radius-lg); padding: 10px; gap: 10px; }
  .hero-search input { padding: 6px 10px; }
  .hero-search .btn { width: 100%; }
  .hero-stats { margin-top: 32px; }
  .stat { padding-inline: 20px; }
  .stat b { font-size: 24px; }
  .section { padding: 40px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px 12px 13px; gap: 5px; }
  .card-title { font-size: 13px; min-height: 38px; }
  .card-price { font-size: 17px; }
  .card-meta { font-size: 10px; padding-top: 8px; }
  .card-meta span:last-child { display: none; }
  .card-badges .badge { padding: 4px 8px; font-size: 9.5px; }
  .heart { width: 34px; height: 34px; font-size: 16px; }
  .flag { width: 26px; height: 22px; font-size: 14px; inset-block-end: 8px; inset-inline-end: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 28px; }
  .sort-wrap { margin-inline-start: 0; width: 100%; }
  .sort-wrap select { width: 100%; }
  #toast-root { inset-inline: 14px; inset-block-end: 14px; }
  .toast { max-width: none; }
  .safety-alert { padding: 16px; }
  .rating-picker { gap: 5px; }
  .rating-option { width: 46px; }
  .detail-actions .btn { flex: 1 1 auto; }
  .modal { padding: 22px 18px; border-radius: 22px; }
  .filter-bar { padding: 10px; gap: 8px; }
  .filter-bar select { flex: 1 1 44%; min-width: 0; }
  .filter-bar .price-range { flex: 1 1 100%; min-width: 0; }
  .filter-bar .price-range input { flex: 1 1 0; width: auto; min-width: 0; }
  .cookie-bar { bottom: 10px; inset-inline: 10px; padding: 12px 14px; }
}
@media (max-width: 640px) {
  .seller-hero { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 0; }
  .stat { flex: 1 1 50%; }
  .stat + .stat { border-inline-start: 0; }
  .stat:nth-child(n+3) { margin-top: 14px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Προσυμπληρωμένα κουμπιά σειράς/διαγραφής φωτογραφιών */
.preview-actions { position:absolute; inset-block-start:3px; inset-inline-end:3px; display:flex; gap:2px; }
.preview .preview-actions button { position:static; width:20px; height:20px; border-radius:6px; font-size:11px; padding:0; }
.preview .preview-actions button:disabled { opacity:.35; cursor:not-allowed; }
