/* ANDALUS_FIRST_SCREEN_V1 — دراسة موقع الأندلس 16 Nov 2026, الخطة النسخة 3, الجلسة 5 «أول شاشة».
   Every rule keys on html[data-an-fs] (set first thing in <head> by includes/andalus-first-screen.php — ?fs=2 preview / 'all').
   Without it this file changes nothing. The switch: ANDALUS_FIRST_SCREEN_V1 in that file ('off' = the old look, one line). */

/* ── 1) the model page: the price on the photo (one column = under 700 px, where the price card is under the first screen).
   The photo keeps its size (أ. محمد 13 Nov 2026). Same words as the bar under the page; a tap goes through to the photo. */
.an-fs-price{display:none}
html[data-an-fs] body .an-pd__media{position:relative}
@media (max-width:699px){
  html[data-an-fs] body .an-pd__media>.an-fs-price{display:flex;flex-direction:column;align-items:flex-start;gap:1px;position:absolute;top:10px;right:10px;z-index:3;
    max-width:calc(100% - 20px);padding:6px 12px 7px;border-radius:14px;background:rgba(29,18,15,.84);color:#fff;line-height:1.3;pointer-events:none;
    box-shadow:0 6px 16px -6px rgba(0,0,0,.45)}
  html[data-an-fs] body .an-fs-price b{font-size:17px;font-weight:900;white-space:nowrap}
  html[data-an-fs] body .an-fs-price small{font-size:12.5px;font-weight:800;color:#f6d7bd;white-space:nowrap}
  html[data-an-fs] body .an-fs-price bdi{white-space:nowrap}
}

/* … and the bar under the page doesn't repeat it while the photo is on the screen (andalus-site.js fsPrice) */
html[data-an-fs] body .an-pd-bar.an-fs-said .an-pd-bar__text{display:none}

/* ── 3) 700–759 px (Huawei MatePad 720 portrait, big phones on their side): the model page takes the tablet's two columns —
   photo | name + price, like the iPad (768) — instead of the phone's one column with the price at 956 px. */
@media (min-width:700px) and (max-width:759px){
  html[data-an-fs] body .an-pd__top{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-areas:"media info" "inst info" "pay pay";gap:18px 20px;align-items:start}
  html[data-an-fs][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-an-fs][data-layout="b"] body main.an-pd .an-pd__info{position:sticky;top:calc(var(--an-site-header-height,72px) + 12px);align-self:start}
  html[data-an-fs] body .an-pd__title{font-size:24px;line-height:1.35}
  html[data-an-fs] body .an-pd .an-pd__thumb{flex-basis:56px;width:56px;height:56px}
}

/* ── 4) no text under 12 px on the first screen (the photo tags on the hero, the «i» of the section bar's note, the calculator's small words) */
html[data-an-fs] body .an-hp__tag{font-size:max(12px,.74rem)!important;flex-wrap:wrap;row-gap:0;max-width:calc(100% - 14px)} /* a narrow photo (3 side by side on a phone on its side, a big font): the price goes under the name, inside the tag */
html[data-an-fs] body .an-hp__off{font-size:max(12px,.8rem)!important}
html[data-an-fs] body .an-tools-note__i{font-size:12px}
html[data-an-fs] body .an-calc__cp{font-size:12px!important}
html[data-an-fs] body .an-calc__co em{font-size:12px}
html[data-an-fs] body .an-calc__chip--m small{font-size:12px}
html[data-an-fs] body .an-calc__pkh em{font-size:12px!important}
html[data-an-fs] body .an-calc__tbl td small{font-size:12px}
html[data-an-fs] body .an-calc__tm em{font-size:12px!important}

/* ── 6) «كبّر الخط» (html.an-big): the TEXT ×1.15 — the phone's own way (text-size-adjust, what Android's «big font» does; the text
   guard measures 130%), the layout and every measured position stay as they are.
   ANDALUS_FIRST_SCREEN_V1 fix (أ. محمد 16 Nov 2026 21:27–21:29 on a computer: «الهيدر دخل في بعضه» · «العلامة اللي بتسمع بعد الضغط
   باينة في مكان مختلف»): the first version zoomed the whole page (body zoom ×1.1–1.3 from 1900 px, ×1.15 for «كبّر الخط») — every
   script that measures a place and draws there (the tap's «شغال» line, the header fit, the cookie line…) drew it in the wrong place.
   No zoom anywhere now: the big screens keep their size, and «كبّر الخط» shows only on touch screens (a computer's browser has
   its own Ctrl/⌘ +). */
html[data-an-fs].an-big,html[data-an-fs].an-big body .an-home-catalog-embed{-webkit-text-size-adjust:115%;text-size-adjust:115%}

/* ANDALUS_BIG_TEXT_V2 (طلب أ. محمد 16 Nov 2026 23:15 «الزرار فيه لاج، أحيانًا يضغط وأحيانًا لأ» + «الانتقال بين الخطين يبقى سلس»):
   · the menu's own words grow too (.an-nav3 was pinned at 100% — a tap inside «تصفح» changed nothing he could see there)
   · the page changes in pieces (assets/andalus-big-text-v1.js): a piece marked data-an-ts="b" / "n" has the new size before
     html.an-big itself is set — what is on the screen first, the rest when the phone is free
   · the two sizes change with an opacity dip only (html.an-big-sw → a veil in the page's colour over the screen; never <body>'s own
     opacity — that paints the whole page again); no font size is animated */
html[data-an-fs].an-big body .an-nav3{-webkit-text-size-adjust:115%;text-size-adjust:115%}
html[data-an-fs] body [data-an-ts="b"]{-webkit-text-size-adjust:115%!important;text-size-adjust:115%!important}
html[data-an-fs] body [data-an-ts="n"]{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
html[data-an-fs] body [data-an-ts="b"] .an-home-catalog-embed{-webkit-text-size-adjust:115%!important;text-size-adjust:115%!important}
html[data-an-fs] body [data-an-ts="n"] .an-home-catalog-embed{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
html[data-an-fs] body .an-big-veil{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483646;background:#fbf6ef;opacity:0;pointer-events:none;will-change:opacity;transition:opacity .06s linear}
html[data-an-fs].an-big-sw body .an-big-veil{opacity:.55;transition:opacity .05s linear}
/* the header keeps its height when its words grow: the four words under the icons keep their line (1.15 × their own size — em does
   not grow with text-size-adjust in Chrome), the bigger letters stand in it. A header 2.4 px taller made andalus-site.js write
   --an-site-header-height on <html> again = the whole page worked out again (80–110 ms on a ×4 phone, in the middle of the switch).
   From 341 px (under it the word may take two lines, ANDALUS_TEXT_FIT_V2). */
@media (min-width:341px) and (max-width:1024px){html[data-an-fs] body .an-site-header .an-nav3-quick a>span{height:1.15em}}

/* the button: in «تصفح» (includes/andalus-site-nav.php) and on the home page (index.php) — an_fs_big_button(), one look.
   Its state = a switch, drawn from html[data-an-bigw] (set in the tap's own frame, and by the head script before the page paints). */
html:not([data-an-fs]) body .an-fs-big{display:none!important}
@media (hover:hover) and (pointer:fine){html[data-an-fs] body .an-fs-big{display:none!important}}
html[data-an-fs] body .an-fs-big{width:100%;border:0;font:inherit;font-size:13.5px;font-weight:800;text-align:start;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
html[data-an-fs] body .an-fs-big svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html[data-an-fs] body .an-fs-big__sw{flex:none;position:relative;margin-inline-start:auto;width:38px;height:22px;border-radius:999px;background:#b9aea4;box-sizing:border-box}
html[data-an-fs] body .an-fs-big__sw::after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3)}
html[data-an-fs][data-an-bigw] body .an-fs-big{box-shadow:0 0 0 2px var(--n3-brand,#6f442f)}
html[data-an-fs][data-an-bigw] body .an-fs-big__sw{background:#0f7a40}
html[data-an-fs][data-an-bigw] body .an-fs-big__sw::after{inset-inline-start:18px}

/* … on the home page: a pill with the switch (36 px drawn, 44 px for the finger) on its own slim line above the hero card —
   أ. محمد's choice of the two places shown in the preview (17 Nov 2026 01:47). Touch screens only; the card starts 32 px lower. */
html[data-an-fs] body .an-fs-bigh{width:auto;min-height:44px;margin-block:-4px;padding:0;background:none;color:inherit;align-items:center;vertical-align:middle;box-shadow:none}
html[data-an-fs] body .an-fs-bigh__p{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 12px;border-radius:999px;border:1px solid rgba(111,68,47,.34);background:#fff;color:var(--brand,#6f442f);white-space:nowrap;box-sizing:border-box}
html[data-an-fs] body .an-fs-bigh svg{width:19px;height:19px;flex:none}
html[data-an-fs] body .an-fs-bigh .an-fs-big__sw{margin-inline-start:2px}
html[data-an-fs][data-an-bigw] body .an-fs-bigh{box-shadow:none}
html[data-an-fs][data-an-bigw] body .an-fs-bigh__p{border-color:#0f7a40;box-shadow:0 0 0 1px #0f7a40}
@media (hover:none),(pointer:coarse){
  html[data-an-fs] body .an-fs-bigrow{display:flex!important;justify-content:flex-start;margin:-8px 0 4px}
  html[data-an-fs] body .an-fs-bigrow .an-fs-bigh{display:inline-flex!important}
}

/* ANDALUS_BIG_FONT_PHONE_V1 (أ. محمد 17 Nov 2026 01:50): the phone's own font is already big (html[data-an-bigfont], measured by
   assets/andalus-big-text-v1.js fontWatch) → no «كبّر الخط» button anywhere, and a choice made earlier adds nothing on top. */
html[data-an-fs] body .an-big-probe.an-big-probe{position:fixed;top:-60px;left:0;visibility:hidden;pointer-events:none;white-space:nowrap;font:400 20px/1 monospace;letter-spacing:0;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
html[data-an-fs][data-an-bigfont] body .an-fs-big{display:none!important}
html[data-an-fs][data-an-bigfont] body .an-fs-bigrow{display:none!important}
html[data-an-fs][data-an-bigfont].an-big{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html[data-an-fs][data-an-bigfont].an-big body .an-nav3{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html[data-an-fs][data-an-bigfont].an-big body .an-home-catalog-embed{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html[data-an-fs][data-an-bigfont] body [data-an-ts="b"]{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}

/* ── 2) the cookie notice = one slim line (36 px instead of 56; the buttons keep a 44 px place for the finger, drawn smaller).
   It comes at his first touch / wheel / key, or after 8 s (includes/tracking-head.php), so it never sits on the title of the first screen. */
html[data-an-fs] body #an-consent.an-cs--slim{padding:0 10px env(safe-area-inset-bottom,0px)!important;min-height:36px;gap:6px!important;font-size:12.5px!important;line-height:1.35}
html[data-an-fs] body #an-consent.an-cs--slim p{font-size:12.5px;line-height:1.35}
html[data-an-fs] body #an-consent.an-cs--slim a{display:inline-flex;align-items:center;min-height:44px;margin-block:-14px;vertical-align:middle}
html[data-an-fs] body #an-consent.an-cs--slim .an-cs-b{gap:0}
html[data-an-fs] body #an-consent.an-cs--slim button{min-height:44px!important;min-width:44px!important;margin-block:-4px;padding:0 3px!important;border:0!important;border-radius:0;background:transparent!important;color:#fff;display:inline-flex;align-items:center;justify-content:center}
html[data-an-fs] body #an-consent.an-cs--slim button span{display:inline-flex;align-items:center;min-height:28px;padding:0 12px;border-radius:999px;font-size:12.5px;font-weight:800}
html[data-an-fs] body #an-consent.an-cs--slim .an-cs-ok span{background:#fff;color:#1d120f}
html[data-an-fs] body #an-consent.an-cs--slim .an-cs-no span{border:1px solid rgba(255,255,255,.45);color:#fff}
@media (min-width:761px){html[data-an-fs] body #an-consent.an-cs--slim{padding:0 14px!important}}

/* ── 2b) the floating «اسأل على واتساب» + «اتصل» wait while the page's own WhatsApp button is on the first screen
   (the home page: they sat on «شوف الموديلات والأسعار»). .is-away = the bottom dock's word for «slid away» (andalus-site.js). */
html[data-an-fs] body .floatwa.is-away,html[data-an-fs] body .an-co-call--float.is-away{transform:translateY(calc(100% + 18px))!important;opacity:0!important;pointer-events:none!important}
@media (prefers-reduced-motion:no-preference){html[data-an-fs] body .floatwa,html[data-an-fs] body .an-co-call--float{transition:transform .28s ease,opacity .2s ease}}

/* ── 5) phones on their side: every button on the first screen gets 44 px (the header row stays 50 px) */
@media (orientation:landscape) and (max-height:500px){
  html[data-an-fs] body .an-site-header .an-site-brand{height:44px!important;display:inline-flex;align-items:center}
  html[data-an-fs] body .an-site-header .an-nav3-btn{height:44px!important;min-height:44px!important}
  html[data-an-fs] body .an-site-header .an-cart-hdr{height:44px!important;min-height:44px!important}
  html[data-an-fs] body .an-site-header .an-nav3-quick a.is-wa{margin:3px 4px 3px 8px!important;min-height:44px!important}
  html[data-an-fs] body .an-fp-strip{min-height:44px!important;box-sizing:border-box}
  html[data-an-fs] body .stickyCta .btn,html[data-an-fs] body .ofr-sticky .ofr-btn,html[data-an-fs] body .mt-bar__wa,html[data-an-fs] body .sst-bar .sst-btn,html[data-an-fs] body .gz-bar a{min-height:44px!important;height:44px!important}
  html[data-an-fs] body .an-pd-bar__wa,html[data-an-fs] body .an-pd-bar__visit,html[data-an-fs] body .an-pd-bar .an-co-call,html[data-an-fs] body .ofr-sticky .an-co-call{min-height:44px!important;height:44px!important}
  html[data-an-fs] body .floatwa,html[data-an-fs] body .an-co-call--float{min-height:44px!important}
  html[data-an-fs] body #an-consent.an-cs--slim{min-height:36px}
  html[data-an-fs] body #an-consent.an-cs--slim button{min-height:44px!important}
}

/* ── 7) ANDALUS_HERO_PHOTO_PRICE_V1 (طلب أ. محمد 18 Nov 2026 00:06 «محتاجين نخلي السعر والخصم يتكتبوا بشكل حلو على الصورة»):
   the price and the discount on a hero photo are written in the model page's «السعر على الصورة» language (rule 1 above, .an-fs-price):
   a dark plate — the model's name small on its first line, the price big and white on its own line — and the discount a red
   chip in one line («خصم 20%», never broken into a circle). Only the words the photo already carried (name · number · price ·
   discount, includes/andalus-hero-photos.php) — the look only, no new word, no markup change. (:not(#an-x) = this plate wins over
   the tag's older inline-flex of a phone on its side, andalus-site-header-v3.css — there the price stayed beside the name on a
   wide photo and went under it on a narrow one.) Everywhere a hero photo is wide
   enough to carry it: tablets, computers and a phone on its side. A phone held upright (≤ 700 px) keeps its small tag as it was. */
@media (min-width:701px),(orientation:landscape) and (max-height:500px){
  html[data-an-fs] body .an-hp .an-hp__ph .an-hp__tag:not(#an-x){display:inline-block!important;text-align:start;right:8px;bottom:8px;
    max-width:calc(100% - 16px);padding:6px 12px 7px!important;border-radius:14px;background:rgba(29,18,15,.84);color:#f6d7bd;
    font-size:12.5px!important;font-weight:800;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:clip;box-shadow:0 6px 16px -6px rgba(0,0,0,.45)}
  html[data-an-fs] body .an-hp .an-hp__tag bdi{font-weight:800;white-space:nowrap}
  html[data-an-fs] body .an-hp .an-hp__tag .an-hp__dot{display:none}
  html[data-an-fs] body .an-hp .an-hp__tag .an-hp__price{display:block;color:#fff;font-size:17px;font-weight:900;line-height:1.3;text-align:start;white-space:nowrap}
  html[data-an-fs] body .an-hp .an-hp__ph .an-hp__off{left:8px;top:8px;max-width:calc(100% - 16px);padding:5px 11px 6px;border-radius:12px;background:#d0283a;color:#fff;
    font-size:14px!important;font-weight:900;line-height:1.3;white-space:nowrap;overflow-wrap:normal;box-shadow:0 6px 16px -6px rgba(120,10,20,.5)}
}
/* a small photo: the same plate, one step smaller — every photo of a phone on its side (three side by side), and on a tablet /
   small laptop (701–1199) the two small ones of the mosaic and the three of a strip. The mosaic's big photo keeps the full plate. */
@media (orientation:landscape) and (max-height:500px){
  html[data-an-fs] body .an-hp .an-hp__ph .an-hp__tag:not(#an-x){right:6px;bottom:6px;max-width:calc(100% - 12px);padding:4px 9px 5px!important;border-radius:12px;font-size:12px!important}
  html[data-an-fs] body .an-hp .an-hp__ph .an-hp__tag .an-hp__price{font-size:15px}
  html[data-an-fs] body .an-hp .an-hp__ph .an-hp__off{left:6px;top:6px;max-width:calc(100% - 12px);padding:3px 9px 4px;font-size:12.5px!important}
}
@media (min-width:701px) and (max-width:1199px) and (min-height:501px){
  html[data-an-fs] body .an-hp .an-hp__ph:not(:first-child) .an-hp__tag:not(#an-x),html[data-an-fs] body .an-hp.an-hp--strip .an-hp__ph .an-hp__tag:not(#an-x){right:6px;bottom:6px;max-width:calc(100% - 12px);padding:4px 9px 5px!important;border-radius:12px;font-size:12px!important}
  html[data-an-fs] body .an-hp .an-hp__ph:not(:first-child) .an-hp__tag .an-hp__price,html[data-an-fs] body .an-hp.an-hp--strip .an-hp__ph .an-hp__tag .an-hp__price{font-size:15px}
  html[data-an-fs] body .an-hp .an-hp__ph:not(:first-child) .an-hp__off,html[data-an-fs] body .an-hp.an-hp--strip .an-hp__ph .an-hp__off{left:6px;top:6px;max-width:calc(100% - 12px);padding:3px 9px 4px;font-size:12.5px!important}
}
