/* Collection text uses the same Jost faces already loaded by the theme. */
:is(body.template-collection, body.template-article, body.template-blog, body:has(#MainContent .t4s-contact-form)) #MainContent {
  --wfs-collection-font: Jost, Arial, sans-serif;
  --font-body-family: var(--wfs-collection-font);
  --font-heading-family: var(--wfs-collection-font);
  --font-button-family: var(--wfs-collection-font);
  font-family: var(--wfs-collection-font);
}

:is(body.template-collection, body.template-article, body.template-blog, body:has(#MainContent .t4s-contact-form)) #MainContent :is(h1,h2,h3,h4,h5,h6,p,a,button,label,input,select,textarea,summary,li,dt,dd,th,td,small,strong,em,figcaption,[role="heading"],.t4s-cat-title,.t4s-collection-title,.be-hub-card b,.be-features i,.la-category-shop,.wde-card-button,.wsh-card-button,.wse-card-button) {
  font-family: var(--wfs-collection-font) !important;
}

:is(body.template-collection, body.template-article, body.template-blog, body:has(#MainContent .t4s-contact-form)) #MainContent :is(.t4s-desc-collection,.wfs-collection-guide,.be-editorial,.be-range-editorial,.wfs-christy-edit,.wfs-christy-guide,.wfs-sheets-editorial,.wfs-sale-editorial,.wfs-duvet-editorial,.wfs-cushion-editorial,.wfs-curtain-editorial,.wfs-throw-editorial,.wfs-towel-editorial,.wfs-sleep-hero,.kb-editorial,.la-brand,.wfs-coming-soon,.kc-editorial,.bb-editorial,.wfs-autumn,.wfs-colouredit,.wfs-kettle-guide,.wfs-curtain-guide,.t4s-contact-form) :is(h1,h2,h3,[role="heading"]) {
  font-weight: 700 !important;
  letter-spacing: -.015em !important;
  text-wrap: balance;
}

:is(body.template-collection, body.template-article, body.template-blog, body:has(#MainContent .t4s-contact-form)) #MainContent :is(.be-kicker,.wde-kicker,.wsh-kicker,.wse-kicker,.ct-kicker,.kb-kicker,.la-brand-kicker,.la-kicker,[class$="-eyebrow"]) {
  font-family: var(--wfs-collection-font) !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}

:is(body.template-collection, body.template-article, body.template-blog, body:has(#MainContent .t4s-contact-form)) #MainContent :is(.be-hub-card b,.be-features i) {
  font-weight: 700 !important;
}

/* The Contact Us form uses 44px controls with 6px corners. */
body #MainContent#MainContent :is(
  body.template-collection .be-button,
  body.template-collection .la-button,
  body.template-collection .la-category-shop,
  body.template-collection .wde-button,
  body.template-collection .wde-card-button,
  body.template-collection .wde-link,
  body.template-collection .wte-link,
  body.template-collection .wse-link,
  body.template-collection .wsh-button,
  body.template-collection .wsh-card-button,
  body.template-collection .wse-button,
  body.template-collection .wse-card-button,
  body.template-collection .wte-button,
  body.template-collection .wte-card-button,
  body.template-collection .be-card-button,
  body.template-collection .cs-button,
  body.template-collection .ct-button,
  body.template-collection .bb-button,
  body.template-collection .kb-button,
  body.template-collection .kc-button,
  body.template-article .aw-links a,
  body.template-article .ce-buttons a,
  body.template-article .wfs-curtain-guide .wfs-contact a,
  .t4s-contact-form input[type="submit"],
  .t4s-contact-form button[type="submit"]
) {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: auto !important;
  min-height: 44px !important;
  white-space: normal !important;
  max-width: 100%;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  font-family: var(--wfs-collection-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-align: center;
}

/* Shared finishing for the navigation, search and editorial panels. */
body {
  --wfs-editorial-radius: 8px;
}

body .t4s-nav__ul a,
body #t4s-menu-drawer :is(a, button, .t4s-menu-item > span) {
  font-family: Jost, Arial, sans-serif !important;
}

body form.t4s-search-header__form,
body input.t4s-search-header__input[name="q"],
body #t4s-search-hidden input.t4s-mini-search__input[name="q"]:not([type=submit]):not([type=checkbox]),
body.template-search #MainContent input.t4s-search-form__input[name="q"] {
  border-radius: var(--wfs-editorial-radius) !important;
}

body #MainContent :is(
  .wde-hero, .wde-card, .wsh-hero, .wsh-card, .wsh-fit,
  .wte-hero, .wte-card, .wse-hero, .wse-card, .wse-discount-card,
  .be-hero, .be-hub-card, .be-guide, .be-link-grid > a, .be-features > *,
  .la-hero, .la-category, .ct-hero, .ct-detail, .ct-range-card,
  .bb-hero, .bb-card, .kb-hero, .kb-link-grid > a,
  .kc-hero, .kc-link-grid > a, .kc-guide, .wfs-collection-guide,
  .wfs-christy-guide, .cs-intro, .cs-notice,
  .aw-intro, .aw-panel, .aw-tip, .aw-layers, .aw-layers li,
  .ce-intro, .ce-note, .ce-palette, .ce-board,
  .wfs-kettle-guide .wfs-card, .wfs-curtain-guide .wfs-tip,
  .t4s-contact-form .t4s-contact-info, .t4s-contact-form .t4s-col-item:has(form)
) {
  border-radius: var(--wfs-editorial-radius) !important;
}

body #MainContent :is(.wde-hero, .wde-card, .wsh-hero, .wsh-card, .wte-card,
  .wse-hero, .wse-card, .be-hero, .be-hub-card, .la-hero, .la-category,
  .ct-hero, .ct-range-card, .bb-hero, .bb-card, .kb-hero, .kc-hero) {
  overflow: clip;
}

body.template-collection #MainContent#MainContent :is(
  .t4s-desc-collection, .la-brand, .wfs-collection-guide, .kb-editorial, .llb-editorial, .be-editorial, .kw-editorial,
  .wfs-christy-edit, .wfs-christy-guide, .wfs-coming-soon, .wfs-discount-guide,
  .wfs-sheets-guide, .wfs-sale-editorial, .la-brand-footer
) :is(h1, h2, h3, h4, h5, h6, p, a, button, span, b, strong, em, small, label, summary, figcaption, blockquote, [role="heading"]):not([class*="icon"], [aria-hidden="true"]) {
  font-family: var(--wfs-collection-font) !important;
}

body.template-collection #MainContent#MainContent :is(
  .kb-related > h2, .llb-related > h2, .be-hub > h2, .kw-related > h2,
  .llb-copy h1, .llb-guide :is(h2,h3)
) {
  font-weight: 700 !important;
  letter-spacing: -.015em;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-link-grid, .llb-link-grid, .be-hub-grid,
  .wde-grid, .wsh-grid, .wte-grid, .wse-grid, .bb-grid, .kw-link-grid, .kc-link-grid, .be-link-grid, .ct-collection-links,
  .la-brand:not(.la-brand--christmas) .la-category-grid
) {
  align-items: stretch;
  gap: 30px 22px;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip, .llb-strip, .be-hub-card, .kw-strip, .kc-strip, .be-strip, .ct-collection-links .ct-strip,
  a.wde-card, a.wsh-card, a.wte-card, a.wse-card, article.bb-card,
  .la-brand:not(.la-brand--christmas) .la-category
) {
  --wfs-card-button: #233d3b;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-width: 0;
  height: 100%;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  text-align: left !important;
  text-decoration: none !important;
}

body.template-collection #MainContent#MainContent :is(.kb-overview .kb-related, .llb-overview .llb-related, .be-hub) {
  width: min(1360px, 100%, 90vw);
  margin-inline: auto;
}

body.template-collection #MainContent#MainContent a.wse-card {
  --wfs-card-button: #a44443;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip, .llb-strip, .be-hub-card, .kw-strip, .kc-strip, .be-strip, .ct-collection-links .ct-strip,
  a.wde-card, a.wsh-card, a.wte-card, a.wse-card, article.bb-card,
  .la-brand:not(.la-brand--christmas) .la-category
) > :is(img, .wte-card-img, .la-category-photo, .ct-stack-crop, a:has(> img)) {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto !important;
  min-height: 0 !important;
  flex: none;
  margin: 0 !important;
  object-fit: cover;
  overflow: hidden;
  border-radius: var(--wfs-editorial-radius) !important;
}

body.template-collection #MainContent#MainContent :is(.la-category-photo, .wte-card-img, .bb-card > a, .ct-stack-crop) > img {
  display: block;
  width: 100%;
  height: 100%;
}

body.template-collection #MainContent#MainContent :is(.kb-overview .kb-strip, .be-hub-card, .kw-strip) > span,
body.template-collection #MainContent#MainContent .bb-card > .bb-cardbody {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  gap: 0;
  padding: 0 !important;
  background: transparent !important;
  text-align: left;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip > span > b, .llb-strip > span:not(.wfs-collection-card-label),
  .be-hub-card > span > b, .kw-strip > span, .kc-strip > span, .be-strip > span, .ct-strip > span:not(.ct-stack-crop,.wfs-collection-card-label), .wde-card > h3, .wsh-card > h3,
  .wte-card > h3, .wse-card > h3, .bb-cardbody > h3,
  .la-brand:not(.la-brand--christmas) .la-category-title > h3
) {
  display: block;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 19px 0 0 !important;
  background: transparent !important;
  font-family: var(--wfs-collection-font) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em;
  text-transform: capitalize;
  text-align: left;
  text-wrap: initial;
}

body.template-collection #MainContent#MainContent .la-brand:not(.la-brand--christmas) .la-category-title {
  margin: 0;
}

body.template-collection #MainContent#MainContent .la-brand:not(.la-brand--christmas) .la-category-title > span {
  display: none;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip > span > em, .be-hub-card > span > em,
  .wde-card > p, .wsh-card > p, .wte-card > p, .wse-card > p, .bb-cardbody > p,
  .la-brand:not(.la-brand--christmas) .la-category > p
) {
  display: block;
  min-height: 0 !important;
  flex: none;
  margin: 7px 0 10px !important;
  font-size: 13px !important;
  font-style: normal;
  line-height: 1.6 !important;
  text-align: left;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip > span > strong, .be-hub-card > span > strong,
  .kw-strip > span > strong, .kc-strip > span > strong, .be-strip > span > small,
  .wde-card > .wde-link, .wsh-card > .wsh-card-button, .wte-card > .wte-link,
  .wse-card > .wse-link, .bb-cardbody > .bb-button
),
body.template-collection #MainContent#MainContent .wfs-collection-card-label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  align-self: stretch !important;
  box-sizing: border-box;
  flex: none;
  width: 100% !important;
  height: auto !important;
  min-height: 44px !important;
  margin: auto 0 0 !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: var(--wfs-card-button) !important;
  color: white !important;
  font-family: var(--wfs-collection-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: capitalize;
  white-space: normal !important;
}

body.template-collection #MainContent#MainContent :is(.kw-strip, .kc-strip, .be-strip) > span {
  display: flex;
  gap: 12px;
  flex: 1;
}

body.template-collection #MainContent#MainContent a.wte-card > .wte-card-img {
  display: flex;
}

body.template-collection #MainContent#MainContent :is(.llb-strip > span:not(.wfs-collection-card-label), .ct-strip > span:not(.ct-stack-crop,.wfs-collection-card-label)) {
  margin-bottom: 12px !important;
}

body.template-collection #MainContent#MainContent :is(
  .kb-overview .kb-strip, .llb-strip, .be-hub-card, .kw-strip, .kc-strip, .be-strip, .ct-collection-links .ct-strip,
  a.wde-card, a.wsh-card, a.wte-card, a.wse-card, .bb-cardbody > .bb-button,
  .la-brand:not(.la-brand--christmas) .la-category
):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 767px) {
  body.template-collection #MainContent#MainContent :is(
    .kb-overview .kb-link-grid, .llb-link-grid, .be-hub-grid,
    .wde-grid, .wsh-grid, .wte-grid, .wse-grid, .bb-grid, .kw-link-grid, .kc-link-grid, .be-link-grid, .ct-collection-links,
    .la-brand:not(.la-brand--christmas) .la-category-grid
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 14px;
  }

  body.template-collection #MainContent#MainContent :is(
    .kb-overview .kb-strip > span > b, .llb-strip > span:not(.wfs-collection-card-label),
    .be-hub-card > span > b, .kw-strip > span, .kc-strip > span, .be-strip > span, .ct-strip > span:not(.ct-stack-crop,.wfs-collection-card-label), .wde-card > h3, .wsh-card > h3,
    .wte-card > h3, .wse-card > h3, .bb-cardbody > h3,
    .la-brand:not(.la-brand--christmas) .la-category-title > h3
  ) {
    margin-top: 10px !important;
    font-size: clamp(16px, 4.7vw, 20px) !important;
  }
}

@media (max-width: 767px) {
  body.template-collection #MainContent#MainContent .la-brand--christmas .la-category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 14px;
  }

  body.template-collection #MainContent#MainContent .la-brand--christmas .la-category-title h3 {
    font-size: clamp(16px, 4.7vw, 20px) !important;
    line-height: 1.2;
  }

  body.template-collection #MainContent#MainContent .la-brand--christmas .la-category-photo {
    border-radius: var(--wfs-editorial-radius);
  }
}

body.template-collection #MainContent#MainContent :is(.ctg-year, .be-features i, .wse-discount-card *, [class*="ai-laura-coming-soon-"][class$="__heading"]) {
  font-family: var(--wfs-collection-font) !important;
}

body.template-collection #MainContent#MainContent .ct-collection-links {
  gap: 30px 22px !important;
}

body.template-collection #MainContent#MainContent :is(.kw-strip, .kc-strip, .be-strip, .ct-strip) > span {
  text-decoration: none;
}

@media (max-width: 767px) {
  body.template-collection #MainContent#MainContent .ct-collection-links {
    gap: 24px 14px !important;
  }
}

/* Mobile collection heroes. Use wfs-collection-hero, wfs-collection-hero-copy and
   wfs-collection-hero-media for new covers. The original Duvet Covers cover remains the reference. */
@media (max-width: 767px) {
  body.template-collection #MainContent :is(
    .wfs-collection-hero, .wde-hero:not(.wfs-duvet-editorial .wde-hero),
    .wfs-sleep-hero, .wfs-duvet-hero, .wfs-matthew-hero, .be-hero,
    .wte-hero, .ct-hero, .kb-hero, .kw-hero, .kc-hero, .llb-hero,
    .bb-hero, .wsh-hero, .wse-hero, .la-hero, .wf-bf-hero
  ):has(> img, > picture img, > :is(
    .wfs-collection-hero-media, .wfs-sleep-picture, .wfs-duvet-visual,
    .wfs-matthew-picture, .be-hero-picture, .ct-hero-image, .kb-hero-picture,
    .kw-hero-picture, .kc-hero-picture, .llb-hero-picture, .wsh-visual, .wse-visual, .la-hero-image
  ) img) {
    --wfs-hero-panel: rgb(248 247 240 / 78%);
    --wfs-hero-ink: #233d3b;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: clamp(420px, 110vw, 540px);
    align-items: center;
    padding: 22px 12px;
    border-radius: var(--wfs-editorial-radius, 8px);
    overflow: hidden;

    &:is(.wf-bf-hero) {
      --wfs-hero-panel: rgb(25 25 24 / 82%);
      --wfs-hero-ink: #fff9ef;
    }

    .la-brand--christmas & {
      --wfs-hero-panel: rgb(35 63 50 / 86%);
      --wfs-hero-ink: #fff9ed;
    }

    & > :is(img, picture, .wfs-collection-hero-media, .wfs-sleep-picture,
      .wfs-duvet-visual, .wfs-matthew-picture, .be-hero-picture, .ct-hero-image,
      .kb-hero-picture, .kw-hero-picture, .kc-hero-picture, .llb-hero-picture,
      .wsh-visual, .wse-visual, .la-hero-image) {
      position: absolute;
      inset: 0;
      display: block;
      width: 100% !important;
      height: 100% !important;
      min-height: 0;
      max-height: none;
      margin: 0 !important;
      aspect-ratio: auto;
      object-fit: cover;
    }

    & > :is(picture, .wfs-collection-hero-media, .wfs-sleep-picture,
      .wfs-duvet-visual, .wfs-matthew-picture, .be-hero-picture, .ct-hero-image,
      .kb-hero-picture, .kw-hero-picture, .kc-hero-picture, .llb-hero-picture,
      .wsh-visual, .wse-visual, .la-hero-image) > img,
    & > .wfs-collection-hero-media > picture > img {
      display: block;
      width: 100%;
      height: 100%;
      min-height: 0;
      object-fit: cover;
    }

    & > .la-hero-image .la-photo-caption {
      top: 12px;
      right: 12px;
      bottom: auto;
      left: 12px;
    }

    & > :is(.wfs-collection-hero-copy, .wde-copy, .wfs-sleep-copy,
      .wfs-duvet-copy, .wfs-matthew-copy, .be-copy, .wte-hero-copy,
      .ct-copy, .kb-copy, .kw-copy, .kc-copy, .llb-copy, .bb-copy,
      .wsh-copy, .wse-copy, .la-hero-copy, .wf-bf-copy) {
      position: relative;
      z-index: 1;
      justify-self: center;
      box-sizing: border-box;
      width: min(100%, 420px);
      min-width: 0;
      padding: 18px clamp(14px, 4.6vw, 22px);
      background: var(--wfs-hero-panel);
      border-radius: var(--wfs-editorial-radius, 8px);
      color: var(--wfs-hero-ink);

      & :is(h1, h2, h3, p, .ct-brandline),
      & :is(h1, h2) > span {
        color: var(--wfs-hero-ink);
      }

      & :is(h1, h2) {
        font-size: clamp(25px, 7.4vw, 34px);
        line-height: 1.12;
        margin-bottom: 8px;
        overflow-wrap: anywhere;
      }

      & :is(h1, h2) > span {
        font-size: clamp(17px, 4.8vw, 22px);
        line-height: 1.2;
      }

      & p {
        margin-bottom: 10px;
      }

      & p:not([class*="kicker"], [class*="eyebrow"]) {
        font-size: 15px;
        line-height: 1.45;
      }
    }
  }

  body.template-collection #MainContent .wfs-duvet-editorial .wde-hero {
    min-height: clamp(420px, 110vw, 540px);
    align-items: center;
    padding: 22px 12px;
  }

  body.template-collection #MainContent .wfs-duvet-editorial .wde-copy {
    justify-self: center;
  }
}
