/* =====================================================================
   Snooze Mattress – Tempur-Pedic brand page: fixes + local sections
   Load AFTER tempur-pedic.scoped.css. Everything is scoped to
   .tempur-wrapper so nothing here can touch the site header/footer.
   ===================================================================== */

/* ---------- 1. Real <img> tags instead of CSS background images ----------
   The vendor drew every product/slide picture as a CSS background with the
   alt text pushed off-screen (text-indent:-9999px). Google can't index those
   images and screen readers get nothing useful. The HTML now has real <img>
   tags; these rules switch the old backgrounds off and make the <img> fill
   the same box, so the layout looks identical. */
.tempur-wrapper .rtbs .swiper-slide .image,
.tempur-wrapper .adapt__image,
.tempur-wrapper .breeze__image,
.tempur-wrapper .split-king__image,
.tempur-wrapper .bases__image,
.tempur-wrapper .flat-foundations__image,
.tempur-wrapper .pillows__image {
  background: none !important;
  text-indent: 0 !important;
  position: relative;
}
.tempur-wrapper .rtbs .swiper-slide .image > img,
.tempur-wrapper .product-container [class$="__image"] > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.tempur-wrapper .product-container [class$="__image"] > img { object-fit: contain; }
.tempur-wrapper .rtbs .swiper-slide .image > img { object-fit: cover; object-position: center center; }
.tempur-wrapper .rtbs .swiper-slide.hot .image > img,
.tempur-wrapper .rtbs .swiper-slide.restlessness .image > img { object-position: top center; }

/* ---------- 2. ActiveBreeze image fix ----------
   The vendor's final CSS has no rule for the ActiveBreeze image, so the
   section showed the words "TEMPUR-ActiveBreeze mattresses" instead of a
   picture. Rules below come from the vendor's own /testing stylesheet. */
.tempur-wrapper .active-breeze .breeze__image {
  height: 52vw;
  margin: 25px 0 50px;
}
@media all and (min-width: 1024px) {
  .tempur-wrapper .active-breeze .breeze__image {
    flex: 0 0 50%;
    height: auto;
    margin: 0 100px 0 0;
  }
}

/* ---------- 3. Vendor CSS typos ---------- */
.tempur-wrapper .rtbs .swiper-slide .content-container h3 { font-size: 1.111em; } /* vendor wrote "1.111" with no unit */

/* ---------- 4. SEO H1 above the vendor headline ----------
   The vendor's H1 ("Searching for better sleep?") says nothing about the
   brand or the city. A short, visible H1 now names both; the vendor headline
   keeps its exact look as an H2. */
.tempur-wrapper .header .header__inner .header__content-container h1.snz-h1 {
  color: #D5DFE3;
  font-family: var(--font-montserrat), helvetica, arial, sans-serif;
  font-size: 0.833em;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin: 18px 0 0 0;
  text-transform: uppercase;
}
.tempur-wrapper .header .header__inner .header__content-container h2.header__headline {
  font-family: var(--font-montserrat), helvetica, arial, sans-serif;
  font-size: 1.6666666667em;
  font-weight: 300;
  line-height: 1.2667;
  margin: 14px 0 25px 0;
  color: #fff;
}
@media all and (min-width: 1024px) {
  .tempur-wrapper .header .header__inner .header__content-container h2.header__headline { margin: 20px 0 25px 0; }
}
@media all and (min-width: 1280px) {
  .tempur-wrapper .header .header__inner .header__content-container h2.header__headline { font-size: 2.222em; }
}

/* =====================================================================
   6. Site integration (Snooze location site, November 2026)
   Additions made when the page went into the site; nothing above is
   changed. Still scoped to .tempur-wrapper. The local sections' own styles
   (shared/css/snooze-brand-local.css, ".snz-brand ...") load AFTER this
   file, so a rule here that changes one of them needs a more specific
   selector.
   ===================================================================== */

/* 6a. Body text at least 16px: the store card (15px) and the offer tiles
   (15px). Fine print keeps its size. */
.tempur-wrapper.snz-brand .snz-store { font-size: 16px; }
.tempur-wrapper .snz-tile p:not(.snz-fine) { font-size: 16px; }

/* 6b. Tap targets at least 44px tall: the vendor .btn was 43px below
   1024px (15px type, line-height 1, 14px padding). 16px line boxes make it
   44px at every width, text still centred. */
.tempur-wrapper .btn { line-height: 16px; }

/* 6c. Phones and tablets: every button takes the full width of its row,
   as the vendor's product buttons already do below 1024px. */
@media (max-width: 1023px) {
  .tempur-wrapper .header .header__inner .header__content-container a.btn { display: block; }
  .tempur-wrapper .snz-btns .snz-btn { flex: 1 1 100%; text-align: center; }
}

/* 6d. Hero: "Learn About Dream Mapping" beside "Try Tempur-Pedic in {city}".
   The two vendor buttons sit in one wrapping row; below 1024px they stack
   full width (6c). */
.tempur-wrapper .header .header__inner .header__content-container .snz-hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0 0; }
.tempur-wrapper .header .header__inner .header__content-container .snz-hero-btns a.btn { margin: 0; }
@media (max-width: 1023px) {
  .tempur-wrapper .header .header__inner .header__content-container .snz-hero-btns a.btn { flex: 1 1 100%; }
}

/* ===== 7. Montserrat with its size-matched fallback (CLS) =====
   The vendor sets font-family "montserrat", helvetica, arial on the rules below. Until Montserrat arrives (it is not
   preloaded) the text shows in Helvetica/Arial, which is wider than Montserrat, and the hero copy re-wraps when the
   font swaps in (the hero block moved ~80px; CLS 0.139 on the live page). The page loads Montserrat with next/font
   (components/brand-pages/tempur-pedic/font.ts), which defines --font-montserrat on .tempur-wrapper as "Montserrat",
   "Montserrat Fallback": a local Arial face size-adjusted to Montserrat metrics, so the swap no longer moves the
   text. Same selectors as the vendor file (tempur-pedic.scoped.css, unchanged), loaded after it. */
.tempur-wrapper .btn,
.tempur-wrapper .header .header__inner .header__content-container h1,
.tempur-wrapper .header .header__inner .header__content-container p,
.tempur-wrapper .rtbs .rtbs__inner h2,
.tempur-wrapper .rtbs .rtbs__inner .swiper .swiper-wrapper .swiper-slide .content-container h3,
.tempur-wrapper .rtbs .rtbs__inner .swiper .swiper-wrapper .swiper-slide .content-container p,
.tempur-wrapper .product-container .product-container__inner .product-container__content-container h2,
.tempur-wrapper .product-container .product-container__inner .product-container__content-container h3,
.tempur-wrapper .product-container .product-container__inner .product-container__content-container p,
.tempur-wrapper .product-container .product-container__inner .product-container__content-container li,
.tempur-wrapper .testimonials .testimonials__inner h2,
.tempur-wrapper .testimonials .testimonials__inner .swiper .swiper-wrapper .swiper-slide .inner h3,
.tempur-wrapper .testimonials .testimonials__inner .swiper .swiper-wrapper .swiper-slide .inner p,
.tempur-wrapper .testimonials .testimonials__inner .swiper .swiper-wrapper .swiper-slide .inner .customer,
.tempur-wrapper .why h2,
.tempur-wrapper .why p,
.tempur-wrapper .video .video__inner h2,
.tempur-wrapper .disclaimers .disclaimers__inner p {
  font-family: var(--font-montserrat), helvetica, arial, sans-serif;
}
