/* Kaman UI layer — header, footer, mobile navigation.
   Loaded after charsoogh.css and scoped to body.camaan-ui so the legacy theme
   is untouched when the layer is switched off. Mobile-first; desktop >= 992px. */

body.camaan-ui {
  --k-brand: #8c0f18;
  --k-brand-dark: #6f0a12;
  --k-red: #c1121f;
  --k-red-soft: #fdeaec;
  --k-accent: #ffc23c;
  --k-ink: #1b1b1b;
  --k-muted: #6b6b6b;
  --k-line: #e8e8e8;
  --k-chip: #f1f1f1;
  --k-radius: 12px;
  --k-font: 'IRANSansX', Tahoma, sans-serif;
  --k-tabbar-h: 64px;
  font-family: var(--k-font);
  color: var(--k-ink);
  background: #fff;
}
body.camaan-ui .camaan-header,
body.camaan-ui .camaan-footer,
body.camaan-ui .camaan-tabbar { font-family: var(--k-font); direction: rtl; text-align: right; }
body.camaan-ui .camaan-header a,
body.camaan-ui .camaan-footer a,
body.camaan-ui .camaan-tabbar a { text-decoration: none; }
body.camaan-ui .camaan-icon { flex: none; display: block; }
.camaan-container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Neutralise legacy hero chrome (background art, overlay, spacing). */
body.camaan-ui .hero { background: #fff; padding: 0; min-height: 0; }
body.camaan-ui .hero .hero-wrapper { padding: 0; }
body.camaan-ui .hero .background { display: none; }
body.camaan-ui .hero .page-title { background: #fff; color: var(--k-ink); padding: 18px 0; }
body.camaan-ui .hero .page-title h1,
body.camaan-ui .hero .page-title h1 a,
body.camaan-ui .hero .page-title .location a { color: var(--k-ink); }
body.camaan-ui .footer-sticky-menu { display: none !important; }

/* ---------- Buttons / badges ---------- */
.camaan-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; font: 600 14px/1 var(--k-font); cursor: pointer; transition: background .15s; }
.camaan-btn--primary { background: var(--k-red); color: #fff !important; }
.camaan-btn--primary:hover { background: var(--k-brand); }
.camaan-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--k-red); color: #fff; font: 700 11px/18px var(--k-font); text-align: center; }
.camaan-dot { position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--k-red); box-shadow: 0 0 0 2px #fff; }

/* ---------- Header (mobile first) ---------- */
.camaan-header { background: #fff; border-bottom: 1px solid var(--k-line); }
.camaan-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.camaan-brand { display: none; }
.camaan-actions { display: none; }
.camaan-cats { display: none; }

.camaan-city { order: 1; }
.camaan-bell { order: 2; margin-inline-start: auto; position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--k-ink); }
.camaan-bell .camaan-dot { top: 7px; left: 9px; }
.camaan-search { order: 3; flex: 1 1 100%; }

/* City pill — restyles the legacy city-select button + modal trigger. */
.camaan-city ul { list-style: none; margin: 0; padding: 0; }
.camaan-city .btn.city-select-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--k-line); border-radius: 22px; background: #fff; color: var(--k-ink);
  font: 600 14px/1 var(--k-font); box-shadow: none;
}
.camaan-city .btn.city-select-btn:hover, .camaan-city .btn.city-select-btn:focus { background: var(--k-chip); color: var(--k-ink); box-shadow: none; }
.camaan-city .btn.city-select-btn::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translateY(-2px); opacity: .7; }
.camaan-city .city-select-btn .fa { order: 2; font-size: 16px; }

/* Search */
.camaan-search { position: relative; display: flex; align-items: center; height: 48px; border-radius: var(--k-radius); background: var(--k-chip); }
.camaan-search__cat { display: none; }
.camaan-search .camaan-search__input,
.camaan-search .camaan-search__cat select {
  height: 100%; margin: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important;
  box-shadow: none !important; outline: 0; font-family: var(--k-font); color: var(--k-ink);
}
.camaan-search .camaan-search__input { flex: 1; min-width: 0; padding: 0 16px; font-size: 14px; text-align: right; }
.camaan-search .camaan-search__btn { border-radius: 0; box-shadow: none; padding: 0; }
.camaan-search__input::placeholder { color: #8a8a8a; }
.camaan-search__input::-webkit-search-cancel-button { display: none; }
.camaan-search__btn { display: grid; place-items: center; width: 48px; height: 100%; border: 0; background: transparent; color: #444; cursor: pointer; }
.camaan-search:focus-within { box-shadow: 0 0 0 2px var(--k-brand); background: #fff; }

/* ---------- Mobile tab bar ---------- */
.camaan-tabbar {
  position: fixed; z-index: 1030; right: 0; bottom: 0; left: 0; background: #fff;
  border-top: 1px solid var(--k-line); padding-bottom: env(safe-area-inset-bottom);
}
.camaan-tabbar ul { display: flex; list-style: none; margin: 0; padding: 0; }
.camaan-tabbar__item { flex: 1 1 0; min-width: 0; }
.camaan-tabbar__item a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: var(--k-tabbar-h); color: #4a4a4a; font-size: 11px; line-height: 1.2; }
.camaan-tabbar__icon { position: relative; display: grid; place-items: center; width: 48px; height: 28px; border-radius: 14px; transition: background .15s; }
.camaan-tabbar__icon .camaan-dot { top: 2px; left: 12px; }
.camaan-tabbar__icon .camaan-badge { position: absolute; top: -4px; left: 4px; }
.camaan-tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camaan-tabbar__item.is-active a { color: var(--k-brand); font-weight: 700; }
.camaan-tabbar__item.is-active .camaan-tabbar__icon { background: var(--k-red-soft); }
body.camaan-ui { padding-bottom: calc(var(--k-tabbar-h) + env(safe-area-inset-bottom)); }

/* ---------- Footer ---------- */
.camaan-footer { margin-top: 40px; background: var(--k-brand); color: #f4dcdd; padding: 32px 0 20px; }
.camaan-footer a { color: #f4dcdd; }
.camaan-footer a:hover { color: #fff; }
.camaan-footer h3, .camaan-footer h4 { margin: 0 0 12px; color: #fff; font-weight: 700; }
.camaan-footer h3 { font-size: 18px; }
.camaan-footer h4 { font-size: 15px; }
.camaan-footer ul { list-style: none; margin: 0; padding: 0; }
.camaan-footer__apps { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.14); }
.camaan-footer__apps-text p { margin: 0; font-size: 13px; opacity: .85; }
.camaan-footer__apps-list { display: flex; flex-wrap: wrap; gap: 10px; }
.camaan-app { display: inline-flex; align-items: center; gap: 10px; min-width: 130px; padding: 8px 14px; border-radius: 10px; background: #fff; color: var(--k-ink) !important; }
.camaan-app span { display: grid; gap: 2px; line-height: 1.2; }
.camaan-app small { font-size: 10px; color: var(--k-muted); }
.camaan-app strong { font-size: 13px; }
.camaan-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
.camaan-footer__col--brand { grid-column: 1 / -1; }
.camaan-footer__col li { margin-bottom: 10px; font-size: 13px; }
.camaan-footer__logo img { display: block; width: auto; }
.camaan-footer__about { margin: 12px 0; font-size: 13px; line-height: 1.9; }
.camaan-footer__contact li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.camaan-footer__social { display: flex; gap: 10px; margin-top: 12px; }
.camaan-footer__social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.1); }
.camaan-footer__social a:hover { background: rgba(255,255,255,.2); }
.camaan-footer__namad { display: flex; flex-wrap: wrap; gap: 8px; }
.camaan-footer__namad img { max-height: 70px; width: auto; border-radius: 8px; background: #fff; padding: 4px; }
.camaan-footer__notice { display: flex; gap: 10px; margin: 28px 0 16px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; font-size: 12px; line-height: 1.9; }
.camaan-footer__notice .camaan-icon { color: var(--k-accent); margin-top: 3px; }
.camaan-footer__notice strong { color: #fff; }
.camaan-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; opacity: .85; }
.camaan-footer__top { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
  body.camaan-ui { padding-bottom: 0; }
  .camaan-tabbar, .camaan-bell { display: none; }

  .camaan-header { display: contents; }
  .camaan-header__bar { position: sticky; top: 0; z-index: 1040; background: #fff; border-bottom: 1px solid var(--k-line); }
  body.admin-bar .camaan-header__bar { top: 32px; }
  .camaan-header__row { flex-wrap: nowrap; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
  .camaan-brand { display: block; order: 0; }
  .camaan-brand img { display: block; width: auto; height: 36px; }
  .camaan-city { order: 1; }
  .camaan-search { order: 2; flex: 1 1 auto; max-width: 560px; height: 42px; }
  .camaan-search__cat { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; border-inline-end: 1px solid #dcdcdc; color: #555; }
  .camaan-search .camaan-search__cat select { appearance: none; -webkit-appearance: none; padding: 0 4px 0 20px; font-size: 13px; cursor: pointer; max-width: 130px; text-overflow: ellipsis; line-height: 42px; }
  .camaan-search__cat .camaan-icon { position: absolute; left: 10px; pointer-events: none; }
  .camaan-search__btn { width: 42px; }
  .camaan-actions { order: 3; display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
  .camaan-action { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 10px; color: var(--k-ink); font-size: 13px; }
  .camaan-action:hover { background: var(--k-chip); color: var(--k-ink); }
  .camaan-action .camaan-badge { position: absolute; top: 2px; right: 2px; }
  .camaan-action, .camaan-post-btn, .camaan-city .btn.city-select-btn { white-space: nowrap; flex: none; }
  .camaan-post-btn { margin-inline-start: 8px; }

  .camaan-cats { display: block; border-bottom: 1px solid var(--k-line); background: #fff; }
  .camaan-cats__wrap { position: relative; }
  .camaan-cats__list { display: flex; gap: 4px; margin: 0; padding: 18px 0 16px; list-style: none; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; user-select: none; }
  .camaan-cats__list.is-dragging { cursor: grabbing; }
  .camaan-cats__list.is-dragging a { pointer-events: none; }
  .camaan-cats__nav { position: absolute; z-index: 2; top: 32px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--k-line); border-radius: 50%; background: #fff; color: var(--k-ink); box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; }
  .camaan-cats__nav:hover { background: var(--k-chip); }
  .camaan-cats__nav[hidden] { display: none; }
  .camaan-cats__nav--next { left: 4px; }
  .camaan-cats__nav--next .camaan-icon { transform: rotate(90deg); }
  .camaan-cats__nav--prev { right: 4px; }
  .camaan-cats__nav--prev .camaan-icon { transform: rotate(-90deg); }
  .camaan-cats__list::-webkit-scrollbar { display: none; }
  .camaan-cats__item { flex: none; width: 88px; }
  .camaan-cats__item a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px; color: var(--k-ink); font-size: 12px; font-weight: 600; text-align: center; }
  .camaan-cats__label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; word-break: break-word; }
  .camaan-cats__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--k-chip); transition: background .15s, color .15s; }
  .camaan-cats__item a:hover .camaan-cats__icon { background: #e4e4e4; }
  .camaan-cats__item.is-active .camaan-cats__icon { background: var(--k-ink); color: #fff; }

  .camaan-footer { padding-top: 40px; margin-top: 56px; }
  .camaan-footer__apps { flex-direction: row; align-items: center; justify-content: space-between; }
  .camaan-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr); }
  .camaan-footer__col--brand { grid-column: auto; }
}

@media (min-width: 992px) and (max-width: 1279.98px) {
  .camaan-action span { display: none; }
  .camaan-action { width: 40px; justify-content: center; padding: 0; }
}
@media (max-width: 991.98px) {
  /* Keep the header tidy on phones: brand is implied, search is the hero. */
  .camaan-header__row { padding-top: 10px; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .camaan-tabbar__icon, .camaan-btn, .camaan-cats__icon { transition: none; }
}

/* =========================================================================
   Home page + ad card
   ========================================================================= */
.camaan-home { background: #fff; padding-bottom: 8px; direction: rtl; text-align: right; font-family: var(--k-font); }
.camaan-home a { text-decoration: none; }
.camaan-home ul { list-style: none; margin: 0; padding: 0; }
.camaan-home h1, .camaan-home h2, .camaan-home h3, .camaan-home p, .camaan-hero__title { margin: 0; }
.camaan-btn--ghost { background: #fff; color: var(--k-ink); border: 1px solid #d6d6d6; height: 44px; padding: 0 28px; }
.camaan-btn--ghost:hover { background: var(--k-chip); }

/* Hero */
.camaan-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding: 18px 16px; border-radius: 16px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 160% at 100% 0, #a8121c 0, transparent 60%), linear-gradient(135deg, #8c0f18, #6f0a12); }
.camaan-hero::after { content: ''; position: absolute; inset: 0; opacity: .08; pointer-events: none; background: repeating-radial-gradient(circle at 100% 100%, #fff 0 1px, transparent 1px 22px); }
.camaan-hero__text { position: relative; z-index: 1; min-width: 0; }
.camaan-hero__eyebrow { display: none; align-items: center; gap: 6px; margin-bottom: 8px !important; font-size: 12px; opacity: .85; }
.camaan-hero h1, .camaan-hero__title { font-size: 16px; font-weight: 700; line-height: 1.7; color: #fff; }
.camaan-hero__title span { display: block; color: var(--k-accent); font-size: 14px; }
.camaan-hero__cta { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 10px; background: #fff; color: var(--k-ink) !important; font-size: 13px; font-weight: 700; }
.camaan-hero__cta:hover { background: var(--k-red-soft); }

.camaan-stories { margin-top: 12px; }

/* Category grid (phones) */
.camaan-catgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; margin: 24px 0 8px; }
.camaan-catgrid__item { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--k-ink) !important; text-align: center; }
.camaan-catgrid__icon { display: grid; place-items: center; width: 100%; max-width: 78px; aspect-ratio: 1; border-radius: 20px; background: var(--k-chip); }
.camaan-catgrid__item.is-active .camaan-catgrid__icon { background: var(--k-ink); color: #fff; }
.camaan-catgrid__label { font-size: 12px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Sections */
.camaan-section { margin-top: 28px; }
.camaan-section__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.camaan-section__head h2 { font-size: 18px; font-weight: 800; color: var(--k-ink); }
.camaan-section__count { margin-inline-start: auto; font-size: 12px; color: var(--k-muted); }
.camaan-section__sub { font-size: 12px; color: var(--k-muted); }
.camaan-section__more { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--k-red) !important; }
.camaan-empty { padding: 40px 0; text-align: center; color: var(--k-muted); }

/* Sort chips (desktop only) */
.camaan-sorts { display: none; }
.camaan-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 18px; background: var(--k-chip); color: var(--k-ink) !important; font-size: 13px; }
.camaan-chip:hover { background: #e4e4e4; }
.camaan-chip.is-active { background: var(--k-ink); color: #fff !important; }

/* Listing */
.camaan-ads { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.camaan-ad-item { min-width: 0; position: relative; float: none; width: auto; margin: 0; padding: 0; list-style: none; border: 0; background: transparent; box-shadow: none; }
.camaan-ad-item::before, .camaan-ad-item::after { display: none; }
.camaan-ad-item + .camaan-ad-item { border-top: 1px solid var(--k-line); }

.camaan-ad { position: relative; display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 14px; padding: 14px 0; direction: rtl; font-family: var(--k-font); }
.camaan-ad__media { position: relative; flex: none; width: 120px; height: 116px; border-radius: 10px; overflow: hidden; background: #e6e6e6; }
.camaan-ad__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.camaan-ad__ph { display: grid; place-items: center; width: 100%; height: 100%; color: #8a8a8a; }
.camaan-ad__badge { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 5px; background: var(--k-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.5; }
.camaan-ad__views { position: absolute; bottom: 8px; left: 8px; padding: 2px 7px; border-radius: 5px; background: rgba(27,27,27,.78); color: #fff; font-size: 10.5px; line-height: 1.6; }
.camaan-ad__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.camaan-ad__title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.7; color: var(--k-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.camaan-ad__title a { color: inherit !important; }
.camaan-ad__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.camaan-ad__sub { margin-top: 2px !important; font-size: 12.5px; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camaan-ad__foot { margin-top: auto; padding-top: 8px; }
.camaan-ad__price { font-size: 12px; color: #444; }
.camaan-ad__price strong { font-size: 15px; font-weight: 800; color: var(--k-ink); }
.camaan-ad__price em { font-style: normal; font-weight: 700; color: var(--k-ink); font-size: 14px; }
.camaan-ad__meta { margin-top: 2px; font-size: 12px; color: var(--k-muted); }
.camaan-ad .bookmark.camaan-ad__bookmark {
  position: absolute; z-index: 2; left: 134px; bottom: 36px; right: auto; top: auto; display: grid; place-items: center;
  width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent !important; color: #444;
  font-size: 0; box-shadow: none; opacity: 1; cursor: pointer; text-indent: 0;
}
.camaan-ad .bookmark.camaan-ad__bookmark::before, .camaan-ad .bookmark.camaan-ad__bookmark::after { display: none !important; }
.camaan-ad .bookmark.camaan-ad__bookmark:hover { background: var(--k-chip) !important; }
.camaan-ad .bookmark.favorited-ad { color: var(--k-red); }
.camaan-ad .bookmark.favorited-ad svg { fill: currentColor; }
.camaan-ad .charsoogh-vip-ad-badge { position: absolute; top: 14px; left: 8px; z-index: 2; }

.camaan-more { display: flex; justify-content: center; margin-top: 20px; }
.camaan-more__btn.is-loading { opacity: .6; pointer-events: none; }

/* Featured row */
.camaan-featured__row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.camaan-featured__row::-webkit-scrollbar { display: none; }
.camaan-featured__row .camaan-ad-item { flex: none; width: 88%; max-width: 420px; scroll-snap-align: start; border: 1px solid var(--k-line) !important; border-radius: 14px; padding: 0 12px; }
.camaan-featured__row .camaan-ad-item + .camaan-ad-item { border-top: 1px solid var(--k-line) !important; }
.camaan-featured__row .camaan-ad .bookmark.camaan-ad__bookmark { left: 146px; }

/* App banner */
.camaan-appbanner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 32px; padding: 18px 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #8c0f18, #6f0a12); }
.camaan-appbanner h2 { font-size: 16px; font-weight: 800; color: #fff; }
.camaan-appbanner p { margin-top: 4px !important; font-size: 12px; line-height: 1.8; color: #f4dcdd; }
.camaan-appbanner__btn { flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; background: #fff; color: var(--k-ink) !important; font-size: 13px; font-weight: 700; }

/* Magazine */
.camaan-mag__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.camaan-mag__row::-webkit-scrollbar { display: none; }
.camaan-post { position: relative; flex: none; width: 78%; max-width: 340px; scroll-snap-align: start; overflow: hidden; border: 1px solid var(--k-line); border-radius: 14px; background: #fff; }
.camaan-post__media { position: relative; display: block; aspect-ratio: 16 / 10; background: #e6e6e6; }
.camaan-post__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.camaan-post__tag { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 6px; background: rgba(27,27,27,.85); color: #fff; font-size: 11px; }
.camaan-post__body { padding: 14px; }
.camaan-post__body h3 { font-size: 15px; font-weight: 800; line-height: 1.8; }
.camaan-post__body h3 a { color: var(--k-ink) !important; }
.camaan-post__body h3 a::after { content: ''; position: absolute; inset: 0; }
.camaan-post__body p { margin-top: 6px !important; font-size: 12.5px; line-height: 1.9; color: var(--k-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.camaan-post__views { display: block; margin-top: 10px; font-size: 11.5px; color: #8a8a8a; }

/* SEO copy */
.camaan-seo { margin-top: 32px; font-size: 13px; line-height: 2.1; color: #444; }
.camaan-seo__content { position: relative; }
.camaan-seo.is-collapsible .camaan-seo__content { max-height: 110px; overflow: hidden; transition: max-height .3s ease; }
.camaan-seo.is-collapsible .camaan-seo__content::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 56px; background: linear-gradient(to top, #fff, rgba(255,255,255,0)); }
.camaan-seo.is-collapsible.is-open .camaan-seo__content { max-height: none; }
.camaan-seo.is-open .camaan-seo__content::after { display: none; }
.camaan-seo__content h1, .camaan-seo__content h2, .camaan-seo__content h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--k-ink); }
.camaan-seo__content p { margin: 0 0 8px; }
.camaan-seo__toggle { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--k-red); font: 700 13px var(--k-font); cursor: pointer; }

@media (min-width: 992px) {
  body.camaan-ui .camaan-home { padding-top: 4px; }
  .camaan-hero { margin-top: 20px; padding: 26px 32px; }
  .camaan-hero__eyebrow { display: flex; }
  .camaan-hero h1, .camaan-hero__title { font-size: 22px; }
  .camaan-hero__title span { display: inline; font-size: inherit; }
  .camaan-hero__cta { height: 46px; padding: 0 20px; font-size: 14px; }
  .camaan-catgrid { display: none; }

  .camaan-section { margin-top: 36px; }
  .camaan-section__head h2 { font-size: 22px; }
  .camaan-sorts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -2px 0 18px; }
  .camaan-sorts__label { font-size: 12px; color: var(--k-muted); margin-inline-end: 4px; }

  .camaan-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .camaan-ad-item + .camaan-ad-item { border-top: 0; }
  .camaan-ads .camaan-ad-item { border: 1px solid var(--k-line); border-radius: 14px; background: #fff; transition: box-shadow .15s, border-color .15s; }
  .camaan-ads .camaan-ad-item:hover { border-color: #d2d2d2; box-shadow: 0 4px 18px rgba(0,0,0,.06); }
  .camaan-ads .camaan-ad { padding: 14px; }
  .camaan-ads .camaan-ad .bookmark.camaan-ad__bookmark { left: 148px; bottom: 44px; }
  .camaan-ad__title { font-size: 16px; }

  .camaan-featured__row .camaan-ad-item { width: 420px; }
  .camaan-appbanner { padding: 24px 32px; margin-top: 40px; }
  .camaan-appbanner h2 { font-size: 20px; }
  .camaan-appbanner p { font-size: 13px; }
  .camaan-appbanner__btn { height: 44px; padding: 0 22px; }

  .camaan-mag__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .camaan-post { width: auto; max-width: none; }
  .camaan-seo { margin-top: 40px; }
}

/* =========================================================================
   Listing pages (shop / category / search) + filters
   ========================================================================= */
.camaan-listing-page { background: #fff; direction: rtl; text-align: right; font-family: var(--k-font); padding-bottom: 8px; }
.camaan-listing-page a { text-decoration: none; }
.camaan-listing-page ul { list-style: none; margin: 0; padding: 0; }
.camaan-listing-page h1, .camaan-listing-page h2, .camaan-listing-page h3, .camaan-listing-page p { margin: 0; }

.camaan-crumbs { margin: 14px 0 4px; font-size: 12px; color: var(--k-muted); }
.camaan-crumbs__nav a { color: var(--k-muted); }
.camaan-crumbs__nav a:hover { color: var(--k-brand); }
.camaan-crumbs__sep { margin: 0 6px; opacity: .6; }

.camaan-listing { display: block; }
.camaan-listing__head { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.camaan-listing__head h1 { font-size: 18px; font-weight: 800; line-height: 1.6; color: var(--k-ink); }
.camaan-listing__head .camaan-section__count { margin-inline-start: auto; }
.camaan-view { display: none; }

/* Toolbar: filter button + sort chips (scrolls sideways on phones) */
.camaan-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.camaan-filterbtn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid #d6d6d6; border-radius: 18px; background: #fff; color: var(--k-ink); font: 600 13px var(--k-font); cursor: pointer; }
.camaan-filterbtn .camaan-badge { position: static; }
.camaan-sorts.camaan-sorts--bar { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; margin: 0; overflow-x: auto; scrollbar-width: none; }
.camaan-sorts--bar::-webkit-scrollbar { display: none; }
.camaan-sorts--bar .camaan-sorts__label { display: none; flex: none; }
.camaan-sorts--bar .camaan-chip { flex: none; }
.camaan-subcats { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.camaan-subcats::-webkit-scrollbar { display: none; }
.camaan-chip--soft { flex: none; height: 32px; background: #fff; border: 1px solid var(--k-line); font-size: 12.5px; }
.camaan-chip--soft:hover { background: var(--k-chip); }

/* Listing grid inherits .camaan-ads; list view = one column */
.camaan-ads.is-list { grid-template-columns: minmax(0, 1fr) !important; }
.camaan-more__link { text-decoration: none; }
.camaan-pager { margin-top: 18px; text-align: center; }
.camaan-pager .page-numbers { display: inline-grid; place-items: center; min-width: 36px; height: 36px; margin: 0 2px; padding: 0 10px; border-radius: 10px; color: var(--k-ink); font-size: 13px; }
.camaan-pager a.page-numbers:hover { background: var(--k-chip); }
.camaan-pager .page-numbers.current { background: var(--k-ink); color: #fff; }
.camaan-pager.is-hidden { display: none; }
.camaan-empty-state { display: grid; justify-items: center; gap: 10px; padding: 56px 16px; text-align: center; color: var(--k-muted); }
.camaan-empty-state h2 { font-size: 17px; font-weight: 800; color: var(--k-ink); }
.camaan-empty-state p { font-size: 13px; }

/* Filters — bottom sheet on phones */
.camaan-filters-overlay { position: fixed; z-index: 1055; inset: 0; background: rgba(0,0,0,.45); }
.camaan-filters-overlay[hidden] { display: none; }
.camaan-filters { position: fixed; z-index: 1060; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; max-height: 88vh; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.2); transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; font-family: var(--k-font); }
body.camaan-filters-open .camaan-filters { transform: none; visibility: visible; transition: transform .25s ease; }
body.camaan-filters-open { overflow: hidden; }
.camaan-filters__form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.camaan-filters__head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--k-line); }
.camaan-filters__head h2 { font-size: 16px; font-weight: 800; }
.camaan-filters__reset { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--k-muted) !important; }
.camaan-filters__reset:hover { color: var(--k-red) !important; }
.camaan-filters__close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--k-chip); color: var(--k-ink); cursor: pointer; }
.camaan-filters__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 16px 12px; overscroll-behavior: contain; }
.camaan-filters__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--k-line); background: #fff; }
.camaan-filters__apply { width: 100%; height: 46px; }

.camaan-fgroup { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.camaan-fgroup:last-child { border-bottom: 0; }
.camaan-fgroup h3 { margin-bottom: 10px !important; font-size: 12px; font-weight: 700; color: var(--k-muted); }
.camaan-ftree a { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; color: var(--k-ink) !important; font-size: 14px; }
.camaan-ftree a:hover { color: var(--k-brand) !important; }
.camaan-ftree a .camaan-icon { opacity: .45; }
.camaan-ftree li.is-active > a { color: var(--k-red) !important; font-weight: 800; }
.camaan-ftree ul { margin: 0 12px 6px 0; padding-right: 12px; border-right: 1px solid var(--k-line); }
.camaan-ftree ul a { padding: 6px 0; font-size: 13px; color: #444 !important; }

.camaan-select, .camaan-input { position: relative; display: flex; align-items: center; }
.camaan-select select, .camaan-input { box-sizing: border-box; width: 100%; height: 42px; min-height: 0; padding: 0 12px; border: 1px solid #d9d9d9 !important; border-radius: 10px !important; background: #fff !important; box-shadow: none !important; color: var(--k-ink); font: 400 13.5px/1 var(--k-font); outline: 0; }
.camaan-select select { appearance: none; -webkit-appearance: none; padding-left: 34px; cursor: pointer; }
.camaan-select .camaan-icon { position: absolute; left: 12px; pointer-events: none; color: #777; }
.camaan-select select:focus, .camaan-input:focus, .camaan-price input:focus { border-color: var(--k-brand) !important; }
.camaan-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.camaan-price input { box-sizing: border-box; width: 100%; min-width: 0; height: 42px !important; min-height: 0; margin: 0; padding: 0 12px !important; border: 1px solid #d9d9d9 !important; border-radius: 10px !important; background: #fff !important; box-shadow: none !important; font: 400 13.5px/1 var(--k-font); text-align: right; outline: 0; }
.camaan-price input::placeholder { color: #9a9a9a; }

.camaan-fgroup--toggles { display: grid; gap: 14px; }
.camaan-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.camaan-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.camaan-switch i { position: relative; flex: none; width: 44px; height: 24px; border-radius: 12px; background: #cfcfcf; transition: background .15s; }
.camaan-switch i::after { content: ''; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.camaan-switch input:checked + i { background: var(--k-red); }
.camaan-switch input:checked + i::after { transform: translateX(-20px); }
.camaan-switch input:focus-visible + i { outline: 2px solid var(--k-brand); outline-offset: 2px; }
.camaan-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.camaan-opt { position: relative; margin: 0; }
.camaan-opt input { position: absolute; opacity: 0; }
.camaan-opt span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid #d9d9d9; border-radius: 18px; font-size: 13px; cursor: pointer; }
.camaan-opt input:checked + span { border-color: var(--k-ink); background: var(--k-ink); color: #fff; }
.camaan-opt input:focus-visible + span { outline: 2px solid var(--k-brand); outline-offset: 2px; }

/* Desktop: sidebar + results */
@media (min-width: 992px) {
  .camaan-listing { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; }
  .camaan-filters-overlay { display: none !important; }
  .camaan-filters { position: sticky; top: 80px; z-index: 1; right: auto; bottom: auto; left: auto; max-height: calc(100vh - 100px); border-radius: 0; box-shadow: none; transform: none; visibility: visible; transition: none; background: transparent; }
  body.camaan-filters-open { overflow: auto; }
  .camaan-filters__head { padding: 4px 0 12px; }
  .camaan-filters__head h2 { font-size: 15px; }
  .camaan-filters__close, .camaan-filterbtn { display: none; }
  .camaan-filters__body { padding: 0; margin-inline-end: -6px; padding-inline-end: 6px; }
  .camaan-filters__foot { padding: 12px 0 0; border-top: 0; background: transparent; }
  .camaan-listing__head h1 { font-size: 22px; }
  .camaan-view { display: inline-flex; gap: 6px; margin-inline-start: 4px; order: 3; }
  .camaan-listing__head .camaan-section__count { margin-inline-start: auto; }
  .camaan-view__btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #d6d6d6; border-radius: 10px; background: #fff; color: var(--k-ink); cursor: pointer; }
  .camaan-view__btn[aria-pressed="true"] { background: var(--k-ink); border-color: var(--k-ink); color: #fff; }
  .camaan-sorts.camaan-sorts--bar { flex-wrap: wrap; overflow: visible; }
  .camaan-sorts--bar .camaan-sorts__label { display: inline; }
  .camaan-subcats { flex-wrap: wrap; overflow: visible; }
  .camaan-crumbs { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .camaan-filters, .camaan-switch i, .camaan-switch i::after { transition: none; }
}

/* Safety nets: legacy CSS hides horizontal scroll on <html>, so any overflow would
   silently stretch the mobile layout. Keep wide user content (SEO text, tables,
   embeds) inside the column and clip stray overflow on our pages. */
.camaan-home, .camaan-listing-page { overflow-x: clip; }
.camaan-seo__content { overflow-wrap: anywhere; }
.camaan-seo__content img, .camaan-seo__content iframe, .camaan-seo__content video { max-width: 100%; height: auto; }
.camaan-seo__content table { display: block; max-width: 100%; overflow-x: auto; }
.camaan-ad__title, .camaan-ad__sub, .camaan-ad__meta { min-width: 0; overflow-wrap: anywhere; }
.camaan-ad__sub { overflow-wrap: normal; }
