/* «الموزّعون» page (pages/dealers.php). Store colours: --brand (red), --dark (black), greys from the theme. */
.dl-page { --dl-grey:#f1f2f3; --dl-grey-2:#e4e6e8; --dl-ink:var(--ink, #191c21); --dl-muted:var(--muted, #6d7480); }
[data-dl-card][hidden], [data-dl-group][hidden], .dl-none[hidden] { display:none !important; }
.dl-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.dl-ic { flex:none; }

.dl-hero { background:var(--dark, #14161a); color:#fff; padding:30px 0 34px; position:relative; overflow:hidden; }
.dl-hero::after { content:""; position:absolute; inset:auto 0 0 0; height:4px; background:var(--brand, #d9161e); }
.dl-hero .wrap { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.dl-hero-ic { width:56px; height:56px; border-radius:16px; background:var(--brand, #d9161e); display:grid; place-items:center; color:#fff; flex:none; }
.dl-hero h1 { margin:0 0 4px; font-size:28px; font-weight:900; letter-spacing:-.2px; }
.dl-hero p { margin:0; color:#c9ccd1; font-size:15px; }
.dl-hero-n { margin-inline-start:auto; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); border-radius:999px; padding:7px 14px; font-weight:800; font-size:14px; }

.dl-body { padding-top:20px; padding-bottom:36px; }

.dl-filters { display:flex; gap:10px; flex-wrap:wrap; align-items:center; background:#fff; border:1px solid var(--line, #e8eaee);
  border-radius:16px; padding:12px; box-shadow:0 1px 2px rgba(16,20,28,.04); }
.dl-f { position:relative; display:flex; align-items:center; flex:1 1 180px; min-width:0; }
.dl-f-q { flex:2 1 260px; }
.dl-f-q .dl-ic { position:absolute; inset-inline-start:12px; color:var(--dl-muted); pointer-events:none; }
.dl-f input, .dl-f select { width:100%; height:46px; border:1px solid var(--dl-grey-2); border-radius:12px; background:var(--dl-grey);
  font:inherit; font-size:15px; color:var(--dl-ink); padding:0 12px; }
.dl-f-q input { padding-inline-start:38px; }
.dl-f input:focus, .dl-f select:focus { outline:none; border-color:var(--brand, #d9161e); background:#fff; box-shadow:0 0 0 3px rgba(217,22,30,.12); }
.dl-go { height:46px; padding:0 22px; border:0; border-radius:12px; background:var(--dark, #14161a); color:#fff; font:inherit; font-weight:800; cursor:pointer; }
.dl-go:hover { background:var(--brand, #d9161e); }
.dl-clear { color:var(--brand, #d9161e); font-weight:700; padding:0 6px; }
.dl-filters.dl-js .dl-go { display:none; }   /* with JavaScript the selects apply at once */

.dl-chips { display:flex; gap:8px; overflow-x:auto; padding:14px 0 4px; scrollbar-width:none; }
.dl-chips::-webkit-scrollbar { display:none; }
.dl-chips a { flex:none; display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; background:#fff;
  border:1px solid var(--line, #e8eaee); color:var(--dl-ink); font-weight:700; font-size:14px; white-space:nowrap; }
.dl-chips a b { font-size:12px; background:var(--dl-grey); color:var(--dl-muted); border-radius:999px; padding:1px 8px; }
.dl-chips a:hover { border-color:var(--brand, #d9161e); color:var(--brand, #d9161e); }
.dl-chips a.on { background:var(--dark, #14161a); border-color:var(--dark, #14161a); color:#fff; }
.dl-chips a.on b { background:var(--brand, #d9161e); color:#fff; }

.dl-count { color:var(--dl-muted); font-size:14px; margin:10px 0 0; }
.dl-none { background:#fff; border:1px dashed var(--dl-grey-2); border-radius:16px; padding:28px; text-align:center; color:var(--dl-muted); margin-top:14px; }
.dl-none a { color:var(--brand, #d9161e); font-weight:700; }
.dl-empty { text-align:center; color:var(--dl-muted); padding:50px 0; }
.dl-empty .dl-ic { color:var(--dl-grey-2); }

.dl-group { margin-top:22px; }
.dl-group h2 { display:flex; align-items:center; gap:8px; font-size:19px; font-weight:900; color:var(--dl-ink); margin:0 0 12px; }
.dl-group h2 .dl-ic { color:var(--brand, #d9161e); }
.dl-group h2 span { font-size:13px; font-weight:800; color:var(--dl-muted); background:var(--dl-grey); border-radius:999px; padding:2px 10px; }
.dl-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }

.dl-card { background:#fff; border:1px solid var(--line, #e8eaee); border-radius:16px; padding:16px; display:flex; flex-direction:column; gap:7px;
  border-top:3px solid var(--dark, #14161a); transition:border-color .15s, box-shadow .15s; }
.dl-card:hover { border-top-color:var(--brand, #d9161e); box-shadow:0 8px 24px rgba(16,20,28,.07); }
.dl-card h3 { margin:0; font-size:17px; font-weight:800; color:var(--dl-ink); line-height:1.35; }
.dl-place, .dl-phone { display:flex; align-items:center; gap:6px; color:var(--dl-muted); font-size:14px; }
.dl-place .dl-ic { color:var(--brand, #d9161e); }
.dl-phone bdi { font-weight:700; color:var(--dl-ink); }
.dl-actions { display:grid; grid-template-columns:repeat(2, 1fr); gap:8px; margin-top:auto; padding-top:8px; }
.dl-btn { display:flex; align-items:center; justify-content:center; gap:6px; height:42px; border-radius:11px; font-weight:800; font-size:14px;
  border:1px solid var(--dl-grey-2); background:var(--dl-grey); color:var(--dl-ink); text-decoration:none; }
.dl-btn:hover { border-color:var(--dark, #14161a); }
.dl-btn.call { background:var(--brand, #d9161e); border-color:var(--brand, #d9161e); color:#fff; }
.dl-btn.call:hover { background:var(--brand-2, #b01219); }
.dl-btn.wa { background:var(--dark, #14161a); border-color:var(--dark, #14161a); color:#fff; }
.dl-btn.wa:hover { background:#000; }
.dl-btn.map .dl-ic { color:var(--brand, #d9161e); }

.dl-updated { color:var(--dl-muted); font-size:12.5px; text-align:center; margin:26px 0 0; }

/* «الفروع» — a dealer with several branches: the card lists them, a button opens the sheet. */
.dl-head { display:flex; align-items:flex-start; gap:10px; }
.dl-head h3 { flex:1; min-width:0; }
.dl-nb { flex:none; display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:999px; font-size:13px; font-weight:800;
  color:var(--brand, #d9161e); background:rgba(217,22,30,.07); border:1px solid rgba(217,22,30,.18); white-space:nowrap; }
.dl-bl { list-style:none; margin:2px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; }
.dl-bl li { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:14.5px; font-weight:700; color:var(--dl-ink); }
.dl-bl li .dl-ic { color:var(--brand, #d9161e); }
.dl-bl li.dim { color:var(--dl-muted); font-weight:500; }
.dl-bl li.dim .dl-ic { color:#b9bec6; }
.dl-gchip { font-style:normal; font-size:12px; font-weight:700; color:var(--dl-muted); background:var(--dl-grey); border-radius:999px; padding:1px 9px; }
.dl-hit { display:none; font-size:12px; font-weight:800; color:#0f7a3d; background:#e8f7ee; border:1px solid #bfe6cd; border-radius:999px; padding:1px 9px; }
.dl-bl li.hit .dl-hit, .dl-br.hit .dl-hit { display:inline-flex; }
.dl-bl li.hit { color:var(--dl-ink); }
.dl-more { display:flex; align-items:center; gap:8px; height:46px; margin-top:auto; padding:0 14px; border-radius:12px; background:var(--dark, #14161a);
  color:#fff; font-weight:800; font-size:14.5px; text-decoration:none; }
.dl-more span { flex:1; }
.dl-more:hover { background:var(--brand, #d9161e); color:#fff; }
[dir="ltr"] .dl-more .dl-ic:last-child { transform:scaleX(-1); }
.dl-multi .dl-actions { margin-top:0; }

/* The sheet: from the bottom on a phone, a centred panel on a wide screen. */
html.dl-locked { overflow:hidden; }
.dl-sheet { display:none; position:fixed; inset:0; z-index:1000; }
.dl-sheet.on, .dl-sheet:target:not(.off) { display:block; }
.dl-sheet-bg { position:absolute; inset:0; background:rgba(10,12,16,.55); }
.dl-sheet-box { position:absolute; inset-inline:0; bottom:0; max-height:88vh; display:flex; flex-direction:column; background:#fff;
  border-radius:22px 22px 0 0; box-shadow:0 -10px 40px rgba(0,0,0,.18); transition:transform .2s ease; animation:dl-up .22s ease; }
@keyframes dl-up { from { transform:translateY(40px); opacity:.6; } to { transform:none; opacity:1; } }
.dl-sheet-grip { display:flex; justify-content:center; padding:10px 0 2px; touch-action:none; }
.dl-sheet-grip span { width:44px; height:5px; border-radius:99px; background:#d5d8dd; }
.dl-sheet-head { display:flex; align-items:center; gap:12px; padding:8px 16px 12px; touch-action:none; }
.dl-sheet-ic { width:48px; height:48px; border-radius:14px; background:var(--dark, #14161a); color:#fff; display:grid; place-items:center; flex:none; }
.dl-sheet-tt { flex:1; min-width:0; }
.dl-sheet-tt h2 { margin:0; font-size:19px; font-weight:900; color:var(--dl-ink); line-height:1.3; }
.dl-sheet-tt p { margin:2px 0 0; color:var(--dl-muted); font-size:13.5px; }
.dl-sheet-x { width:42px; height:42px; flex:none; display:grid; place-items:center; border-radius:12px; background:var(--dl-grey);
  border:1px solid var(--dl-grey-2); color:var(--dl-ink); }
.dl-sheet-body { overflow-y:auto; padding:4px 16px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior:contain; }
.dl-sheet-h { display:flex; align-items:center; gap:8px; font-size:17px; font-weight:900; margin:6px 0 10px; color:var(--dl-ink); }
.dl-sheet-h span { font-size:12.5px; font-weight:800; color:var(--dl-muted); background:var(--dl-grey); border-radius:999px; padding:1px 9px; }
.dl-br { border:1px solid var(--line, #e8eaee); border-radius:16px; padding:14px; margin-bottom:10px; display:flex; flex-direction:column; gap:7px; }
.dl-br.hit { border-color:#7fcf9d; box-shadow:0 0 0 3px rgba(15,122,61,.08); }
.dl-br-top { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.dl-br-n { width:26px; height:26px; flex:none; display:grid; place-items:center; border-radius:8px; background:var(--dark, #14161a); color:#fff; font-weight:800; font-size:13px; }
.dl-br-tt { flex:1; min-width:0; }
.dl-br-tt h4 { margin:0; font-size:16px; font-weight:800; color:var(--dl-ink); line-height:1.35; }
.dl-br-tt p { margin:1px 0 0; font-size:13px; font-weight:700; color:var(--dl-muted); }
.dl-main { flex:none; font-size:12px; font-weight:800; color:var(--brand, #d9161e); background:rgba(217,22,30,.07); border:1px solid rgba(217,22,30,.2);
  border-radius:999px; padding:2px 10px; }
.dl-actions-3 { grid-template-columns:repeat(3, 1fr); margin-top:2px; padding-top:4px; }
@media (min-width:701px) {
  .dl-sheet-box { inset-inline:auto; left:50%; bottom:auto; top:50%; width:min(560px, 92vw); max-height:84vh; border-radius:22px;
    transform:translate(-50%, -50%); animation:none; }
  .dl-sheet-grip { display:none; }
}

@media (max-width:700px) {
  .dl-hero { padding:22px 0 24px; }
  .dl-hero h1 { font-size:23px; }
  .dl-hero p { font-size:14px; }
  .dl-hero-ic { width:46px; height:46px; border-radius:13px; }
  .dl-hero-n { margin-inline-start:0; }
  .dl-filters { padding:10px; gap:8px; }
  .dl-f, .dl-f-q { flex:1 1 100%; }
  .dl-f:not(.dl-f-q) { flex:1 1 calc(50% - 4px); }
  .dl-grid { grid-template-columns:1fr; }
}
