/* ANDALUS_LAYOUT_V3 (خطة «تطوير الموقع لكل الشاشات — Layout V3» الجلسة 1 — أ. محمد 8 Nov 2026 23:05)
   Loaded for everybody (includes/andalus-layout-ab.php; the old andalus-fullwidth-v1.css was deleted — ANDALUS_FULLWIDTH_GONE_V1).
   One rule for every width: one frame for every block, columns by width, type and spacing that grow with the screen.
   The phone first (82% of visitors): 360×800 is decided before 2560.
   Not touched here (their own files, their tests): the shell / soft navigation, ANDock (DOCK_SEL), the photo engine
   (ANDALUS_PHOTO_FIT_V1), the cart, the live touch, ANDALUS_PHONE_LANDSCAPE_V1. Motion = transform / opacity only. */

:root{
  --an-gut:clamp(14px,2vw,48px);
  --an-rail:0px;
  /* % not vw: 100vw counts what overflows, and a frame sized from it widened the phone's page on its side by 22 px (the
     page then zoomed out). The side menu already takes its width from <body> (html.an-has-rail), so it is not subtracted again. */
  --an-frame:min(calc(100% - 2 * var(--an-gut)),2400px);
  --an-read:min(var(--an-frame),72ch);
  --an-fs:clamp(14.5px,calc(.5vw + 9.5px),19px);
  --an-h1:clamp(28px,2.9vw,78px);
  --an-h2:clamp(22px,1.7vw,44px);
  --an-sp:clamp(36px,4vw,110px);
  --an-gap:clamp(12px,1.3vw,32px);
  --an-r:clamp(16px,1.2vw,28px);
  --an-cols:1;
  --an-cols-sm:2;
  --an-cols-cat:2;
  /* the old file's names, for the components that read them */
  --an-fullwidth:var(--an-frame);
  --an-fullwidth-max:2400px;
  --an-content-max:2400px;
}
@media (min-width:600px){:root{--an-cols:2;--an-cols-sm:3;--an-cols-cat:3}}
@media (min-width:1100px){:root{--an-cols:3;--an-cols-sm:4;--an-cols-cat:4}}
@media (min-width:1280px){:root{--an-rail:76px}}
@media (min-width:1500px){:root{--an-cols-sm:5;--an-cols-cat:6}}
@media (min-width:1800px){:root{--an-cols:4;--an-cols-sm:6}}

/* ---------- 1) the one frame: header, partners strip, hero, sections, grids, footer ---------- */
html[data-layout="b"] body{font-size:var(--an-fs)}
html[data-layout="b"] body :where(.wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :is(main .an-site-wrap),html[data-layout="b"] body :where(.an-cat-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-info-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-vrail__wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-sc__wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-ft__wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-ph__wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-pf__wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.mattressWrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.mt-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.sbx-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.sst-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.s10-wrap):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.sb-wrap):not(.an-sz):not(an-sz){
  width:var(--an-frame)!important;max-width:none!important;margin-inline:auto!important;box-sizing:border-box
}
/* the header and the partners strip run above the side rail: the full width less the gutters */
/* phones and tablets keep the header exactly as it was (ANDALUS_PHONE_LANDSCAPE_V1 sizes its one-row header to the full width:
   framed, its links spilled 22 px past the screen and the whole page zoomed out on a phone on its side) */
@media (min-width:1100px) and (min-height:501px){html[data-layout="b"] body :is(.an-site-header,.an-hq) .an-site-wrap{width:min(calc(100% - 2 * var(--an-gut)),2400px)!important;max-width:none!important;margin-inline:auto!important}}
html[data-layout="b"] body :is(.an-sb),html[data-layout="b"] body :is(.an-prf),html[data-layout="b"] body :is(.an-rvb),html[data-layout="b"] body :is(.an-sec-intro),html[data-layout="b"] body :is(.an-lv3-band){width:min(var(--an-frame),100%)!important;max-width:none!important;margin-inline:auto!important;box-sizing:border-box}
/* long text keeps a reading line, inside the frame */
html[data-layout="b"] body :is(.an-sec-intro__body p),html[data-layout="b"] body :is(.an2-guide p),html[data-layout="b"] body :is(.seoText p),html[data-layout="b"] body :where(.faqAnswer):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(details>p):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.an-info-lead):not(.an-sz):not(an-sz),html[data-layout="b"] body :where(.ang-lead):not(.an-sz):not(an-sz),html[data-layout="b"] body :is(.an-section-intro p),html[data-layout="b"] body :where(.an-cd__typ):not(.an-sz):not(an-sz){max-width:var(--an-read)}
html[data-layout="b"] body .an-cat-hero h1{font-size:var(--an-h1)!important;line-height:1.25!important}
html[data-layout="b"] body .an-cat :is(.an-vrail__head h2),html[data-layout="b"] body .an-cat :is(.an-sc__head h2),html[data-layout="b"] body .an-cat :is(.an-lv3-band h2),html[data-layout="b"] body .an-cat :is(.an-rvb h2),html[data-layout="b"] body .an-cat :is(.an-sec-intro h2),html[data-layout="b"] body .an-cat :is(.an2-guide h2){font-size:var(--an-h2)!important;line-height:1.35!important}

/* ---------- 2) the grids: columns by width, never «more small cards» ---------- */
html[data-layout="b"] body :where(.an-cat-grid):not(#an-sz):not(#an-sz),html[data-layout="b"] body :where(.an-rc-grid):not(#an-sz):not(#an-sz),html[data-layout="b"] body :is(#catalog #grid),html[data-layout="b"] body :where(.catalogGrid):not(#an-sz):not(#an-sz){
  display:grid!important;grid-template-columns:repeat(var(--an-cols),minmax(0,1fr))!important;gap:var(--an-gap)!important
}
html[data-layout="b"] body :is(.mt-grid),
html[data-layout="b"] body :is(.an-rc-grid),
html[data-layout="b"] body :is([data-an-grid="sm"]),
html[data-layout="b"] body .an-cat-grid:has(> [data-category="shoe_cabinets"],> [data-category="dining_tables"]){grid-template-columns:repeat(var(--an-cols-sm),minmax(0,1fr))!important}
html[data-layout="b"] body :is(.an-sc__grid:not(.an-sc__grid--offers)),html[data-layout="b"] body :where(.categoryPick):not(.an-sz):not(.an-sz){display:grid!important;grid-template-columns:repeat(var(--an-cols-cat),minmax(0,1fr))!important;gap:var(--an-gap)!important}

/* ---------- 3) the room card (section pages) = the home card (ANDALUS_CARD_AS_HOME_V1) ---------- */
html[data-layout="b"] body :is(.an-cat-photo),html[data-layout="b"] body :is(.an-home-photo),html[data-layout="b"] body :is(.an-live-photo),html[data-layout="b"] body :is(.an-rc__photo){--anp-ratio:4/3}
html[data-layout="b"] body .an-cat-card{container-type:inline-size;border-radius:var(--an-r)!important;display:flex!important;flex-direction:column}
/* ANDALUS_TAP_FAST_V1 (أ. محمد 11 Nov 2026 19:47 «صفحات الموقع فيها لاج غريب» — خطة «سرعة الموقع واستجابة الدوسة» الجلسة 4): the
   `display:flex!important` above also beat the `hidden` of a card, so from Layout V3 (9 Nov) the section pages showed ALL the
   models — «8 من 40 موديل» + «عرض المزيد» hid nothing and the price chips filtered nothing on screen (measured live 11 Nov:
   32 of 40 cards `hidden` and displayed; /dining2/ = 62 cards, a 71,000 px page on the phone). A hidden card is hidden. */
html[data-layout="b"] body .an-cat-card[hidden]{display:none!important}
html[data-layout="b"] body .an-cat-card .an-cat-body{display:flex!important;flex-direction:column;gap:10px;flex:1 1 auto}
html[data-layout="b"] body .an-cat-card .ptitle{font-size:clamp(17px,calc(.45vw + 13px),24px)!important;line-height:1.4!important;margin:0!important}
/* ANDALUS_CARD_AS_HOME_V1 (أ. محمد 9 Nov 2026 21:26 «كارت المنتج في صفحات المنتجات لازم يكون نفس كارت الصفحة الرئيسية بتفاصيله»):
   the section card shows everything the home card shows — the cash logos, «احسب قسط الموديل ده», «كل أنظمة التقسيط»,
   «التفاصيل والمقاسات», the pieces on every size, and the same buttons: «اسأل على واتساب» the whole row, then
   «تفاصيل الموديل ←» + share (48×48) under it (was: hidden in layout b and moved to the model page). */
/* the buttons row (WhatsApp · «صفحة الموديل» · share) = assets/andalus-product-card-v1.css for every card (ANDALUS_PCARD_ACTIONS_LOOK_V1) */

/* ---------- 4) the section page: one question per block, in this order (doc §4) ---------- */
html[data-layout="b"] body main.an-cat{display:flex!important;flex-direction:column}
html[data-layout="b"] body main.an-cat > *{order:50}
html[data-layout="b"] body main.an-cat > .an-cat-hero{order:1}
html[data-layout="b"] body main.an-cat > .an-cat-main{order:4}
html[data-layout="b"] body main.an-cat > .an-vrail{order:5}
html[data-layout="b"] body main.an-cat > .an-vtours{order:6}
html[data-layout="b"] body main.an-cat > .an-lv3-homes{order:7}
html[data-layout="b"] body main.an-cat > .an-lv3-pay{order:8}
html[data-layout="b"] body main.an-cat > .an-lv3-packs{order:9}
html[data-layout="b"] body main.an-cat > :is(.an-sec-intro),html[data-layout="b"] body main.an-cat > :is(.an2-guide),html[data-layout="b"] body main.an-cat > :is(.an-cat-guide){order:10}
html[data-layout="b"] body main.an-cat > .an-lv3-visit{order:11}
/* answered elsewhere now: the 3 steps + the proof strip (→ the facts line in the hero), the text tabs (→ the chips),
   «المكونات والمقاسات» (→ the model page), the 3 cross cards (→ the video block / packages / installments) */
html[data-layout="b"] body main.an-cat > :where(.an-sb):not(.an-sz):not(.an-sz),html[data-layout="b"] body main.an-cat > :where(.an-prf):not(.an-sz):not(.an-sz),html[data-layout="b"] body main.an-cat > :where(.an-cat-cross):not(.an-sz):not(.an-sz),html[data-layout="b"] body main.an-cat > :is(.an-cat-wrap:not(.an-cat-cross__grid)){display:none!important}
html[data-layout="b"] body main.an-cat > section{margin-block:0 var(--an-sp)!important}
html[data-layout="b"] body main.an-cat > :is(.an-cat-hero),html[data-layout="b"] body main.an-cat > :is(.an-cat-main){margin-block:0!important}
html[data-layout="b"] body main.an-cat > .an-cat-main{padding-block:var(--an-gap) var(--an-sp)!important}
/* the old blocks that the page shows only to layout a */
html:not([data-layout="b"]) :is(.an-hfacts),html:not([data-layout="b"]) :is(.an-lv3-only){display:none!important}

/* the hero: words next to 3 photos + 4 facts (wide) · on the phone a 150 px strip of 3 photos, the title, the facts line */
html[data-layout="b"] body .an-cat-hero{padding-block:clamp(10px,1.6vw,40px) clamp(8px,1vw,24px)!important}
html[data-layout="b"] body .an-cat-hero .an-cat-hero__finance{display:none!important}
html[data-layout="b"] body .an-cat-hero__box{border-radius:var(--an-r)!important}
html[data-layout="b"] .an-hfacts{display:flex;gap:8px;margin:12px 0 0;padding:0;align-items:center;list-style:none;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
html[data-layout="b"] .an-hfacts::-webkit-scrollbar{display:none}
html[data-layout="b"] .an-hfacts li{flex:0 0 auto;display:flex;align-items:center;gap:6px;height:34px;box-sizing:border-box;margin:0;padding:0 12px;line-height:1.2;border:1px solid #eadbd0;border-radius:999px;background:#fff;color:#3b2a22;font-weight:800;font-size:.86em;white-space:nowrap}
html[data-layout="b"] .an-hfacts b{color:#6f442f}
/* ANDALUS_HFACTS_LOOK_V1 (طلب أ. محمد 17 Nov 2026 22:50 على صف الفاكتس في الهيرو — الرئيسية، صفحات الأقسام، /24/): every fact
   starts with its icon in a small round (the proof strip's icons and its look: an_pstrip_icon, includes/andalus-proof-strip.php),
   the rating's star is gold, and the rating is one link — the number, the count, the Google and Facebook marks
   (an_rating_logos) — that opens the ratings panel. The pill stays 36 px; the rating link itself is 44 px tall (a thumb's
   size) and runs 4 px over the pill above and under it: the row keeps that room inside itself (padding-block), since a row
   that scrolls sideways clips what leaves it. A fact printed without .an-hf (a page kept from before) keeps the old look. */
html[data-layout="b"] ul.an-hfacts{padding-block:5px;margin-top:7px;margin-bottom:-5px}
html[data-layout="b"] .an-hfacts li.an-hf{height:36px;gap:7px;padding-inline:5px 13px;font-size:min(.86em,14px)} /* 14px at most (a phone / tablet has 13.8 already): in the computer's narrow hero column (533–576 px, words at 14.7–16.2px) the icons made the row 4 lines instead of 3 */
html[data-layout="b"] .an-hfacts li.an-hf>svg,html[data-layout="b"] .an-hfacts li.an-hf>a>svg{flex:0 0 26px;width:26px;height:26px;padding:5px;box-sizing:border-box;border-radius:50%;background:#f3e9df;fill:none;stroke:#6f442f;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html[data-layout="b"] .an-hfacts li.an-hf--rating>svg,html[data-layout="b"] .an-hfacts li.an-hf--rating>a>svg{padding:3.5px;background:#fff3cc;fill:#f4b400;stroke:#c98a00;stroke-width:1.3}
html[data-layout="b"] .an-hfacts li.an-hf--rating:has(>a){padding:0;border-color:#ecd9a6}
html[data-layout="b"] .an-hfacts li.an-hf--rating>a{display:flex;align-items:center;gap:7px;box-sizing:border-box;height:44px;margin-block:-4px;padding-inline:5px 7px;border-radius:999px;color:inherit;text-decoration:none!important;-webkit-tap-highlight-color:transparent;cursor:pointer}
html[data-layout="b"] .an-hfacts li.an-hf--rating>a:focus-visible{outline:3px solid #c8202f;outline-offset:-4px}
html[data-layout="b"] .an-hfacts li.an-hf--rating b{font-size:1.08em;color:#3b2a22}
html[data-layout="b"] .an-hfacts .an-rt-logos{gap:4px;margin-inline-start:1px}
html[data-layout="b"] .an-hfacts .an-rt-logo{width:22px;height:22px;box-shadow:0 0 0 1px #eadbd0}
html[data-layout="b"] .an-hfacts .an-rt-logo--facebook{box-shadow:none}
html[data-layout="b"] .an-hfacts .an-rt-logo svg{width:13px;height:13px}
html[data-layout="b"] .an-hfacts .an-rt-logo--facebook svg{width:14px;height:14px}
@media (hover:hover){html[data-layout="b"] .an-hfacts li.an-hf--rating:has(>a:hover){border-color:#c98a00;background:#fffaf0}}
/* a small computer / a tablet on its side (1024–1365): the hero's words stand in a 455–535 px column beside the photos — a tighter pill, so the row keeps its 3 lines from 1280 up (at 1024 it is 4 where it was 3: the icons do not fit two long facts in 455 px) */
@media (min-width:1024px) and (max-width:1365.98px){
  html[data-layout="b"] ul.an-hfacts{gap:6px}
  html[data-layout="b"] .an-hfacts li.an-hf{height:34px;gap:6px;padding-inline:4px 11px}
  html[data-layout="b"] .an-hfacts li.an-hf>svg,html[data-layout="b"] .an-hfacts li.an-hf>a>svg{flex-basis:24px;width:24px;height:24px;padding:4.5px}
  html[data-layout="b"] .an-hfacts li.an-hf--rating>svg,html[data-layout="b"] .an-hfacts li.an-hf--rating>a>svg{padding:3px}
  html[data-layout="b"] .an-hfacts li.an-hf--rating>a{gap:6px;margin-block:-5px;padding-inline:4px 6px}
  html[data-layout="b"] .an-hfacts .an-rt-logos{gap:3px}
  html[data-layout="b"] .an-hfacts .an-rt-logo{width:20px;height:20px}
  html[data-layout="b"] .an-hfacts .an-rt-logo svg{width:12px;height:12px}
  html[data-layout="b"] .an-hfacts .an-rt-logo--facebook svg{width:13px;height:13px}
}
@media (min-width:600px) and (min-height:501px){html[data-layout="b"] .an-hfacts li.an-hf.an-co-hf{height:auto;min-height:34px}} /* the long «التوصيل والتركيب» fact may wrap inside its pill where the row wraps (as before, includes/andalus-content-order.php) */
@media (max-width:599px){
  html[data-layout="b"] body .an-cat-hero{padding:4px 0 2px!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box,html[data-layout="b"] body .an-cat .an-cat-hero__box.an-cat-hero__box--photos{padding:0!important;border:0!important;background:none!important;box-shadow:none!important;display:flex!important;flex-direction:column;gap:8px!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__text{padding:0!important;margin:0!important;width:100%!important;max-width:100%!important;min-width:0!important}
  html[data-layout="b"] body .an-cat .an-cat-hero h1{white-space:normal!important;overflow-wrap:anywhere;max-width:100%!important}
  html[data-layout="b"] body .an-cat-hero__side{order:-1;margin:0!important;padding:0!important;min-height:0!important;height:auto!important;width:100%!important;align-self:stretch!important}
  html[data-layout="b"] body .an-cat-hero :is(.an-cat-hero__text > p),html[data-layout="b"] body .an-cat-hero :where(.an-cat-actions):not(.an-sz):not(an-sz),html[data-layout="b"] body .an-cat-hero :where(.an-cat-breadcrumb):not(.an-sz):not(an-sz){display:none!important}
  html[data-layout="b"] body .an-cat-hero h1{font-size:clamp(19px,5.2vw,23px)!important;line-height:1.28!important;margin:0!important}
  /* the photos = one strip, the full width (not the 1 big + 2 small collage squeezed) — أ. محمد 9 Nov 01:32 «صورة الهيرو
     بقت صغيرة اوي»: 2 big photos (the first wider), as tall as the screen allows, instead of 3 × 150 px */
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp{display:grid!important;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)!important;grid-template-rows:var(--an-hp-h)!important;grid-template-areas:none!important;gap:6px!important;width:100%!important;height:var(--an-hp-h)!important;min-height:0!important;max-height:var(--an-hp-h)!important;margin:0!important;aspect-ratio:auto!important}
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp > *{grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;width:auto!important;height:var(--an-hp-h)!important;min-height:0!important;max-height:var(--an-hp-h)!important;margin:0!important;border-radius:14px!important;overflow:hidden;position:relative!important;inset:auto!important;transform:none!important}
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp{--an-hp-h:clamp(200px,56vw,280px)}
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp > :nth-child(n+3){display:none!important}
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp img{width:100%!important;height:100%!important;object-fit:cover!important}
  html[data-layout="b"] body .an-cat .an-cat-hero .an-hp :is(.an-hp__lbl),html[data-layout="b"] body .an-cat .an-cat-hero .an-hp :where(figcaption):not(.an-sz),html[data-layout="b"] body .an-cat .an-cat-hero .an-hp :where(b):not(.an-sz),html[data-layout="b"] body .an-cat .an-cat-hero .an-hp :where(small):not(.an-sz){font-size:11px!important}
  html[data-layout="b"] body .an-cat-hero::before,html[data-layout="b"] body .an-cat-hero::after,html[data-layout="b"] body .an-cat-hero__box::before{display:none!important}
  /* ANDALUS_TEXT_FIT_V2 ق7: the edge-to-edge strip only where the page clips its sides (overflow:clip) — an old browser (Huawei
     Browser, an old WebView) kept it inside the gutter, else /24/ scrolled sideways 4px there */
  @supports (overflow:clip){html[data-layout="b"] .an-hfacts{margin:4px calc(50% - 50vw) 0;padding-inline:var(--an-gut)}} /* ANDALUS_TEXT_FIT_V2: edge to edge of the SCREEN (50% − 50vw), not «− gutter» — the column's two sides are not always the gutter (2–3px side scroll at 280 + big font) */
  html[data-layout="b"] .an-hfacts{margin-top:4px}
  html[data-layout="b"] ul.an-hfacts{margin-top:-1px} /* ANDALUS_HFACTS_LOOK_V1: the same 4 px as before, the row's own 5 px of room counted */
}

/* the section chips with a photo (component an_section_chips) */

/* the tools bar: sticks under the header; on the phone 2 lines (search + price filter) */
@media (max-width:599px){
  html[data-layout="b"] body main.an-cat > .an-cat-main{padding-top:6px!important}
}
@media (min-width:600px){
  html[data-layout="b"] .an-hfacts{flex-wrap:wrap;overflow:visible}
  /* one line: count · search · price · sort (the note and «اقفل» are not in the doc's bar) */
  /* the hero: words next to the photos, never taller than a screen's half */
  html[data-layout="b"] body .an-cat .an-cat-hero__box.an-cat-hero__box--photos{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:center!important;padding:clamp(16px,2vw,48px)!important}
  html[data-layout="b"] body .an-cat-hero .an-hp{height:clamp(240px,30vw,560px)!important;max-height:52vh!important;min-height:0!important}
}
/* ANDALUS_HERO_TABLET_V1 (ملاحظة أ. محمد من تجربة الآيباد الطولي، 17 Nov 2026 22:06 «هيرو صفحة القسم شكله مش مظبوط من عرض 700 لـ 1000…
   على التابلت الطولي نفس ترتيب التليفون: الصور صف فوق بعرض الكارت من غير رمادي، والكلام تحتها بعرض الكارت، والأزرار التلاتة في صف واحد…
   الكمبيوتر والتليفون مايتغيروش»). Measured live 820×1180 before: two equal columns — the words 492 px tall, the photos 246 px
   centred beside them (123 px of nothing above and under), the photos «contain» inside taller cards (grey bars), «شوفها فيديو»
   on two lines with the big font, and the old brand line (2 px, 42% wide, grows under the mouse) under each button.
   A tablet / a wide phone held upright (600–1023 px wide, portrait) now gets the phone's order: the three photos in ONE row
   across the card, each 3:2 and filled (cover), then the words across the card, then the three buttons in one row that never
   wrap. The line under the buttons goes here (there is no mouse to grow it). A phone (≤ 599), a phone on its side, a tablet
   on its side and computers: not a rule of theirs is touched. Guard: tools/dev/screen-matrix.js «hero» + tests/site-facts/hero_tablet_test.php. */
@media (min-width:600px) and (max-width:1023px) and (orientation:portrait){
  html[data-layout="b"] body .an-cat .an-cat-hero__box.an-cat-hero__box--photos{grid-template-columns:minmax(0,1fr)!important;align-items:start!important;gap:14px!important;padding:clamp(14px,2vw,20px)!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-hero__side{order:-1;width:100%!important;min-width:0!important;margin:0!important;align-self:stretch!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-hero__text{width:100%!important;max-width:100%!important;min-width:0!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;grid-template-areas:none!important;gap:10px!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;margin:0!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp > *{grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:3/2!important;margin:0!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp > :only-child{aspect-ratio:16/7!important} /* a section with one photo: a wide band, not a tall card */
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp img{width:100%!important;height:100%!important;object-fit:cover!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp .an-hp__tag{display:inline-flex!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-actions{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;gap:10px!important} /* two or three buttons: one row, equal shares */
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-actions > .an-cat-btn{width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding-inline:8px!important;white-space:nowrap!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-actions > .an-cat-btn::after{content:none!important}
}

/* the blocks under the grid (components, shown to layout b only) */
html[data-layout="b"] .an-lv3-band{box-sizing:border-box;padding:clamp(18px,2.4vw,48px);border:1px solid #eadbd0;border-radius:var(--an-r);background:linear-gradient(180deg,#fff,#fff9f3)}
html[data-layout="b"] .an-lv3-band > h2{margin:0 0 12px;color:#1d120f;font-weight:900}
html[data-layout="b"] .an-lv3-pay__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--an-gap)}
@media (max-width:599px){html[data-layout="b"] .an-lv3-pay__grid{grid-template-columns:minmax(0,1fr)}}
html[data-layout="b"] .an-lv3-pay__card{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid #eadbd0;border-radius:14px;background:#fff;text-decoration:none;color:#2b1d17}
html[data-layout="b"] .an-lv3-pay__card img{height:28px;width:auto;object-fit:contain;align-self:flex-start}
html[data-layout="b"] .an-lv3-pay__card b{font-size:1.05em}
html[data-layout="b"] .an-lv3-visit{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--an-gap)}
@media (max-width:699px){html[data-layout="b"] .an-lv3-visit{grid-template-columns:minmax(0,1fr)}}
html[data-layout="b"] .an-lv3-visit p{margin:4px 0}
html[data-layout="b"] .an-lv3-visit .an-lv3-visit__go{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 22px;border-radius:999px;background:#6f442f;color:#fff;font-weight:900;text-decoration:none}

/* the phone (standing or on its side): every tap is at least 44×44 */
@media (max-width:599px),(max-height:500px){
  html[data-layout="b"] body main :is(.an-cat-btn),html[data-layout="b"] body main :is(.chip),html[data-layout="b"] body main :is(.an-cp__calc),html[data-layout="b"] body main :is(.anp-gal__nav),html[data-layout="b"] body main :is(.anp-gal__zoom),html[data-layout="b"] body main :where(summary):not(.an-sz){min-height:44px!important;box-sizing:border-box}
  html[data-layout="b"] body main :is(.anp-gal__nav),html[data-layout="b"] body main :is(.an-gz-tg){min-width:44px!important;min-height:44px!important}
  html[data-layout="b"] body main :is(.anp-gal__zoom),html[data-layout="b"] body main :is(.an-gz-tg){min-height:46px!important}
  html[data-layout="b"] body main :is(.an-cat-card,.an-rc) :is(.an-cd__more),html[data-layout="b"] body main :is(.an-cat-card,.an-rc) :is(.an-cp__calc),html[data-layout="b"] body main :is(.an-cat-card,.an-rc) :where(summary):not(.an-sz){min-height:46px!important;box-sizing:border-box} /* ANDALUS_CARD_AS_HOME_V1: the home-card rows are back on the section card */
  html[data-layout="b"] body main .an-gz-tg{min-width:46px!important}
  html[data-layout="b"] body .an-cat-hero .an-cat-breadcrumb{display:none!important}
  html[data-layout="b"] body main :is(.visitPhones a),html[data-layout="b"] body main :is(.an-prfl a),html[data-layout="b"] body main :is(.an-calc__papers a){display:inline-flex!important;align-items:center;min-height:44px!important;box-sizing:border-box}
}

/* the packages = a strip (not a second grid), the installments = the companies only (banks are in the header strip) */
html[data-layout="b"] .an-lv3-packs .an-sc__grid--offers{display:flex!important;gap:var(--an-gap)!important;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin;padding-bottom:6px;grid-template-columns:none!important}
html[data-layout="b"] .an-lv3-packs .an-sc__offer{flex:0 0 clamp(230px,24vw,360px)!important;scroll-snap-align:start;width:auto!important}
html[data-layout="b"] .an-lv3-pay :where(.an-fp-block__sub):not(.an-sz):not(.an-sz),html[data-layout="b"] .an-lv3-pay :is(.an-fp-block__sub + .an-fp-block__row){display:none!important}
html[data-layout="b"] .an-lv3-pay .an-fp-block{margin:0 auto!important;max-width:none!important;border:0!important;box-shadow:none!important;background:none!important}
html[data-layout="b"] .an-lv3-pay > p{text-align:center;margin:12px 0 0}
/* the long text folds under its own heading (an_lv3 fold script) */
html[data-layout="b"] details.an-lv3-fold > summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
html[data-layout="b"] details.an-lv3-fold > summary::-webkit-details-marker{display:none}
html[data-layout="b"] details.an-lv3-fold > summary::after{content:"";flex:none;width:12px;height:12px;border:solid #6f442f;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);transition:transform .2s ease}
html[data-layout="b"] details.an-lv3-fold[open] > summary::after{transform:rotate(-135deg)}
html[data-layout="b"] details.an-lv3-fold > summary > :is(h2),html[data-layout="b"] details.an-lv3-fold > summary > :is(h3){margin:0!important}

/* small logos and icons are not photos to open (the preview script marks every <img>): no tap target under 44 px */
html[data-layout="b"] body main :is(.an-cp,.an-hfacts,.an-fp-block,.an-pt) .an-ug-openable{pointer-events:none!important;cursor:default!important}

/* the phone on its side (ANDALUS_PHONE_LANDSCAPE_V1 stays as is): the hero = 2 columns, words short; 3 cards a row */
@media (orientation:landscape) and (max-height:500px){
  html[data-layout="b"]{--an-cols:2}
  html[data-layout="b"] body .an-cat .an-cat-hero :is(.an-cat-hero__text > p),html[data-layout="b"] body .an-cat .an-cat-hero :where(.an-cat-actions):not(.an-sz):not(an-sz){display:none!important}
  html[data-layout="b"] body .an-cat .an-hfacts{flex-wrap:nowrap!important;overflow-x:auto!important}
  html[data-layout="b"] body .an-cat .an-cat-hero h1{font-size:clamp(19px,2.6vw,24px)!important}
}
@media (orientation:landscape) and (max-height:500px) and (min-width:700px){html[data-layout="b"]{--an-cols:3}}

/* the first models are in the first screen now (586 px on a phone): they show at once — the scroll reveal (opacity .38
   until revealed) held the first card's photo back and pushed the page's LCP to 7.6 s on a slow phone */
html[data-layout="b"] body .an-cat-grid > .an-cat-card:nth-child(-n+4),
html[data-layout="b"] body .an-cat-grid > .an-cat-card:nth-child(-n+4).an-reveal:not(.is-revealed){opacity:1!important;transform:none!important}

/* =================== session 2: the home page (doc §4) =================== */
/* hero ← sections (6 a row ≥1500, no half row) ← packages ← «جاهز في المعرض» ← «3 خطوات» (here only) ← homes ← questions +
   «عن الأندلس» folded ← visit. Gone: «خدمات الأندلس في مكان واحد» (the menu again), the steps bar + proof strip (the hero facts). */
html[data-layout="b"] body main:has(> .homeHero){display:flex!important;flex-direction:column}
/* ANDALUS_TAP_FAST_V1 (أ. محمد 11 Nov 2026 19:47 «لاج غريب أثناء ضغط العميل على الأزرار» — خطة «سرعة الموقع واستجابة الدوسة»
   الجلسة 1، س2): was `main:has(> .homeHero) > *` — a rule «:has() then a part with no name» makes the browser work the WHOLE
   page out again on every element added/removed anywhere, on every page (measured live on /living2/: 107 ms → 3 ms per change;
   it was the freeze of the section pages and the late taps). The hero is main's first child, so «everything after it» is the
   same set, with the same weight, and needs no :has(). Guard: tools/tests/rules/has_whole_page_test.php. */
html[data-layout="b"] body main > .homeHero ~ *{order:50}
html[data-layout="b"] body main > .homeHero{order:1}
html[data-layout="b"] body main > #choose-section{order:2}
html[data-layout="b"] body main > #home-packages{order:3}
html[data-layout="b"] body main > #home-ready{order:4}
html[data-layout="b"] body main > #how-it-works{order:5}
html[data-layout="b"] body main > #home-installments{order:6}
html[data-layout="b"] body main > .an-lv3-homes{order:7}
html[data-layout="b"] body main > #why-andalus{order:8}
html[data-layout="b"] body main > #visit{order:9}
html[data-layout="b"] body main > .homeHero ~ :is(#services),html[data-layout="b"] body main > .homeHero ~ :is(#pay),html[data-layout="b"] body main > .homeHero ~ :where(.an-sb):not(#an-sz),html[data-layout="b"] body main > .homeHero ~ :where(.an-prf):not(#an-sz){display:none!important}
/* ANDALUS_TAP_FAST_V1: was `main:has(> .homeHero) > section` — the hero itself + every section after it (same set, same weight) */
html[data-layout="b"] body main > section.homeHero,
html[data-layout="b"] body main > .homeHero ~ section{margin-block:0!important;padding-block:calc(var(--an-sp) / 2)!important}
html[data-layout="b"] body main > .an-lv3-homes{padding-block:calc(var(--an-sp) / 2)}
/* the section cards: as many as fit evenly, the last one widens instead of leaving a hole */
html[data-layout="b"] body #choose-section .categoryPick{grid-template-columns:repeat(var(--an-cols-cat),minmax(0,1fr))!important}
/* no half row: the last row's cards widen to fill it (any count) */
/* ANDALUS_TAP_FAST_V1: was `.categoryPick:has(> :last-child:nth-child(Mn+r)) > :nth-last-child(k)` = «the k-th card from the end
   when the count is r over M». The same card is «k-th from the end AND its own number is r-k+1 over M» — no :has() (see the
   note at the home page rules above). `:nth-child(n)` is always true: it only keeps the rule's weight as it was. */
@media (max-width:599px){
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(2n+1):nth-child(n){grid-column:span 2}
}
@media (min-width:600px) and (max-width:1099px){
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(3n+1):nth-child(n){grid-column:span 3}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(3n+2):nth-child(n){grid-column:span 2}
}
@media (min-width:1100px) and (max-width:1499px){
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(4n+1):nth-child(n){grid-column:span 4}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(4n+2):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(2):nth-child(4n+1):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(4n+3):nth-child(n){grid-column:span 2}
}
@media (min-width:1500px){
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(6n+1):nth-child(n){grid-column:span 6}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(6n+2):nth-child(n){grid-column:span 3}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(2):nth-child(6n+1):nth-child(n){grid-column:span 3}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(6n+3):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(2):nth-child(6n+2):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(3):nth-child(6n+1):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(6n+4):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(2):nth-child(6n+3):nth-child(n){grid-column:span 2}
  html[data-layout="b"] body #choose-section .categoryPick > :nth-last-child(1):nth-child(6n+5):nth-child(n){grid-column:span 2}
}
/* the packages / ready rows: a grid of their cards on wide screens (6 / 4), the swipe row on phones */
/* ANDALUS_HOME_PICKS_GRID_FLOW_V1 (أ. محمد 12 Nov 2026: «جاهز في المعرض» و«باقات العروض» على شاشة 13 إنش الحروف واخدة بالطول):
   the swipe row's grid-auto-flow:column + grid-auto-columns stayed on, so cards past the 3rd/4th opened new 337px columns and squeezed
   the first ones to ~16px. On the grid the flow is rows and the implicit columns are reset — the cards wrap to a second row. */
@media (min-width:1100px){
  html[data-layout="b"] body :is(#home-packages,#home-ready) .an-hpk__row{grid-auto-flow:row!important;grid-auto-columns:auto!important;scroll-snap-type:none!important;margin:0!important}
  html[data-layout="b"] body #home-packages .an-hpk__row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--an-gap)!important;overflow:visible!important;transform:none!important}
  html[data-layout="b"] body #home-ready .an-hpk__row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--an-gap)!important;overflow:visible!important;transform:none!important}
  html[data-layout="b"] body :is(#home-packages,#home-ready) .an-hpk__head span{display:none}
  html[data-layout="b"] body :is(#home-packages,#home-ready) .an-hpk__card{width:auto!important;min-width:0!important;max-width:none!important;flex:none!important;height:auto!important}
}
@media (min-width:1500px){html[data-layout="b"] body :is(#home-packages,#home-ready) .an-hpk__row{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* =================== session 2: /24/ (doc §4) =================== */
/* the title + 4 facts on top; ≥1500 three columns: choices · result (stuck) · «what you get»; 1100–1499 the third under it,
   full width; the phone: the result first. Gone: the photos that filled the space next to the calculator. */
html[data-layout="b"] body #top .heroGrid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:none!important;gap:var(--an-gap)!important;align-items:start!important}
html[data-layout="b"] body #top .heroGrid > *{grid-area:auto!important;grid-column:1 / -1!important}
html[data-layout="b"] body #top .heroGrid > .heroCard{display:none!important}
html[data-layout="b"] body #top :is(.an-hfill),html[data-layout="b"] body #top :is(.afsHeroPhotos),html[data-layout="b"] body #top :is(.heroActions),html[data-layout="b"] body #top :is(.eyebrow){display:none!important}
html[data-layout="b"] body #top .an-calc{width:auto!important;max-width:none!important;margin:0!important}
html[data-layout="b"] .an-lv3-get{box-sizing:border-box;font-size:var(--an-fs);line-height:1.7;padding:clamp(14px,1.4vw,28px);border:1px solid #eadbd0;border-radius:var(--an-r);background:#fff}
html[data-layout="b"] .an-lv3-get__ph:has(img[hidden]){display:none}
html[data-layout="b"] .an-lv3-get__ph{margin:0 0 10px;aspect-ratio:4/3;border-radius:calc(var(--an-r) - 6px);overflow:hidden;background:#f3ece6}
html[data-layout="b"] .an-lv3-get__ph img{width:100%;height:100%;object-fit:cover;display:block}
html[data-layout="b"] .an-lv3-get__n{margin:0 0 6px;font-weight:800;color:#2b1d17}
html[data-layout="b"] .an-lv3-get__mo{margin:0;color:#6f442f}
html[data-layout="b"] .an-lv3-get__mo b{font-size:1.6em}
html[data-layout="b"] .an-lv3-get__sub,html[data-layout="b"] .an-lv3-get__pp{margin:6px 0 0;color:#5b4a42;font-size:.92em}
@media (min-width:1100px){html[data-layout="b"] body #top .heroGrid{grid-template-columns:minmax(0,1fr)!important}}
@media (min-width:1500px){
  html[data-layout="b"] body #top .heroGrid{grid-template-columns:minmax(0,2fr) minmax(0,1fr)!important}
  html[data-layout="b"] body #top .heroGrid > .an-calc{grid-column:1!important}
  html[data-layout="b"] body #top .heroGrid > .an-lv3-get{grid-column:2!important;grid-row:2!important}
  html[data-layout="b"] body #top .heroGrid:has(> .an-lv3-get[hidden]) > .an-calc{grid-column:1 / -1!important}
  html[data-layout="b"] .an-lv3-get{position:sticky;top:calc(var(--an-site-header-height,0px) + 12px)}
}
html[data-layout="b"] body #top .an-calc__res{position:sticky;top:calc(var(--an-site-header-height,0px) + 12px);align-self:start}
/* phone: the calculator as it was — the choices first, the sticky «قسطك الشهري» bar on top, the full result after (أ. محمد
   9 Nov 02:08 «حاسبة القسط بايظة»: the result block first = 1,150 px to scroll before any choice); the «اللي هتاخده» column
   comes after the calculator, never before it */
@media (max-width:767px){html[data-layout="b"] body #top .an-calc__res{position:static}}
@media (max-width:1499px){html[data-layout="b"] body #top .heroGrid > .an-lv3-get{order:3}}
html[data-layout="b"] body main:has(> #top.hero){display:flex!important;flex-direction:column}
/* ANDALUS_TAP_FAST_V1: was `main:has(> #top.hero) > *` (see the home page above) — #top is main's first child */
html[data-layout="b"] body main > #top.hero ~ *{order:50}
html[data-layout="b"] body main > #top.hero{order:1}
html[data-layout="b"] body main > #top.hero ~ #offers{order:2}
html[data-layout="b"] body main > #top.hero ~ #reviews{order:3}
html[data-layout="b"] body main > #top.hero ~ #customer-installment-video{order:4}
html[data-layout="b"] body main > #top.hero ~ #faq{order:5}
html[data-layout="b"] body main > #top.hero ~ .an-lv3-visit{order:6}
html[data-layout="b"] body main > #top.hero ~ .an2-guide{order:7}
html[data-layout="b"] body main > #top.hero ~ :where(.an-sb):not(#an-sz),html[data-layout="b"] body main > #top.hero ~ :where(.an-prf):not(#an-sz),html[data-layout="b"] body main > #top.hero ~ :is(#afs-qualify),html[data-layout="b"] body main > #top.hero ~ :is(#income),html[data-layout="b"] body main > #top.hero ~ :is(#steps),html[data-layout="b"] body main > #top.hero ~ :is(#installment-video),html[data-layout="b"] body main > #top.hero ~ :is(#catalog),html[data-layout="b"] body main > #top.hero ~ :is(#afs-partners),html[data-layout="b"] body main > #top.hero ~ :is(#why-us),html[data-layout="b"] body main > #top.hero ~ :is(#afs-ways-sec),html[data-layout="b"] body main > #top.hero ~ :is(#installment-today-price){display:none!important}
/* a widened card keeps the row's height: the photo has one height per row, not one ratio */
@media (min-width:600px){html[data-layout="b"] body #choose-section .categoryPick .catPhoto{aspect-ratio:auto!important;height:clamp(150px,13vw,300px)!important}}

/* ── Session 3: the model page (product/index.php) — doc §4: gallery 60% + a sticky buy column ← material & sizes ←
   installments (lowest lit) ← «ادفع كاش» ← videos ← «كمّل الأوضة» ← customers' homes ← questions + description folded ←
   visit ← other models. Bank logos only in the header strip; «3 خطوات» / the proof row / the perks list are gone here
   (the buy column keeps the 3 facts line). an_lv3_pd_js() moves the nodes; this places them. */
html[data-layout="b"] body main.an-pd{--pd-gut:var(--an-gut);width:var(--an-frame)!important;max-width:none!important;display:flex;flex-direction:column}
html[data-layout="b"] body main.an-pd > *{order:50;min-width:0}
html[data-layout="b"] body main.an-pd > .an-pd__crumb{order:1}
html[data-layout="b"] body main.an-pd > .an-pd__top{order:2}
html[data-layout="b"] body main.an-pd > .an-pd__specs{order:3}
html[data-layout="b"] body main.an-pd > .an-pd__inst{order:4}
html[data-layout="b"] body main.an-pd > .an-pd__paybox{order:5}
html[data-layout="b"] body main.an-pd > :is(.an-vrail),html[data-layout="b"] body main.an-pd > :is(.an-vtours),html[data-layout="b"] body main.an-pd > :is([id^="pd-video"]){order:6}
html[data-layout="b"] body main.an-pd > .an-cr{order:7}
html[data-layout="b"] body main.an-pd > .an-pd-dl{order:8}
html[data-layout="b"] body main.an-pd > .an-pd__about{order:9}
html[data-layout="b"] body main.an-pd > .an-pd__visit{order:10}
html[data-layout="b"] body main.an-pd > .an-pd__more{order:11}
html[data-layout="b"] body main.an-pd > :is(.an-sb),
html[data-layout="b"] body main.an-pd > :is(.an-prf),
html[data-layout="b"] body main.an-pd .an-pd__info > :is(.an-vr),
html[data-layout="b"] body main.an-pd .an-pd__info > :is(.an-pd__perks),
html[data-layout="b"] body main.an-pd .an-pd__inst :is(.an-pd__inst-steps),
html[data-layout="b"] body main.an-pd .an-pd__inst :is(.an-pd__inst-partners){display:none!important}
html[data-layout="b"] body main.an-pd > :is(.an-pd__specs),html[data-layout="b"] body main.an-pd > :is(.an-pd__inst),html[data-layout="b"] body main.an-pd > :is(.an-pd__paybox){margin:var(--an-gap) 0 0!important;width:100%}
html[data-layout="b"] body main.an-pd > :is(.an-cr),html[data-layout="b"] body main.an-pd > :is(.an-pd-dl),html[data-layout="b"] body main.an-pd > :is(.an-pd__about),html[data-layout="b"] body main.an-pd > :is(.an-pd__visit),html[data-layout="b"] body main.an-pd > :is(.an-pd__more),html[data-layout="b"] body main.an-pd > :is(.an-vrail){margin-top:var(--an-sp)!important}
html[data-layout="b"] body main.an-pd .an-pd__top{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"media" "info"!important;grid-template-rows:auto!important}
@media (min-width:760px){
  html[data-layout="b"] body main.an-pd .an-pd__top{grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;grid-template-areas:"media info"!important;align-items:start}
  html[data-layout="b"] body main.an-pd .an-pd__info{position:sticky;top:calc(var(--an-site-header-height,72px) + 12px);align-self:start}
}
/* the questions first, the model's long description folded under its own heading */
html[data-layout="b"] body main.an-pd > .an-pd__about{display:flex;flex-direction:column;gap:var(--an-gap)}
html[data-layout="b"] body main.an-pd > .an-pd__about > .an-obj,html[data-layout="b"] body main.an-pd > .an-pd__about > .an-pdl-ob{order:1;margin:0!important}
html[data-layout="b"] body main.an-pd > .an-pd__about > .an-pd__faq{order:2}
html[data-layout="b"] body main.an-pd > .an-pd__about > .an-lv3-pd-desc{order:3}
html[data-layout="b"] .an-lv3-pd-desc > .an-pd__about-text{max-width:var(--an-read);margin:10px 0 0}

/* ── Session 3: /packages/ (the offers page under www) — doc §4: hero ← «عندك مقدم؟» + the packages as a grid (every group
   open, its fold head = the group's heading) ← «تطلب باقتك إزاي» ← mattress discount ← customers ← visit. The delivery photos
   come once (inside the reviews block): the old «من المعرض لبيوت عملائنا» under the page goes. */
html[data-layout="b"] body .ofr .ofr-wrap{width:var(--an-frame)!important;max-width:none!important;margin-inline:auto!important}
html[data-layout="b"] body .ofr .ofr-cmp{max-width:none!important;width:100%!important}
html[data-layout="b"] body .ofr .ofr-cmp :is(.ofr-dp),html[data-layout="b"] body .ofr .ofr-cmp :is(.ofr-cmp__head){max-width:860px;margin-inline:auto}
html[data-layout="b"] body .ofr #packages .ofr-cmp__list{grid-template-columns:repeat(var(--an-cols),minmax(0,1fr))!important;gap:var(--an-gap)!important}
html[data-layout="b"] body .ofr #packages .ofr-cmp__list > .ofr-cmp__card{grid-column:auto!important;justify-self:stretch!important;width:auto!important}
/* ANDALUS_OFFERS_FILL_ROWS_V1 (أ. محمد 9 Nov 23:59 «على الشاشة الكبيرة ظاهر ٣ باقات بالعرض… خانة فاضية للباقة الرابعة… متوافقة مع كل
   الشاشات»): a group never shows an empty slot — its columns follow how many packages it has, whatever the count:
   · fewer packages than --an-cols = that many columns (3 packages on a 4-column screen = 3 that fill the row)
   · 4 packages on a 3-column screen = 2×2 under 1400 px, 4 in a row from 1400 · an odd last card on 2 columns = the full row
   · very wide (≥2300 px, 27") with 2 groups of ≤3 = the two groups side by side, 3 a row each (6 packages in one row)
   No numbers per package — a new package in «المنتجات والأسعار» takes its place by itself. */
html[data-layout="b"] body .ofr #packages .ofr-cmp__list:has(> .ofr-cmp__card:only-child){grid-template-columns:minmax(0,1fr)!important}
@media (min-width:600px){
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list:has(> .ofr-cmp__card:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:600px) and (max-width:1099px){
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list > .ofr-cmp__card:last-child:nth-child(odd){grid-column:1 / -1!important}
}
@media (min-width:1100px){
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list:has(> .ofr-cmp__card:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list:has(> .ofr-cmp__card:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:1400px){
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list:has(> .ofr-cmp__card:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media (min-width:2300px){
  html[data-layout="b"] body .ofr #packages.ofr-cmp:has(> .ofr-cmp__group + .ofr-cmp__group):not(:has(.ofr-cmp__list > .ofr-cmp__card:nth-child(4))){grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important}
  /* ANDALUS_TAP_FAST_V1: was `> :not(.ofr-cmp__group)` — the two children that are not groups, by name (same weight) */
  html[data-layout="b"] body .ofr #packages.ofr-cmp:has(> .ofr-cmp__group + .ofr-cmp__group):not(:has(.ofr-cmp__list > .ofr-cmp__card:nth-child(4))) > .ofr-cmp__head,
  html[data-layout="b"] body .ofr #packages.ofr-cmp:has(> .ofr-cmp__group + .ofr-cmp__group):not(:has(.ofr-cmp__list > .ofr-cmp__card:nth-child(4))) > [id="choose-offer-type"]{grid-column:1 / -1}
}
html[data-layout="b"] body .ofr #packages .ofr-cmp__sum{pointer-events:none;cursor:default}
html[data-layout="b"] body .ofr #packages .ofr-cmp__chev{display:none!important}
/* ANDALUS_TAP_FAST_V1: was `main:has(> .ofr) > #from-showroom` — .ofr is main's first child */
html[data-layout="b"] body main > .ofr ~ #from-showroom{display:none!important}
html[data-layout="b"] body .ofr > .an-lv3-visit{width:var(--an-frame);margin:var(--an-sp) auto 0}
/* the model page's small links get a 44 px tap area on phones (doc §3) — the crumb, «اختار الموديل ←», «شوف الكل» */
@media (max-width:999px){
  html[data-layout="b"] body main.an-pd :is(.an-pd__crumb a),html[data-layout="b"] body main.an-pd :where(.an-cr__lk):not(.an-sz):not(an-sz),html[data-layout="b"] body main.an-pd :is(.an-pd__more-head > a){display:inline-flex!important;align-items:center;min-height:44px!important}
  html[data-layout="b"] body main.an-pd .an-pd__crumb{min-height:44px;display:flex;align-items:center;flex-wrap:wrap;gap:0 6px}
}
/* the phone gallery is full-bleed by -16 px; the frame's gutter here is --an-gut (14 px at 390) → bleed by exactly that */
@media (max-width:699px){html[data-layout="b"] body main.an-pd .an-pd__gal.anp-gal{margin:0 calc(-1 * var(--an-gut))!important}}

/* ── Session 4 (the 120%): ANDALUS_CARD_WHY_V1 — one small «ليه دي؟» line under the model's name · ANDALUS_CARD_CLIP_V1 — ▶ on
   the photo of a model with its own video, the video opens right there on the card (✕ closes it) */
html[data-layout="b"] .an-why{display:inline-flex;align-items:center;gap:6px;margin:2px 0 6px;padding:3px 10px;border-radius:999px;background:#fff4e6;color:#8a4b0b;font-size:.8em;font-weight:800;line-height:1.5;max-width:100%}
html[data-layout="b"] .an-why::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:#ea7a0c}
html[data-layout="b"] .an-cat-card .an-cat-photo{position:relative}
html[data-layout="b"] .an-lv3-clip{position:absolute;inset-inline-start:12px;bottom:12px;z-index:4;display:grid;place-items:center;width:48px;height:48px;padding:0 0 0 3px;border:2px solid rgba(255,255,255,.9);border-radius:50%;background:rgba(20,12,8,.62);color:#fff;cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:transform .18s ease,opacity .18s ease}
@media (hover:hover){html[data-layout="b"] .an-lv3-clip:hover{transform:scale(1.08)}}
html[data-layout="b"] .an-lv3-clip:active{transform:scale(.92)}
html[data-layout="b"] .an-lv3-clipbox{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;background:#0d0907;border-radius:inherit;overflow:hidden;animation:an-lv3-clip-in .22s ease-out}
html[data-layout="b"] .an-lv3-clipbox > figure,html[data-layout="b"] .an-lv3-clipbox .an-yt{width:100%!important;max-width:none!important;margin:0!important}
html[data-layout="b"] .an-lv3-clipbox__x{position:absolute;top:8px;inset-inline-end:8px;z-index:7;width:44px;height:44px;border:0;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:18px;cursor:pointer}
@keyframes an-lv3-clip-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){html[data-layout="b"] .an-lv3-clipbox{animation:none}}

/* =================== ANDALUS_LAYOUT_V3_TOOLS — session 5: the tool pages (أ. محمد 9 Nov 2026 02:12 «الجلسة 5 … عمودين على
   الشاشة العريضة (الأداة + الملخص/الصور) بدل عمود ضيق في النص، التليفون زي ما هو») ============   Only the frame and the columns: the pages' engines (the calculator, the visit sheet, the gehaz list, the account, «أوردري فين»,
   the wheel) are untouched — the rules work on the classes the pages already print (two small hooks: body.ist-page on
   /installment-status/, and /account/ runs the same a/b head script; its own rules are in order/account.php). Phones (< 1024) keep their
   one column exactly as before. --an-tool = the frame, capped where a form or a list would stretch past reading (2560: 1920). */
:root{--an-tool:min(var(--an-frame),1920px)}
@media (min-width:1024px){
  /* /quote/ (عرض السعر): the head on top; the items + total (the tool) on one side, stuck while the plans · why · deposit ·
     the showroom run on the other. A last 1fr row takes the tall side's extra height, so the short side never gets gaps. */
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]){
    width:var(--an-tool)!important;max-width:none!important;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
    grid-template-rows:auto auto auto auto auto 1fr;column-gap:var(--an-gap);align-items:start;padding-inline:0
  }
  /* ANDALUS_TAP_FAST_V1: was `.qp-wrap:has(> [items]) > *` — the same children as «the items block's siblings», after it and
     before it (a :has() on the child itself is cheap), same weight; the items block gets its min-width in its own rule */
  html[data-layout="b"] body.qp-page .qp-wrap > [aria-labelledby="qp-items-h"] ~ *,
  html[data-layout="b"] body.qp-page .qp-wrap > :has(~ [aria-labelledby="qp-items-h"]){grid-column:2;min-width:0}
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]) > .qp-head{grid-column:1/-1;grid-row:1}
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]) > [aria-labelledby="qp-items-h"]{grid-column:1;grid-row:2/-1;min-width:0;position:sticky;top:calc(var(--an-site-header-height,72px) + 12px)}
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]) .qp-head h1{font-size:var(--an-h1)}
  /* «أوردري فين» (/order/, and the quote page of a signed quote): its own 2 columns, now on the frame */
  html[data-layout="b"] body .qp-wrap.ot-v2{width:var(--an-tool)!important;max-width:none!important;padding-inline:0}
  html[data-layout="b"] body .qp-wrap.ot-v2 .ot-grid{grid-template-columns:minmax(0,1fr) clamp(340px,32%,600px);gap:0 var(--an-gap)}
  html[data-layout="b"] body .qp-wrap.ot-v2 .qp-head h1{font-size:var(--an-h1)}
  /* /account/ (ادخل بحسابك): its rules are in order/account.php itself (the page loads no site stylesheet) */
  /* «قايمة جهازك» / «اختياراتي» (/gehaz/, /my/, the family page /gehaz/<code>/): the list (the invoice) stuck on one side,
     what's missing · add a room · the name · start yours · the reviews on the other */
  html[data-layout="b"] body.gz-page .gz-wrap{width:var(--an-tool)!important;max-width:none!important;display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:auto auto auto auto 1fr;column-gap:var(--an-gap);align-items:start}
  html[data-layout="b"] body.gz-page .gz-wrap > *{grid-column:2;min-width:0;margin-top:0}
  html[data-layout="b"] body.gz-page .gz-wrap > :first-child{grid-column:1;grid-row:1/-1;position:sticky;top:calc(var(--an-site-header-height,72px) + 12px)}
  html[data-layout="b"] body.gz-page .gz-wrap > :only-child{grid-column:1/-1;position:static}
  html[data-layout="b"] body.gz-page .gz-wrap > :nth-child(n+3){margin-top:var(--an-gap)}
  /* /installment-check/ (اعرف قسطك وورقك): the 3 questions (the form card) stuck on one side, the calculator + the video on the other */
  html[data-layout="b"] body.aic-page .aic-wrap:has(> .aic-card){width:var(--an-tool);display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
    gap:0 var(--an-gap);align-items:start}
  html[data-layout="b"] body.aic-page .aic-wrap > .aic-card{position:sticky;top:calc(var(--an-site-header-height,72px) + 12px)}
  html[data-layout="b"] body.aic-page .aic-wrap > .aic-below{margin-top:0}
  html[data-layout="b"] body.aic-page .aic-wrap > :not(.aic-card):not(.aic-below){grid-column:1/-1}
  html[data-layout="b"] body.aic-page .aic-wrap > .aic-below .an-calc{max-width:none}
  /* /installment-status/ (التقسيط متاح الآن): already 2 columns in its hero — on the frame now */
  html[data-layout="b"] body.ist-page .shell{width:var(--an-tool);max-width:none}
}
@media (min-width:1500px){
  /* /visit/ (زيارة المعرض): the frame; the 4 ways to come in one row */
  html[data-layout="b"] body.an-visit-page .an-visit-wrap{width:var(--an-tool)}
  html[data-layout="b"] body.an-visit-page .an-visit-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
  html[data-layout="b"] body.an-visit-page .an-visit-action--wide{grid-column:auto}
  html[data-layout="b"] body.an-visit-page .an-visit-hero h1{font-size:var(--an-h1)}
  /* /wheel/ (لف العجلة): the form and the wheel keep their 2 columns, with room */
  html[data-layout="b"] body .anw .anw-main{max-width:1240px;gap:0 80px}
}
@media (min-width:1800px){
  /* /quote/ on a very wide screen: items + total · the plans · why + deposit + the showroom = 3 columns */
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]){grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr)}
  html[data-layout="b"] body.qp-page .qp-wrap > [aria-labelledby="qp-items-h"] ~ *,
  html[data-layout="b"] body.qp-page .qp-wrap > :has(~ [aria-labelledby="qp-items-h"]){grid-column:3}
  html[data-layout="b"] body.qp-page .qp-wrap:has(> [aria-labelledby="qp-items-h"]) > [aria-labelledby="qp-inst-h"]{grid-column:2;grid-row:2/-1}
}
/* the tool pages on a phone (one column as before): every tap ≥ 44×44 (doc §3) — the list's line links / add / «هساهم في دي»,
   the page hero's crumbs (the same component on /installment-check/, /faq/, /guides/…) */
@media (max-width:1023px){
  html[data-layout="b"] body.gz-page :is(.gz-ln__links a),html[data-layout="b"] body.gz-page :where(.gz-ln__add):not(.an-sz):not(an-sz),html[data-layout="b"] body.gz-page :where(.gz-contrib):not(.an-sz):not(an-sz){min-height:44px!important;min-width:44px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
  html[data-layout="b"] body .an-ph__crumbs a{display:inline-flex;align-items:center;min-height:44px}
}
/* =================== session 6: content pages (doc §6 — mockup «موافق» 9 Nov 2026 02:45) ===================
   /deliveries/ = the homes gallery the frame's width (--an-cols-sm: 3 · 4 · 5 ≥1500 · 6 ≥1800; the phone keeps 1 a row),
   /guides/ = the guides 1 · 2 · 3 · 4 a row on the frame, an article = one comfortable reading column (--an-read) and the site's
   type size, /v/<id>/ = the words under the video on the reading width. «3 خطوات» + the proof row only on the home page. */
html[data-layout="b"] body .dl3 .dl3-wrap{width:var(--an-frame)!important;max-width:none!important;padding-inline:0!important}
@media (min-width:600px){html[data-layout="b"] body .dl3 .dl3-grid{grid-template-columns:repeat(var(--an-cols-sm),minmax(0,1fr))!important}}
html[data-layout="b"] body main.ang .ang-wrap--wide{width:var(--an-frame)!important;max-width:none!important;padding-inline:0!important}
html[data-layout="b"] body main.ang .ang-wrap--wide .ang-cards{display:grid!important;grid-template-columns:repeat(var(--an-cols),minmax(0,1fr))!important;gap:var(--an-gap)!important}
html[data-layout="b"] body main.ang .ang-wrap:not(.ang-wrap--wide){max-width:calc(var(--an-read) + 32px)!important}
html[data-layout="b"] body main.ang{font-size:var(--an-fs)}
html[data-layout="b"] body main.ang > :is(.an-sb),html[data-layout="b"] body main.ang > :is(.an-prf){display:none!important}
html[data-layout="b"] body .vp:not(.vp--side){max-width:min(var(--an-frame),1280px)!important}
html[data-layout="b"] body .vp :is(.vp-ans),html[data-layout="b"] body .vp :is(.vp-tr),html[data-layout="b"] body .vp :is(.vp-here){max-width:var(--an-read)}
/* session 6 fix (9 Nov 2026): on a phone the photo wall and the section chips bleed to the screen edge by the old page padding
   (-16px) — the b frame's gutter is --an-gut (14px on a phone), so they ran 2px past the screen (scroll sideways on 360/390/640) */
@media (max-width:760px){
  html[data-layout="b"] body .dl3 :is(.dl3-wall),html[data-layout="b"] body .dl3 :is(.dl3-chips){margin-inline:calc(-1 * var(--an-gut))!important;padding-inline:var(--an-gut)!important}
}

/* ── ANDALUS_PD_WIDE_PAIRS_V1 (أ. محمد 9 Nov 2026 19:23 «على الشاشات العريضة محتاجة الجزء بتاع خامة ومكونات وعن الموديل يبقوا
   جنب بعض وكمان كمل الاوضة مينفعش تكون طويلة… ممكن تضيف حاجة جنبها مناسبة من الصفحة… يتطبق على كل صفحات الموديل"):
   from 1100 px the model page is a 2-column grid (dense flow). Everything spans both columns except two pairs:
   [الخامة والمكونات + قسّطها على راحتك | عن الموديل والأسئلة] under the photos, and
   [كمّل الأوضة | ادفع كاش + بيوت عملائنا يوم التسليم] (the room's total ← how to pay it ← real finished rooms).
   «كمّل الأوضة» cards sit side by side; a picked card keeps its place (its chooser is a window — ANDALUS_CR_CALM_V1).
   A page missing one side of a pair = the other spans the row. inst/paybox carry old grid-areas → grid-row reset. */
@media (min-width:1100px){
  html[data-layout="b"] body main.an-pd{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:var(--an-gap);align-items:start;grid-auto-flow:row dense}
  html[data-layout="b"] body main.an-pd > *{grid-column:1/-1;grid-row:auto!important}
  html[data-layout="b"] body main.an-pd > .an-pd__specs{order:3;grid-column:1}
  html[data-layout="b"] body main.an-pd > .an-pd__inst{order:3;grid-column:1;margin-top:var(--an-gap)!important;width:auto}
  html[data-layout="b"] body main.an-pd > .an-pd__about{order:3;grid-column:2;grid-row:span 2!important;align-self:stretch}
  html[data-layout="b"] body main.an-pd > :is(.an-vrail),html[data-layout="b"] body main.an-pd > :is(.an-vtours),html[data-layout="b"] body main.an-pd > :is([id^="pd-video"]){order:5}
  html[data-layout="b"] body main.an-pd > .an-cr{order:6;grid-column:1;grid-row:span 2!important;align-self:stretch}
  html[data-layout="b"] body main.an-pd > .an-pd__paybox{order:7;grid-column:2}
  html[data-layout="b"] body main.an-pd > .an-pd-dl{order:8;grid-column:2;margin-top:var(--an-gap)!important}
  html[data-layout="b"] body main.an-pd > :is(.an-pd__specs),html[data-layout="b"] body main.an-pd > :is(.an-pd__about),html[data-layout="b"] body main.an-pd > :is(.an-cr),html[data-layout="b"] body main.an-pd > :is(.an-pd__paybox){margin:var(--an-sp) 0 0!important;width:auto}
  html[data-layout="b"] body main.an-pd:not(:has(> .an-pd__about)) > :is(.an-pd__specs),
html[data-layout="b"] body main.an-pd:not(:has(> .an-pd__about)) > :is(.an-pd__inst),
html[data-layout="b"] body main.an-pd:not(:has(> :is(.an-pd__specs,.an-pd__inst))) > .an-pd__about,
html[data-layout="b"] body main.an-pd:not(:has(> .an-cr)) > :is(.an-pd__paybox),
html[data-layout="b"] body main.an-pd:not(:has(> .an-cr)) > :is(.an-pd-dl),
html[data-layout="b"] body main.an-pd:not(:has(> :is(.an-pd__paybox,.an-pd-dl))) > .an-cr{grid-column:1/-1}
  html[data-layout="b"] body main.an-pd:not(:has(> .an-pd__inst)) > .an-pd__about,
  html[data-layout="b"] body main.an-pd:not(:has(> .an-pd-dl)) > .an-cr{grid-row:auto!important}
  /* ANDALUS_PD_WIDE_FLUID_V1 (9 Nov 19:45 «متفاعلة مع اي مقاس شاشة مش نقعد نظبطها يدوي»): no per-size numbers — the
     cards are a wrapping flex row (each ≥260 px, they share whatever width is left, so no empty card-sized hole at 2560/3440),
     the chooser's models auto-fit the same way */
  html[data-layout="b"] body main.an-pd .an-cr__list{display:flex!important;flex-wrap:wrap}
  html[data-layout="b"] body main.an-pd .an-cr__list > li{flex:1 1 260px}
  /* ANDALUS_CR_CALM_V1 (9 Nov 23:40 «بعد الضغطة بتبوظ كل حاجة وبتغير… اماكنها»): a picked card keeps its place and size — the chooser is a window over the page */
  html[data-layout="b"] body main.an-pd .an-cr__pkm{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
}

/* =================== ANDALUS_PHONE_LANDSCAPE_V3 (بلاغ أ. محمد 17 Nov 2026 23:59 «التليفون بالعرض الموقع سيء للغاية في السكرول أو
   في عرض الحاجة» + تسجيل شاشة آيفونه 18 Nov) ===================
   Only a phone on its side (short landscape screens) — an upright phone, tablets and computers are not touched by this block.
   1) section hero: it took the whole first screen and its three photos were tall slivers (119×203, cut hard / shown small on a
      blur). Now a low band: the words in the narrow column, the three photos wide beside them (each ~5:4, filling its card),
      and the facts in ONE line under both, across the whole card (was cut at half the card) — the first models show under it.
   2) the model page: the photo's column ended after 343 px and the name/price column ran on for 1,069 px beside nothing
      (two thirds of the screen empty). The info column's parts become the grid's own parts: the name, «متوفرة», the price
      beside the photo; the delivery box under the photo and the buttons beside it; nothing runs beside an empty column.
   3) /packages/ «اختار باقتك»: three packages on a three-column screen stood as 2 + an empty slot + the third across the whole
      row (the «odd last card takes the row» rule is for two columns). Three a row, every slot filled.
   4) the breadcrumb row of the model page keeps its 44 px taps but takes 30 px of the first screen. */
@media (orientation:landscape) and (max-height:500px){
  /* 1) the section hero */
  html[data-layout="b"] body .an-cat .an-cat-hero__box.an-cat-hero__box--photos{grid-template-columns:minmax(0,1fr) minmax(0,.62fr)!important;align-items:center!important;gap:8px 14px!important;padding:10px 12px!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-hero__text{display:contents!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-hero__text > h1{grid-column:2;grid-row:1;margin:0!important;min-width:0}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-cat-hero__side{grid-column:1;grid-row:1;min-width:0;margin:0!important;height:auto!important;min-height:0!important;align-self:center!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hfacts{grid-column:1 / -1;grid-row:2;margin:0!important;min-width:0;
    -webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to left,#000 calc(100% - 28px),transparent)}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp{height:auto!important;max-height:none!important;aspect-ratio:auto!important;gap:8px!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp > .an-hp__ph{height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:5/4!important}
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp > .an-hp__ph:only-child{aspect-ratio:16/7!important}
  html[data-layout="b"] body .an-cat .an-cat-hero{padding-block:6px 4px!important}
}
/* a small phone on its side (under 700 wide): two photos, as it has upright — three were 100 px each, under their own price plates */
@media (orientation:landscape) and (max-height:500px) and (max-width:699px){
  html[data-layout="b"] body .an-cat .an-cat-hero__box--photos .an-hp > .an-hp__ph:nth-child(n+3){display:none!important}
}
@media (orientation:landscape) and (max-height:500px){

  /* 2) the model page */
  html[data-layout="b"] body main.an-pd .an-pd__crumb{min-height:44px;margin-block:-7px!important;padding-block:0!important}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-pd__wa{min-height:48px!important}
}
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){
  html[data-layout="b"] body main.an-pd .an-pd__top{grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;grid-template-areas:none!important;grid-template-rows:none!important;grid-auto-rows:auto;grid-auto-flow:row dense;gap:8px 18px!important;align-items:start!important}
  html[data-layout="b"] body main.an-pd .an-pd__top > .an-pd__info{display:contents!important}
  html[data-layout="b"] body main.an-pd .an-pd__top > .an-pd__media{grid-area:auto!important;grid-column:1!important;grid-row:2 / span 3!important;min-width:0}
  html[data-layout="b"] body main.an-pd .an-pd__info > *{grid-column:2;min-width:0;margin-block:0!important}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-pd__title{grid-column:1 / -1;grid-row:1}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-seo7-date,html[data-layout="b"] body main.an-pd .an-pd__info > .an-prfl{grid-column:1 / -1}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-co-dlv{grid-column:1;grid-row:span 3;align-self:start}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-gz-add{grid-column:1}
  html[data-layout="b"] body main.an-pd .an-pd__info > .an-pd__share{grid-column:2}

  /* 3) /packages/: three packages = three in a row; no card takes a whole row on three columns */
  html[data-layout="b"] body .ofr #packages .ofr-cmp__list > .ofr-cmp__card:last-child:nth-child(odd){grid-column:auto!important}
  /* five or six rooms in a third-of-the-screen card: three a row (their words «11 موديل» broke in two under 5 icons a row) */
  html[data-layout="b"] body .ofr #packages .ofr-cmp__rooms--n5,html[data-layout="b"] body .ofr #packages .ofr-cmp__rooms--n6{grid-template-columns:repeat(3,minmax(0,1fr))}
}
