/**
 * Sitewide Design System v1.0 — white grounds, type, buttons, mobile.
 * Mobile chrome follows Moom: announce + compact [menu/search | logo | account/cart].
 */

html {
  overflow-x: clip;
}

body {
  font-family: var(--font-body) !important;
  color: var(--dsc-text) !important;
  background: var(--dsc-white) !important;
}

h1, h2, h3,
.entry-title,
.page-title,
.woocommerce-loop-product__title,
.woocommerce-products-header__title {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  color: var(--dsc-charcoal) !important;
}

/* White sections user flagged (trust / bestsellers / product chrome) */
.dsc-trust-strip,
.dsc-bestsellers,
.dsc-section--white,
.dsc-awards,
.dsc-cart-drawer,
#dsc-cart-drawer,
.woocommerce ul.products li.product,
.dsc-best-card {
  background-color: var(--dsc-white) !important;
}

/* Moom-style chrome: soft lavender announce, white header */
.dsc-announce {
  background: #ebe4f4 !important;
  /* Never use --dsc-aqua-dark here — it aliases to champagne and vanishes on the bar */
  color: var(--dsc-forest) !important;
  min-height: var(--announce-h);
  padding: 0.5rem 1rem;
}

.dsc-announce p {
  color: var(--dsc-forest) !important;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  font-size: 13px;
}

.dsc-header {
  background: var(--dsc-white) !important;
  border-bottom: 1px solid rgba(35, 31, 32, 0.08);
}

/* Buttons */
.dsc-btn--primary,
.dsc-btn--coral,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.checkout-button,
.single_add_to_cart_button {
  background: var(--dsc-coral) !important;
  border-color: var(--dsc-coral) !important;
  color: var(--dsc-white) !important;
  border-radius: var(--dsc-radius-md) !important;
  min-height: 48px;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
}

.dsc-btn--primary:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.checkout-button:hover,
.single_add_to_cart_button:hover {
  background: var(--dsc-coral-dark) !important;
  border-color: var(--dsc-coral-dark) !important;
}

.dsc-btn--secondary,
.dsc-btn--ghost {
  background: transparent !important;
  border: 1px solid var(--dsc-aqua-dark) !important;
  color: var(--dsc-aqua-dark) !important;
  border-radius: var(--dsc-radius-md) !important;
  min-height: 48px;
}

.dsc-btn--secondary:hover,
.dsc-btn--ghost:hover {
  background: var(--dsc-aqua-dark) !important;
  color: var(--dsc-white) !important;
}

img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

.dsc-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.dsc-best-grid--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 767px) {
  .dsc-best-grid--2 {
    grid-template-columns: 1fr;
  }

  .dsc-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dsc-cta-row .dsc-btn {
    width: 100%;
  }

  .dsc-hero-editorial {
    padding: 2rem 0 2.5rem;
  }

  .dsc-hero-editorial h1 {
    font-size: var(--mobile-h1) !important;
    max-width: none;
  }
}

/* Desktop grid for Moom header markup */
.dsc-header__inner {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  grid-template-areas: "logo nav actions" !important;
  align-items: center;
}
.dsc-header__leading { display: none; }
.dsc-logo { grid-area: logo; }
.dsc-nav { grid-area: nav; }
.dsc-header__actions { grid-area: actions; }

/* Moom mobile top bar — last in cascade, wins over main/design-system. */
@media (max-width: 720px) {
  .dsc-header {
    min-height: var(--header-h) !important;
  }

  .dsc-header__inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    grid-template-areas: "leading logo actions" !important;
    gap: 0.2rem 0.4rem !important;
    align-items: center !important;
    min-height: var(--header-h) !important;
    padding-block: 0.35rem;
    padding-inline: 0.65rem;
    max-width: 100%;
    overflow: visible;
  }

  .dsc-header__leading {
    display: flex !important;
    grid-area: leading;
    align-items: center;
    gap: 0.1rem;
    justify-self: start;
  }

  .dsc-logo {
    grid-area: logo !important;
    justify-self: center !important;
  }

  .dsc-logo__img--header {
    height: 36px !important;
    max-height: 40px !important;
    width: auto !important;
  }

  .dsc-nav-toggle {
    display: flex !important;
    width: 40px;
    height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dsc-aqua-dark);
    cursor: pointer;
  }

  .dsc-nav-toggle span:not(.screen-reader-text) {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }

  .dsc-header__search {
    display: inline-flex !important;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--dsc-aqua-dark) !important;
  }

  .dsc-header__search .dsc-icon {
    width: 22px;
    height: 22px;
  }

  .dsc-header__actions {
    grid-area: actions !important;
    justify-self: end !important;
    gap: 0.1rem !important;
    flex-shrink: 0;
    max-width: none;
  }

  .dsc-header__actions .dsc-icon-link--social,
  .dsc-header__cta,
  .dsc-icon-link__text {
    display: none !important;
  }

  .dsc-icon-link {
    min-height: 40px !important;
    min-width: 40px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--dsc-aqua-dark) !important;
  }

  /* Critical: closed menu must not inflate the header (~440px bug). */
  .dsc-header:not(.is-open) #dsc-nav.dsc-nav,
  .dsc-header:not(.is-open) .dsc-nav,
  #dsc-nav.dsc-nav {
    display: none !important;
    grid-area: unset !important;
    position: fixed !important;
    top: calc(var(--announce-h) + var(--header-h)) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 40 !important;
    width: 100% !important;
    max-height: calc(100dvh - var(--announce-h) - var(--header-h)) !important;
    overflow-y: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.15rem !important;
    margin: 0 !important;
    padding: 0.75rem 1rem 1.5rem !important;
    background: var(--dsc-white) !important;
    border-top: 1px solid rgba(35, 31, 32, 0.08);
    box-shadow: 0 12px 40px rgba(37, 37, 38, 0.1);
  }

  .dsc-header.is-open #dsc-nav.dsc-nav,
  .dsc-header.is-open .dsc-nav {
    display: flex !important;
  }

  body:has(.dsc-header.is-open) {
    overflow: hidden;
  }

  .dsc-nav > a::after,
  .dsc-nav__trigger::after {
    display: none !important;
  }

  .dsc-nav > a,
  .dsc-nav__trigger {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0.7rem 0.35rem;
    border-radius: 0;
    border-bottom: 1px solid var(--dsc-border, rgba(35, 31, 32, 0.1));
  }

  .dsc-nav__trigger {
    justify-content: space-between;
  }

  .dsc-nav .dsc-nav__mobile-cta {
    display: inline-flex !important;
    margin-top: 0.85rem;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 0.85rem 1rem;
    background: var(--dsc-coral) !important;
    color: var(--dsc-white) !important;
    border: 0 !important;
    border-radius: var(--dsc-radius-md, 0.5rem);
    font-weight: 600;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .dsc-section {
    padding-block: 2.5rem;
  }
}

.woocommerce-account h2,
.woocommerce-checkout h3,
.woocommerce-cart h2 {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  color: var(--dsc-charcoal) !important;
}

/* Real results — center the video story row */
.dsc-video-carousel {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.dsc-video-row {
  display: flex !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
