/* amer-banner-feature--d12 — one full-width promo banner: text over a picture.
 * Amer home-electronics.html:4380-4402, `.banner-image-text.type-abs.style-2`
 * ("Precision at Your Fingertips"); styles.css 16768-16823, 17207-17211,
 * 17357-17366. Measured at 1920/1440/1200/1024/768/576/390 against the
 * template with tools/measure_styles.mjs (spec and results in
 * D:/tmp/amer-build/fidelity/amer-banner-feature/r2/). What still differs is
 * the title's width alone (435.5 vs 397.7px at 1440): layout.jinja loads DM
 * Sans as static weights, without the optical-size axis the template's
 * variable face uses at display sizes.
 */

/* `.banner-image-text { display: flex }`, `.type-abs { position: relative }`. */
.amer-banner-feature--d12 .amer-banner-feature__stage {
  display: flex;
}
/* «القسم بعرض الشاشة كلها» (full_width): the picture reaches both screen
   edges with square corners, as design 1's does (Mohamed, 2026-10-13). The
   switch only lifted the 1440px cap before: the 15px gutter and the 16px
   corners stayed at 1440 and on phones (options review, 2026-10-13). */
.amer-banner-feature--d12.mt-section--full { --mt-content-gutter: 0px; }
.amer-banner-feature--d12.mt-section--full .amer-banner-feature__stage,
.amer-banner-feature--d12.mt-section--full .amer-banner-feature__media,
.amer-banner-feature--d12.mt-section--full .amer-banner-feature__stage::after { border-radius: 0; }

/* `.style-2 .bn-image img { min-height: 400px }`; the template's banner-9.jpg
   is 1410x460 (ratio 3.065), and the ratio holds for any upload
   (object-fit: cover crops it). */
.amer-banner-feature--d12 .amer-banner-feature__media {
  aspect-ratio: 1410 / 460;
  min-height: 400px;
}

/* `.type-abs .bn-content` + `.style-2 .bn-content`: absolute, 20px from the
   start, top and bottom (80px from the start from 1200px), a column centred
   vertically. No end offset and no max width: the box shrinks to its
   copy, as the template's does, and the lines break where the merchant
   breaks them (the template writes `<br class="d-none d-sm-block">` inside
   the title and the text; here a line break typed in either field). */
.amer-banner-feature--d12 .amer-banner-feature__content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  inset-block: 20px;
  inset-inline-start: 20px;
  text-align: start;
  color: var(--afb-text, #ffffff);
}
@media (min-width: 1200px) {
  .amer-banner-feature--d12 .amer-banner-feature__content { inset-inline-start: 80px; }
}
/* Amer's own alignments (the template has only the start one). */
.amer-banner-feature--d12 .amer-banner-feature__content--center {
  align-items: center;
  text-align: center;
  inset-inline: 20px;
}
.amer-banner-feature--d12 .amer-banner-feature__content--end {
  align-items: end;
  text-align: end;
  inset-inline-start: auto;
  inset-inline-end: 20px;
}
@media (min-width: 1200px) {
  .amer-banner-feature--d12 .amer-banner-feature__content--center { inset-inline: 80px; }
  .amer-banner-feature--d12 .amer-banner-feature__content--end { inset-inline-end: 80px; }
}

/* `overlay` on this design: the veil over the picture only, under the copy
   (banner-feature.css, shared since 2026-10-13). Over the section it greyed
   the page around the banner (office «عدّة عمل»); on the picture it is what
   keeps white copy readable on a light photo at every width. */
.amer-banner-feature--d12 .amer-banner-feature__content { z-index: 1; }

/* Phones: `.style-2::after`, a dark gradient over the whole banner, darkest
   on the copy's side, with the copy above it (z-index 1). Here it follows
   the picture's 16px corners (the template's sits on the square block and
   greys the four corners outside the rounded picture), and it mirrors with
   the copy: Arabic puts the copy on the right, so the dark end goes there.
   Carried up to 991px: from 768px the copy still spans most of the picture
   (the electronics text read 1.4-1.6:1 over the headphones at 768; visual
   review 2026-09-23). */
@media (max-width: 991px) {
  .amer-banner-feature--d12 .amer-banner-feature__stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(270deg, rgba(6, 6, 11, .3) 50%, rgba(6, 6, 11, .702) 80%);
  }
  [dir="rtl"] .amer-banner-feature--d12 .amer-banner-feature__stage::after,
  .amer-banner-feature--d12 .amer-banner-feature__stage--end::after {
    background: linear-gradient(90deg, rgba(6, 6, 11, .3) 50%, rgba(6, 6, 11, .702) 80%);
  }
  [dir="rtl"] .amer-banner-feature--d12 .amer-banner-feature__stage--end::after {
    background: linear-gradient(270deg, rgba(6, 6, 11, .3) 50%, rgba(6, 6, 11, .702) 80%);
  }
  .amer-banner-feature--d12 .amer-banner-feature__stage--center::after,
  [dir="rtl"] .amer-banner-feature--d12 .amer-banner-feature__stage--center::after {
    background: rgba(6, 6, 11, .45);
  }
  /* Dark words (the section's text colour is dark, banner-feature.jinja): the
     same shade in the page's light cream, so they are not laid on a dark
     gradient (wellness: 1.46:1 on the dark one, 10.2:1 on this). */
  .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage::after {
    background: linear-gradient(270deg, rgba(250, 247, 242, .2) 50%, rgba(250, 247, 242, .72) 80%);
  }
  [dir="rtl"] .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage::after,
  .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage--end::after {
    background: linear-gradient(90deg, rgba(250, 247, 242, .2) 50%, rgba(250, 247, 242, .72) 80%);
  }
  [dir="rtl"] .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage--end::after {
    background: linear-gradient(270deg, rgba(250, 247, 242, .2) 50%, rgba(250, 247, 242, .72) 80%);
  }
  .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage--center::after,
  [dir="rtl"] .amer-banner-feature--d12.amer-banner-feature--ink-dark .amer-banner-feature__stage--center::after {
    background: rgba(250, 247, 242, .55);
  }
}

.amer-banner-feature--d12 .amer-eyebrow {
  color: var(--afb-text, #ffffff);
  margin-block-end: 8px;
}
/* `.title.h1.fw-medium.text-white.link`: 56/68 at 1440 down to 34/44, 500,
   .05em (the template's h1), 12px below; `.link:hover` turns it to the
   template's --primary #DC4646, which is --amer-accent. Since 2026-10-13
   the title is an h2 with the link inside it (it was the <a> itself, so
   the default design had no heading): the type stays on the class, the
   heading's own margins are set here, and the link inherits all of it. */
.amer-banner-feature--d12 .amer-banner-feature__title {
  display: block;
  font-family: var(--amer-font-heading);
  font-weight: var(--amer-fw-heading);
  text-rendering: optimizeLegibility;
  font-size: clamp(34px, 5vw, 56px);
  line-height: clamp(44px, 6vw, 68px);
  letter-spacing: .05em;
  color: var(--afb-text, #ffffff);
  margin-block: 0 12px;
  text-decoration: none;
}
.amer-banner-feature--d12 .amer-banner-feature__title a {
  color: inherit;
  text-decoration: none;
  transition: color .3s ease;
}
.amer-banner-feature--d12 .amer-banner-feature__title a[href]:hover,
.amer-banner-feature--d12 .amer-banner-feature__title a[href]:focus-visible {
  color: var(--amer-accent);
}
/* Letter-spacing pulls joined Arabic letters apart. */
[dir="rtl"] .amer-banner-feature--d12 .amer-banner-feature__title { letter-spacing: 0; }
/* `.desc.text-body-1`: 18/28, 24px below (32px from 1200px). */
.amer-banner-feature--d12 .amer-banner-feature__text {
  font-size: 18px;
  line-height: 28px;
  color: var(--afb-text, #ffffff);
  margin-block: 0 24px;
}
@media (min-width: 1200px) {
  .amer-banner-feature--d12 .amer-banner-feature__text { margin-block-end: 32px; }
}
/* `.btn-action.tf-btn.btn-white`: the shared .amer-btn draws a 1px
   transparent border that the template's .tf-btn does not have, so the same
   "Shop Now" measured 126.9px against 124.8px (142.9 / 140.8 from 1200px).
   No border here, and the button's text line is the body's 26px, as there. */
.amer-banner-feature--d12 .amer-banner-feature__btn {
  border-width: 0;
  line-height: 26px;
}
/* The light button's hover is the primary colour (core.css), and a store whose primary is its ink (Framlna's #111111)
   lost the button into the dark band behind it. Here it turns to the accent (Mohamed, 2026-10-29: «المفروض يكون
   بالاحمر ... بدل ما بيكون زي الخلفية فاللون بيختفي»). */
.amer-banner-feature--d12 .amer-banner-feature__btn:is(:hover, :focus-visible) { background: var(--amer-accent); color: var(--amer-on-accent); }
/* A line break typed in the title or the text is kept from 576px up and
   flows as a space below that — the template's `<br class="d-none d-sm-block">`. */
@media (min-width: 576px) {
  .amer-banner-feature--d12 .amer-banner-feature__title,
  .amer-banner-feature--d12 .amer-banner-feature__text { white-space: pre-line; }
}

/* 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-banner-feature--d12 .amer-banner-feature__title { letter-spacing: 0; }
