/* Andalus Surprises V39 — manual launcher + calm scheduled popup. */
html.an-pop-open,body.an-pop-open{overflow:hidden!important;overscroll-behavior:none}
.an-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.an-surprise-launcher{
  --an-surprise-bottom:18px;
  position:fixed;z-index:2147482000;right:max(18px,env(safe-area-inset-right));bottom:calc(var(--an-surprise-bottom) + env(safe-area-inset-bottom));
  min-height:52px;max-width:min(290px,calc(100vw - 36px));display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:8px 11px 8px 15px;border:1px solid rgba(255,255,255,.22);border-radius:999px;
  background:linear-gradient(135deg,#17261e,#324b3c);color:#fff;font:900 15px/1.2 'Tajawal',Tahoma,Arial,sans-serif;
  box-shadow:0 16px 40px rgba(12,24,17,.28);cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease,filter .2s ease;
}
.an-surprise-launcher[hidden]{display:none!important}
.an-surprise-launcher:hover{transform:translateY(-2px);box-shadow:0 20px 48px rgba(12,24,17,.34);filter:brightness(1.04)}
.an-surprise-launcher:active{transform:scale(.98)}
.an-surprise-launcher:focus-visible{outline:3px solid #efc58d;outline-offset:3px}
.an-surprise-launcher__icon{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;border-radius:50%;background:rgba(255,255,255,.13)}
.an-surprise-launcher__icon svg{width:21px;height:21px;fill:currentColor;display:block}
.an-surprise-launcher__mobile{display:none}
.an-surprise-launcher__count{min-width:25px;height:25px;display:grid;place-items:center;padding:0 6px;border-radius:999px;background:#f0c590;color:#25180e;font:900 12px/1 Arial,sans-serif;direction:ltr}

.an-pop{position:fixed;inset:0;z-index:2147482500;display:grid;place-items:center;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:rgba(9,15,12,.8);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s ease,visibility .22s ease}
.an-pop.is-open{opacity:1;visibility:visible;pointer-events:auto}
.an-pop__dialog{position:relative;width:min(760px,94vw);height:min(92vh,1040px);height:min(92dvh,1040px);max-height:92vh;max-height:92dvh;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.1);border-radius:24px;background:#111a15;box-shadow:0 28px 95px rgba(0,0,0,.5);overflow:hidden;transform:translateY(14px) scale(.985);transition:transform .24s ease;outline:0}
.an-pop.is-open .an-pop__dialog{transform:none}
.an-pop__top{flex:0 0 auto;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 11px 9px 18px;background:linear-gradient(180deg,#1d2e24,#132019);border-bottom:1px solid rgba(255,255,255,.09);color:#fff}
.an-pop__title{min-width:0;font:900 clamp(17px,2.2vw,22px)/1.35 'Tajawal',Tahoma,Arial,sans-serif;text-wrap:balance}
.an-pop__stage{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;flex:1 1 auto;padding:10px;background:#101713;overflow:hidden}
.an-pop__image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;object-position:center;border-radius:18px;background:#f2f2ed;transition:opacity .18s ease,transform .22s ease}
.an-pop__image.is-switching{opacity:.18;transform:scale(.992)}
.an-pop__close{position:static;flex:0 0 auto;width:42px;height:42px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.18);border-radius:13px;background:rgba(255,255,255,.1);color:#fff;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease,background .18s ease,border-color .18s ease}
.an-pop__close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round}
.an-pop__close:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.32);transform:translateY(-1px)}
.an-pop__close:active{transform:scale(.97)}
.an-pop__close:focus-visible,.an-pop__nav:focus-visible,.an-pop__dot:focus-visible{outline:3px solid #f2c68b;outline-offset:3px}
.an-pop__controls{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:'prev center next';align-items:center;gap:10px;padding:10px 12px;background:#111a15;border-top:1px solid rgba(255,255,255,.08);direction:rtl}
.an-pop__controls[hidden]{display:none!important}
.an-pop__nav{position:static!important;inset:auto!important;transform:none!important;width:100%;min-width:0;min-height:48px;display:flex;align-items:center;justify-content:center;padding:0 18px;border:1px solid rgba(255,255,255,.18);border-radius:14px;background:rgba(255,255,255,.1);color:#fff;font:900 16px/1.2 'Tajawal',Tahoma,Arial,sans-serif;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.an-pop__nav:hover{background:rgba(255,255,255,.17);border-color:rgba(255,255,255,.34);transform:translateY(-1px)!important}
.an-pop__nav:active{transform:scale(.985)!important}
.an-pop__prev{grid-area:prev}.an-pop__next{grid-area:next}
.an-pop__controls-center{grid-area:center;min-width:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;direction:ltr}
.an-pop__counter{position:static!important;inset:auto!important;display:block;border:0;border-radius:999px;background:transparent;color:rgba(255,255,255,.9);padding:0;font-size:12px;font-weight:800;direction:ltr}
.an-pop__dots{display:flex;align-items:center;justify-content:center;gap:7px}
.an-pop__dot{width:9px;height:9px;border:0;border-radius:999px;background:rgba(255,255,255,.35);padding:0;cursor:pointer;transition:width .18s ease,background .18s ease}
.an-pop__dot.is-active{width:27px;background:#fff}
.an-pop__caption{position:relative;z-index:5;flex:0 0 auto;width:100%;box-sizing:border-box;padding:15px 18px 17px;background:linear-gradient(180deg,#16221b 0%,#0c130f 100%);color:#fff;text-align:center;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;align-items:center;gap:11px}
.an-pop__caption[hidden]{display:none!important}
.an-pop__headline{display:block;margin:auto;max-width:640px;font-size:clamp(19px,2.5vw,29px);line-height:1.5;font-weight:900;text-wrap:balance;overflow-wrap:anywhere}.an-pop__headline[hidden]{display:none!important}
.an-pop__cta{display:inline-flex;align-items:center;justify-content:center;min-height:46px;max-width:min(100%,430px);padding:11px 24px;border-radius:999px;background:#d7a15d;color:#171007!important;text-decoration:none;font-size:clamp(16px,2vw,19px);font-weight:900;box-shadow:0 10px 30px rgba(215,161,93,.22);transition:transform .18s ease,filter .18s ease}.an-pop__cta[data-type="whatsapp"]{background:#25d366;color:#071b0f!important;box-shadow:0 10px 30px rgba(37,211,102,.22)}.an-pop__cta:hover{transform:translateY(-1px);filter:brightness(1.04)}.an-pop__cta:focus-visible{outline:3px solid #f2c68b;outline-offset:3px}.an-pop__cta[hidden]{display:none!important}
.an-pop__loading{position:absolute;inset:0;display:grid;place-items:center;color:#d5ded8;font-weight:700;background:#101713}
.an-pop__spinner{width:38px;height:38px;border:4px solid rgba(213,222,216,.2);border-top-color:#d5ded8;border-radius:50%;animation:an-pop-spin .8s linear infinite}
@keyframes an-pop-spin{to{transform:rotate(360deg)}}

@media(max-width:700px){
  .an-surprise-launcher{right:max(12px,env(safe-area-inset-right));min-height:48px;max-width:calc(100vw - 24px);padding:7px 10px 7px 13px;font-size:14px;gap:8px}
  .an-surprise-launcher__desktop{display:none}.an-surprise-launcher__mobile{display:inline}
  .an-surprise-launcher__icon{width:33px;height:33px}.an-surprise-launcher__icon svg{width:19px;height:19px}
  .an-surprise-launcher__count{min-width:23px;height:23px;font-size:11px}
}
@media(max-width:620px){
  .an-pop{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  .an-pop__dialog{width:min(96vw,620px);height:94vh;height:94dvh;max-height:94vh;max-height:94dvh;border-radius:18px}
  .an-pop__top{min-height:54px;padding:7px 8px 7px 14px}.an-pop__title{font-size:17px}.an-pop__close{width:40px;height:40px;border-radius:12px}
  .an-pop__stage{padding:7px}.an-pop__image{max-height:100%;border-radius:13px}
  .an-pop__controls{grid-template-columns:1fr 1fr;grid-template-areas:'prev next' 'center center';gap:8px;padding:9px}
  .an-pop__nav{min-height:46px;font-size:15px;border-radius:13px}
  .an-pop__controls-center{min-width:0;gap:5px;padding-top:1px}
  .an-pop__caption{padding:13px 14px 15px}.an-pop__headline{font-size:clamp(17px,5vw,24px);line-height:1.45}
  .an-pop__cta{min-height:44px;width:min(100%,360px);padding:10px 18px;font-size:16px}
}
@media(max-height:620px) and (orientation:landscape){
  .an-pop__dialog{width:min(88vw,900px);height:94dvh;max-height:94dvh}.an-pop__top{min-height:48px}.an-pop__close{width:36px;height:36px}
  .an-pop__controls{grid-template-columns:1fr auto 1fr;grid-template-areas:'prev center next';padding-block:7px}.an-pop__nav{min-height:40px}
  .an-pop__caption{padding:9px 14px 10px}.an-pop__headline{font-size:clamp(16px,2.5vw,21px);line-height:1.35}
}
@media(prefers-reduced-motion:reduce){.an-pop,.an-pop__dialog,.an-pop__image,.an-pop__dot,.an-pop__close,.an-pop__nav,.an-surprise-launcher{transition:none!important}.an-pop__spinner{animation:none}}

/* V39 — keep the launcher compact and clearly above any fixed bottom CTA. */
@media(max-width:700px){
  .an-surprise-launcher{max-width:190px!important;min-height:46px!important;padding:6px 9px 6px 11px!important;box-shadow:0 14px 34px rgba(12,24,17,.28)!important}
  .an-surprise-launcher__icon{width:31px!important;height:31px!important}
}


/* V44: launcher visibility remains synchronized with galleries; vertical
   positioning is also calculated against the mattress mobile summary. */
html.an-gallery-open .an-surprise-launcher,
body.an-gallery-open .an-surprise-launcher,
.an-ug.is-open ~ .an-surprise-launcher,
.an-ug.is-visible ~ .an-surprise-launcher {
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}
