/* ANDALUS_SITE_NAV_V3 (28 Oct 2026) — the site menu, one file (markup: includes/andalus-site-nav.php)
   أ. محمد: «خلي شكل القايمة حلو ومتوافق مع التصميمات الحديثة وألوان الموقع».
   - the site's palette: graphite of the top bar and footer (#2d2a35 → #1b1921), cream (#f7f3ee), the brand brown
     (#6f442f) for prices and the packages, ink #24160f for titles — same tokens as the glass section cards
     (assets/andalus-section-cards-v2.css)
   - computers: a light bar in the header + a glass drop-down under it («الموديلات ▾»)
   - phones / tablets: «تصفح» opens a glass bottom sheet: packages first, then «غرف كاملة», «قطع منفصلة», «اشتري بثقة»
   - Android (html.an-android) has no blur: every glass part is solid enough to read
   Replaces the menu rules that were spread over andalus-site.css, header-v22, nav-v2, responsive-fixes-v36,
   brand-system, neutral-v14 and motion (those rules targeted .an-site-nav / .an-site-menu-btn, which are gone). */

:root{
  --n3-ink:#24160f;
  --n3-text:#2b2730;
  --n3-muted:#6b584c;
  --n3-brand:#6f442f;
  --n3-cream:#f7f3ee;
  --n3-graphite:#2d2a35;
  --n3-graphite-2:#1b1921;
  --n3-line:rgba(36,22,15,.08);
  --n3-gold:#f3c98a;
  --n3-focus:#f0b75a;
  --n3-ease:cubic-bezier(.22,.9,.24,1);
}

/* line icons: the old header rules fill every svg — these are outlines */
html body .an-site-header .an-nav3-bar svg,html body .an-site-header .an-nav3-btn svg,html body .an-site-header .an-nav3-quick svg,
.an-nav3 svg{fill:none!important;stroke:currentColor}

/* ============ header bar (computers) ============ */
html body .an-site-header .an-nav3-bar{display:flex;align-items:center;gap:4px;margin-inline:auto;min-width:0;font-family:'Tajawal',Arial,sans-serif}
html body .an-site-header .an-nav3-bar__link{
  position:relative;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 13px;margin:0;border:0;border-radius:12px;
  background:transparent;color:var(--n3-text)!important;font:800 15px/1 'Tajawal',Arial,sans-serif;white-space:nowrap;
  text-decoration:none!important;cursor:pointer;transition:background .18s ease,color .18s ease;-webkit-tap-highlight-color:transparent
}
html body .an-site-header .an-nav3-bar__link svg{width:17px;height:17px;flex:0 0 auto}
html body .an-site-header .an-nav3-bar__link:hover{background:rgba(111,68,47,.07);color:var(--n3-ink)!important}
html body .an-site-header .an-nav3-bar__link:focus-visible{outline:3px solid var(--n3-focus);outline-offset:2px}
html body .an-site-header .an-nav3-bar__link[aria-current="page"]{color:var(--n3-brand)!important}
html body .an-site-header .an-nav3-bar__link[aria-current="page"]::after{content:"";position:absolute;inset-inline:14px;bottom:5px;height:2px;border-radius:2px;background:var(--n3-brand)}
html body .an-site-header .an-nav3-bar__link--pkg{
  color:var(--n3-brand)!important;background:linear-gradient(135deg,#fbf3ea 0%,#f3e4d5 100%);
  box-shadow:inset 0 0 0 1px rgba(111,68,47,.16)
}
html body .an-site-header .an-nav3-bar__link--pkg:hover{background:linear-gradient(135deg,#f8ecdf 0%,#efdcc9 100%);color:#5c3726!important}
html body .an-site-header .an-nav3-bar__link--pkg[aria-current="page"]::after{display:none}
html body .an-site-header .an-nav3-bar__chev{width:15px!important;height:15px!important;transition:transform .2s var(--n3-ease)}
html body .an-site-header .an-nav3-bar__more[aria-expanded="true"]{background:rgba(111,68,47,.08);color:var(--n3-ink)!important}
html body .an-site-header .an-nav3-bar__more[aria-expanded="true"] .an-nav3-bar__chev{transform:rotate(180deg)}

@media (min-width:1440px){
  html body .an-site-header .an-nav3-bar{gap:6px}
  html body .an-site-header .an-nav3-bar__link{font-size:16px;min-height:48px;padding:0 16px}
}
@media (min-width:1800px){
  html body .an-site-header .an-nav3-bar__link{font-size:17.5px;min-height:52px;padding:0 20px}
}
@media (min-width:1025px) and (max-width:1279px){
  html body .an-site-header .an-nav3-bar{gap:1px}
  html body .an-site-header .an-nav3-bar__link{font-size:14px;padding:0 9px}
  html body .an-site-header .an-nav3-bar__link--pkg svg{display:none}
}

/* ============ «تصفح» button (phones / tablets) ============ */
html body .an-site-header .an-nav3-btn{display:none}
@media (max-width:1024px){
  html body .an-site-header .an-nav3-bar{display:none!important}
  html body .an-site-header .an-nav3-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;min-width:44px;padding:0 15px 0 14px;margin:0;margin-inline-start:auto;
    border:0;border-radius:999px;background:linear-gradient(180deg,#36323e 0%,#1d1b22 100%);color:#fff;
    font:800 14.5px/1 'Tajawal',Arial,sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent;
    box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 6px 16px rgba(27,25,33,.22);transition:transform .15s ease,background .2s ease
  }
  html body .an-site-header .an-nav3-btn svg{width:18px;height:18px;flex:0 0 auto}
  html body .an-site-header .an-nav3-btn:active{transform:scale(.96)}
  html body .an-site-header .an-nav3-btn:focus-visible{outline:3px solid var(--n3-focus);outline-offset:2px}
  html body .an-site-header .an-nav3-btn[aria-expanded="true"]{background:#fff;color:var(--n3-ink);box-shadow:inset 0 0 0 1px var(--n3-line)}
}
@media (max-width:350px){
  html body .an-site-header .an-nav3-btn{padding:0;width:44px}
  html body .an-site-header .an-nav3-btn span{display:none}
}

/* ============ quick bar under the logo (phones / tablets) ============ */
html body .an-site-header .an-nav3-quick{display:none}
@media (max-width:1024px){
  html body .an-site-header .an-nav3-quick{
    position:relative;z-index:7;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));min-height:58px;
    background:rgba(255,255,255,.94);border-top:1px solid var(--n3-line);font-family:'Tajawal',Arial,sans-serif
  }
  html body .an-site-header .an-nav3-quick a{
    position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px 2px;
    color:var(--n3-text)!important;text-decoration:none!important;font-size:12.5px;font-weight:800;line-height:1.15;white-space:nowrap;
    -webkit-tap-highlight-color:transparent;transition:background .15s ease
  }
  html body .an-site-header .an-nav3-quick a+a::before{content:"";position:absolute;right:0;inset-block:12px;width:1px;background:var(--n3-line)}
  html body .an-site-header .an-nav3-quick svg{display:block;width:20px;height:20px;color:#4b4750}
  html body .an-site-header .an-nav3-quick a.is-pkg{color:var(--n3-brand)!important}
  html body .an-site-header .an-nav3-quick a.is-pkg svg{color:var(--n3-brand)}
  html body .an-site-header .an-nav3-quick a[aria-current="page"],
  html body .an-site-header .an-nav3-quick a[aria-expanded="true"]{background:var(--n3-cream)}
  html body .an-site-header .an-nav3-quick a:active{background:#efe8e0}
  html body .an-site-header .an-nav3-quick a:focus-visible{outline:3px solid var(--n3-focus);outline-offset:-3px}
}
@media (max-width:360px){
  html body .an-site-header .an-nav3-quick a{font-size:11.5px}
  html body .an-site-header .an-nav3-quick svg{width:18px;height:18px}
}

/* ============ the panel ============ */
.an-nav3[hidden]{display:none!important}
.an-nav3{position:fixed;inset:0;z-index:2147481000;direction:rtl;font-family:'Tajawal',Arial,sans-serif;color:var(--n3-ink);-webkit-text-size-adjust:100%}
.an-nav3 *,.an-nav3 *::before,.an-nav3 *::after{box-sizing:border-box}
.an-nav3 a{text-decoration:none!important}
.an-nav3 svg{display:block;flex:0 0 auto}
.an-nav3__scrim{position:absolute;inset:0;background:rgba(22,18,16,.44);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);opacity:0;transition:opacity .28s ease}
.an-nav3.is-open .an-nav3__scrim{opacity:1}

.an-nav3__sheet{
  position:absolute;display:flex;flex-direction:column;overflow:hidden;outline:none;
  background:rgba(250,247,243,.95);-webkit-backdrop-filter:blur(30px) saturate(1.7);backdrop-filter:blur(30px) saturate(1.7);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 0 0 1px rgba(36,22,15,.06),0 24px 60px rgba(30,20,14,.24)
}
.an-nav3__grab{display:flex;justify-content:center;padding:9px 0 4px;touch-action:none;cursor:grab}
.an-nav3__grab i{width:42px;height:5px;border-radius:5px;background:rgba(36,22,15,.18)}
.an-nav3__top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 18px 12px;touch-action:none}
.an-nav3__top strong{display:block;font-size:19px;font-weight:900;line-height:1.3;color:var(--n3-ink)}
.an-nav3__top span{display:block;margin-top:2px;font-size:12.5px;font-weight:700;color:var(--n3-muted)}
.an-nav3__x{flex:0 0 40px;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:rgba(36,22,15,.07);color:var(--n3-ink);cursor:pointer;transition:background .15s}
.an-nav3__x svg{width:20px;height:20px}
.an-nav3__x:hover{background:rgba(36,22,15,.12)}
.an-nav3__x:focus-visible,.an-nav3 a:focus-visible{outline:3px solid var(--n3-focus);outline-offset:2px}

.an-nav3__body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:2px 14px 16px;display:flex;flex-direction:column;gap:18px}
.an-nav3__body>*{flex-shrink:0}

/* packages card: the graphite of the top bar, warm glow, the package photo */
.an-nav3__pkg{
  position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:14px;
  padding:10px;border-radius:22px;color:#fff!important;
  background:linear-gradient(135deg,var(--n3-graphite) 0%,var(--n3-graphite-2) 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 12px 28px rgba(27,25,33,.28);transition:transform .2s var(--n3-ease)
}
.an-nav3__pkg::after{content:"";position:absolute;z-index:-1;width:220px;height:220px;left:-60px;top:-110px;border-radius:50%;background:radial-gradient(circle,rgba(243,201,138,.34) 0%,rgba(243,201,138,0) 70%)}
.an-nav3__pkg:active{transform:scale(.985)}
.an-nav3__pkg-ph{display:grid;place-items:center;width:96px;height:96px;border-radius:16px;overflow:hidden;background:#efe7de;color:var(--n3-brand)}
.an-nav3__pkg-ph img{width:100%;height:100%;object-fit:contain}
.an-nav3__pkg-ph svg{width:34px;height:34px}
.an-nav3__pkg-txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.an-nav3__pkg-txt small{font-size:11.5px;font-weight:800;color:var(--n3-gold)}
.an-nav3__pkg-txt strong{font-size:17.5px;font-weight:900;line-height:1.3}
.an-nav3__pkg-txt em{font-style:normal;font-size:13px;font-weight:700;color:rgba(255,255,255,.8)}
.an-nav3__pkg-txt b{display:inline-flex;align-items:center;gap:4px;margin-top:4px;font-size:13px;font-weight:900;color:#fff}
.an-nav3__pkg-txt b svg{width:16px;height:16px;transition:transform .2s var(--n3-ease)}
@media (hover:hover){.an-nav3__pkg:hover .an-nav3__pkg-txt b svg{transform:translateX(-3px)}}

/* groups */
.an-nav3__group h3{display:flex;align-items:center;gap:10px;margin:0 4px 9px;font-size:13px;font-weight:900;color:var(--n3-muted);letter-spacing:0}
.an-nav3__group h3::after{content:"";flex:1 1 auto;height:1px;background:var(--n3-line)}
.an-nav3__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.an-nav3__item{
  position:relative;display:flex;align-items:center;gap:10px;min-width:0;min-height:70px;padding:7px;border-radius:18px;color:var(--n3-ink)!important;
  background:rgba(255,255,255,.8);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 0 0 1px rgba(36,22,15,.06),0 4px 14px rgba(54,31,20,.06);
  transition:transform .18s var(--n3-ease),box-shadow .18s ease
}
.an-nav3__item:active{transform:scale(.975)}
@media (hover:hover){.an-nav3__item:hover{transform:translateY(-2px);box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 0 0 1px rgba(36,22,15,.08),0 12px 26px rgba(54,31,20,.12)}}
.an-nav3__item.is-current{box-shadow:0 0 0 2px var(--n3-brand),0 4px 14px rgba(54,31,20,.08)}
.an-nav3__ph{position:relative;flex:0 0 56px;width:56px;height:56px;border-radius:13px;overflow:hidden;background:#efe6dc}
.an-nav3__ph img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s ease}
.an-nav3__ph img.is-in{opacity:1}
.an-nav3__count{
  position:absolute;bottom:3px;left:3px;display:grid;place-items:center;min-width:20px;height:18px;padding:0 5px;border-radius:99px;
  background:rgba(255,255,255,.9);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  font:900 10.5px/1 'Tajawal',Arial,sans-serif;color:var(--n3-ink);font-variant-numeric:tabular-nums
}
.an-nav3__txt{display:flex;flex-direction:column;gap:3px;min-width:0}
.an-nav3__txt strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13.5px;font-weight:800;line-height:1.3}
.an-nav3__txt small{font-size:11.5px;font-weight:800;color:var(--n3-brand);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* «اشتري بثقة» */
.an-nav3__links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.an-nav3__link{
  display:flex;align-items:center;gap:9px;min-width:0;min-height:48px;padding:0 12px;border-radius:14px;color:var(--n3-ink)!important;
  background:rgba(255,255,255,.62);box-shadow:0 0 0 1px var(--n3-line);font-size:13.5px;font-weight:800;line-height:1.25;transition:background .15s ease
}
.an-nav3__link svg{width:19px;height:19px;color:var(--n3-brand)}
.an-nav3__link span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.an-nav3__link:hover{background:#fff}
.an-nav3__link[aria-current="page"]{background:#fff;box-shadow:0 0 0 2px var(--n3-brand)}

.an-nav3__foot{flex:0 0 auto;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--n3-line);background:rgba(250,247,243,.97)}
.an-nav3__wa{
  display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;border-radius:16px;color:#fff!important;
  background:linear-gradient(180deg,#36323e 0%,#1d1b22 100%);box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 8px 20px rgba(27,25,33,.22);
  font-size:15.5px;font-weight:900
}
.an-nav3__wa svg{width:21px;height:21px}

/* ---- phones / tablets: bottom sheet ---- */
@media (max-width:1024px){
  .an-nav3__sheet{
    left:0;right:0;bottom:0;margin-inline:auto;width:min(100%,780px);max-height:min(90dvh,calc(100dvh - 20px));
    border-radius:28px 28px 0 0;transform:translateY(104%);transition:transform .36s var(--n3-ease)
  }
  .an-nav3.is-open .an-nav3__sheet{transform:translateY(var(--an-nav3-drag,0px))}
  .an-nav3.is-dragging .an-nav3__sheet{transition:none}
}
@media (min-width:600px) and (max-width:1024px){
  .an-nav3__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .an-nav3__links{grid-template-columns:repeat(3,minmax(0,1fr))}
  .an-nav3__body{padding-inline:20px}
  .an-nav3__pkg{grid-template-columns:120px minmax(0,1fr)}
  .an-nav3__pkg-ph{width:120px;height:120px}
}
@media (max-width:399px){
  .an-nav3__item{gap:8px;padding:6px}
  .an-nav3__ph{flex-basis:50px;width:50px;height:50px;border-radius:12px}
  .an-nav3__txt small{font-size:11px}
}
@media (max-width:359px){
  .an-nav3__body{padding-inline:10px}
  .an-nav3__grid,.an-nav3__links{gap:6px}
  .an-nav3__ph{flex-basis:48px;width:48px;height:48px}
  .an-nav3__txt strong{font-size:12.5px}
  .an-nav3__pkg{grid-template-columns:80px minmax(0,1fr)}
  .an-nav3__pkg-ph{width:80px;height:80px}
}

/* ---- computers: a drop-down under the header ---- */
@media (min-width:1025px){
  .an-nav3{top:var(--an-nav3-top,96px)}
  .an-nav3__scrim{background:rgba(22,18,16,.16);-webkit-backdrop-filter:none;backdrop-filter:none}
  .an-nav3__sheet{
    top:10px;left:50%;width:min(1180px,calc(100vw - 48px));max-height:calc(100vh - var(--an-nav3-top,96px) - 24px);
    border-radius:26px;opacity:0;transform:translate(-50%,-10px) scale(.985);transform-origin:top center;
    transition:opacity .2s ease,transform .26s var(--n3-ease)
  }
  .an-nav3.is-open .an-nav3__sheet{opacity:1;transform:translate(-50%,0) scale(1)}
  .an-nav3__grab,.an-nav3__foot{display:none}
  .an-nav3__top{padding:16px 24px 6px}
  .an-nav3__top strong{font-size:17px}
  .an-nav3__body{
    display:grid;grid-template-columns:270px minmax(0,1fr) 232px;grid-template-areas:"pkg rooms links" "pkg pieces links";
    align-items:start;gap:18px 22px;padding:8px 24px 24px
  }
  .an-nav3__pkg{grid-area:pkg;grid-template-columns:1fr;align-content:start;gap:12px;padding:10px 10px 16px;border-radius:22px}
  .an-nav3__pkg-ph{width:100%;height:auto;aspect-ratio:1/1;border-radius:16px}
  .an-nav3__pkg-txt{padding:0 6px}
  .an-nav3__pkg-txt strong{font-size:19px}
  .an-nav3__group--rooms{grid-area:rooms}
  .an-nav3__group--pieces{grid-area:pieces}
  .an-nav3__group--links{grid-area:links;align-self:stretch}
  .an-nav3__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .an-nav3__item{min-height:74px}
  .an-nav3__ph{flex-basis:60px;width:60px;height:60px}
  .an-nav3__links{grid-template-columns:1fr;gap:6px}
  .an-nav3__link{min-height:44px;background:transparent;box-shadow:none;border-radius:12px}
  .an-nav3__link:hover{background:rgba(255,255,255,.85)}
}
@media (min-width:1025px) and (max-width:1199px){
  .an-nav3__body{grid-template-columns:220px minmax(0,1fr);grid-template-areas:"pkg rooms" "pkg pieces" "links links"}
  .an-nav3__links{grid-template-columns:repeat(4,minmax(0,1fr))}
  .an-nav3__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1025px) and (max-height:760px){
  .an-nav3__pkg-ph{aspect-ratio:4/3}
}

/* the page under an open panel on a phone does not scroll */
@media (max-width:1024px){
  body.an-site-menu-open{overflow:hidden!important;overscroll-behavior:none}
}

/* Android without blur */
html.an-android .an-nav3__sheet{background:#faf7f3}
html.an-android .an-nav3__scrim{background:rgba(22,18,16,.5)}
html.an-android .an-nav3__count{background:#fff}

@media (prefers-reduced-motion:reduce){
  .an-nav3__sheet,.an-nav3__scrim,.an-nav3__item,.an-nav3__pkg,.an-nav3__ph img,
  html body .an-site-header .an-nav3-bar__chev,html body .an-site-header .an-nav3-btn{transition:none!important}
}
