/*
 * Sleepbetter.Baby v3.6.3
 * Header containment, pastel commerce controls, and responsive repair layer.
 */

:root {
  --sbb-v363-ink: #49372f;
  --sbb-v363-muted: #796960;
  --sbb-v363-paper: #fffaf6;
  --sbb-v363-cream: #faf2e8;
  --sbb-v363-peach: #ead7cd;
  --sbb-v363-peach-strong: #dec1b2;
  --sbb-v363-sage: #edf2e8;
  --sbb-v363-blue: #e8f0f3;
  --sbb-v363-line: #e5d5c9;
  --sbb-v363-shadow: 0 18px 46px rgba(74, 51, 39, .08);
}

.sbb-theme-v363 :where(h1, h2, h3) {
  font-weight: 600;
  letter-spacing: -.03em;
  text-wrap: pretty;
}

.sbb-theme-v363 :where(button, .button, .sbb-btn, .sbb-button) {
  font-weight: 680;
}

/* Product titles stay neat instead of forming tall, uneven card rows. */
.sbb-theme-v363 .sbb-product-card__content h3,
.sbb-theme-v363 .sbb-product-card__content h3 a,
body.sbb-theme-v363.woocommerce ul.products li.product.sbb-product-card-v320
  .woocommerce-loop-product__title.sbb-product-card-v320__title,
body.sbb-theme-v363.woocommerce ul.products li.product.sbb-product-card-v320
  .woocommerce-loop-product__title.sbb-product-card-v320__title a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The statistics use real local icon assets and a softer pastel rhythm. */
.sbb-theme-v363 .sbb-stat-card {
  min-width: 0;
  border-color: var(--sbb-v363-line);
  box-shadow: 0 10px 30px rgba(74, 51, 39, .045);
}

.sbb-theme-v363 .sbb-stat-icon {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, .74);
  color: #725443;
}

.sbb-theme-v363 .sbb-stat-icon-image {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.sbb-theme-v363 .sbb-stat-label {
  color: #69584e;
  font-weight: 650;
}

.sbb-theme-v363 .sbb-stat-numberline strong {
  font-weight: 600;
}

/* Keep the featured article image and copy in separate, non-overlapping cells. */
.sbb-theme-v363 .sbb-blog-featured__card {
  width: 100%;
  max-width: none;
}

.sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card {
  position: relative;
  display: grid !important;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
  align-items: stretch;
  overflow: hidden;
  border-color: var(--sbb-v363-line);
  background: var(--sbb-v363-paper);
  box-shadow: var(--sbb-v363-shadow);
  isolation: isolate;
}

.sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__image,
.sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__content {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  transform: none;
}

.sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__image {
  grid-column: 1;
  grid-row: 1;
  min-height: clamp(330px, 31vw, 470px);
}

.sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__content {
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  justify-content: center;
  background: var(--sbb-v363-paper);
}

/* Consultant cards must display the supplied portraits without distortion. */
.sbb-theme-v363 .sbb-consultant-card__image {
  overflow: hidden;
  background: #f2e7dc;
}

.sbb-theme-v363 .sbb-consultant-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

/* Header: contain the logo and keep the right-side actions inside the viewport. */
.sbb-theme-v363 .sbb-site-header,
.sbb-theme-v363 .sbb-header-inner,
.sbb-theme-v363 .sbb-header-logo,
.sbb-theme-v363 .sbb-logo--header,
.sbb-theme-v363 .sbb-logo--header :where(.sbb-logo__default, .sbb-logo__sticky) {
  overflow: visible;
}

.sbb-theme-v363 .sbb-header-actions {
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.sbb-theme-v363 .sbb-header-action {
  flex: 0 0 auto;
}

.sbb-theme-v363 .sbb-logo--header {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
}

.sbb-theme-v363 .sbb-logo--header :where(.sbb-logo__default, .sbb-logo__sticky) {
  max-width: 100%;
}

.sbb-theme-v363 .sbb-logo--header img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: 46px !important;
  max-height: 46px !important;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 1321px) {
  .sbb-theme-v363 .sbb-header-inner {
    display: grid;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) max-content;
    gap: clamp(.7rem, 1.35vw, 1.35rem);
  }

  .sbb-theme-v363 .sbb-header-logo {
    width: auto;
    min-width: 0;
    max-width: 230px;
    flex: none;
  }

  .sbb-theme-v363 .sbb-primary-nav {
    min-width: 0;
    justify-self: center;
  }

  .sbb-theme-v363 .sbb-menu {
    gap: clamp(.6rem, 1.1vw, 1.25rem);
  }

  .sbb-theme-v363 .sbb-menu > li > a {
    font-size: clamp(.76rem, .78vw, .9rem);
    font-weight: 690;
  }

  .sbb-theme-v363 .sbb-header-actions {
    justify-self: end;
    gap: .48rem;
  }

  .sbb-theme-v363 .sbb-header-library-links {
    gap: .35rem;
  }

  .sbb-theme-v363 .sbb-header-action {
    min-width: 42px;
    font-weight: 680;
  }
}

@media (max-width: 1320px) {
  .sbb-theme-v363 .sbb-header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: .65rem;
  }

  .sbb-theme-v363 .sbb-primary-nav,
  .sbb-theme-v363 .sbb-header-library-links {
    display: none !important;
  }

  .sbb-theme-v363 .sbb-menu-toggle {
    display: inline-flex !important;
  }

  .sbb-theme-v363 .sbb-header-logo {
    position: static;
    z-index: auto;
    left: auto;
    width: clamp(150px, 21vw, 210px);
    max-width: calc(100% - 108px);
    flex: 0 1 clamp(150px, 21vw, 210px);
    transform: none;
  }

  .sbb-theme-v363 .sbb-logo--header,
  .sbb-theme-v363 .sbb-logo--header :where(.sbb-logo__default, .sbb-logo__sticky) {
    width: 100%;
    max-width: 100%;
  }

  .sbb-theme-v363 .sbb-header-actions {
    z-index: 2;
    gap: .4rem;
    margin-left: auto;
  }

  .sbb-theme-v363 .sbb-header-action--cart .sbb-header-action-label {
    display: none;
  }
}

/* Product detail: one calm flow, with only the two primary buttons in a row. */
body.sbb-theme-v363.single-product .sbb-pdp-ebook-purchase {
  padding: clamp(2.75rem, 6vw, 5.25rem) var(--sbb-gutter);
  background:
    radial-gradient(circle at 8% 8%, rgba(237, 242, 232, .72), transparent 28rem),
    #fbf6f0;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-purchase__inner {
  width: min(100%, 1240px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-story-card,
body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card {
  border: 1px solid var(--sbb-v363-line);
  border-radius: 24px;
  background: rgba(255, 250, 246, .97);
  box-shadow: var(--sbb-v363-shadow);
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card {
  width: 100%;
  max-width: 430px;
  padding: clamp(1.25rem, 2.1vw, 1.65rem);
  justify-self: end;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card__top {
  margin-bottom: .7rem;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card__top > span {
  color: #775a49;
  font-weight: 680;
  letter-spacing: .04em;
}

body.sbb-theme-v363.single-product .sbb-pdp-share {
  min-width: 0;
  min-height: 38px;
  padding: .42rem .65rem;
  border-color: var(--sbb-v363-line);
  background: rgba(255, 255, 255, .7);
  font-weight: 650;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card > h2 {
  max-width: 100%;
  margin: .2rem 0 .55rem;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.16;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-price {
  margin: .35rem 0 1rem;
  color: var(--sbb-v363-ink);
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  font-weight: 620;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-format {
  display: grid;
  min-height: 0;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin: 0 0 .85rem;
  padding: .8rem .9rem;
  border-color: var(--sbb-v363-line);
  border-radius: 15px;
  background: var(--sbb-v363-cream);
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-format > span {
  color: #806b5f;
  font-size: .73rem;
  font-weight: 650;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-format > strong {
  color: #5c473c;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.35;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: .68rem;
}

body.sbb-theme-v363.single-product .sbb-pdp-primary-actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .62rem;
}

body.sbb-theme-v363.single-product .sbb-pdp-primary-actions--single {
  grid-template-columns: minmax(0, 1fr);
}

body.sbb-theme-v363.single-product
  :where(
    .sbb-pdp-cart-form,
    .sbb-pdp-buy-now-form,
    .sbb-pdp-sticky-cart-form,
    .sbb-pdp-sticky-buy-form
  ) {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

body.sbb-theme-v363.single-product
  .sbb-pdp-primary-actions
  > form.sbb-pdp-cart-form.cart,
body.sbb-theme-v363.single-product
  .sbb-pdp-primary-actions
  > form.sbb-pdp-buy-now-form,
body.sbb-theme-v363.single-product
  .sbb-pdp-sticky-purchase-v350__form
  > form.sbb-pdp-sticky-cart-form.cart,
body.sbb-theme-v363.single-product
  .sbb-pdp-sticky-purchase-v350__form
  > form.sbb-pdp-sticky-buy-form {
  display: block;
  width: 100%;
  min-width: 0;
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  padding: 0;
  float: none;
}

body.sbb-theme-v363.single-product .sbb-pdp-primary-actions :where(button.button, .button),
body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions > .sbb-pdp-preview {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: .72rem .7rem;
  float: none;
  border: 1px solid #cdb7aa;
  border-radius: 999px;
  box-shadow: none;
  font-size: .82rem;
  font-weight: 680;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

body.sbb-theme-v363.single-product
  .sbb-pdp-primary-actions
  .single_add_to_cart_button.button {
  border-color: #cdb7aa;
  background: #fffdf9;
  color: #5a4439;
}

body.sbb-theme-v363.single-product
  .sbb-pdp-primary-actions
  .sbb-pdp-direct-buy.button {
  border-color: var(--sbb-v363-peach-strong);
  background: var(--sbb-v363-peach);
  color: #4f392f;
}

body.sbb-theme-v363.single-product
  .sbb-pdp-primary-actions
  :where(.single_add_to_cart_button.button, .sbb-pdp-direct-buy.button):hover {
  border-color: #c7aa99;
  background: #e2c9bc;
  color: #3f2e27;
}

body.sbb-theme-v363.single-product .sbb-pdp-buy-now-note {
  display: block;
  width: 100%;
  margin: -.02rem 0 .08rem;
  color: var(--sbb-v363-muted);
  font-size: .71rem;
  line-height: 1.48;
  text-align: left;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions > .sbb-pdp-preview {
  border-color: #c6d7dd;
  background: var(--sbb-v363-blue);
  color: #536b78;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions > .sbb-pdp-preview:hover {
  border-color: #aec5ce;
  background: #dce9ed;
  color: #425c69;
}

/*
 * Product-page express buttons previously landed between the two main CTAs.
 * Payment Request / Apple Pay / Google Pay / Link remain available on the
 * actual WooCommerce checkout, where Stripe owns the payment layout.
 */
body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions
  :where(
    #wc-stripe-express-checkout-element,
    #wc-stripe-express-checkout-button-separator,
    #wc-stripe-payment-request-wrapper,
    #wc-stripe-payment-request-button-separator,
    .wc-stripe-express-checkout-element,
    .wcpay-express-checkout-wrapper,
    #wcpay-express-checkout-element,
    #wcpay-express-checkout-button-separator,
    #wcpay-payment-request-wrapper,
    #wcpay-payment-request-button-separator,
    wc-order-attribution-inputs
  ) {
  display: none !important;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-includes {
  gap: .5rem;
  margin-top: 1rem;
  padding-top: .95rem;
  border-color: var(--sbb-v363-line);
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-includes div {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: .55rem;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-includes :where(strong, span) {
  font-size: .74rem;
  line-height: 1.45;
}

body.sbb-theme-v363.single-product .sbb-pdp-ebook-includes strong {
  font-weight: 680;
}

/* App-like mobile purchase bar with two equal, independent forms. */
@media (max-width: 768px) {
  body.sbb-theme-v363.single-product .sbb-pdp-sticky-purchase-v350 {
    grid-template-columns: minmax(66px, .28fr) minmax(0, 1.72fr);
    gap: .55rem;
    padding: .62rem max(.7rem, env(safe-area-inset-right))
      calc(.62rem + env(safe-area-inset-bottom))
      max(.7rem, env(safe-area-inset-left));
    border-color: var(--sbb-v363-line);
    background: rgba(255, 250, 246, .97);
    box-shadow: 0 -12px 34px rgba(67, 45, 34, .11);
  }

  body.sbb-theme-v363.single-product .sbb-pdp-sticky-purchase-v350__form {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .42rem;
    margin: 0;
  }

  body.sbb-theme-v363.single-product
    .sbb-pdp-sticky-purchase-v350__form--single {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sbb-theme-v363.single-product
    .sbb-pdp-sticky-purchase-v350__form
    button.button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: .55rem .42rem;
    float: none;
    border-radius: 999px;
    box-shadow: none;
    font-size: .68rem;
    font-weight: 680;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.sbb-theme-v363.single-product
    .sbb-pdp-sticky-purchase-v350__cart.button {
    border-color: #cdb7aa;
    background: #fffdf9;
    color: #5a4439;
  }

  body.sbb-theme-v363.single-product
    .sbb-pdp-sticky-purchase-v350__buy.button {
    border-color: var(--sbb-v363-peach-strong);
    background: var(--sbb-v363-peach);
    color: #4f392f;
  }
}

@media (max-width: 1100px) {
  body.sbb-theme-v363.single-product .sbb-pdp-ebook-purchase__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card {
    max-width: 620px;
    justify-self: center;
    order: 1;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-ebook-story-card {
    width: min(100%, 760px);
    justify-self: center;
    order: 2;
  }
}

@media (max-width: 820px) {
  .sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__image {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .sbb-theme-v363 .sbb-blog-featured__card > .sbb-post-card > .sbb-post-card__content {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .sbb-theme-v363 .sbb-stats-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .sbb-theme-v363 .sbb-stat-card {
    display: grid;
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    text-align: left;
  }

  .sbb-theme-v363 .sbb-stat-icon {
    width: 48px;
    height: 48px;
    margin: 0;
  }

  .sbb-theme-v363 .sbb-stat-label {
    min-height: 0;
    margin: 0;
  }

  .sbb-theme-v363 .sbb-stat-numberline {
    justify-content: flex-end;
  }

  .sbb-theme-v363 .sbb-stat-numberline strong {
    font-size: 2.15rem;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-ebook-purchase {
    padding-right: .9rem;
    padding-left: .9rem;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-ebook-buy-card {
    max-width: 100%;
    padding: 1.05rem;
    border-radius: 20px;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-ebook-format {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  body.sbb-theme-v363.single-product .sbb-pdp-buy-now-note {
    font-size: .68rem;
  }
}

@media (max-width: 480px) {
  .sbb-theme-v363 .sbb-header-inner {
    gap: .28rem;
  }

  .sbb-theme-v363 .sbb-header-logo {
    width: 128px;
    max-width: calc(100% - 96px);
    flex-basis: 128px;
  }

  .sbb-theme-v363 .sbb-logo--header img {
    height: 34px !important;
    max-height: 34px !important;
  }

  .sbb-theme-v363 .sbb-header-actions {
    gap: .25rem;
  }

  .sbb-theme-v363 .sbb-header-action {
    min-width: 40px;
  }

  .sbb-theme-v363 .sbb-menu-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-primary-actions {
    gap: .42rem;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-primary-actions :where(button.button, .button),
  body.sbb-theme-v363.single-product .sbb-pdp-ebook-actions > .sbb-pdp-preview {
    min-height: 47px;
    padding-inline: .48rem;
    font-size: .75rem;
  }

  body.sbb-theme-v363.single-product .sbb-pdp-sticky-purchase-v350 {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sbb-theme-v363.single-product .sbb-pdp-sticky-purchase-v350__summary {
    display: none;
  }
}

@media (max-width: 340px) {
  body.sbb-theme-v363.single-product .sbb-pdp-primary-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sbb-theme-v363.single-product .sbb-pdp-sticky-purchase-v350__form {
    gap: .3rem;
  }

  body.sbb-theme-v363.single-product
    .sbb-pdp-sticky-purchase-v350__form
    button.button {
    font-size: .62rem;
  }
}
