/* Amer — Hero slider, design 3: a colour panel for the copy beside the photo.
 *
 * Two template pages, told apart by the section's full_width:
 *  - off — home-baby.html:1611, `.tf-slideshow.slideshow-2.pt-30.p-xl-0` >
 *    `.container` > `.tf-swiper.slideshow-2[data-effect=fade]` of
 *    `.slider-wrap_2` (styles.css:8882-8945, 8714-8730): a 16px-rounded box,
 *    the panel 36.17% wide from 992px (40% from 768px), 48px padding (20px
 *    under 992px), a 22.7% black veil over it, the photo beside it at its
 *    own 3:2 ratio (at least 400px tall); the h1-size title; the white bars
 *    at the start of the panel (`.sw-line-default.pst-2`, 20/30px from
 *    768px, 48/48px from 1200px);
 *  - on — home-garden.html:1667, `.tf-slideshow.slideshow-3` of
 *    `.slider-wrap_4` (styles.css:9048-9118, 8660-8676): edge to edge, panel
 *    and photo half and half from 768px, at least 542px tall (400px on a
 *    phone), the copy centred, the display-size title (400) with a
 *    description, the bars centred under the panel (`.wrap-sw-line`, 32px
 *    off the bottom, 16px on a phone).
 * Under 768px both hide the photo half and put the photo behind the copy
 * (`.sld-image-abs img.d-md-none`), darkened (baby: the same 22.7% veil;
 * garden: the photo at 80% over the ink). Here that is one picture, moved
 * by CSS, and the slide's own overlay is the veil — over the panel on a
 * desktop and over the photo on a phone, exactly where baby's ::after is.
 * Measured live at 1440/1024/768/390 (D:/tmp/amer-build/r5/build-hero-a/).
 */

/* baby: 30px over it under 1200px, none from 1200px; garden: none. */
.mt-section.amer-hero-slider--d3 { padding-block: var(--mt-space-top, 0px) var(--mt-space-bottom, 0px); }
.mt-section.amer-hero-slider--d3:not(.mt-section--full) { padding-block: var(--mt-space-top, 30px) var(--mt-space-bottom, 0px); }
@media (min-width: 1200px) {
  .mt-section.amer-hero-slider--d3:not(.mt-section--full) { padding-block: var(--mt-space-top, 0px) var(--mt-space-bottom, 0px); }
}
@media (max-width: 767px) {
  .mt-section.amer-hero-slider--d3 { padding-block: var(--mt-space-top-mobile, var(--mt-space-top, 0px)) var(--mt-space-bottom-mobile, var(--mt-space-bottom, 0px)); }
  .mt-section.amer-hero-slider--d3:not(.mt-section--full) { padding-block: var(--mt-space-top-mobile, var(--mt-space-top, 30px)) var(--mt-space-bottom-mobile, var(--mt-space-bottom, 0px)); }
}

.amer-hero-slider--d3 .amer-hs3__stage { position: relative; }
.amer-hero-slider--d3 .swiper-slide { block-size: auto; }

/* ---- One slide ------------------------------------------------------------ */
.amer-hero-slider--d3 .amer-hs3__slide {
  position: relative;
  display: flex;
  block-size: 100%;
  min-block-size: var(--mt-slider-height-mobile, 400px);
  overflow: hidden;
  background: var(--mt-slide-bg, var(--amer-heading, #101010));
}
.amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__slide { border-radius: 16px; }
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3__slide { min-block-size: var(--mt-slider-height, 542px); }
  .amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__slide { min-block-size: var(--mt-slider-height, 400px); }
}

/* The panel: the slide's colour (the ink when none is set), its pattern,
   the veil, the copy centred on its height. */
.amer-hero-slider--d3 .amer-hs3__panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex: none;
  inline-size: 100%;
  padding: var(--mt-slider-content-padding-mobile, 20px);
  background: var(--mt-slide-bg, var(--amer-heading, #101010));
}
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3__slide--media .amer-hs3__panel { inline-size: 50%; }
  .amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__slide--media .amer-hs3__panel { inline-size: 40%; }
}
@media (min-width: 992px) {
  .amer-hero-slider--d3 .amer-hs3__panel { padding: var(--mt-slider-content-padding, 48px); }
  .amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__slide--media .amer-hs3__panel { inline-size: 36.17%; }
}
.amer-hero-slider--d3 .amer-hs3__slide--v-start .amer-hs3__panel { align-items: flex-start; }
.amer-hero-slider--d3 .amer-hs3__slide--v-end .amer-hs3__panel { align-items: flex-end; }
.amer-hero-slider--d3 .amer-hs3__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  pointer-events: none;
}
.amer-hero-slider--d3 .amer-hs3__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--mt-slide-overlay, #000);
  opacity: var(--mt-slide-opacity, .4);
}
.amer-hero-slider--d3 .amer-hs3__overlay--gradient { background: linear-gradient(to top, var(--mt-slide-overlay, #000) 0%, transparent 70%); }
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3__pattern { display: block; }
}

/* The photo: beside the panel from 768px at its own ratio (the slide is at
   least the minimum height, and the photo covers whatever the row is);
   under 768px behind the copy, the panel's colour giving way to it. */
.amer-hero-slider--d3 .amer-hs3__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.amer-hero-slider--d3 .amer-hs3__photo picture { display: contents; }
.amer-hero-slider--d3 .amer-hs3__img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}
@media (max-width: 767px) {
  .amer-hero-slider--d3 .amer-hs3__slide--media .amer-hs3__panel { background: transparent; }
}
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3__photo { position: relative; inset: auto; flex: 1 1 0; min-inline-size: 0; overflow: hidden; }
}
[dir="rtl"] .amer-hero-slider--d3 .amer-hs3__photo--rtl-mirror .amer-hs3__img { transform: scaleX(-1); }

.amer-hero-slider--d3 .amer-hs3__youtube { position: relative; display: block; block-size: 100%; background: #101010; }
.amer-hero-slider--d3 .amer-hs3__play {
  position: absolute;
  inset: 0;
  z-index: 3;
  inline-size: 64px;
  block-size: 64px;
  margin: auto;
  border-radius: 50%;
  background: #fff;
  transition: transform .3s var(--amer-ease, ease);
}
[dir] .amer-hero-slider--d3 .amer-hs3__play::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: 0;
  block-size: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #101010;
  translate: 3px 0;
}
.amer-hero-slider--d3 .amer-hs3__youtube:hover .amer-hs3__play,
.amer-hero-slider--d3 .amer-hs3__youtube:focus-visible .amer-hs3__play { transform: scale(1.1); }
/* Under 768px the panel sits over the photo: a YouTube poster stays
   reachable through the copy's empty space. */
@media (max-width: 767px) {
  .amer-hero-slider--d3 .amer-hs3__slide--media .amer-hs3__panel { pointer-events: none; }
  .amer-hero-slider--d3 .amer-hs3__slide--media .amer-hs3__copy > * { pointer-events: auto; }
}

/* ---- The copy -------------------------------------------------------------- */
.amer-hero-slider--d3 .amer-hs3__copy {
  position: relative;
  z-index: 2;
  min-inline-size: 0;
  max-inline-size: 100%;
  text-align: start;
}
.amer-hero-slider--d3 .amer-hs3__slide--h-center .amer-hs3__copy { margin-inline: auto; text-align: center; }
.amer-hero-slider--d3 .amer-hs3__slide--h-end .amer-hs3__copy { margin-inline-start: auto; text-align: end; }
.amer-hero-slider--d3 .amer-hs3__slide--h-center .amer-hs3__actions { justify-content: center; }
.amer-hero-slider--d3 .amer-hs3__slide--h-end .amer-hs3__actions { justify-content: flex-end; }
@media (max-width: 767px) {
  .amer-hero-slider--d3 .amer-hs3__slide--mv-start .amer-hs3__panel { align-items: flex-start; }
  .amer-hero-slider--d3 .amer-hs3__slide--mv-center .amer-hs3__panel { align-items: center; }
  .amer-hero-slider--d3 .amer-hs3__slide--mv-end .amer-hs3__panel { align-items: flex-end; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-start .amer-hs3__copy { margin-inline: 0 auto; text-align: start; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-center .amer-hs3__copy { margin-inline: auto; text-align: center; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-end .amer-hs3__copy { margin-inline: auto 0; text-align: end; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-start .amer-hs3__actions { justify-content: flex-start; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-center .amer-hs3__actions { justify-content: center; }
  .amer-hero-slider--d3 .amer-hs3__slide--mh-end .amer-hs3__actions { justify-content: flex-end; }
}
/* `.h6.mb-16`: 20/28, 500. */
.amer-hero-slider--d3 .amer-hs3__eyebrow {
  margin: 0 0 16px;
  font-family: var(--amer-font-heading);
  font-size: var(--amer-fs-h6, 20px);
  font-weight: var(--amer-fw-heading, 500);
  line-height: 28px;
  color: var(--mt-slide-text, #fff);
  overflow-wrap: anywhere;
}
.amer-hero-slider--d3 .amer-hs3__eyebrow:last-child { margin-block-end: 0; }
/* baby `h1.title_sld`: 34-56px on 44-68px, 500; garden
   `.title_sld.text-display`: 36-80px on 40-88px, 400. .05em in English. */
.amer-hero-slider--d3 .amer-hs3__title {
  margin: 0;
  font-family: var(--amer-font-heading);
  font-weight: var(--amer-fw-heading, 500);
  font-size: var(--amer-fs-h1, clamp(34px, 5vw, 56px));
  line-height: clamp(44px, 6vw, 68px);
  letter-spacing: var(--amer-ls-title, .05em);
  color: var(--mt-slide-title, #fff);
  overflow-wrap: anywhere;
}
.amer-hero-slider--d3 .amer-hs3--wide .amer-hs3__title {
  font-weight: 400;
  font-size: var(--amer-fs-display, clamp(36px, 6vw, 80px));
  line-height: clamp(40px, 6.5vw, 88px);
}
/* garden `p.decs_sld.text-body-1`: 18/28, 12px under the title (16px from
   768px). */
.amer-hero-slider--d3 .amer-hs3__subtitle {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 28px;
  color: var(--mt-slide-text, #fff);
  overflow-wrap: anywhere;
}
/* The merchant's line breaks from 1200px, where the template's own title
   breaks show (`<br class="d-none d-xl-block">`); narrower, the words wrap
   to the panel. */
@media (min-width: 1200px) {
  .amer-hero-slider--d3 .amer-hs3__title,
  .amer-hero-slider--d3 .amer-hs3__subtitle { white-space: pre-line; }
}
.amer-hero-slider--d3 .amer-hs3__subtitle:first-child { margin-block-start: 0; }
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3__subtitle { margin-block-start: 16px; }
}
/* The button's row: baby 24px under the title (40px from 1200px), garden
   24px under the description (40px from 768px). */
.amer-hero-slider--d3 .amer-hs3__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 24px; }
.amer-hero-slider--d3 .amer-hs3__actions:first-child { margin-block-start: 0; }
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3--wide .amer-hs3__actions:not(:first-child) { margin-block-start: 40px; }
}
@media (min-width: 1200px) {
  .amer-hero-slider--d3 .amer-hs3__actions:not(:first-child) { margin-block-start: 40px; }
}
/* `.tf-btn.btn-white`, as design 2. */
.amer-hero-slider--d3 .amer-hs3__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  block-size: 44px;
  padding-inline: 24px;
  border: var(--mt-slide-button-bw, 0) solid var(--mt-slide-button-border, transparent);
  border-radius: var(--amer-radius-button, 60px);
  background: var(--mt-slide-button-bg, #fff);
  color: var(--mt-slide-button-text, var(--amer-heading, #101010));
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .3s var(--amer-ease, ease), color .3s var(--amer-ease, ease), border-color .3s var(--amer-ease, ease);
}
@media (min-width: 1200px) {
  .amer-hero-slider--d3 .amer-hs3__button { block-size: 58px; padding-inline: 32px; }
}
.amer-hero-slider--d3 .amer-hs3__button:hover,
.amer-hero-slider--d3 .amer-hs3__button:focus-visible { background: var(--mt-slide-button-hover-bg, var(--amer-heading, #101010)); color: var(--mt-slide-button-hover-text, var(--amer-bg, #fff)); text-decoration: none; }
.amer-hero-slider--d3 .amer-hs3__button--secondary {
  border: 1px solid var(--mt-slide-button-border, currentColor);
  background: var(--mt-slide-button-bg, transparent);
  color: var(--mt-slide-button-text, var(--mt-slide-title, #fff));
}
.amer-hero-slider--d3 .amer-hs3__button--secondary:hover,
.amer-hero-slider--d3 .amer-hs3__button--secondary:focus-visible { border-color: #fff; background: #fff; color: #101010; }

.amer-hero-slider--d3 a:focus:not(:focus-visible),
.amer-hero-slider--d3 button:focus:not(:focus-visible),
.amer-hero-slider--d3 a:focus-visible,
.amer-hero-slider--d3 button:focus-visible { outline: none; }

/* ---- Entrance (`.slider_effect_fade`) --------------------------------------
   The copy rises in (.3s, delays .5/.6/.7/.8s) and the photo settles from
   120% (`.scale-item`, .5s) each time a slide comes in; only once Swiper
   runs. */
@media (prefers-reduced-motion: no-preference) {
  .amer-hero-slider--d3 .swiper-initialized .amer-hs3__fade { transition: opacity .3s ease, transform .3s ease, visibility .3s ease; }
  .amer-hero-slider--d3 .swiper-initialized .swiper-slide:not(.swiper-slide-active) .amer-hs3__fade { opacity: 0; visibility: hidden; transform: translateY(100px); }
  .amer-hero-slider--d3 .amer-hs3__fade--1 { transition-delay: .5s; }
  .amer-hero-slider--d3 .amer-hs3__fade--2 { transition-delay: .6s; }
  .amer-hero-slider--d3 .amer-hs3__fade--3 { transition-delay: .7s; }
  .amer-hero-slider--d3 .amer-hs3__fade--4 { transition-delay: .8s; }
  .amer-hero-slider--d3 .swiper-initialized .amer-hs3__photo .amer-hs3__img { transition: scale .5s linear; }
  .amer-hero-slider--d3 .swiper-initialized .swiper-slide:not(.swiper-slide-active) .amer-hs3__photo .amer-hs3__img { scale: 1.2; }
}

/* ---- Navigation ----------------------------------------------------------- */
.amer-hero-slider--d3 .amer-hs3__lines {
  position: absolute;
  inset-inline: 0;
  inline-size: auto;
  inset-block-end: 15px;
  z-index: 3;
}
.amer-hero-slider--d3 .amer-hs3--wide .amer-hs3__lines { inset-block-end: 16px; }
@media (min-width: 768px) {
  .amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__lines { inset-inline-start: 20px; inset-block-end: 30px; justify-content: flex-start; }
  .amer-hero-slider--d3 .amer-hs3--wide .amer-hs3__lines { inset-inline-end: 50%; inset-block-end: 32px; }
}
@media (min-width: 1200px) {
  .amer-hero-slider--d3 .amer-hs3--boxed .amer-hs3__lines { inset-inline-start: 48px; inset-block-end: 48px; }
}
.amer-hero-slider--d3 .amer-hs3__lines .swiper-pagination-bullet { background: var(--mt-nav-text, #fff); }
.amer-hero-slider--d3 .amer-hs3__lines .swiper-pagination-bullet-active { background: var(--mt-nav-active, var(--mt-nav-text, #fff)); }

/* The template draws no arrows here (its markup for them is commented out);
   the switch gives the theme's round ones, 20px in, centred on the slide. */
.amer-hero-slider--d3 .amer-hs3__arrow {
  position: absolute;
  inset-block-start: 50%;
  z-index: 3;
  margin-block-start: -22px;
  border: 0;
  border-radius: 50%;
  background: var(--mt-nav-bg, var(--amer-bg, #fff));
  color: var(--mt-nav-text, var(--amer-heading, #101010));
  box-shadow: 0 10px 25px rgb(43 52 74 / .12);
}
.amer-hero-slider--d3 .amer-hs3__arrow--prev { inset-inline-start: 20px; }
.amer-hero-slider--d3 .amer-hs3__arrow--next { inset-inline-end: 20px; }
.amer-hero-slider--d3 .amer-hs3__arrow:hover,
.amer-hero-slider--d3 .amer-hs3__arrow:focus-visible { background: var(--mt-nav-active, var(--amer-heading, #101010)); color: var(--amer-bg, #fff); }

/* «لون الكلام» (text_color, 2026-10-13): the slide counter sits
   on the section's own colour, so it takes the merchant's colour
   (--amer-hs-ink, hero-slider.jinja) before the theme's. */
.amer-hero-slider--d3 .amer-hs3__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block-start: 10px;
  font-size: 14px;
  line-height: 22px;
  color: var(--amer-hs-ink, var(--amer-heading));
}
.amer-hero-slider--d3 .amer-hs3__progress-track { position: relative; inline-size: 120px; block-size: 2px; background: var(--mt-progress-track, #ddd); overflow: hidden; }
.amer-hero-slider--d3 .amer-hs3__progress-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--mt-progress-fill, var(--amer-heading)); transition: inline-size .3s var(--amer-ease, ease); }
/* «الجزء اللي يفضل باين لما الصورة تتقص» (2026-10-13): the slide picture is
   held at the point the merchant chose; the section writes the two
   properties only when a choice is not the middle (hero-slider.jinja,
   hs_focus), and the phone picture's own choice takes over from 767px down,
   the break of its <source>. */
.amer-hero-slider--d3 img[data-amer-focus] { object-position: var(--amer-focus, 50% 50%); }
@media (max-width: 767px) {
  .amer-hero-slider--d3 img[data-amer-focus] { object-position: var(--amer-focus-m, var(--amer-focus, 50% 50%)); }
}
/* «الصورة على الكمبيوتر» = «كاملة من غير قص» (a slide's image_fit,
   hero-slider.jinja hs_focus): from 768px the picture is drawn whole in its
   box, on the slide's «لون الخلفية» when one is set; the phone keeps cover. */
@media (min-width: 768px) {
  .amer-hero-slider--d3 img[data-amer-fit="contain"] { object-fit: contain; background-color: var(--amer-fit-bg, transparent); }
}
/* The photo box takes its picture's own ratio from 768px; a whole picture
   leaves the height to the slide («ارتفاع الشريحة على الكمبيوتر»), so a tall
   photo does not make the slide taller than the screen. */
@media (min-width: 768px) {
  .amer-hero-slider--d3 img[data-amer-fit="contain"] { position: absolute; inset: 0; }
}
/* Phones: copy at the bottom of the slide sat on the dots (0px from the last
   button to the bars, measured at 300-430px on a merchant's store, Taylan
   2026-10-19). When the slider has its bars, a slide whose copy is at the
   bottom on a phone (its own «تحت», or the computer's «تحت» left as «زي
   الكمبيوتر») keeps 32px more under its copy. */
@media (max-width: 767px) {
  .amer-hero-slider--d3:has(.amer-hs3__lines) :is(.amer-hs3__slide--mv-end, .amer-hs3__slide--v-end:not(.amer-hs3__slide--mv-start, .amer-hs3__slide--mv-center)) .amer-hs3__panel {
    padding-block-end: calc(var(--mt-slider-content-padding-mobile, 20px) + 32px);
  }
}
/* Tablets and computers, boxed: the bars sit at the panel's start, 30px from
   the bottom (48px from 1200px), and a slide with its copy at the bottom put
   its last button on them (14px over at 768-991, 4px at 1200-1440; review,
   2026-10-19). Its panel keeps the bars' place plus 28px under the copy;
   a larger padding set by the merchant stays. */
@media (min-width: 768px) {
  .amer-hero-slider--d3:has(.amer-hs3__lines) .amer-hs3--boxed .amer-hs3__slide--v-end .amer-hs3__panel { padding-block-end: max(var(--mt-slider-content-padding-mobile, 20px), 58px); }
}
@media (min-width: 992px) {
  .amer-hero-slider--d3:has(.amer-hs3__lines) .amer-hs3--boxed .amer-hs3__slide--v-end .amer-hs3__panel { padding-block-end: max(var(--mt-slider-content-padding, 48px), 58px); }
}
@media (min-width: 1200px) {
  .amer-hero-slider--d3:has(.amer-hs3__lines) .amer-hs3--boxed .amer-hs3__slide--v-end .amer-hs3__panel { padding-block-end: max(var(--mt-slider-content-padding, 48px), 76px); }
}

/* Arabic letters join: any letter-spacing pulls them apart in WebKit (Safari, every iPhone and Mac), while Chrome ignores it on
   Arabic, so it never showed on a Windows check (Framlna review, 2026-10-29). Right-to-left pages track nothing here. */
[dir="rtl"] .amer-hero-slider--d3 .amer-hs3__title { letter-spacing: 0; }
