/* PHONE-FIX-1 (Sajawat, 1 Dec 2026, Asia/Karachi).
   Scoped under body.ad-theme. Mobile first.
   Phone tweaks are in max-width:767.98px (or 575.98px where the live rule already is).
   768px and 1280px layout is unchanged, except /ar where the compact language
   dropdown replaces the expanded .ard-lang-top bar at every width (item 2).
   Offline build by Coka. Live only after Bina's QA and the founder's yes. */

/* ------------------------------------------------------------------
   2. /ar compact language switcher, matching EN .ard-lang-dd
   EN CSS already lives inline in header.blade.php; AR pages do not
   include it today. These rules style the new <details class="ard-lang-dd">
   on /ar (and are harmless if EN already has the same rules).
   ------------------------------------------------------------------ */
body.ad-theme .ard-lang-dd{position:relative;display:inline-block;margin-inline-start:8px}
body.ad-theme .ard-lang-dd>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;min-height:44px;padding:0 10px;color:#D4AF37;font-size:15px;font-weight:600;line-height:1;white-space:nowrap}
body.ad-theme .ard-lang-dd>summary::-webkit-details-marker{display:none}
body.ad-theme .ard-lang-dd>summary::after{content:"▾";margin-inline-start:6px;font-size:12px}
body.ad-theme .ard-lang-dd .ard-lang-bar{position:absolute;inset-inline-end:0;top:100%;z-index:1050;min-width:170px;padding:6px 0;background:#0F1113;border:1px solid #D4AF37;border-radius:6px;text-align:start}
body.ad-theme .ard-lang-dd .ard-lang-bar a{display:block;padding:10px 16px;color:#F4F4F4;font-size:15px;line-height:1.3;text-decoration:none;white-space:nowrap}
body.ad-theme .ard-lang-dd .ard-lang-bar a:hover,
body.ad-theme .ard-lang-dd .ard-lang-bar a:focus{color:#D4AF37}
body.ad-theme .ard-lang-dd .ard-lang-bar a[aria-current]{color:#D4AF37;font-weight:600}

/* Hide the old expanded AR top bar if a leftover node is present during rollout. */
body.ad-theme .ard-lang-top{display:none}

/* ------------------------------------------------------------------
   4. Reserve image boxes (CLS). Logo + export-product cards.
   Width/height attributes are set in HTML (see SPEC). These rules
   are the CSS fallback and do not change the existing 210/230/275px
   .ard-export-image heights at 768/1280.
   ------------------------------------------------------------------ */
body.ad-theme img.ardlink-logo-image{aspect-ratio:243/52;height:auto}
body.ad-theme .ard-export-image img{width:100%;height:100%;object-fit:cover;aspect-ratio:attr(width)/attr(height,auto)}

/* ------------------------------------------------------------------
   5. Slider dots and arrows: 44x44px tap target.
   Visual mark stays the small ::before dot (10px) / 40px arrow circle.
   Padded hit area + negative margin so the row does not wrap or grow.
   Home .ard-sl-dot / .ard-sl-prev / .ard-sl-next are already 44x44.
   ------------------------------------------------------------------ */
body.ad-theme .ard-ss-dots{gap:0}
body.ad-theme .ard-ss-dot{
  box-sizing:border-box!important;
  flex:0 0 44px;
  width:44px!important;height:44px!important;
  min-width:44px;min-height:44px;
  padding:0!important;
  margin:0 -10px; /* 24px pitch so a long row still fits at 360 */
  border:0;background:transparent;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer
}

/* Live rule at max-width:575px shrinks arrows to 40x40. Keep the 40px
   circle and add 2px padding so the hit box is 44x44. */
@media(max-width:575.98px){
  body.ad-theme .ard-ss-btn{
    box-sizing:content-box;
    width:40px;height:40px;
    padding:2px;margin:-2px;
    top:calc(50% - 22px);
    line-height:40px
  }
}

/* ------------------------------------------------------------------
   6. Product CTA label 16px on phone. Live ad-theme rule is
   font:600 13px/1 !important. Tighter tracking so the full
   "REQUEST A SESAME QUOTE" line still fits at 360px.
   ------------------------------------------------------------------ */
@media(max-width:767.98px){
  body.ad-theme .ard-product-btn,
  body.ad-theme .ard-product-btn-outline,
  body.ad-theme .ard-product-btn-gold,
  body.ad-theme a.ard-product-btn[href*="request-a-quote"]{
    font-size:16px!important;
    letter-spacing:.08em!important;
    line-height:1.2!important
  }
}

/* ------------------------------------------------------------------
   3. Sticky quote bar vs in-page enquiry CTA.
   scroll-margin so #inquiry / the hero buttons are not hidden under
   the 65px bar after a jump. Hide/show is handled by
   phone-fix-1-quote-bar.js toggling the existing .ard-quote-bar--off.
   ------------------------------------------------------------------ */
body.ad-theme #inquiry,
body.ad-theme .ard-machine-hero-buttons{
  scroll-margin-bottom:calc(72px + env(safe-area-inset-bottom,0px))
}

/* ------------------------------------------------------------------
   1. Home / and /ar: tighten the hero on phone so the CTA row
   (WhatsApp, Request a quote, Products) sits fully above the fold
   at 360x780 and 390x844. No content, photo or contact route removed.
   ------------------------------------------------------------------ */
@media(max-width:767.98px){
  body.ad-theme .ard-sh-hero .wrap{
    padding-top:0;
    padding-bottom:8px
  }
  body.ad-theme .ard-sh h1{
    font-size:30px!important;
    line-height:1.12!important;
    margin:4px 0 6px!important;
    max-width:none
  }
  body.ad-theme .ard-sh .eb{margin:0}
  body.ad-theme .ard-sh .sub{margin:0;letter-spacing:.08em}
  body.ad-theme .ard-sh .intro{
    font-size:15px!important;
    line-height:1.35!important;
    margin:6px 0 8px!important
  }
  body.ad-theme .ard-sh-hero .ard-home-mail{margin:0 0 4px!important}
  body.ad-theme .ard-sh .cta{gap:8px!important}
  /* Shorter photo slot on phone only; object-fit:cover keeps the photo. */
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-slide picture{
    aspect-ratio:3/1
  }
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-dots{
    top:calc(100vw / 3 - 44px)
  }
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-prev,
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-next{
    top:calc(100vw / 6)
  }
  /* Caption: title + optional line on the left, quote link on the right. No copy removed. */
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-cap{
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-rows:auto auto;
    align-items:center;
    column-gap:8px;
    row-gap:0;
    padding:4px 12px
  }
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-cap b{
    grid-column:1;grid-row:1;flex:none
  }
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-cap span:not(.m):not(.d){
    grid-column:1;grid-row:2;flex:none
  }
  body.ad-theme .ard-sl:not(.ard-sl--single) .ard-sl-cap a{
    grid-column:2;grid-row:1 / span 2;margin:0
  }
}
