/*
 * TouchScreens Oman — category listing (owner: listing agent).
 * Values are the inline styles of design/Category - Interactive Panels.dc.html (README 5.4).
 * Also loaded by the search page for the shared toolbar, empty state and pager.
 */

/* Without JS: show the Apply buttons; with JS they are not needed (filters apply instantly). */
.o-js .o-nojs { display: none !important; }

.o-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--copper); font: 700 12.5px var(--font); white-space: nowrap; }
.o-linkbtn:hover { color: var(--copper-hover); }

/* ---------- Hero ---------- */
.o-cat-hero {
  position: relative; overflow: hidden;
  padding: clamp(120px, 14vw, 170px) var(--gutter) 44px;
  border-bottom: 1px solid var(--line);
}
.o-cat-hero__wm { top: 90px; font-size: clamp(140px, 18vw, 280px); }
.o-cat-hero__grid {
  position: relative; display: grid; gap: 36px; align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.o-cat-hero__main { min-width: 0; }
.o-cat-hero__h1 {
  margin: 16px 0 0; font-size: clamp(38px, 5vw, 72px); line-height: 1.02; letter-spacing: var(--track-tight); font-weight: 800;
  overflow-wrap: anywhere;
}
[dir="rtl"] .o-cat-hero__h1 { line-height: 1.1; }
.o-cat-hero__h1 .o-accent { letter-spacing: inherit; }
[dir="rtl"] .o-cat-hero__h1 .o-accent { letter-spacing: 0; }
.o-cat-hero__intro { margin: 18px 0 0; max-width: 620px; color: var(--lede); font-size: 16.5px; line-height: 1.7; }
[dir="rtl"] .o-cat-hero__intro { line-height: 1.85; }
.o-cat-hero__sizes { margin-top: 22px; }
.o-cat-hero__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.o-cat-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  border-radius: 20px; border: 1px solid var(--line-10); background: var(--surface); padding: 20px; color: var(--ink);
  transition: border-color var(--t-hover);
}
.o-cat-side:hover { border-color: var(--accent-line-strong); color: var(--ink); }
.o-cat-side__ey { font-size: 11px; font-weight: 700; letter-spacing: var(--track-eyebrow-sm); text-transform: uppercase; color: var(--copper); }
.o-cat-side__h { font-weight: 700; font-size: 16px; line-height: 1.35; }
.o-cat-side__l { display: block; font-size: 13px; line-height: 1.45; color: var(--muted-2); }
.o-cat-side__l .o-icon { font-size: 12px; margin-inline-start: 4px; vertical-align: -1px; }
.o-cat-side--red { border: 0; background: var(--deep-red); color: var(--deep-red-soft); }
.o-cat-side--red:hover { color: var(--deep-red-soft); box-shadow: 0 18px 40px rgba(58, 13, 15, .25); }
.o-cat-side--red .o-cat-side__ey { color: var(--deep-red-eyebrow); }
.o-cat-side--red .o-cat-side__h { color: var(--deep-red-text); }
.o-cat-side--red .o-cat-side__l { color: var(--deep-red-body); }

/* ---------- Body / toolbar ---------- */
.o-cat-body { padding: 32px var(--gutter) 80px; }
.o-cat-body > .o-container, .o-listing-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
[data-listing] { transition: opacity .2s; }
[data-listing][aria-busy="true"] [data-grid], [data-listing][aria-busy="true"] .o-resbar__count { opacity: .45; }

.o-tb {
  position: relative; z-index: 36; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.o-tb__filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.o-tb__label { font-size: 12px; font-weight: 800; letter-spacing: var(--track-eyebrow-sm); text-transform: uppercase; color: var(--muted-3); padding-inline: 6px; }
.o-tb__right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; margin-inline-start: auto; }
.o-tb__sort { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted-2); }
.o-tb__select {
  border: 1px solid var(--line-14); border-radius: var(--r-pill); padding: 9px 14px; background: var(--surface);
  font: 600 13px var(--font); color: var(--ink); cursor: pointer; max-width: 100%;
}

/* Dropdown pills (details/summary: they open without JS too) */
.o-dd { position: relative; }
.o-dd__btn {
  list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: center; user-select: none;
  border: 1px solid var(--line-16); background: var(--surface); color: var(--ink);
  border-radius: var(--r-pill); padding: 10px 14px; font: 700 13px var(--font); white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.o-dd__btn::-webkit-details-marker { display: none; }
.o-dd__btn::after { content: ""; display: inline-block; width: 14px; }
.o-dd.is-active .o-dd__btn::after { display: none; }
.o-dd__btn:hover { border-color: var(--ink); }
.o-dd[open] .o-dd__btn, .o-dd.is-active .o-dd__btn { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.o-dd__badge { font-size: 11px; line-height: 1.45; padding: 1px 7px; border-radius: var(--r-pill); background: var(--cta); color: var(--cta-ink); }
.o-dd__caret { font-size: 11px; order: 3; transition: transform .2s; }
.o-dd__btn::after { order: 2; }
.o-dd[open] .o-dd__caret { transform: rotate(180deg); }
.o-dd__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 5; min-width: 240px; max-height: 340px; overflow: auto;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line-10); box-shadow: var(--sh-pop); padding: 8px;
}
@media (prefers-reduced-motion: no-preference) {
  .o-dd[open] .o-dd__panel { animation: o-card-in .25s both; }
}
.o-dd__panel .o-btn { margin-top: 6px; }

/* Checkbox option rows (dropdowns and the mobile panel) */
.o-opts { display: flex; flex-direction: column; gap: 2px; border: 0; margin: 0; padding: 0; min-width: 0; }
.o-opt {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
  padding: 9px 10px; border-radius: 10px; text-align: start; font: 500 13.5px var(--font); color: var(--ink);
  transition: background-color .15s;
}
.o-opt:hover { background: var(--cta-softer); }
.o-opt.is-on { background: var(--cta-softer); }
.o-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.o-opt__box {
  width: 18px; height: 18px; flex: none; border-radius: 6px; border: 1.5px solid rgba(40, 28, 16, .25); background: transparent;
  color: var(--on-ink); font-size: 11px; display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.o-opt__box .o-icon { opacity: 0; }
.o-opt input:checked + .o-opt__box { background: var(--ink); border-color: var(--ink); }
.o-opt input:checked + .o-opt__box .o-icon { opacity: 1; }
.o-opt input:focus-visible + .o-opt__box { outline: 2px solid var(--cta); outline-offset: 2px; }
.o-opt__label { flex: 1; min-width: 0; }
.o-opt__n { font-size: 12px; color: var(--muted-4); font-variant-numeric: tabular-nums; }

/* Grid / list toggle */
.o-view { display: flex; border: 1px solid var(--line-14); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.o-view__btn { display: grid; place-items: center; padding: 9px 13px; font-size: 14px; color: var(--text-ui); background: transparent; transition: background-color .2s, color .2s; }
.o-view__btn:hover { color: var(--ink); background: var(--tint); }
.o-view__btn.is-on { background: var(--ink); color: var(--on-ink); }

/* Mobile filter panel (≤900px) */
.o-mf { display: none; }
.o-mf__btn {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; width: 100%;
  border: 1px solid var(--line-14); background: var(--surface); border-radius: 16px; padding: 14px 18px;
  font: 800 15px var(--font); color: var(--ink);
}
.o-mf__btn::-webkit-details-marker { display: none; }
.o-mf__ico { color: var(--copper); font-size: 18px; }
.o-mf__ico--open, .o-mf[open] .o-mf__ico--closed { display: none; }
.o-mf[open] .o-mf__ico--open { display: inline-block; }
.o-mf__panel {
  margin-top: 16px; display: flex; flex-direction: column; gap: 6px;
  border-radius: 22px; border: 1px solid var(--line); background: var(--surface); padding: 20px;
}
.o-mf__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.o-mf__title { font-weight: 800; font-size: 16px; }
.o-mf__group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 8px; min-width: 0; }
.o-mf__legend { float: left; width: 100%; padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: var(--track-eyebrow-sm); text-transform: uppercase; color: var(--muted-3); margin-bottom: 10px; }
[dir="rtl"] .o-mf__legend { float: right; }
.o-mf__group .o-opts { clear: both; }
.o-mf__group .o-opt { padding: 7px 8px; }
.o-mf__cant {
  margin-top: 10px; border-radius: 16px; background: var(--bg); border: 1px dashed rgba(194, 106, 26, .4);
  padding: 14px; font-size: 13px; color: var(--lede); line-height: 1.55;
}
.o-mf__cant a { font-weight: 700; }
.o-mf__panel .o-btn--block { margin-top: 8px; }

/* Count + active filter chips */
.o-resbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 0; }
.o-resbar__count { margin: 0; margin-inline-end: 6px; font-size: 14px; color: var(--lede); }
.o-resbar__count strong { color: var(--ink); font-size: 16px; }
.o-resbar__chips { list-style: none; margin: 0; padding: 0; }
.o-resbar__chips .o-chip--removable { padding: 7px 12px; }

.o-cat-grid { margin-top: 4px; }

/* Empty state */
.o-empty {
  margin-top: 12px; border-radius: 24px; border: 1px dashed rgba(194, 106, 26, .4); background: var(--surface);
  padding: 40px; text-align: center;
}
.o-empty__ar { font-family: var(--ruqaa); font-size: 40px; line-height: 1.3; color: var(--copper); }
.o-empty__h { margin: 8px 0 0; font-size: 22px; font-weight: 700; }
.o-empty__p { margin: 10px auto 0; max-width: 460px; color: var(--muted); line-height: 1.6; }
.o-empty__cta { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.o-empty__cta .o-btn { padding: 11px 18px; font-size: 13.5px; }
.o-empty__cta .o-btn--ghost { font-weight: 700; }

/* Pager */
.o-pager { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.o-pager__text { margin: 0; font-size: 13px; color: var(--muted-2); }
.o-pager__bar { width: 220px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.o-pager__bar > span { display: block; height: 100%; background: var(--cta); transition: width .5s var(--ease); }
[dir="rtl"] .o-pager__bar > span { margin-inline-start: 0; }
.o-pager__more {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-18); background: var(--surface); border-radius: var(--r-pill);
  padding: 13px 26px; font: 700 14px var(--font); color: var(--ink); transition: border-color var(--t-hover);
}
.o-pager__more:hover { border-color: var(--cta); color: var(--ink); }
.o-pager__more[aria-busy="true"] { opacity: .6; pointer-events: none; }
.o-pager__pages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; }
.o-pager__n, .o-pager__step {
  min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--r-pill);
  color: var(--muted-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.o-pager__n:hover, .o-pager__step:hover { background: var(--tint); color: var(--ink); }
.o-pager__n.is-current { background: var(--ink); color: var(--on-ink); }
.o-pager__gap { color: var(--muted-4); padding: 0 2px; }

/* ---------- Buying guide / size table / FAQ / governorates ---------- */
.o-cat-guide { padding: 80px var(--gutter); background: var(--sand); border-top: 1px solid var(--line); }
.o-cat-guide__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 48px; }
.o-cat-guide__article { max-width: 640px; min-width: 0; }
.o-cat-guide__ey { font-size: 11.5px; letter-spacing: var(--track-eyebrow-sm); }
.o-cat-guide__h { margin: 12px 0 0; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: var(--track-tight); line-height: 1.1; font-weight: 800; }
[dir="rtl"] .o-cat-guide__h { line-height: 1.35; }
.o-cat-guide__prose { margin-top: 18px; color: var(--lede); font-size: 15px; line-height: 1.8; }
.o-cat-guide__prose > * + * { margin-top: 14px; }
.o-cat-guide__prose p { margin: 0; }
.o-cat-guide__prose > p + p { margin-top: 14px; }
.o-cat-guide__prose strong { color: var(--text); font-weight: 700; }
.o-cat-guide__prose h2, .o-cat-guide__prose h3 { margin: 26px 0 0; font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.o-cat-guide__more { margin: 22px 0 0; font-size: 15px; font-weight: 700; }
.o-cat-guide__min { font-weight: 500; color: var(--muted-2); font-size: 13px; }
.o-cat-guide__side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.o-sizetable { border-radius: 22px; border: 1px solid var(--line-10); background: var(--surface); overflow: hidden; }
.o-sizetable__h { margin: 0; padding: 18px 20px; font-weight: 700; font-size: 16px; }
.o-sizetable__scroll { overflow-x: auto; }
.o-sizetable__t { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 14px; }
.o-sizetable__t thead th {
  background: var(--bg); color: var(--muted-3); font-size: 11.5px; letter-spacing: var(--track-eyebrow-sm); text-transform: uppercase;
  font-weight: 700; padding: 12px 20px; text-align: start; vertical-align: bottom; line-height: 1.4;
}
.o-sizetable__t tbody th, .o-sizetable__t td { padding: 14px 20px; border-top: 1px solid var(--line-07); text-align: start; color: var(--text-ui); font-weight: 400; }
.o-sizetable__t tbody th { font-weight: 800; color: var(--ink); white-space: nowrap; }
[dir="rtl"] .o-sizetable__t tbody th { text-align: right; }
.o-sizetable__t td a { font-weight: 700; }
.o-sizetable__none { color: var(--muted-4); }
.o-sizetable__cap { margin: 0; padding: 12px 20px 16px; border-top: 1px solid var(--line-07); font-size: 12.5px; color: var(--muted-2); line-height: 1.6; }
.o-sizetable__cap a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

.o-cat-guide .o-faq--sm .o-faq__h { margin: 0 0 6px; }

.o-cat-cities { display: flex; flex-wrap: wrap; gap: 8px; }
.o-cat-cities__label { width: 100%; font-size: 12.5px; color: var(--muted-3); }
.o-cat-cities__a {
  padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-12); background: var(--surface);
  color: var(--text-ui); font-size: 12.5px; font-weight: 600; transition: border-color .2s;
}
.o-cat-cities__a:hover { border-color: var(--accent-line-strong); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .o-mf { display: block; }
  .o-tb__filters { display: none !important; }
  .o-cat-body > .o-container { gap: 16px; }
}
@media (max-width: 640px) {
  .o-tb__select { max-width: 52vw; }
  .o-empty { padding: 28px 18px; }
  .o-cat-guide { padding-block: 60px; }
}

/* Buying-guide article section titles (design: margin 26px 0 0, 18px/700, ink). */
.o-cat-guide__prose h3 { margin: 26px 0 0; font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.o-cat-guide__prose h3 + p { margin-top: 8px; }
