/* ==========================================================
   رَفّ — مبني على رموز التصميم في كود المنصات (DGA Platforms Code v1.0.3)
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Brand */
  --primary: #1b8354;
  --primary-hover: #166a45;
  --primary-pressed: #104631;
  --primary-50: #f3fcf6;
  --primary-400: #54c08a;
  --brand-dark: #074d31;

  /* Text */
  --text-display: #1f2a37;
  --text-default: #161616;
  --text-paragraph: #384250;
  --text-secondary: #6c737f;
  --text-disabled: #9da4ae;
  --text-oncolor: #ffffff;

  /* Backgrounds */
  --bg-page: #f9fafb;
  --bg-white: #ffffff;
  --bg-neutral-100: #f3f4f6;
  --bg-neutral-200: #e5e7eb;

  /* Borders & fields */
  --border: #d2d6db;
  --border-light: #e5e7eb;
  --field-border: #9da4ae;
  --field-hover: #384250;
  --field-active: #0d121c;

  /* Semantic */
  --success-text: #085d3a; --success-bg: #ecfdf3; --success-border: #abefc6; --success: #067647;
  --warning-text: #93370d; --warning-bg: #fffaeb; --warning-border: #fedf89; --warning: #b54708;
  --error-text: #912018;   --error-bg: #fef3f2;   --error-border: #fecdca;   --error: #b42318;
  --info-text: #1849a9;    --info-bg: #eff8ff;    --info-border: #b2ddff;    --info: #175cd3;
  --neutral-tag-text: #1f2a37; --neutral-tag-bg: #f9fafb;

  /* Radius */
  --r-xs: 2px; --r-sm: 4px; --r-md: 8px; --r-lg: 16px; --r-full: 9999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px 0 #1018280d;
  --shadow-sm: 0 1px 2px 0 #1018280d, 0 1px 3px 0 #1018280d;
  --shadow-md: 0 2px 4px -2px #1018280f, 0 4px 8px -2px #1018281a;
  --shadow-lg: 0 4px 6px -2px #10182808, 0 12px 16px -4px #10182814;

  --container: 1280px;
  --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-size: 16px; line-height: 24px;
  color: var(--text-paragraph);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--text-display); margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--field-active); outline-offset: 2px; border-radius: var(--r-xs); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex-shrink: 0; }
[hidden] { display: none !important; }
fieldset { min-width: 0; }

/* Type ramp */
.display-sm { font-size: 30px; line-height: 38px; font-weight: 700; }
.display-xs { font-size: 24px; line-height: 32px; font-weight: 600; }
.text-xl { font-size: 20px; line-height: 30px; font-weight: 600; }
.text-lg { font-size: 18px; line-height: 28px; font-weight: 700; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-xs { font-size: 12px; line-height: 18px; font-weight: 500; }
.muted { color: var(--text-secondary); }
@media (max-width: 767px) { .display-sm { font-size: 24px; line-height: 32px; } }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; top: -48px; right: 16px; background: var(--primary); color: #fff; padding: 8px 16px; border-radius: var(--r-sm); z-index: 100; transition: top .15s; }
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: 14px; line-height: 20px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
  text-decoration: none !important;
}
.btn-lg { height: 48px; padding: 0 16px; font-size: 16px; line-height: 24px; }
.btn-sm { height: 32px; padding: 0 8px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--text-oncolor); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-pressed); }
.btn-neutral { background: var(--bg-page); color: var(--text-default); border-color: var(--border); }
.btn-neutral:hover { background: var(--bg-neutral-100); color: var(--text-default); }
.btn-neutral:active { background: var(--bg-neutral-200); }
.btn-transparent { background: transparent; color: var(--primary); }
.btn-transparent:hover { background: var(--bg-neutral-100); color: var(--primary-hover); }
.btn:disabled, .btn[aria-disabled=true] { background: var(--bg-neutral-200); color: var(--text-disabled); border-color: transparent; cursor: not-allowed; }

/* ---------- Header (Nav Header) ---------- */
.site-header { background: var(--bg-white); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text-display); font-size: 20px; line-height: 30px; font-weight: 700; text-decoration: none !important; }
.brand:hover { color: var(--text-display); }
.brand-mark { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--primary); color: #fff; display: grid; place-items: center; }
.brand small { display: block; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--text-secondary); }
.main-nav { display: flex; height: 100%; gap: 4px; }
.main-nav a { display: flex; align-items: center; padding: 0 12px; color: var(--text-paragraph); font-weight: 500; position: relative; text-decoration: none; }
.main-nav a:hover { color: var(--text-default); background: var(--bg-page); }
.main-nav a[aria-current=page] { color: var(--primary); }
.main-nav a[aria-current=page]::after { content: ''; position: absolute; inset: auto 12px 0 12px; height: 4px; background: var(--primary); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.header-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 767px) {
  .header-inner { height: 64px; gap: 12px; }
  .main-nav, .hide-mobile { display: none !important; }
  .brand small { display: none; }
}

/* ---------- Tab Bar (mobile shell) ---------- */
.tab-bar { display: none; }
@media (max-width: 767px) {
  .tab-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 40;
    background: var(--bg-white); border-top: 1px solid var(--border-light); padding: 4px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .tab-bar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; font-weight: 500; text-decoration: none; border-radius: var(--r-md); position: relative; }
  .tab-bar a[aria-current=page] { color: var(--primary); }
  .tab-bar a[aria-current=page]::before { content: ''; position: absolute; top: -5px; width: 32px; height: 3px; background: var(--primary); border-radius: 0 0 var(--r-sm) var(--r-sm); }
  body.with-tabbar { padding-bottom: 84px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: #ffffffcc; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.site-footer h3 { color: #fff; font-size: 16px; line-height: 24px; font-weight: 600; margin-bottom: 12px; }
.site-footer p { margin: 8px 0 0; font-size: 14px; line-height: 20px; max-width: 420px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.site-footer a { color: #ffffffcc; }
.site-footer a:hover { color: #fff; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand-mark { background: #ffffff1a; }
.site-footer .brand small { color: #ffffffcc; }
.footer-bottom { border-top: 1px solid #ffffff33; padding: 16px 0; font-size: 12px; line-height: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 599px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 24px 0 16px; font-size: 14px; line-height: 20px; }
.breadcrumb li { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.breadcrumb li[aria-current] { color: var(--text-default); font-weight: 500; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field, .field-row + .field, .field + .field-row { margin-top: 24px; }
.label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-default); }
.label .req { color: var(--error); }
.hint { font-size: 12px; line-height: 18px; color: var(--text-secondary); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 16px 8px 8px; padding-inline: 16px 8px;
  border: 1px solid var(--field-border); border-radius: var(--r-sm); background: var(--bg-white);
  font: inherit; font-size: 16px; color: var(--text-default); outline: none;
}
.textarea { padding: 8px 16px; resize: vertical; min-height: 96px; }
.input::placeholder, .textarea::placeholder { color: var(--text-secondary); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--field-hover); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--field-active); box-shadow: inset 0 0 0 1px var(--field-active); }
.select { appearance: none; padding-inline: 16px 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23384250' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; }
.has-error .input, .has-error .textarea, .has-error .input-group { border-color: var(--error); }
.error-msg { display: none; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; color: var(--error); }
.has-error .error-msg { display: flex; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 599px) { .field-row { grid-template-columns: minmax(0, 1fr); } .field-row .field + .field { margin-top: 8px; } }

.input-group { display: flex; direction: ltr; border: 1px solid var(--field-border); border-radius: var(--r-sm); background: var(--bg-white); overflow: hidden; }
.input-group:hover { border-color: var(--field-hover); }
.input-group:focus-within { border-color: var(--field-active); box-shadow: inset 0 0 0 1px var(--field-active); }
.input-group .addon { display: flex; align-items: center; padding: 0 12px; background: var(--bg-neutral-100); color: var(--text-paragraph); font-weight: 500; border-right: 1px solid var(--border); }
.input-group input { border: 0; outline: 0; flex: 1; min-width: 0; height: 38px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--text-default); letter-spacing: .5px; background: transparent; }
.input-group.rtl { direction: rtl; }
.input-group .end { display: flex; align-items: center; padding: 0 12px; color: var(--text-secondary); direction: rtl; }

/* Radio cards */
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 12px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; }
.radio-card label { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; background: var(--bg-white); height: 100%; }
.radio-card label:hover { border-color: var(--field-hover); }
.radio-card .dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #6c737f; flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; }
.radio-card b { display: block; color: var(--text-default); font-weight: 600; }
.radio-card small { display: block; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.radio-card input:checked + label { border-color: var(--primary); background: var(--primary-50); box-shadow: inset 0 0 0 1px var(--primary); }
.radio-card input:checked + label .dot { border-color: var(--primary); }
.radio-card input:checked + label .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.radio-card input:focus-visible + label { outline: 2px solid var(--field-active); outline-offset: 2px; }

/* ---------- Chips (filters) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--bg-white); color: var(--text-paragraph);
  font-size: 14px; line-height: 20px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--bg-neutral-100); }
.chip[aria-pressed=true] { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips input:checked + label.chip { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.chips input:focus-visible + label.chip { outline: 2px solid var(--field-active); outline-offset: 2px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex-shrink: 0; background: none; border: 0; height: 48px; padding: 0 16px; font-size: 16px; font-weight: 500; color: var(--text-secondary); cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 8px; }
.tabs button:hover { color: var(--text-default); }
.tabs button[aria-selected=true] { color: var(--primary); font-weight: 600; }
.tabs button[aria-selected=true]::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 3px; background: var(--primary); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.tabs .count { font-size: 12px; line-height: 18px; background: var(--bg-neutral-100); color: var(--text-paragraph); padding: 0 8px; border-radius: var(--r-full); }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; line-height: 18px; font-weight: 500; border: 1px solid; white-space: nowrap; }
.tag-neutral { color: var(--neutral-tag-text); background: var(--neutral-tag-bg); border-color: var(--border); }
.tag-success { color: var(--success-text); background: var(--success-bg); border-color: var(--success-border); }
.tag-info { color: var(--info-text); background: var(--info-bg); border-color: var(--info-border); }
.tag-warning { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-border); }
.tag-brand { color: var(--primary-pressed); background: var(--primary-50); border-color: #abefc6; }

/* ---------- Inline alert ---------- */
.alert { display: flex; gap: 16px; padding: 16px 24px; border-radius: var(--r-md); border: 1px solid; }
.alert .alert-title { color: inherit; font-weight: 600; font-size: 16px; line-height: 24px; margin: 0; }
.alert p { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--text-paragraph); }
.alert-warning { background: #fffcf5; border-color: var(--warning-border); color: var(--warning); }
.alert-info { background: #f5faff; border-color: var(--info-border); color: var(--info); }
.alert-success { background: #f6fef9; border-color: var(--success-border); color: var(--success); }
@media (max-width: 599px) { .alert { padding: 16px; gap: 12px; } }

/* ---------- Card ---------- */
.card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 24px; }
@media (max-width: 599px) { .card-pad { padding: 16px; } }

/* ---------- Home ---------- */
.hero { background: var(--bg-white); border-bottom: 1px solid var(--border-light); }
.hero-inner { padding-block: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 36px; line-height: 44px; font-weight: 700; }
.hero h1 span { color: var(--primary); }
.hero .lead { font-size: 18px; line-height: 28px; color: var(--text-paragraph); margin: 16px 0 24px; max-width: 560px; }
.hero-inner > * { min-width: 0; }
.search-bar { display: flex; gap: 8px; max-width: 600px; }
.search-bar .input-wrap { position: relative; flex: 1; min-width: 0; }
.search-bar .input-wrap .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.search-bar .input { height: 48px; padding-inline: 44px 12px; }
.hero-sell { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 16px; max-width: 600px; background: var(--primary-50); border: 1px solid #abefc6; border-radius: var(--r-md); }
.hero-sell-icon { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--bg-white); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.hero-sell-text { flex: 1; min-width: 0; }
.hero-sell-text b { display: block; color: var(--text-display); font-weight: 600; }
.hero-sell-text span { font-size: 14px; line-height: 20px; color: var(--text-paragraph); }
@media (max-width: 599px) { .hero-sell { flex-wrap: wrap; } .hero-sell .btn { width: 100%; } }

/* Stats section */
.stats-section { background: var(--bg-white); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); padding: 48px 0 56px; margin-top: 64px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.stat-icon { width: 64px; height: 52px; border-radius: var(--r-sm); background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.stat-num { font-size: 48px; line-height: 60px; font-weight: 500; color: var(--brand-dark); font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.stat-label { color: var(--text-default); font-weight: 500; }
@media (max-width: 767px) {
  .stats-section { padding: 32px 0 40px; margin-top: 48px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; margin-top: 28px; }
  .stat-num { font-size: 36px; line-height: 44px; }
}
.hero-stats { display: flex; gap: 32px; margin-top: 32px; }
.hero-stats b { display: block; font-size: 24px; line-height: 32px; color: var(--text-display); font-weight: 700; }
.hero-stats span { font-size: 14px; color: var(--text-secondary); }
.hero-art img { width: 100%; height: auto; }
@media (max-width: 899px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-block: 32px; gap: 24px; }
  .hero-art { display: none; }
  .hero h1 { font-size: 30px; line-height: 38px; }
  .hero .lead { font-size: 16px; line-height: 24px; margin: 8px 0 20px; }
  .hero-stats { gap: 24px; margin-top: 24px; }
}

.browse { padding-top: 32px; }
.browse-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-panel { padding: 0 24px 24px; margin-bottom: 24px; }
.filter-group { margin-top: 20px; }
.filter-group > .label { display: block; margin-bottom: 8px; }
.filter-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }
@media (max-width: 599px) { .filter-panel { padding: 0 16px 16px; } .tabs button { flex: 1 0 auto; justify-content: center; padding: 0 10px; font-size: 15px; } }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.active-filters .chip { height: 28px; font-size: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 24px; }
@media (max-width: 599px) { .grid { gap: 16px; } }

/* Book card — حسب تصميم Stitch */
.book-card { display: flex; flex-direction: column; padding: 8px; border-radius: var(--r-lg); transition: box-shadow .2s, transform .2s; }
.book-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.bc-cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg-neutral-100); }
.bc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.book-card:hover .bc-cover img { transform: scale(1.04); }
.bc-icon { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 10px; background: #d3f4e0; color: var(--primary-pressed); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.bc-cover > .tag { position: absolute; bottom: 10px; right: 10px; background: #ffffffeb; }
.bc-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 8px; flex: 1; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.book-card h3 { font-size: 17px; line-height: 26px; font-weight: 700; }
.book-card h3 a { color: var(--text-display); }
.book-card h3 a:hover { color: var(--primary); text-decoration: none; }
.bc-desc { margin: 0; font-size: 13px; line-height: 21px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.bc-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.bc-meta li { display: inline-flex; align-items: center; gap: 4px; }
.bc-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.bc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bc-actions .btn { height: 40px; padding: 0 8px; font-size: 14px; font-weight: 600; border-radius: var(--r-md); }
.price { font-size: 22px; line-height: 30px; font-weight: 700; color: var(--primary); }
.price small { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.price.free { color: var(--success); font-size: 20px; }
@media (max-width: 599px) { .book-card { padding: 6px; } .bc-body { padding: 10px 6px 6px; } }

/* Filter bar — نمط فلاتر الخدمات */
.input-dark { background-color: var(--bg-neutral-100); border-color: transparent; }
.input-dark:disabled { color: var(--text-disabled); cursor: not-allowed; }
.input-dark:disabled:hover { border-color: transparent; }
.filter-bar { margin-bottom: 0; }
.fb-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; align-items: end; }
.fb-fields-search { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.browse-more { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.browse-more:empty { display: none; }
.pop-link { text-decoration: none !important; display: inline-block; }
.pop-link:hover { color: #fff; }
.fb-search { position: relative; }
.fb-search .icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.fb-search .input { height: 52px; padding-inline: 48px 16px; font-size: 16px; }
.fb-fields .field + .field { margin-top: 0; }
.fb-mobile { display: none; }
.fb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--primary); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 24px 0 16px; }
@media (max-width: 1199px) { .fb-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .fb-mobile { display: flex; }
  .fb-fields { display: none; grid-template-columns: minmax(0, 1fr); margin-top: 16px; padding: 16px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--r-lg); }
  .filter-bar.open .fb-fields { display: grid; }
  .divider { margin: 16px 0 12px; }
}

.empty-state { grid-column: 1/-1; text-align: center; padding: 48px 16px; }
.empty-state .icon-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-neutral-100); color: var(--text-secondary); display: grid; place-items: center; margin: 0 auto 16px; }
.empty-state p { margin: 4px 0 20px; color: var(--text-secondary); }

.how { padding: 48px 0 0; }
.how h2 { margin-bottom: 24px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step .icon-box { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.step h3 { font-size: 18px; line-height: 28px; font-weight: 700; }
.step p { margin: 0; font-size: 14px; line-height: 20px; }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Book details ---------- */
.book-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 899px) { .book-layout { grid-template-columns: 1fr; gap: 24px; } }
.gallery { padding: 16px; }
.gallery-main { position: relative; aspect-ratio: 4/5; max-height: 600px; width: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--bg-neutral-100); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-white); color: var(--text-default); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.g-nav:hover { background: var(--bg-neutral-100); }
.g-prev { right: 12px; } .g-next { left: 12px; }
.g-count { position: absolute; bottom: 12px; left: 12px; background: #0d121ccc; color: #fff; font-size: 12px; line-height: 18px; padding: 2px 8px; border-radius: var(--r-full); }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding: 2px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--r-md); background: none; cursor: pointer; flex-shrink: 0; }
.thumbs img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; }
.thumbs button[aria-current=true] { border-color: var(--primary); }

.details h1 { font-size: 30px; line-height: 38px; font-weight: 700; margin: 8px 0 4px; }
.details .big-price { font-size: 30px; line-height: 38px; font-weight: 700; color: var(--primary); margin: 16px 0 0; }
.details .big-price small { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.spec-list { margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-light); border-radius: var(--r-md); overflow: hidden; }
.spec-list div { padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.spec-list div:nth-child(odd) { border-left: 1px solid var(--border-light); }
.spec-list div:nth-last-child(-n+2) { border-bottom: 0; }
.spec-list dt { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.spec-list dd { margin: 0; color: var(--text-default); font-weight: 500; }
.details .section { margin-top: 24px; }
.details .section h2 { font-size: 16px; line-height: 24px; font-weight: 600; margin-bottom: 8px; }
.details .section p { margin: 0; }
.seller-row { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.seller-row b { color: var(--text-default); display: block; }
.action-stack { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 900px) { .details { position: sticky; top: 96px; } }

.sticky-actions { display: none; }
@media (max-width: 767px) {
  .sticky-actions { display: flex; align-items: center; gap: 12px; position: fixed; inset: auto 0 0 0; z-index: 40; background: var(--bg-white); border-top: 1px solid var(--border-light); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
  .sticky-actions .btn { flex: 1; }
  .sticky-actions .price { white-space: nowrap; }
  body.with-sticky { padding-bottom: 80px; }
  .details .action-stack .btn-primary { display: none; }
}
.section-title { font-size: 20px; line-height: 30px; font-weight: 600; margin: 48px 0 16px; }

/* ---------- Forms page ---------- */
.page-head { padding: 8px 0 24px; }
.page-head p { margin: 8px 0 0; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
@media (max-width: 899px) { .form-layout { grid-template-columns: minmax(0, 1fr); } .form-aside { display: none; } }
.form-section + .form-section { margin-top: 24px; }
.form-section > header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 24px; }
.form-section .num { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.form-section h2 { font-size: 18px; line-height: 28px; font-weight: 700; }
.form-section header p { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
@media (max-width: 599px) { .form-actions { flex-direction: column-reverse; } .form-actions .btn { width: 100%; } }
.form-aside { position: sticky; top: 96px; }
.form-aside ul { margin: 12px 0 0; padding-inline-start: 20px; font-size: 14px; line-height: 20px; display: grid; gap: 8px; }

.uploader { border: 1px dashed var(--field-border); border-radius: var(--r-md); background: var(--bg-page); padding: 24px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; font: inherit; color: inherit; }
.uploader:hover, .uploader.drag { border-color: var(--primary); background: var(--primary-50); }
.uploader .icon-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-white); border: 1px solid var(--border-light); color: var(--primary); display: grid; place-items: center; }
.uploader b { color: var(--text-default); font-weight: 600; }
.has-error .uploader { border-color: var(--error); }
.cam-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cam-actions .btn { width: 100%; }
#photoHint { margin-top: 8px; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-top: 16px; }
.photo-list:empty { display: none; }
.photo { position: relative; aspect-ratio: 4/5; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-light); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .rm { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #ffffffe6; color: var(--error); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.photo .tag { position: absolute; bottom: 6px; right: 6px; }

/* ---------- Login ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; }
@media (max-width: 599px) { .auth-card { padding: 24px 16px; border: 0; box-shadow: none; background: transparent; } .auth-wrap { place-items: start center; padding-top: 16px; } }
.auth-card .brand-mark { width: 48px; height: 48px; margin-bottom: 16px; }
.auth-card h1 { font-size: 24px; line-height: 32px; font-weight: 600; }
.auth-card .sub { margin: 8px 0 24px; color: var(--text-secondary); }
.otp { display: flex; gap: 12px; direction: ltr; justify-content: flex-start; }
.otp input { width: 56px; height: 56px; text-align: center; font: inherit; font-size: 24px; font-weight: 600; color: var(--text-default); border: 1px solid var(--field-border); border-radius: var(--r-sm); outline: 0; }
.otp input:hover { border-color: var(--field-hover); }
.otp input:focus { border-color: var(--field-active); box-shadow: inset 0 0 0 1px var(--field-active); }
.has-error .otp input { border-color: var(--error); }
.resend-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; margin-bottom: 16px; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 88px; left: 50%; transform: translate(-50%, -12px); z-index: 60; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--r-md); background: #f6fef9; border: 1px solid var(--success-border); color: var(--success); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .2s; font-weight: 500; }
.toast span { color: var(--text-default); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check .box { width: 20px; height: 20px; border: 1px solid #6c737f; border-radius: var(--r-xs); flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; background: var(--bg-white); }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box::after { content: ''; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible + .box { outline: 2px solid var(--field-active); outline-offset: 2px; }
.check b { display: block; color: var(--text-default); font-weight: 600; }
.check small { display: block; font-size: 14px; line-height: 20px; color: var(--text-paragraph); margin-top: 2px; }
.has-error .check .box { border-color: var(--error); }
.has-error .error-msg { margin-top: 4px; }

/* Report */
.report-link { margin-top: 12px; color: var(--text-secondary); }
.report-link:hover { color: var(--error); }
.modal { border: 0; border-radius: var(--r-lg); padding: 24px; width: min(480px, calc(100% - 32px)); box-shadow: var(--shadow-lg); color: var(--text-paragraph); }
.modal::backdrop { background: #0d121c80; }
.report-reasons { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; color: var(--text-default); }
.radio-row:hover { background: var(--bg-page); }
.radio-row input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
.radio-row:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }

/* Terms page */
.terms { max-width: 760px; }
.terms h2 { font-size: 20px; line-height: 30px; font-weight: 600; margin: 32px 0 8px; }
.terms p, .terms li { line-height: 26px; }
.terms ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.terms .ok li::marker { content: '✓  '; color: var(--success); }
.terms .no li::marker { content: '✕  '; color: var(--error); }

/* الأكثر بحثاً */
.popular-wrap { padding-top: 40px; }
.popular { border-radius: var(--r-lg); padding: 48px 40px; color: #fff; background: linear-gradient(120deg, #1b8354 0%, #14573a 55%, #074d31 100%); position: relative; overflow: hidden; }
.popular::after { content: ''; position: absolute; inset: auto auto -120px -80px; width: 320px; height: 320px; border-radius: 50%; background: #ffffff0d; pointer-events: none; }
.popular h2 { color: #fff; font-size: 30px; line-height: 38px; font-weight: 700; }
.popular p { margin: 12px 0 0; color: #ffffffd9; font-size: 16px; line-height: 24px; max-width: 640px; }
.popular-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; position: relative; z-index: 1; }
.pop-link { font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; color: #fff; background: #ffffff26; border: 1px solid #ffffff33; border-radius: var(--r-sm); padding: 10px 16px; cursor: pointer; transition: background-color .15s; }
.pop-link:hover { background: #ffffff40; }
.pop-link:active { background: #ffffff59; }
.pop-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 767px) {
  .popular-wrap { padding-top: 32px; }
  .popular { padding: 28px 20px; }
  .popular h2 { font-size: 24px; line-height: 32px; }
  .popular-links { gap: 8px; margin-top: 20px; }
  .pop-link { padding: 8px 12px; }
}

.books-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.check-sm b { font-weight: 500; font-size: 14px; }
.input-group input:disabled { background: var(--bg-neutral-100); color: var(--text-disabled); }

/* ================= تصميم Stitch ================= */
:root { --surface-low: #eef4ff; --surface-mid: #e4efff; --surface-high: #dee9fb; --wa: #25d366; --wa-hover: #1ebd5a; }

/* أزرار */
.btn-wa { background: var(--wa); color: #0d121c; font-weight: 600; }
.btn-wa:hover { background: var(--wa-hover); color: #0d121c; }
.btn-soft { background: var(--surface-mid); color: var(--primary-pressed); font-weight: 600; border-color: #d2e1f7; }
.btn-soft:hover { background: var(--surface-high); color: var(--primary-pressed); }

/* شريط علوي */
.topbar { background: var(--surface-low); border-bottom: 1px solid #dfe8f5; font-size: 12px; line-height: 18px; color: var(--text-paragraph); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 32px; }
.topbar .dot, .hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; margin-inline-end: 8px; vertical-align: middle; }
.topbar-side { display: flex; gap: 20px; }
.topbar-side span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 899px) { .topbar { display: none; } }

/* الهيدر */
.brand-mark { width: 44px; height: 44px; border-radius: var(--r-md); font-size: 16px; font-weight: 700; }
.main-nav a { border-radius: var(--r-md); margin: 14px 0; padding: 0 14px; }
.main-nav a[aria-current=page] { background: var(--surface-mid); color: var(--primary-pressed); font-weight: 600; }
.main-nav a[aria-current=page]::after { display: none; }
.header-inner { gap: 20px; }
.header-search { position: relative; flex: 1; max-width: 340px; margin-inline-start: auto; }
.header-search .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.header-search input { width: 100%; height: 40px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--surface-low); font: inherit; font-size: 14px; padding: 0 40px 0 12px; color: var(--text-default); outline: 0; }
.header-search input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px #1b835426; }
.header-search + .header-actions { margin-inline-start: 0; }
@media (max-width: 1279px) { .header-search { display: none; } }
@media (max-width: 1099px) { .main-nav a:nth-child(3) { display: none; } }

/* الهيرو */
.hero2 { margin-top: 24px; border-radius: 24px; border: 1px solid #dfe8f5; background: linear-gradient(135deg, #eef4ff 0%, #f1f8ff 45%, #e9f8ef 100%); position: relative; overflow: hidden; }
.hero2::before, .hero2::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero2::before { width: 320px; height: 320px; background: #b0f1ca55; top: -100px; left: -80px; }
.hero2::after { width: 380px; height: 380px; background: #96f6bd33; bottom: -140px; right: -100px; }
.hero2-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 40px 24px 48px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; background: #fff; color: var(--primary-pressed); font-size: 12px; line-height: 18px; font-weight: 600; padding: 6px 14px; border-radius: var(--r-full); border: 1px solid #e5eef9; box-shadow: var(--shadow-xs); }
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }
.hero2 h1 { font-size: 40px; line-height: 52px; font-weight: 700; margin: 20px 0 12px; color: var(--text-display); }
.hero2 h1 span { color: var(--primary); }
.hero2 .lead { font-size: 18px; line-height: 30px; color: var(--text-paragraph); margin: 0 0 32px; max-width: 720px; }
.hero-search { width: 100%; display: grid; grid-template-columns: 1.7fr 1.35fr 1fr auto; gap: 10px; padding: 10px; background: #fff; border-radius: var(--r-lg); box-shadow: 0 10px 15px -3px #0000000f, 0 4px 6px -2px #00000008; border: 1px solid #e5eef9; }
.hs-field { position: relative; display: flex; align-items: center; }
.hs-field .icon { position: absolute; right: 12px; color: var(--text-secondary); pointer-events: none; }
.hs-field input, .hs-field select { width: 100%; height: 48px; border: 1px solid transparent; border-radius: var(--r-md); background: var(--surface-low); font: inherit; font-size: 15px; color: var(--text-default); padding: 0 40px 0 12px; outline: 0; appearance: none; }
.hs-field select { padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c737f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; cursor: pointer; }
.hs-field input:focus, .hs-field select:focus { background-color: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px #1b835426; }
.hs-btn { height: 48px; padding: 0 24px; font-size: 16px; font-weight: 600; border-radius: var(--r-md); }
.sell-banner { width: 100%; margin-top: 24px; display: flex; align-items: center; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: linear-gradient(110deg, #1b8354 0%, #187a4d 50%, #14573a 100%); color: #fff; text-align: right; box-shadow: var(--shadow-md); }
.sell-icon { width: 52px; height: 52px; border-radius: 12px; background: #ffffff26; display: grid; place-items: center; flex-shrink: 0; }
.sell-text { flex: 1; min-width: 0; }
.sell-text b { display: block; font-size: 20px; line-height: 30px; font-weight: 700; }
.sell-text span { font-size: 14px; line-height: 22px; color: #ffffffd9; }
.sell-btn { background: #fff; color: var(--primary-pressed); height: 52px; padding: 0 24px; font-size: 16px; font-weight: 700; border-radius: var(--r-md); }
.sell-btn:hover { background: #f3fcf6; color: var(--primary-pressed); }
@media (max-width: 899px) {
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hs-q, .hs-btn { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .hero2 { margin-top: 16px; border-radius: 20px; }
  .hero2-inner { padding: 28px 16px 20px; }
  .hero2 h1 { font-size: 30px; line-height: 40px; margin-top: 16px; }
  .hero2 .lead { font-size: 15px; line-height: 26px; margin-bottom: 20px; }
  .hero-search { grid-template-columns: 1fr; }
  .sell-banner { flex-wrap: wrap; padding: 18px; }
  .sell-text b { font-size: 18px; }
  .sell-btn { width: 100%; }
}

/* عناوين الأقسام */
.section { padding-top: 56px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 22px; line-height: 32px; font-weight: 700; }
.section-head h2 .icon { color: var(--primary); }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.eyebrow.center { display: flex; justify-content: center; }
.latest-head { align-items: flex-end; flex-wrap: wrap; }
.latest-head h2 { font-size: 26px; line-height: 36px; }
.latest-chips { flex-wrap: nowrap; }
.latest-chips .chip[aria-pressed=true] { background: var(--primary-pressed); color: #fff; border-color: var(--primary-pressed); }
@media (max-width: 767px) { .section { padding-top: 40px; } .latest-head h2 { font-size: 22px; } .latest-chips { width: 100%; } }

/* المراحل */
.stage-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stage-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 12px 16px; background: #fff; border: 1px solid var(--border-light); border-radius: 14px; box-shadow: var(--shadow-xs); color: var(--text-display); text-decoration: none !important; transition: box-shadow .2s, background .2s, border-color .2s; }
.stage-tile:hover { background: var(--surface-low); border-color: #d2e1f7; box-shadow: var(--shadow-md); color: var(--text-display); }
.stage-icon { width: 52px; height: 52px; border-radius: 50%; background: #d3f4e066; color: var(--primary); display: grid; place-items: center; margin-bottom: 10px; transition: transform .2s; }
.stage-tile:hover .stage-icon { transform: scale(1.08); }
.stage-tile b { font-size: 16px; line-height: 24px; font-weight: 700; }
.stage-tile span { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.stage-tile .stage-count { margin-top: 6px; color: var(--primary); font-weight: 600; }
@media (max-width: 1023px) { .stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* اللوحات */
.panel-soft { background: var(--surface-low); border: 1px solid #dfe8f5; border-radius: 20px; }
.panel-white { background: #fff; border: 1px solid var(--border-light); border-radius: 20px; box-shadow: var(--shadow-xs); }
.center-title { text-align: center; font-size: 26px; line-height: 36px; font-weight: 700; }
.center-sub { text-align: center; color: var(--text-secondary); margin: 8px 0 0; }

/* الإحصائيات */
.stats-panel { padding: 40px; }
.stats-panel .stats-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat-card { background: #fff; border: 1px solid #e5eef9; border-radius: 14px; box-shadow: var(--shadow-xs); padding: 24px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; background: #d3f4e080; color: var(--primary); margin-bottom: 8px; }
.stat-card .stat-num { font-size: 40px; line-height: 50px; font-weight: 700; color: var(--primary-pressed); letter-spacing: 0; }
.stat-card .stat-label { font-weight: 600; color: var(--text-display); }
.stat-sub { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
@media (max-width: 899px) { .stats-panel { padding: 28px 16px; } .stats-panel .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; } .stat-card .stat-num { font-size: 32px; line-height: 42px; } .center-title { font-size: 22px; line-height: 32px; } }

/* كيف تعمل */
.how-panel { padding: 40px; }
.how-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.how-card { background: var(--surface-low); border: 1px solid #dfe8f5; border-radius: 14px; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.how-num { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-pressed); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.how-icon { width: 56px; height: 56px; border-radius: 14px; background: #d3f4e0; color: var(--primary-pressed); display: grid; place-items: center; }
.how-card h3 { font-size: 18px; line-height: 28px; font-weight: 700; }
.how-card p { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-paragraph); }
@media (max-width: 767px) { .how-panel { padding: 28px 16px; } .how-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; } }

/* الأمان */
.safety { display: flex; align-items: center; gap: 24px; padding: 28px 32px; }
.safety-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.safety-text { flex: 1; min-width: 0; }
.safety-text h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; line-height: 28px; font-weight: 700; }
.safety-text p { margin: 6px 0 0; font-size: 14px; line-height: 24px; color: var(--text-paragraph); }
.safety-btn { background: #fff; color: var(--primary-pressed); flex-shrink: 0; }
@media (max-width: 767px) { .safety { flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px; } .safety-btn { width: 100%; } }

/* الأكثر بحثاً داخل القسم */
.section .popular { margin: 0; }

/* التذييل */
.site-footer { margin-top: 64px; }
.footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.footer-about p { max-width: 360px; }
.site-footer .brand-mark { background: #fff; color: var(--brand-dark); }
.footer-bottom-side { display: flex; gap: 20px; }
.footer-bottom-side span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } }

/* جوال: عنوان الأقسام وبطاقتين بالسطر */
.see-all { white-space: nowrap; }
@media (max-width: 599px) {
  .section-head h2 { font-size: 18px; line-height: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .book-card { padding: 4px; border-radius: 14px; }
  .bc-cover { border-radius: 10px; }
  .bc-icon { width: 28px; height: 28px; border-radius: 8px; top: 6px; right: 6px; }
  .bc-icon .icon { width: 16px; height: 16px; }
  .bc-cover > .tag { bottom: 6px; right: 6px; height: 20px; font-size: 11px; padding: 0 6px; }
  .bc-body { padding: 8px 4px 4px; gap: 6px; }
  .bc-tags .tag:nth-child(2), .bc-desc, .bc-meta li:nth-child(2) { display: none; }
  .bc-tags .tag { height: 20px; font-size: 11px; }
  .book-card h3 { font-size: 14px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
  .price { font-size: 18px; line-height: 26px; }
  .price.free { font-size: 16px; }
  .price.free small { display: none; }
  .bc-actions { grid-template-columns: 1fr; gap: 6px; }
  .bc-actions .btn { height: 36px; font-size: 13px; }
  .bc-actions .btn-soft .icon { display: none; }
}

/* ================= تصميم Stitch — النسخة الثانية ================= */
body { background: #f9fafb; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-50); color: var(--primary); border: 1px solid #abefc6; }
.site-header { box-shadow: 0 1px 0 var(--border-light); }
.header-inner { height: 72px; gap: 28px; }
.main-nav a { margin: 16px 0; padding: 0 14px; font-size: 15px; }
.header-actions { margin-inline-start: auto; gap: 12px; }
.header-actions .btn-primary { height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; border-radius: var(--r-md); }
.header-sep { width: 1px; height: 28px; background: var(--border-light); }
.account-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-paragraph); cursor: pointer; text-decoration: none !important; }
.account-btn:hover { color: var(--text-default); }
.account-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-50); color: var(--primary); border: 1px solid #d3f4e0; display: grid; place-items: center; }

/* تبويبات الجوال (5) */
@media (max-width: 767px) {
  .tab-bar { grid-template-columns: repeat(5, 1fr); }
  .tab-bar a { font-size: 11px; }
  .tab-add span { width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px -4px #1b835499; border: 3px solid #fff; }
  .tab-bar a.tab-add[aria-current=page]::before { display: none; }
}

/* الهيرو */
.hero3 { background: linear-gradient(180deg, #f3fcf6 0%, #f6faf8 60%, #f9fafb 100%); padding: 48px 0 40px; border-bottom: 1px solid #eef2ef; position: relative; overflow: hidden; }
.hero3::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, #d3f4e0aa 0%, transparent 70%); top: -220px; right: -160px; pointer-events: none; }
.hero3-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero3-text .hero-badge { gap: 6px; color: var(--primary-pressed); border-color: #d3f4e0; background: #fff; }
.hero3 h1 { font-size: 46px; line-height: 60px; font-weight: 700; color: #0d121c; margin: 20px 0 16px; }
.hero3 h1 span { color: var(--primary); }
.hero3 .lead { font-size: 17px; line-height: 30px; color: var(--text-paragraph); margin: 0; max-width: 600px; }
.hero-checks { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; font-weight: 500; color: var(--text-default); }
.hero-checks li { display: inline-flex; align-items: center; gap: 6px; }
.hero-checks .icon { color: var(--primary); }
.hero3-media { position: relative; }
.hero-photo { border-radius: 20px; overflow: hidden; box-shadow: 0 24px 48px -16px #10182840; border: 4px solid #fff; aspect-ratio: 16 / 9; background: #e5e7eb; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.search-card { position: relative; margin: 36px auto 0; max-width: 1000px; background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; box-shadow: 0 20px 40px -20px #10182826; padding: 14px; }
.sc-row { display: grid; grid-template-columns: 1fr 260px auto; gap: 10px; }
.search-card .hs-field input, .search-card .hs-field select { background-color: #f9fafb; border: 1px solid #e5e7eb; height: 52px; border-radius: 12px; }
.search-card .hs-btn { height: 52px; border-radius: 12px; padding: 0 28px; }
.sc-popular { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 4px 2px; border-top: 1px solid #f3f4f6; }
.sc-label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-default); white-space: nowrap; }
.sc-label .icon { color: #dc6803; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-chip { font-size: 13px; line-height: 18px; padding: 6px 12px; border-radius: var(--r-md); background: #f3f4f6; color: var(--text-paragraph); border: 1px solid #e5e7eb; text-decoration: none !important; transition: .15s; }
.sc-chip:hover { background: var(--primary-50); border-color: #abefc6; color: var(--primary-pressed); }
@media (max-width: 1023px) {
  .hero3-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero3-media { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 767px) {
  .hero3 { padding: 28px 0 28px; }
  .hero3 h1 { font-size: 30px; line-height: 42px; margin: 14px 0 10px; }
  .hero3 .lead { font-size: 15px; line-height: 26px; }
  .hero-checks { gap: 8px 14px; font-size: 13px; }
  .search-card { margin-top: 20px; padding: 10px; border-radius: 16px; }
  .sc-row { grid-template-columns: 1fr; }
  .sc-popular { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* مشتري / بائع */
.section-tight { padding-top: 40px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo-card { border-radius: 20px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.duo-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.duo-eyebrow { font-size: 12px; font-weight: 600; }
.duo-card h2 { font-size: 22px; line-height: 32px; font-weight: 700; margin: 4px 0 8px; }
.duo-card p { margin: 0; font-size: 14px; line-height: 24px; }
.duo-buyer { background: #fff; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.duo-buyer .duo-eyebrow { color: var(--primary); }
.duo-buyer p { color: var(--text-secondary); }
.duo-seller { background: linear-gradient(135deg, #0f5b3a 0%, #074d31 100%); color: #fff; box-shadow: 0 16px 32px -16px #074d3199; }
.duo-seller .duo-eyebrow { color: #88d8ad; }
.duo-seller h2 { color: #fff; }
.duo-seller p { color: #ffffffd9; }
.duo-icon { width: 56px; height: 56px; border-radius: 16px; background: #ffffff1f; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.duo-stack { position: relative; width: 120px; height: 84px; flex-shrink: 0; }
.duo-stack img { position: absolute; width: 56px; height: 76px; object-fit: cover; border-radius: 8px; border: 3px solid #fff; box-shadow: var(--shadow-md); }
.duo-stack img:nth-child(1) { left: 0; top: 8px; transform: rotate(-8deg); }
.duo-stack img:nth-child(2) { left: 32px; top: 0; z-index: 1; }
.duo-stack img:nth-child(3) { left: 64px; top: 8px; transform: rotate(8deg); }
.duo-card .btn { align-self: flex-start; height: 46px; padding: 0 18px; font-weight: 600; border-radius: 12px; }
.btn-soft-green { background: var(--primary-50); color: var(--primary-pressed); border: 1px solid #d3f4e0; }
.btn-soft-green:hover { background: #e3f8eb; color: var(--primary-pressed); }
.btn-white { background: #fff; color: var(--primary-pressed); }
.btn-white:hover { background: #f3fcf6; color: var(--primary-pressed); }
@media (max-width: 767px) {
  .duo { grid-template-columns: 1fr; gap: 14px; }
  .duo-card { padding: 20px; gap: 18px; }
  .duo-card h2 { font-size: 19px; line-height: 28px; }
  .duo-stack { display: none; }
  .duo-card .btn { width: 100%; }
}

/* المراحل بألوان */
.section-head h2 { font-size: 26px; line-height: 36px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; margin-inline-end: 4px; }
.stage-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.stage-tile { gap: 4px; padding: 22px 10px 18px; border-radius: 16px; }
.stage-tile .stage-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 8px; }
.stage-tile b { font-size: 15px; line-height: 22px; }
.stage-sub { font-size: 12px; color: var(--text-secondary); }
.stage-tile .stage-count { margin-top: 8px; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: var(--r-full); }
.tone-green .stage-icon { background: #ecfdf3; color: #067647; } .tone-green .stage-count { background: #ecfdf3; color: #067647; }
.tone-blue .stage-icon { background: #eff8ff; color: #175cd3; } .tone-blue .stage-count { background: #eff8ff; color: #175cd3; }
.tone-amber .stage-icon { background: #fffaeb; color: #b54708; } .tone-amber .stage-count { background: #fffaeb; color: #b54708; }
.tone-purple .stage-icon { background: #f4f3ff; color: #5925dc; } .tone-purple .stage-count { background: #f4f3ff; color: #5925dc; }
.tone-rose .stage-icon { background: #fff1f3; color: #c01048; } .tone-rose .stage-count { background: #fff1f3; color: #c01048; }
.tone-teal .stage-icon { background: #f0fdf9; color: #107569; } .tone-teal .stage-count { background: #f0fdf9; color: #107569; }
.tone-slate .stage-icon { background: #f3f4f6; color: #384250; } .tone-slate .stage-count { background: #f3f4f6; color: #384250; }
.stage-tile:hover { background: #fff; border-color: #abefc6; }
.stage-tile:hover b { color: var(--primary); }
@media (max-width: 1199px) { .stage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .section-head h2 { font-size: 20px; line-height: 30px; } }

/* أحدث الكتب */
.latest-band { margin-top: 56px; padding: 48px 0; background: #fff; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.quick-filter { display: flex; align-items: center; gap: 10px; }
.quick-filter .chip { height: 30px; font-size: 13px; background: #f3f4f6; border-color: transparent; }
.quick-filter .chip[aria-pressed=true] { background: var(--primary-50); border-color: #abefc6; color: var(--primary-pressed); font-weight: 600; }
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 20px; }
.btn-outline { background: #fff; color: var(--primary-pressed); border: 1px solid var(--border); font-weight: 600; border-radius: 12px; }
.btn-outline:hover { background: var(--primary-50); border-color: #abefc6; color: var(--primary-pressed); }
@media (max-width: 767px) { .latest-band { margin-top: 40px; padding: 32px 0; } .quick-filter { width: 100%; overflow-x: auto; } .quick-filter > span { display: none; } }

/* البطاقة — النسخة الثانية */
.book-card { padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid #eceef1; }
.book-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px #10182833; }
.bc-cover { border-radius: 0; aspect-ratio: 4 / 5; }
.bc-cover > .tag { top: 10px; bottom: auto; right: 10px; left: auto; background: #ecfdf3f0; }
.bc-cover > .tag.tag-info { background: #eff8fff0; }
.bc-cover > .tag.tag-neutral { background: #fffffff0; }
.bc-cover > .tag.tag-warning { background: #fffaebf0; }
.bc-cat { position: absolute; bottom: 10px; left: 10px; background: #0d121cb3; color: #fff; font-size: 11px; line-height: 16px; font-weight: 500; padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(4px); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-body { padding: 12px 14px 14px; gap: 6px; }
.bc-meta { justify-content: space-between; font-size: 11px; line-height: 16px; color: var(--text-secondary); flex-wrap: nowrap; }
.bc-meta li { min-width: 0; }
.bc-meta li:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-meta li:last-child { flex-shrink: 0; }
.book-card h3 { font-size: 15px; line-height: 24px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.bc-desc { font-size: 12px; line-height: 20px; min-height: 40px; }
.bc-price-row { padding-top: 10px; margin-top: 4px; border-top: 1px solid #f3f4f6; align-items: baseline; }
.bc-orig { font-size: 11px; color: var(--text-disabled); }
.price { font-size: 20px; line-height: 28px; color: var(--primary-pressed); }
.bc-actions { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.bc-actions .btn { height: 36px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn-wa-soft { background: #ecfdf3; color: #067647; border: 1px solid #d3f4e0; font-weight: 600; }
.btn-wa-soft:hover { background: #d3f8df; color: #085d3a; }
.btn-gray { background: #f3f4f6; color: var(--text-paragraph); font-weight: 600; }
.btn-gray:hover { background: #e5e7eb; color: var(--text-default); }
@media (max-width: 599px) {
  .grid, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .book-card { padding: 0; border-radius: 14px; }
  .bc-body { padding: 10px; gap: 4px; }
  .bc-meta li:last-child { display: none; }
  .bc-desc { display: none; }
  .book-card h3 { font-size: 13px; line-height: 20px; -webkit-line-clamp: 2; min-height: 40px; }
  .bc-orig { display: none; }
  .bc-actions { grid-template-columns: 1fr; gap: 6px; }
  .bc-actions .btn { height: 34px; font-size: 12px; }
  .bc-cat { font-size: 10px; padding: 2px 6px; bottom: 6px; left: 6px; }
  .bc-cover > .tag { top: 6px; right: 6px; }
}

/* كيف تعمل */
.center-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.pill-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; color: var(--primary-pressed); background: var(--primary-50); border: 1px solid #d3f4e0; padding: 3px 12px; border-radius: var(--r-full); }
.center-head h2 { font-size: 28px; line-height: 40px; font-weight: 700; margin: 12px 0 6px; }
.center-head p { margin: 0; color: var(--text-secondary); font-size: 15px; }
.how3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.how3-card { background: #fff; border: 1px solid var(--border-light); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 10px; }
.how3-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.how3-num { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.how3-num.n1 { background: #1b8354; } .how3-num.n2 { background: #14573a; } .how3-num.n3 { background: #074d31; }
.how3-ghost { color: #c7ccd3; }
.how3-card h3 { font-size: 18px; line-height: 28px; font-weight: 700; }
.how3-card p { margin: 0; font-size: 14px; line-height: 24px; color: var(--text-secondary); flex: 1; }
.how3-foot { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--primary-pressed); background: var(--primary-50); padding: 4px 10px; border-radius: 8px; margin-top: 6px; }
.safety-bar { margin-top: 24px; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #d3f4e0; border-radius: 16px; padding: 16px 20px; }
.sb-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.safety-bar p { flex: 1; margin: 0; font-size: 14px; line-height: 22px; color: var(--text-paragraph); }
.safety-bar p b { color: var(--text-display); }
.safety-bar a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (max-width: 767px) {
  .center-head h2 { font-size: 22px; line-height: 32px; }
  .how3 { grid-template-columns: 1fr; gap: 12px; }
  .safety-bar { flex-wrap: wrap; }
}

/* شريط الإحصائيات */
.stats-strip { background: #fff; border: 1px solid var(--border-light); border-radius: 18px; padding: 20px 24px; }
.stats-strip .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.stat-mini { display: flex; align-items: center; gap: 12px; }
.stat-mini + .stat-mini { border-inline-start: 1px solid var(--border-light); padding-inline-start: 16px; }
.stat-mini .stat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.stat-mini .stat-num { display: block; font-size: 24px; line-height: 32px; font-weight: 700; color: var(--primary-pressed); }
.stat-mini .stat-label { font-size: 13px; color: var(--text-secondary); }
@media (max-width: 767px) { .stats-strip .stats-grid { grid-template-columns: 1fr 1fr; } .stat-mini + .stat-mini { border: 0; padding: 0; } }

/* التذييل — النسخة الثانية */
.site-footer { margin-top: 64px; }
.footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; }
.footer-about p { max-width: 460px; }
.site-footer .brand-mark { background: #fff; color: var(--brand-dark); border: 0; }
.footer-notice { margin-top: 16px; background: #0000002b; border: 1px solid #ffffff1f; border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 20px; color: #ffffffd9; max-width: 460px; }
.footer-notice b { color: #b0f1ca; }
.footer-cities { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid #ffffff1f; font-size: 12px !important; }
.footer-cities b { color: #fff; }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } }

.orig-big { font-size: 16px; font-weight: 500; color: var(--text-disabled); margin-inline-start: 8px; }
.big-price .tag { vertical-align: middle; }

/* ================= صفحة تفاصيل الكتاب (Stitch) ================= */
.bd { padding-bottom: 24px; }
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 16px; border-bottom: 1px solid var(--border-light); margin-bottom: 20px; flex-wrap: wrap; }
.bd-crumbs { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.bd-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.bd-crumbs .breadcrumb { padding: 0; font-size: 13px; }
.bd-crumbs .breadcrumb a { color: var(--text-secondary); }
.bd-crumbs .breadcrumb a:hover { color: var(--primary); }
.bd-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.bd-meta span { display: inline-flex; align-items: center; gap: 4px; }
.bd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.bd-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bd-side-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }

/* المعرض */
.bd-gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; height: 440px; }
.bd-gallery.single { grid-template-columns: 1fr; }
.bd-gallery button { padding: 0; border: 0; background: var(--bg-neutral-100); cursor: zoom-in; position: relative; overflow: hidden; border-radius: 16px; display: block; width: 100%; height: 100%; }
.bd-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.bd-gallery button:hover img { transform: scale(1.03); }
.bd-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
.bd-badge { position: absolute; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; color: #fff; background: #0d121cb3; backdrop-filter: blur(6px); }
.bd-badge-real { top: 14px; right: 14px; }
.bd-badge-count { bottom: 14px; left: 14px; }
.bd-thumb-label { position: absolute; bottom: 10px; left: 10px; font-size: 11px; color: #fff; background: #0d121cb3; padding: 3px 8px; border-radius: 6px; }
.bd-more { position: absolute; inset: 0; background: #0d121c99; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; backdrop-filter: blur(2px); }
.bd-more b { font-size: 15px; }
.bd-more small { font-size: 12px; opacity: .85; }

/* البطاقات */
.bd-card { padding: 24px; border-radius: 18px; }
.bd-card h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 28px; font-weight: 700; margin-bottom: 12px; }
.bd-card h2 .icon { color: var(--primary); }
.bd-title-card h1 { font-size: 26px; line-height: 38px; font-weight: 700; color: var(--text-display); }
.bd-chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bd-chips li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 8px; background: var(--surface-low); color: var(--text-paragraph); }
.bd-chips .icon { color: var(--primary); }
.bd-saving { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 13px; font-weight: 600; color: #067647; background: #ecfdf3; border: 1px solid #d3f4e0; padding: 6px 12px; border-radius: 8px; }
.bd-desc { margin: 0; font-size: 16px; line-height: 30px; color: var(--text-paragraph); }
.bd-desc-foot { display: flex; justify-content: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-light); }
.bd-report { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; font: inherit; font-size: 13px; color: var(--text-secondary); cursor: pointer; padding: 0; }
.bd-report:hover { color: var(--error); }
.bd-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.bd-specs div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-low); border-radius: 10px; }
.bd-specs dt { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.bd-specs dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-display); text-align: left; display: inline-flex; align-items: center; gap: 4px; }
.bd-specs dd.ok { color: #067647; }

/* عمود السعر */
.bd-price-card { padding: 22px; border-radius: 18px; }
.bd-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bd-price { font-size: 38px; line-height: 46px; font-weight: 700; color: var(--primary-pressed); }
.bd-price small { font-size: 16px; font-weight: 600; color: var(--primary); }
.bd-price.free { color: #067647; font-size: 32px; }
.bd-orig { margin: 6px 0 0; font-size: 13px; color: var(--text-secondary); }
.bd-orig s { color: var(--text-disabled); }
.bd-wa { margin-top: 18px; height: 54px; font-size: 16px; font-weight: 700; border-radius: 12px; gap: 10px; }
.bd-actions2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bd-actions2 .btn { height: 44px; border-radius: 12px; font-weight: 600; background: #fff; }
#favBtn[aria-pressed=true] { color: #d92d20; border-color: #fecdca; background: #fef3f2; }
#favBtn[aria-pressed=true] .icon { fill: currentColor; }
.bd-note { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 12px; color: var(--text-secondary); justify-content: center; }
.bd-seller { padding: 20px; border-radius: 18px; }
.bd-seller-head { display: flex; align-items: center; gap: 12px; }
.bd-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-50); color: var(--primary); border: 2px solid #d3f4e0; display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.bd-seller-head b { display: block; font-size: 17px; color: var(--text-display); }
.bd-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #067647; }
.bd-seller-stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; background: var(--surface-low); border-radius: 12px; }
.bd-seller-stats div { padding: 10px 14px; }
.bd-seller-stats div + div { border-inline-start: 1px solid #dfe8f5; }
.bd-seller-stats span { display: block; font-size: 12px; color: var(--text-secondary); }
.bd-seller-stats b { font-size: 15px; color: var(--text-display); }
.bd-seller-link { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); font-size: 14px; font-weight: 600; }
.bd-tips { padding: 20px; border-radius: 18px; }
.bd-tips h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.bd-tips h3 .icon { color: var(--primary); }
.bd-tips ul { margin: 10px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 21px; color: var(--text-paragraph); }
.bd-sell-cta { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; color: var(--text-display); text-decoration: none !important; }
.bd-sell-cta:hover { border-color: #abefc6; background: var(--primary-50); color: var(--text-display); }
.bd-sell-cta > span:nth-child(2) { flex: 1; }
.bd-sell-cta b { display: block; font-size: 15px; }
.bd-sell-cta small { font-size: 12px; color: var(--text-secondary); }
.bd-sell-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.bd-similar { margin-top: 48px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 20px; }

/* المعاينة بشاشة كاملة */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0d121cf2; color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 1fr auto; align-items: center; }
.lightbox::backdrop { background: #0d121c; }
.lightbox figure { grid-column: 2; margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 0 8px; min-height: 0; }
.lightbox figure img { width: 100%; height: calc(100vh - 190px); object-fit: contain; }
.lightbox figcaption { font-size: 14px; color: #ffffffcc; }
.lb-close { position: absolute; top: 16px; left: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ffffff1f; color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.lb-nav { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #ffffff1f; color: #fff; display: grid; place-items: center; cursor: pointer; justify-self: center; }
.lb-prev { grid-column: 3; grid-row: 1; } .lb-next { grid-column: 1; grid-row: 1; }
.lb-close:hover, .lb-nav:hover { background: #ffffff33; }
.lb-thumbs { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; padding: 12px 16px 20px; overflow-x: auto; }
.lb-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; opacity: .6; flex-shrink: 0; }
.lb-thumbs button[aria-current=true] { border-color: #fff; opacity: 1; }
.lb-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }

@media (max-width: 1023px) {
  .bd-layout { grid-template-columns: 1fr; }
  .bd-side-col { position: static; }
  .bd-price-card { order: -1; }
}
@media (max-width: 767px) {
  .bd-top { padding: 12px 0; margin-bottom: 14px; }
  .bd-crumbs .breadcrumb, .bd-meta span:last-child { display: none; }
  .bd-gallery { grid-template-columns: 1fr; height: auto; }
  .bd-hero-img { aspect-ratio: 4 / 3; }
  .bd-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .bd-thumb { aspect-ratio: 4 / 3; }
  .bd-card { padding: 18px; }
  .bd-title-card h1 { font-size: 21px; line-height: 32px; }
  .bd-specs { grid-template-columns: 1fr; }
  .bd-price { font-size: 32px; }
  .lightbox[open] { grid-template-columns: 0 1fr 0; }
  .lb-nav { display: none; }
  .lightbox figure img { height: calc(100vh - 170px); }
}
@media (max-width: 1023px) {
  .bd-layout { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .bd-main, .bd-side-col { display: contents; }
  .bd-gallery { order: 1; } .bd-title-card { order: 2; } .bd-price-card { order: 3; }
  .bd-desc-card { order: 4; } .bd-specs-card { order: 5; }
  .bd-seller { order: 6; } .bd-tips { order: 7; } .bd-sell-cta { order: 8; }
}
@media (max-width: 599px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ================= صفحة إضافة كتاب (Stitch) ================= */
.ad { padding-bottom: 40px; }
.ad .breadcrumb { padding: 20px 0 8px; }
.ad-head { padding: 4px 0 20px; }
.ad-head .hero-badge { gap: 6px; color: var(--primary-pressed); border-color: #d3f4e0; }
.ad-head h1 { font-size: 30px; line-height: 42px; font-weight: 700; margin: 12px 0 6px; }
.ad-head p { margin: 0; color: var(--text-secondary); max-width: 640px; }
.ad-steps { list-style: none; margin: 0 0 24px; padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #fff; border: 1px solid var(--border-light); border-radius: 18px; position: sticky; top: 80px; z-index: 5; box-shadow: var(--shadow-xs); }
.ad-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.ad-steps li:hover { background: var(--bg-page); }
.ad-steps .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--bg-neutral-100); color: var(--text-secondary); flex-shrink: 0; transition: .2s; }
.ad-steps b { display: block; font-size: 14px; color: var(--text-display); }
.ad-steps small { display: block; font-size: 11px; color: var(--text-secondary); }
.ad-steps li.active { background: var(--primary-50); }
.ad-steps li.active .n { background: var(--primary); color: #fff; }
.ad-steps li.done .n { background: #d3f4e0; color: var(--primary-pressed); }
.ad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ad-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ad-sec { padding: 24px; border-radius: 20px; scroll-margin-top: 170px; }
.ad-sec-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.ad-sec-head > div { flex: 1; }
.ad-sec-head h2 { font-size: 18px; line-height: 28px; font-weight: 700; }
.ad-sec-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.ad-sec-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.ad-row { margin-top: 20px; }
.ad-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.ad-fs legend { margin-bottom: 10px; }
.ad-divider { height: 1px; background: var(--border-light); margin: 24px 0 4px; }
.ad-tip { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-low); border: 1px solid #dfe8f5; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; color: var(--info); }
.ad-tip p { margin: 0; font-size: 13px; line-height: 22px; color: var(--text-paragraph); }

/* خانات الصور */
.ad-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ad-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed #c7d0db; background: var(--bg-page); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 10px; cursor: pointer; font: inherit; color: var(--text-paragraph); transition: .2s; }
.ad-slot:hover { border-color: var(--primary); background: var(--primary-50); }
.ad-slot b { font-size: 13px; color: var(--text-display); }
.ad-slot small { font-size: 11px; color: var(--text-secondary); line-height: 16px; }
.ad-slot-icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--border-light); color: var(--primary); display: grid; place-items: center; margin-bottom: 4px; }
.ad-slot-btn { margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--primary-pressed); background: #fff; border: 1px solid #d3f4e0; padding: 2px 10px; border-radius: 999px; }
.ad-slot:first-child:not(.filled) { border-color: #abefc6; background: #f6fef9; }
.ad-slot.filled { border: 0; padding: 0; overflow: hidden; cursor: default; }
.ad-slot.filled img { width: 100%; height: 100%; object-fit: cover; }
.ad-slot-tag { position: absolute; bottom: 8px; right: 8px; font-size: 11px; color: #fff; background: #067647; padding: 2px 8px; border-radius: 6px; }
.ad-slot-rm, .ad-slot-re { position: absolute; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.ad-slot-rm { left: 8px; background: #fff; color: var(--error); }
.ad-slot-re { left: 44px; background: #fff; color: var(--text-paragraph); }
.has-error .ad-slot:first-child { border-color: var(--error); }

/* أنواع / حالة / كتابة */
.ad-types, .ad-conds { display: grid; gap: 10px; }
.ad-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-conds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ad-types label, .ad-conds label, .ad-writing label { position: relative; cursor: pointer; }
.ad-types input, .ad-conds input, .ad-writing input { position: absolute; opacity: 0; }
.ad-types label > span, .ad-conds label > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; transition: .15s; }
.ad-types label > span { align-items: center; text-align: center; }
.ad-types .icon { color: var(--text-secondary); margin-bottom: 4px; }
.ad-types b, .ad-conds b { font-size: 14px; color: var(--text-display); }
.ad-types small, .ad-conds small { font-size: 11px; line-height: 17px; color: var(--text-secondary); }
.ad-types input:checked + span, .ad-conds input:checked + span { border-color: var(--primary); background: var(--primary-50); box-shadow: inset 0 0 0 1px var(--primary); }
.ad-types input:checked + span .icon { color: var(--primary); }
.ad-types input:focus-visible + span, .ad-conds input:focus-visible + span, .ad-writing input:focus-visible + span { outline: 2px solid var(--field-active); outline-offset: 2px; }
.ad-writing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ad-writing span { display: flex; align-items: center; gap: 8px; height: 100%; padding: 12px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--bg-page); font-size: 13px; color: var(--text-default); }
.ad-writing span::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #9da4ae; flex-shrink: 0; background: #fff; }
.ad-writing input:checked + span { border-color: var(--primary); background: var(--primary-50); }
.ad-writing input:checked + span::before { border: 5px solid var(--primary); }

/* المفاتيح */
.ad-toggles { display: grid; gap: 10px; }
.ad-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-low); border-radius: 12px; cursor: pointer; position: relative; }
.ad-toggle > .icon { color: var(--primary); flex-shrink: 0; }
.ad-toggle > span:nth-child(2) { flex: 1; }
.ad-toggle b { display: block; font-size: 14px; color: var(--text-display); }
.ad-toggle small { font-size: 12px; color: var(--text-secondary); }
.ad-toggle input { position: absolute; opacity: 0; }
.sw { width: 42px; height: 24px; border-radius: 999px; background: #d2d6db; position: relative; flex-shrink: 0; transition: .2s; }
.sw::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: .2s; }
.ad-toggle input:checked ~ .sw { background: var(--primary); }
.ad-toggle input:checked ~ .sw::after { right: 21px; }
.ad-toggle input:focus-visible ~ .sw { outline: 2px solid var(--field-active); outline-offset: 2px; }
#saveHint.good { color: #067647; display: flex; align-items: center; gap: 4px; }

.ad-actions { display: flex; gap: 12px; }
.ad-actions .btn-primary { flex: 1; height: 56px; font-size: 17px; font-weight: 700; border-radius: 14px; }
.ad-actions .btn-neutral { height: 56px; border-radius: 14px; padding: 0 24px; }

/* العمود الجانبي */
.ad-aside { position: sticky; top: 170px; display: flex; flex-direction: column; gap: 14px; }
.ad-preview-head { display: flex; align-items: center; gap: 8px; }
.ad-preview-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.8s infinite; }
.ad-preview-head b { font-size: 14px; color: var(--text-display); }
.ad-preview-head small { margin-inline-start: auto; font-size: 12px; color: var(--text-secondary); }
#preview .book-card { pointer-events: none; box-shadow: 0 16px 32px -16px #10182840; }
#preview .bc-cover { aspect-ratio: 16 / 11; }
.ad-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9da4ae; background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, #f9fafb 10px, #f9fafb 20px); }
.muted-price { color: var(--text-disabled) !important; }
.tag.nego { height: 20px; font-size: 10px; }
.ad-preview-note { margin: -4px 0 0; text-align: center; font-size: 11px; color: var(--text-secondary); }
.ad-tips { padding: 18px; border-radius: 18px; }
.ad-tips h3, .ad-safe h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.ad-tips h3 .icon { color: #dc6803; }
.ad-tips ul { margin: 10px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 21px; color: var(--text-paragraph); }
.ad-safe { background: linear-gradient(135deg, #0f5b3a, #074d31); color: #fff; border-radius: 18px; padding: 18px; }
.ad-safe h3 { color: #fff; }
.ad-safe p { margin: 8px 0 0; font-size: 13px; line-height: 22px; color: #ffffffd9; }

@media (max-width: 1023px) {
  .ad-layout { grid-template-columns: 1fr; }
  .ad-aside { position: static; order: -1; }
  .ad-aside .ad-tips, .ad-aside .ad-safe { display: none; }
  #preview { max-width: 320px; }
  .ad-sec { scroll-margin-top: 140px; }
}
@media (max-width: 767px) {
  .ad-head h1 { font-size: 24px; line-height: 34px; }
  .ad-steps { top: 64px; padding: 6px; border-radius: 14px; gap: 2px; }
  .ad-steps li { flex-direction: column; gap: 4px; padding: 6px 2px; text-align: center; }
  .ad-steps small { display: none; }
  .ad-steps b { font-size: 11px; }
  .ad-steps .n { width: 26px; height: 26px; font-size: 12px; }
  .ad-sec { padding: 18px; border-radius: 16px; }
  .ad-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-types { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ad-types label > span { padding: 10px 6px; }
  .ad-types small { display: none; }
  .ad-conds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-writing { grid-template-columns: 1fr; }
  .ad-actions { flex-direction: column; }
  .ad-actions .btn-neutral { height: 48px; }
  .ad-aside { display: none; }
}

.field-row > .field + .field { margin-top: 0; }
@media (max-width: 599px) { .field-row > .field + .field { margin-top: 16px; } }

/* ================= الرسائل ================= */
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--text-paragraph); background: #fff; border: 1px solid var(--border-light); text-decoration: none !important; }
.icon-btn:hover, .icon-btn[aria-current=page] { color: var(--primary); border-color: #abefc6; background: var(--primary-50); }
.badge-dot { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; border: 2px solid #fff; box-sizing: content-box; }
.tab-ic { position: relative; display: inline-flex; }
.tab-ic .badge-dot { top: -6px; left: -10px; }
@media (max-width: 767px) { .header-actions .icon-btn { display: none; } }

/* نافذة راسل البائع */
.msg-modal { width: min(520px, calc(100% - 24px)); padding: 0; border-radius: 20px; overflow: hidden; }
.msg-modal form { padding: 20px 22px 22px; }
.mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mm-head h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; }
.mm-head h2 .icon { color: var(--primary); }
.mm-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-neutral-100); color: var(--text-paragraph); display: grid; place-items: center; cursor: pointer; }
.mm-x:hover { background: var(--bg-neutral-200); }
.mm-book { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface-low); border-radius: 12px; margin-bottom: 14px; }
.mm-book img { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.mm-book b { display: block; font-size: 14px; color: var(--text-display); }
.mm-book span { font-size: 12px; color: var(--text-secondary); }
.mm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mm-quick .sc-chip { cursor: pointer; font: inherit; font-size: 13px; }
.msg-modal .textarea { min-height: 110px; border-radius: 12px; }
.mm-foot-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.mm-actions { display: flex; gap: 10px; margin-top: 16px; }
.mm-actions .btn-primary { flex: 1; border-radius: 12px; }
.mm-actions .btn-neutral { border-radius: 12px; }
.toast a { color: var(--primary); font-weight: 700; margin-inline-start: 8px; white-space: nowrap; }

/* صفحة الكتاب: أزرار التواصل والإعلان الخاص */
.bd-msg { margin-top: 10px; height: 50px; font-weight: 700; border-radius: 12px; gap: 8px; }
.bd-owner { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; }
.bd-owner b { display: block; color: var(--text-display); font-size: 14px; }
.bd-owner span { font-size: 13px; color: var(--text-paragraph); }
.bd-del { margin-top: 10px; border-radius: 12px; color: #b42318; }
.bd-del:hover { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.bd-published { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(110deg, #1b8354, #14573a); color: #fff; flex-wrap: wrap; }
.bp-icon { width: 48px; height: 48px; border-radius: 14px; background: #ffffff26; display: grid; place-items: center; flex-shrink: 0; }
.bd-published > div:nth-child(2) { flex: 1; min-width: 220px; }
.bd-published b { display: block; font-size: 17px; }
.bd-published span { font-size: 14px; color: #ffffffd9; }
.bp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost-white { background: transparent; color: #fff; border: 1px solid #ffffff66; }
.btn-ghost-white:hover { background: #ffffff1a; color: #fff; }
@media (max-width: 767px) {
  .sticky-actions .sa-msg { flex: 0 0 auto; width: 52px; padding: 0; }
  .sticky-actions .sa-msg.solo { width: auto; flex: 1; padding: 0 16px; }
  .bp-actions { width: 100%; } .bp-actions .btn { flex: 1; }
}

/* صفحة الرسائل */
.msgs { padding-bottom: 32px; }
.msgs-head { padding: 24px 0 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.msgs-head h1 { font-size: 28px; line-height: 38px; font-weight: 700; }
.msgs-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }
/* زر "فعّل الإشعارات" وحالته */
.push-box { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.push-box:empty { display: none; }
.push-hint { color: var(--text-secondary); font-size: 12px; }
.push-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.push-state.on { color: var(--success); font-weight: 600; }
.push-state.denied { color: var(--error); }
.acc-push { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--bg-page); }
.msgs-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; height: calc(100vh - 200px); min-height: 520px; }
.msgs-layout.empty { grid-template-columns: 1fr; }
.msgs-layout.empty .msgs-list { display: none; }
.msgs-list { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; }
.ml-search { position: relative; padding: 12px; border-bottom: 1px solid var(--border-light); }
.ml-search .icon { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.ml-search input { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--border-light); background: var(--bg-page); font: inherit; font-size: 14px; padding: 0 38px 0 12px; outline: 0; }
.ml-search input:focus { border-color: var(--primary); background: #fff; }
#convList { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.conv { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; background: none; border-radius: 12px; cursor: pointer; text-align: right; font: inherit; color: inherit; }
.conv:hover { background: var(--bg-page); }
.conv.active { background: var(--primary-50); }
.conv img { width: 46px; height: 58px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top b { font-size: 14px; color: var(--text-display); }
.conv-top time { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.conv-book { font-size: 12px; color: var(--primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.ml-none { padding: 24px; text-align: center; color: var(--text-secondary); font-size: 14px; }

.msgs-thread { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; }
.th-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.th-back { display: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg-neutral-100); place-items: center; cursor: pointer; color: var(--text-default); }
.th-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; border: 2px solid #d3f4e0; }
.th-who { flex: 1; min-width: 0; }
.th-who b { display: block; font-size: 15px; color: var(--text-display); }
.th-who span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #067647; }
.th-wa { height: 38px; border-radius: 10px; padding: 0 12px; gap: 6px; font-size: 13px; }
.th-book { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 8px 10px; border-radius: 12px; background: var(--surface-low); color: inherit; text-decoration: none !important; }
.th-book:hover { background: var(--surface-mid); color: inherit; }
.th-book img { width: 36px; height: 46px; object-fit: cover; border-radius: 6px; }
.th-book > span:nth-child(2) { flex: 1; min-width: 0; }
.th-book b { display: block; font-size: 13px; color: var(--text-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-book small { font-size: 12px; color: var(--primary-pressed); font-weight: 600; }
.th-book-link { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.th-safety { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 16px 0; font-size: 12px; color: #93370d; background: #fffaeb; border: 1px solid #fedf89; padding: 6px 10px; border-radius: 10px; text-align: center; }
.th-msgs { list-style: none; margin: 0; padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, #fff, #f9fafb); }
.day-sep { align-self: center; font-size: 11px; color: var(--text-secondary); background: var(--bg-neutral-100); padding: 2px 10px; border-radius: 10px; margin: 6px 0; }
.bubble { max-width: 75%; padding: 9px 13px 6px; border-radius: 16px; font-size: 14px; line-height: 22px; box-shadow: var(--shadow-xs); }
.bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; background: #d3f4e0; color: #053321; border-bottom-left-radius: 4px; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--border-light); color: var(--text-default); border-bottom-right-radius: 4px; }
.b-meta { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 10px; color: var(--text-secondary); }
.bubble.me .b-meta { color: #085d3a; }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9da4ae; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.th-quick { display: flex; gap: 6px; padding: 8px 16px 0; overflow-x: auto; scrollbar-width: none; }
.th-quick .sc-chip { white-space: nowrap; cursor: pointer; font: inherit; font-size: 12px; }
.th-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px 14px; }
.th-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 15px; line-height: 22px; outline: 0; background: #fff; }
.th-compose textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #1b835426; }
.th-send { width: 46px; height: 46px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.msgs-empty { margin: auto; text-align: center; padding: 48px 20px; max-width: 420px; }
.msgs-empty.small { padding: 24px; color: var(--text-secondary); }
.me-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 16px; }
.msgs-empty h2 { font-size: 20px; font-weight: 700; }
.msgs-empty p { color: var(--text-secondary); margin: 8px 0 20px; }
@media (max-width: 899px) {
  .msgs-layout { grid-template-columns: 1fr; height: calc(100vh - 230px); }
  .msgs-layout .msgs-thread { display: none; }
  .msgs-layout.open .msgs-list { display: none; }
  .msgs-layout.open .msgs-thread, .msgs-layout.empty .msgs-thread { display: flex; }
  .th-back { display: grid; }
  .msgs-head { padding: 16px 0 12px; }
  .msgs-head h1 { font-size: 22px; }
  .bubble { max-width: 85%; }
  .th-wa span { display: none; }
}

@media (max-width: 899px) {
  .msgs-layout { height: calc(100dvh - 64px - 84px - 128px); min-height: 380px; }
  .msgs:has(.msgs-layout.open) .msgs-head { display: none; }
  .msgs:has(.msgs-layout.open) { padding-top: 12px; padding-bottom: 8px; }
  .msgs-layout.open { height: calc(100dvh - 64px - 84px - 24px); }
}
@media (max-width: 767px) { .sticky-actions .sa-msg:not(.solo) { flex: 0 0 52px; } }
/* الهيدر على التابلت: نخفي رقم الجوال ونصغّر زر الإضافة */
@media (max-width: 1099px) {
  .account-btn span[dir=ltr] { display: none; }
  .header-actions .btn-primary { padding: 0 14px; }
  .header-inner { gap: 16px; }
}
@media (min-width: 768px) and (max-width: 899px) {
  .main-nav a { padding: 0 8px; font-size: 14px; }
  .header-sep { display: none; }
}
.main-nav a { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav a:nth-child(n+3) { display: none; }
  .brand small { display: none; }
}

/* ================= قائمة الحساب المنسدلة ================= */
.acct { position: relative; }
.acct .account-btn { padding: 4px 6px 4px 10px; border-radius: var(--r-full); border: 1px solid var(--border-light); background: #fff; }
.acct .account-btn:hover, .acct .account-btn[aria-expanded=true] { border-color: #abefc6; background: var(--primary-50); }
.acct .account-btn > .icon { color: var(--text-secondary); transition: transform .15s; }
.acct .account-btn[aria-expanded=true] > .icon { transform: rotate(180deg); }
.account-avatar { font-weight: 700; font-size: 15px; }
.account-avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.account-avatar.xl { width: 72px; height: 72px; font-size: 28px; border-width: 3px; }
.acct-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 260px; background: #fff; border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 20px 40px -12px #10182833; padding: 8px; z-index: 50; }
.acct-menu[hidden] { display: none; }
.am-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border-light); }
.am-head b { display: block; font-size: 15px; color: var(--text-display); }
.am-head span { font-size: 12px; color: var(--text-secondary); }
.acct-menu [role=menuitem] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-default); background: none; border: 0; text-decoration: none !important; cursor: pointer; text-align: right; }
.acct-menu [role=menuitem] .icon { color: var(--text-secondary); }
.acct-menu [role=menuitem]:hover, .acct-menu [role=menuitem]:focus-visible { background: var(--bg-page); color: var(--primary-pressed); outline: none; }
.acct-menu [role=menuitem]:hover .icon { color: var(--primary); }
.am-count { margin-inline-start: auto; min-width: 22px; padding: 0 6px; height: 20px; border-radius: 10px; background: var(--bg-neutral-100); font-size: 11px; font-weight: 700; color: var(--text-paragraph); display: grid; place-items: center; }
.am-count:empty { display: none; }
.am-count.red { background: #d92d20; color: #fff; }
.acct-menu hr { border: 0; border-top: 1px solid var(--border-light); margin: 6px 0; }
.am-logout { color: #b42318 !important; }
.am-logout .icon { color: #b42318 !important; }
.am-logout:hover { background: #fef3f2 !important; }
@media (max-width: 767px) { .acct .account-btn > .icon { display: none; } .acct .account-btn { padding: 2px; border: 0; } .acct-menu { left: -8px; width: min(280px, calc(100vw - 24px)); } }

/* ================= صفحة حسابي ================= */
.acc { padding-top: 24px; padding-bottom: 40px; }
.acc-hero { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: 20px; flex-wrap: wrap; background: linear-gradient(135deg, #fff 0%, #f3fcf6 100%); }
.acc-who { flex: 1; min-width: 200px; }
.acc-who h1 { font-size: 24px; line-height: 34px; font-weight: 700; }
.acc-phone { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #067647; }
.acc-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 0; background: #fff; border: 1px solid var(--border-light); border-radius: 14px; overflow: hidden; }
.acc-stats div { padding: 10px 18px; text-align: center; }
.acc-stats div + div { border-inline-start: 1px solid var(--border-light); }
.acc-stats b { display: block; font-size: 20px; line-height: 28px; color: var(--primary-pressed); }
.acc-stats span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.acc-tabs { display: flex; gap: 6px; margin: 24px 0 16px; border-bottom: 1px solid var(--border-light); overflow-x: auto; scrollbar-width: none; }
.acc-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--text-secondary); cursor: pointer; position: relative; white-space: nowrap; }
.acc-tabs button[aria-selected=true] { color: var(--primary-pressed); font-weight: 700; }
.acc-tabs button[aria-selected=true]::after { content: ''; position: absolute; inset: auto 8px -1px 8px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.acc-tabs .count { font-size: 11px; background: var(--bg-neutral-100); padding: 0 7px; border-radius: 9px; color: var(--text-paragraph); }
.acc-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.acc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.acc-item { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; }
.acc-item.is-sold { background: #fafafa; }
.acc-item.is-sold .ai-img img { filter: grayscale(.7); opacity: .7; }
.ai-img { position: relative; flex-shrink: 0; }
.ai-img img { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; display: block; }
.ai-sold { position: absolute; inset: auto 4px 4px 4px; text-align: center; font-size: 10px; font-weight: 700; color: #fff; background: #0d121ccc; border-radius: 6px; padding: 1px 0; }
.ai-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ai-body h3 { font-size: 16px; line-height: 24px; font-weight: 700; }
.ai-body h3 a { color: var(--text-display); }
.ai-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.ai-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ai-actions .btn { border-radius: 10px; background: #fff; }
.ai-del { color: #b42318; }
.ai-del:hover { background: #fef3f2 !important; border-color: #fecdca; color: #b42318; }
.acc-empty { text-align: center; padding: 48px 20px; border-radius: 20px; }
.acc-empty h2 { font-size: 20px; font-weight: 700; }
.acc-empty p { color: var(--text-secondary); margin: 8px 0 20px; }
.acc-form { padding: 24px; border-radius: 20px; max-width: 760px; }
.acc-form h2 { font-size: 20px; font-weight: 700; }
.acc-form .field-row { margin-top: 20px; }
.acc-form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.acc-logout { color: #b42318; margin-inline-start: auto; }
.bd-owner.sold { background: #f3f4f6; border-color: #e5e7eb; color: #384250; }
@media (max-width: 767px) {
  .acc-hero { padding: 18px; gap: 12px; }
  .account-avatar.xl { width: 56px; height: 56px; font-size: 22px; }
  .acc-stats { width: 100%; grid-template-columns: repeat(4, 1fr); }
  .acc-stats div { padding: 8px 4px; }
  .acc-stats b { font-size: 17px; }
  .acc-item { flex-wrap: wrap; }
  .ai-actions { width: 100%; }
  .ai-actions .btn { flex: 1; padding: 0 8px; font-size: 13px; }
  .ai-actions .ai-del { flex: 0 0 44px; }
  .acc-logout { margin-inline-start: 0; }
}

/* اعرض كتابك داخل الهيرو */
.hero3 .hero-sell { margin-top: 24px; max-width: 560px; }
.hero3 .hero-sell .btn { height: 44px; border-radius: 10px; font-weight: 600; }

/* ================= صفحة الدخول (موحّدة) ================= */
.auth2 { padding-top: 32px; padding-bottom: 40px; }
.auth2-grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 24px; align-items: stretch; min-height: calc(100vh - 140px); }
.auth2-card { padding: 32px; border-radius: 24px; display: flex; flex-direction: column; justify-content: center; }
.auth2-card h1 { font-size: 26px; line-height: 36px; font-weight: 700; }
.auth2-card .sub { margin: 6px 0 24px; color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.auth2-card .sub b { color: var(--text-default); }
.auth2-steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; gap: 6px; }
.auth2-steps li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 500; color: var(--text-disabled); }
.auth2-steps li::before { content: ''; height: 4px; border-radius: 2px; background: var(--bg-neutral-200); }
.auth2-steps li span { display: none; }
.auth2-steps li.on { color: var(--primary-pressed); font-weight: 700; }
.auth2-steps li.on::before, .auth2-steps li.done::before { background: var(--primary); }
.auth2-steps li.done { color: var(--text-secondary); }
.auth2-phone input { height: 52px; font-size: 18px; letter-spacing: 1px; }
.auth2-phone .addon { font-size: 16px; }
.auth2-fs { border: 0; padding: 0; margin: 22px 0 0; }
.auth2-fs legend { margin-bottom: 8px; }
.auth2-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth2-channels label { position: relative; cursor: pointer; }
.auth2-channels input { position: absolute; opacity: 0; }
.auth2-channels label > span { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; background: #fff; transition: .15s; }
.auth2-channels label > span .icon { color: var(--text-secondary); flex-shrink: 0; }
.auth2-channels b { display: block; font-size: 15px; color: var(--text-default); }
.auth2-channels small { display: block; font-size: 12px; color: var(--text-secondary); margin-inline-start: auto; }
.auth2-channels label > span { flex-wrap: wrap; }
.auth2-channels input:checked + span { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px #1b835420; }
.auth2-channels input:checked + span .icon { color: var(--primary); }
.auth2-channels input:focus-visible + span { outline: 2px solid var(--field-active); outline-offset: 2px; }
.auth2-btn { margin-top: 24px; height: 54px; border-radius: 14px; font-size: 16px; font-weight: 700; gap: 8px; }
.auth2-terms { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--text-secondary); }
.auth2-otp { justify-content: center; gap: 12px; }
.auth2-otp input { width: 64px; height: 68px; font-size: 28px; border-radius: 14px; border-width: 1.5px; }
.auth2-otp input.filled { border-color: var(--primary); background: var(--primary-50); }
.auth2-demo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; font-size: 13px; color: #175cd3; background: #eff8ff; border: 1px solid #b2ddff; border-radius: 10px; padding: 8px 12px; }
.auth2-welcome { width: 60px; height: 60px; border-radius: 18px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.auth2-side { position: relative; border-radius: 24px; overflow: hidden; background: #074d31; min-height: 520px; }
.auth2-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.auth2-side::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #074d3166 0%, #074d31f2 70%); }
.auth2-side-inner { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 40px; color: #fff; }
.hero-badge.light { background: #ffffff1f; color: #fff; border-color: #ffffff33; }
.auth2-side h2 { font-size: 36px; line-height: 48px; font-weight: 700; color: #fff; margin: 16px 0 24px; }
.auth2-side h2 span { color: #88d8ad; }
.auth2-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth2-perks li { display: flex; align-items: center; gap: 12px; }
.auth2-perks li > span { width: 42px; height: 42px; border-radius: 12px; background: #ffffff1f; display: grid; place-items: center; flex-shrink: 0; }
.auth2-perks b { display: block; font-size: 15px; }
.auth2-perks small { font-size: 13px; color: #ffffffcc; }
@media (max-width: 899px) {
  .auth2-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth2-side { display: none; }
  .auth2-card { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 599px) {
  .auth2 { padding-top: 16px; }
  .auth2-card { padding: 22px 18px; border-radius: 20px; }
  .auth2-card h1 { font-size: 22px; line-height: 32px; }
  .auth2-otp input { width: 56px; height: 60px; font-size: 24px; }
}

/* ================= صفحة تصفّح الكتب (موحّدة) ================= */
.bk-band { background: linear-gradient(180deg, #f3fcf6 0%, #f9fafb 100%); border-bottom: 1px solid #eef2ef; padding-bottom: 20px; }
.bk-band .breadcrumb { padding: 20px 0 8px; }
.bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bk-head h1 { font-size: 32px; line-height: 44px; font-weight: 700; color: #0d121c; }
.bk-head p { margin: 4px 0 0; color: var(--text-paragraph); max-width: 620px; }
.bk-head .btn { border-radius: 12px; }
.bk-stages { display: flex; gap: 8px; margin-top: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.bk-stages::-webkit-scrollbar { display: none; }
.bk-stage { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border-light); color: var(--text-paragraph); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none !important; transition: .15s; }
.bk-stage .icon { color: var(--primary); }
.bk-stage:hover { border-color: #abefc6; background: var(--primary-50); color: var(--primary-pressed); }
.bk-stage[aria-current=true] { background: var(--primary-pressed); border-color: var(--primary-pressed); color: #fff; font-weight: 600; }
.bk-stage[aria-current=true] .icon { color: #88d8ad; }
.bk-body { padding-top: 20px; }
.bk-body .filter-bar { background: #fff; border: 1px solid var(--border-light); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-xs); }
.bk-body .fb-search .input { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; }
.bk-body .fb-fields .select { border-radius: 10px; }
.bk-body .divider { display: none; }
.bk-body .results-bar { margin-top: 20px; }
.bk-body .browse-more .btn { border-radius: 12px; }
@media (max-width: 767px) {
  .bk-head h1 { font-size: 24px; line-height: 34px; }
  .bk-head p { font-size: 14px; }
  .bk-stages { margin-top: 14px; }
  .bk-body .filter-bar { padding: 12px; }
  .bk-body .fb-fields { border: 0; padding: 12px 0 0; margin-top: 4px; }
}

/* ---------- كل الكتب على الجوال (تحت 900px): سطر فلترة + شرائح مراحل، والتفاصيل بلوحة من تحت ---------- */
.lbl-m, .fb-sheet-head, .fb-sheet-foot, .fb-backdrop { display: none; }
@media (max-width: 899px) {
  .lbl-d { display: none; }
  .lbl-m { display: inline; }
  .bk-stages { display: none; }                         /* انتقلت لسطر الفلترة */
  .bk-body .filter-bar { padding: 12px; }
  .bk-body .fb-fields-search { margin-bottom: 0; }
  .fb-mobile { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
  .fb-toggle { flex-shrink: 0; height: 36px; padding: 0 12px; gap: 6px; font-size: 14px; border-radius: 999px; }
  .fb-quick { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
  .fb-quick::-webkit-scrollbar { display: none; }
  .fb-quick .chip { flex-shrink: 0; white-space: nowrap; height: 36px; }
  /* اللوحة */
  .bk-body .fb-fields { display: none; position: fixed; inset: auto 0 0 0; z-index: 80; max-height: 85vh; overflow-y: auto;
    grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    background: #fff; border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px #0d121c26; }
  .bk-body .filter-bar.open .fb-fields { display: grid; }
  .fb-sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; background: #fff; padding: 16px 0 6px; font-size: 18px; }
  .fb-sheet-foot { display: flex; gap: 10px; position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: #fff; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); margin-bottom: calc(-16px - env(safe-area-inset-bottom)); border-top: 1px solid var(--border-light); }
  .fb-sheet-foot #fbApply { flex: 2; }
  .fb-sheet-foot #fbClear { flex: 1; }
  .fb-backdrop { display: block; position: fixed; inset: 0; z-index: 79; background: #0d121c80; }
  .fb-backdrop[hidden] { display: none; }
  body.sheet-open { overflow: hidden; }
}

/* ================= الأسئلة الشائعة ================= */
.faq-list { display: grid; gap: 10px; margin-top: 20px; }
.faq-item { padding: 0; border-radius: 14px; overflow: hidden; }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 600; color: var(--text-display); cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-page); }
.faq-ic { color: var(--text-secondary); transition: transform .2s; display: inline-flex; }
.faq-item[open] .faq-ic { transform: rotate(180deg); color: var(--primary); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--text-paragraph); line-height: 26px; }

.auth2-side img { object-position: 20% center; }

/* ================= حسابي — النسخة الثانية ================= */
.acc-top { padding: 28px; border-radius: 22px; background: linear-gradient(135deg, #fff 0%, #f6fdf9 100%); }
.acc-id { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.acc-avatar-wrap { position: relative; flex-shrink: 0; }
.acc-avatar-wrap .account-avatar.xl { width: 84px; height: 84px; font-size: 32px; border-radius: 22px; background: var(--primary); color: #fff; border: 0; box-shadow: 0 10px 20px -10px #1b8354aa; }
.acc-avatar-ok { position: absolute; bottom: -6px; left: -6px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--primary); border: 2px solid var(--primary); display: grid; place-items: center; }
.acc-who { flex: 1; min-width: 220px; }
.acc-who h1 { font-size: 26px; line-height: 36px; font-weight: 700; }
.acc-facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-secondary); }
.acc-facts li { display: inline-flex; align-items: center; gap: 4px; }
.acc-facts li.ok { color: #067647; font-weight: 500; }
.acc-add { border-radius: 12px; }
.acc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; padding: 14px; background: var(--surface-low); border-radius: 16px; }
.acc-kpi { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid #e5eef9; border-radius: 12px; color: inherit; text-decoration: none !important; transition: .15s; }
.acc-kpi:hover { border-color: #abefc6; box-shadow: var(--shadow-sm); color: inherit; }
.ak-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.acc-kpi b { display: block; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--primary-pressed); }
.acc-kpi b small { font-size: 13px; font-weight: 600; color: var(--primary); }
.acc-kpi span span { font-size: 12px; color: var(--text-secondary); }
.acc-tab-link { display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px; font-size: 15px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; text-decoration: none !important; }
.acc-tab-link:hover { color: var(--primary-pressed); }
.acc-tabs .count.new { background: var(--primary); color: #fff; font-weight: 600; }

.acc-profile { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.acc-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acc-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.acc-card { padding: 24px; border-radius: 18px; }
.acc-card h2, .acc-card h3 { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-display); margin-bottom: 18px; }
.acc-card h2 { font-size: 18px; line-height: 28px; }
.acc-card h3 { font-size: 16px; line-height: 24px; margin-bottom: 10px; }
.acc-card h2 .icon, .acc-card h3 .icon { color: var(--primary); }
.acc-sub { margin: -10px 0 16px; }
.acc-card .input, .acc-card .select { border-radius: 10px; min-height: 46px; }
.acc-phone-box { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px 16px; border-radius: 14px; background: var(--surface-low); border: 1px solid #dfe8f5; flex-wrap: wrap; }
.apb-icon { width: 40px; height: 40px; border-radius: 12px; background: #ecfdf3; color: #067647; display: grid; place-items: center; }
.acc-phone-box > div { flex: 1; min-width: 160px; }
.acc-phone-box b { display: block; font-size: 17px; color: var(--text-display); text-align: right; }
.acc-phone-box small { font-size: 12px; color: var(--text-secondary); }
.acc-phone-box .btn { border-radius: 10px; background: #fff; }
.acc-warn { margin-top: 10px; }
.acc-form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 0; }
.acc-form-actions .btn-primary { min-width: 220px; border-radius: 12px; }
.acc-logout { color: #b42318; margin-inline-start: auto; }
.acc-logout:hover { background: #fef3f2; color: #b42318; }

.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-head h3 { margin-bottom: 0; }
.ap-bar { height: 8px; border-radius: 4px; background: var(--bg-neutral-200); overflow: hidden; margin: 14px 0 10px; }
.ap-bar span { display: block; height: 100%; background: linear-gradient(90deg, #54c08a, #1b8354); border-radius: 4px; transition: width .4s; }
.ap-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.ap-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--text-paragraph); background: var(--bg-page); }
.ap-list li .icon { color: var(--text-disabled); }
.ap-list li span { margin-inline-start: auto; font-size: 12px; color: #b54708; font-weight: 600; }
.ap-list li.ok { background: #f6fef9; }
.ap-list li.ok .icon { color: #067647; }
.ap-list li.ok span { color: #067647; }
.meet-box { margin: 14px 0 8px; display: grid; gap: 10px; }
.meet-card { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface-low); border: 1px solid #dfe8f5; }
.meet-card .icon { color: var(--primary); margin-top: 2px; }
.meet-card b { display: block; font-size: 15px; color: var(--text-display); }
.meet-card small { font-size: 12px; color: var(--text-secondary); }
.meet-empty { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 16px; border: 1.5px dashed #abefc6; border-radius: 14px; background: var(--primary-50); color: var(--primary-pressed); font: inherit; font-weight: 600; cursor: pointer; }
.meet-empty:hover { border-color: var(--primary); }
.meet-edit { margin: 14px 0 8px; display: grid; gap: 10px; }
.meet-edit .input { border-radius: 10px; }
.meet-actions { display: flex; gap: 8px; }
.meet-actions .btn { border-radius: 10px; }
.acc-guide ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; font-size: 13px; line-height: 21px; color: var(--text-paragraph); }
.acc-guide ul b { color: var(--text-display); }
.acc-guide-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 13px; font-weight: 600; }

@media (max-width: 1023px) {
  .acc-profile { grid-template-columns: minmax(0, 1fr); }
  .acc-aside { position: static; }
  .acc-progress { order: -1; }
}
@media (max-width: 767px) {
  .acc-top { padding: 18px; border-radius: 18px; }
  .acc-avatar-wrap .account-avatar.xl { width: 64px; height: 64px; font-size: 24px; border-radius: 18px; }
  .acc-who h1 { font-size: 21px; line-height: 30px; }
  .acc-add { width: 100%; }
  .acc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 8px; margin-top: 16px; }
  .acc-kpi { padding: 10px; gap: 8px; }
  .ak-icon { width: 36px; height: 36px; }
  .acc-kpi b { font-size: 18px; line-height: 24px; }
  .acc-card { padding: 18px; }
  .acc-form-actions .btn-primary { flex: 1; min-width: 0; }
  .acc-logout { margin-inline-start: 0; }
}

/* demo notice bar (top of every page) */
.demo-bar { background: #FFF4D6; color: #6B4A00; border-bottom: 1px solid #F0D58A; text-align: center; font-size: 13px; line-height: 20px; padding: 6px 16px; font-weight: 600; }

/* رمز التحقق 6 أرقام */
.auth2-otp.otp6 { gap: 8px; }
.auth2-otp.otp6 input { width: 52px; height: 60px; font-size: 24px; }
@media (max-width: 480px) {
  .auth2-otp.otp6 { gap: 6px; }
  .auth2-otp.otp6 input { width: calc((100% - 30px) / 6); max-width: 48px; height: 54px; font-size: 22px; }
}
.auth2-phone-in { height: 52px; font-size: 18px; letter-spacing: 1px; text-align: left; }
.auth2-phone-in::placeholder { letter-spacing: 1px; }

/* Turnstile (كابتشا) بصفحة الدخول */
.auth2-cap { display: flex; justify-content: center; min-height: 65px; margin-top: 18px; }

/* ================= اعرض كتابك: خطوات + وضع التركيز ================= */
.wz-body { background: var(--bg-page); }
.wz-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border-light); padding-top: env(safe-area-inset-top); }
.wz-top-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.wz-top h1 { flex: 1; font-size: 18px; line-height: 28px; font-weight: 700; margin: 0; }
.wz-back { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border-light); background: #fff; display: grid; place-items: center; color: var(--text-display); cursor: pointer; flex-shrink: 0; }
.wz-back:hover { background: var(--bg-page); }
.wz-back:focus-visible { outline: 2px solid var(--field-active); outline-offset: 2px; }
.wz-count { font-size: 13px; font-weight: 600; color: var(--primary-pressed); background: var(--primary-50); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.wz-progress { list-style: none; max-width: 760px; margin: 0 auto; padding: 0 16px 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wz-progress li { font-size: 12px; line-height: 16px; color: var(--text-secondary); font-weight: 500; text-align: center; }
.wz-progress li span { display: block; height: 4px; border-radius: 4px; background: var(--bg-neutral-100); margin-bottom: 6px; transition: background .2s; }
.wz-progress li.done span { background: #93d9b0; }
.wz-progress li.on span { background: var(--primary); }
.wz-progress li.on { color: var(--primary-pressed); font-weight: 700; }
.wz-progress li b { font-weight: inherit; }
.wz { max-width: 760px; margin: 0 auto; padding: 20px 16px 32px; }
.wz-step { padding: 24px; border-radius: 20px; }
.wz-step h2 { font-size: 22px; line-height: 32px; font-weight: 700; margin: 0; }
.wz-sub { margin: 4px 0 20px; color: var(--text-secondary); font-size: 14px; }
.wz-gap { margin-top: 20px; }
.wz-step .error-msg { margin-top: 6px; }
.wz-preview { max-width: 280px; margin: 0 auto; }
.wz-preview .book-card { pointer-events: none; }
.wz-more { margin-top: 20px; border: 1px solid var(--border-light); border-radius: 14px; background: #fff; }
.wz-more > summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 600; color: var(--text-display); display: flex; align-items: center; justify-content: space-between; }
.wz-more > summary::-webkit-details-marker { display: none; }
.wz-more > summary small { color: var(--text-secondary); font-weight: 400; margin-inline-start: 4px; flex: 1; }
.wz-more > summary::after { content: ''; width: 9px; height: 9px; border: 2px solid var(--text-secondary); border-top: 0; border-left: 0; transform: rotate(45deg); transition: transform .2s; margin-inline-start: 8px; }
.wz-more[open] > summary::after { transform: rotate(-135deg); }
.wz-more-in { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 18px; }
.wz-nav { display: flex; gap: 12px; margin-top: 20px; }
.wz-nav .btn { flex: 1; }
.wz-nav #nextBtn { flex: 2; }
.wz-leave-actions { flex-wrap: wrap; }
.wz-leave-actions .btn { flex: 1; min-width: 96px; }
@media (max-width: 599px) {
  .wz { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
  .wz-step { padding: 18px 16px; border-radius: 16px; }
  .wz-step h2 { font-size: 20px; line-height: 30px; }
  .wz-progress li { font-size: 11px; }
  /* التالي/السابق ثابتين تحت الشاشة */
  .wz-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; margin: 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border-light); box-shadow: 0 -4px 16px #0d121c0f; }
  .wz-step .field-row { grid-template-columns: minmax(0, 1fr); }
}

/* ================= الرئيسية: تصميمين بنفس الصفحة ================= */
/* home-d = الكمبيوتر (900px وفوق، التصميم القديم) · home-m = الجوال (تحت 900px، التصميم الجديد) */
@media (min-width: 900px) { .home-m { display: none !important; } }
@media (max-width: 899px) { .home-d { display: none !important; } }

/* هيدر مضغوط بالبحث: الجوال فقط، الكمبيوتر بيضل متل ما هو */
.hdr-search { display: none; }
@media (max-width: 899px) {
  .has-hdr-search .main-nav, .has-hdr-search .hide-mobile { display: none !important; }
  .has-hdr-search .brand small { display: none; }
  .has-hdr-search .header-inner { gap: 10px; }
  .has-hdr-search .brand { font-size: 18px; gap: 6px; flex-shrink: 0; }
  .has-hdr-search .brand-mark { width: 36px; height: 36px; }
  .hdr-search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--bg-page); color: var(--text-secondary); }
  .hdr-search:focus-within { border-color: var(--field-active); box-shadow: inset 0 0 0 1px var(--field-active); background: #fff; }
  .hdr-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text-default); }
  .has-hdr-search .header-actions { margin-inline-start: 0; }
}

/* الهيرو القديم على الكمبيوتر، بس أقصر: نفس الشكل، مسافات أقل وصورة أوطى شوي */
.hero3.hero-compact { padding: 32px 0 28px; }
.hero-compact .hero3-grid { gap: 48px; }
.hero-compact h1 { margin: 14px 0 10px; }
.hero-compact .hero-photo { aspect-ratio: 16 / 8; }
.hero-compact .search-card { margin-top: 24px; }
/* أحدث الكتب لاصق بالهيرو: بدون الشريط الرمادي الفاضي، ومسافة ~36px بين البحث والعنوان */
.hero3.hero-compact { padding-bottom: 24px; }
.hero-compact + .latest-band { margin-top: 0; border-top: 0; padding-top: 12px; }

/* شريط "اعرض كتبك" (الجوال) */
.sell-strip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; background: var(--primary-50); border: 1px solid #d3f4e0; border-radius: 14px; }
.sell-strip b { flex: 1; font-size: 14px; line-height: 20px; color: var(--text-display); }
.ss-icon { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.sell-strip .btn { white-space: nowrap; }

/* شريط المراحل */
.stage-strip { margin-top: 20px; scroll-margin-top: 90px; }
.stage-strip ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; justify-content: space-between; }
.st-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 64px; text-decoration: none !important; color: var(--text-default); font-size: 13px; font-weight: 600; text-align: center; }
.st-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; transition: transform .15s; }
.st-item:hover .st-ic { transform: translateY(-2px); }
.st-item:focus-visible { outline: 2px solid var(--field-active); outline-offset: 4px; border-radius: 12px; }
.tone-green .st-ic { background: #ecfdf3; color: #067647; }
.tone-blue .st-ic { background: #eff8ff; color: #175cd3; }
.tone-amber .st-ic { background: #fffaeb; color: #b54708; }
.tone-purple .st-ic { background: #f4f3ff; color: #5925dc; }
.tone-rose .st-ic { background: #fff1f3; color: #c01048; }
.tone-teal .st-ic { background: #f0fdf9; color: #107569; }
.tone-slate .st-ic { background: #f3f4f6; color: #384250; }
@media (max-width: 899px) {
  /* يتمرر أفقياً من طرف الشاشة للطرف (بدون ما يوسّع الصفحة) */
  .stage-strip { padding-inline: 0; }
  .stage-strip ul { overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 16px 6px; gap: 6px; justify-content: flex-start; scrollbar-width: none; }
  .stage-strip ul::-webkit-scrollbar { display: none; }
  .stage-strip li { scroll-snap-align: start; flex-shrink: 0; }
  .st-item { min-width: 64px; padding-inline: 2px; font-size: 12px; white-space: nowrap; }
  .st-ic { width: 44px; height: 44px; border-radius: 12px; }
}
/* أحدث الكتب في منطقتك */
.latest2 { margin-top: 24px; padding-bottom: 8px; }
.l2-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.l2-head h2 { font-size: 22px; line-height: 32px; font-weight: 700; margin: 0; min-width: 0; }
/* "تصفّح كل الكتب ←": نص أخضر بنفس سطر العنوان (جوال وكمبيوتر) */
.l2-head .see-all, .latest-head .see-all { color: var(--primary); font-weight: 600; flex-shrink: 0; }
.l2-head .see-all:hover, .latest-head .see-all:hover { color: var(--primary-pressed); }
.latest-qf { margin: -8px 0 18px; flex-wrap: wrap; }
.l2-city { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
.l2-city u { color: var(--primary); text-decoration: none; font-weight: 600; }
.l2-city:hover u { text-decoration: underline; }
.qchips { display: flex; align-items: center; gap: 8px; margin: 12px 0 14px; flex-wrap: wrap; }
.qchips .chip { display: inline-flex; align-items: center; gap: 4px; }
.l2-count { margin-inline-start: auto; font-size: 13px; color: var(--text-secondary); }
.rowlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rowlist[aria-busy=true]:empty { min-height: 240px; border-radius: 16px; background: linear-gradient(90deg, #f3f4f6 25%, #eef0f2 50%, #f3f4f6 75%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (min-width: 1100px) { .rowlist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .rowlist { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.brow { display: flex; gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--border-light); border-radius: 16px; text-decoration: none !important; color: inherit; transition: border-color .15s, box-shadow .15s; height: 100%; }
.brow:hover { border-color: #abefc6; box-shadow: var(--shadow-xs); }
.brow:focus-visible { outline: 2px solid var(--field-active); outline-offset: 2px; }
.brow-img { width: 92px; flex-shrink: 0; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #e5e7eb; }
.brow-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brow-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; padding-block: 2px; }
.brow-title { font-size: 15px; line-height: 22px; font-weight: 700; color: var(--text-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brow-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow-price { font-size: 17px; font-weight: 700; color: var(--primary-pressed); margin-top: auto; }
.brow-price small { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.brow-price.free { color: #c01048; }
.brow-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.l2-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 32px 16px; border: 1px dashed var(--border-light); border-radius: 16px; background: #fff; }
.l2-empty b { font-size: 16px; color: var(--text-display); }
.l2-empty span { font-size: 14px; color: var(--text-secondary); max-width: 360px; }
.l2-more { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
#sentinel { height: 1px; }

/* اختيار المدينة */
.city-dlg { width: min(420px, calc(100% - 32px)); }
.cd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.cd-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-list button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px; border: 1px solid var(--border-light); border-radius: 12px; background: #fff; font: inherit; font-size: 14px; color: var(--text-default); cursor: pointer; }
.cd-list button:hover { background: var(--bg-page); }
.cd-list button[aria-pressed=true] { border-color: var(--primary); background: var(--primary-50); color: var(--primary-pressed); font-weight: 600; }
.cd-list li:first-child { grid-column: 1 / -1; }
