/* =============================================================
   COUPON / ANNOUNCEMENT BANNER
   ============================================================= */

.site-banner {
  background: #2a252e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-banner[hidden] {
  display: none;
}

.site-banner__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 71px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-banner__text {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.4px;
  line-height: 1.4;
  text-align: left;
}

.site-banner__link {
  color: #f5ede3;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
  margin-left: 10px;
  white-space: nowrap;

  &:hover { opacity: 0.75; }
}

.site-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: color 0.15s;
  margin-right: -8px; /* optically align with text edge */

  &:hover { color: #fff; }
}

@media (max-width: 1100px) {
  .site-banner__inner { padding: 0 40px; }
}

@media (max-width: 1024px) {
  .site-banner__inner {
    height: auto;
    padding: 10px 40px 10px 16px;
    min-height: 40px;
  }

  .site-banner__text  { font-size: 13px; }
  .site-banner__close { right: 6px; }
}

/* =============================================================
   AJAX SEARCH DROPDOWN
   ============================================================= */

/* Zero-height anchor so the dropdown overlaps page content */
.site-search-anchor {
  position: relative;
  height: 0;
  z-index: 200;
}

.site-search {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(57, 50, 59, 0.08);

  /* Hidden by default — fades in on .is-open */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;

  &.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ── Search bar row ────────────────────────────────────────── */

.site-search__bar {
  border-bottom: 1px solid rgba(57, 50, 59, 0.1);
}

.site-search__bar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 71px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 0;
}

.site-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 300;
  color: #39323b;
  background: transparent;
  letter-spacing: 0.3px;

  &::placeholder { color: #b0a8b2; }

  /* Remove browser search decorations */
  &::-webkit-search-decoration,
  &::-webkit-search-cancel-button { display: none; }
}

.site-search__sep {
  width: 1px;
  height: 28px;
  background: rgba(57, 50, 59, 0.2);
  flex-shrink: 0;
  margin: 0 16px;
}

.site-search__category {
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 300;
  color: #39323b;
  background: transparent;
  cursor: pointer;
  padding-right: 4px;
  letter-spacing: 0.2px;

  &:focus { outline: 2px solid #f5ede3; outline-offset: 2px; }
}

.site-search__submit {
  width: 48px;
  height: 48px;
  background: #39323b;
  border: none;
  border-radius: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 20px;
  transition: background 0.15s;

  svg {
    stroke: #f5ede3;
    fill: none;
    stroke-width: 2;
  }

  &:hover { background: #4e4451; }
}

/* ── Results panel ─────────────────────────────────────────── */

.site-search__results {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 71px 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.site-search__no-results {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 300;
  color: #39323b;
  opacity: 0.65;
  margin: 0;
}

.site-search__result {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: #39323b;
  padding: 8px;
  border-radius: 2px;
  transition: background 0.12s;

  &:hover { background: #fbf8f4; }
}

.site-search__result-img {
  width: 90px;
  height: 68px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;

  &--empty {
    background: #f5ede3;
  }
}

.site-search__result-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.site-search__result-title {
  font-size: 15px;
  font-weight: 400;
  color: #39323b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-search__result-price {
  font-size: 14px;
  font-weight: 300;
  color: #39323b;
  opacity: 0.75;

  /* WooCommerce price HTML uses inline elements */
  .woocommerce-Price-amount { font-weight: 400; }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .site-search__bar-inner { padding: 0 40px; }
  .site-search__results   { padding: 16px 40px 24px; }
}

@media (max-width: 1024px) {
  /* Header is position: sticky on mobile, so anchor the search overlay to the
     viewport (right below the sticky header) instead of the page-flow anchor.
     top is set dynamically by JS (getHeaderBottom()) to account for the admin
     bar and announcement banner; 60px is the fallback. */
  .site-search {
    position: fixed;
    top: 60px;
    z-index: 200;
  }
}

@media (max-width: 700px) {
  .site-search__results {
    grid-template-columns: 1fr;
    padding: 12px 20px 20px;
  }

  .site-search__bar-inner { padding: 0 16px; height: 60px; gap: 8px; }

  /* Hide the category filter and separator on small screens — they crowd the row */
  .site-search__sep,
  .site-search__category { display: none; }

  .site-search__submit { width: 40px; height: 40px; margin-left: 8px; padding: 0px !important }
}

/* =============================================================
   SITE HEADER — Desktop navigation
   All rules nested under .site-header.site-header (0,2,0)
   to outrank .elementor-kit-5 * (0,1,1) without !important.
   ============================================================= */

.site-header.site-header {
  background: rgba(57, 50, 69);
  position: relative;
  overflow: hidden;
  z-index: 100;

  /* Decorative watermark */
  &::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 776px;
    left: 39%;
    top: -118%;
    background: url('../images/s-logo.svg') center / contain no-repeat;
    opacity: 0.15;
    mix-blend-mode: overlay;
    transform: rotate(25.48deg) translateX(-50%);
    pointer-events: none;
  }

  .site-header__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 71px;
  }

  /* ── Top row: logo + utility links ────────────────────────── */

  .site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 29px 0 16px;
  }

  .site-header__logo {
    display: block;
    line-height: 0;

    img {
      width: 210px;
      height: auto;
      display: block;
    }
  }

  .site-header__utils {
    display: flex;
    align-items: center;
    gap: 40px;
  }

  .site-header__util-link,
  .site-header__cart-link {
    color: #fff;
    text-decoration: underline;
    font-size: 16px;
    letter-spacing: 0.5px;
    line-height: 1.2;
    font-weight: 300;
    white-space: nowrap;
    text-underline-offset: 4px;
    transition: .4s ease-in-out;
    &:hover { -webkit-text-stroke: 1px; }
  }

  .site-header__cart-link {
    display: flex;
    align-items: center;
    gap: 8px;

    svg { width: 24px; height: 24px; flex-shrink: 0; }
  }

  /* ── Bottom row: primary nav + search button ───────────────── */

  .site-header__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 11px;
  }

  .site-header__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .site-header__menu > li {
    position: relative;

    & + li {
      margin-left: 80px;

      &::before {
        content: '';
        position: absolute;
        left: -40px;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 22px;
        background: white;
        @media only screen and (max-width: 1100px) {
          left: -14px;
        }
      }
    }

    &.current-menu-item > a::after,
    &.current-menu-ancestor > a::after {
      content: '';
      position: absolute;
      bottom: -27px;
      left: -10px;
      width: calc(100% + 20px);
      height: 8px;
      background: #fbf8f4;
    }
  }

  .site-header__menu > li > a {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 0.5px;
    font-weight: 300;
    line-height: 1.2;
    white-space: nowrap;

    &:hover { -webkit-text-stroke: 1px; }
  }

  /* ── Desktop search button ────────────────────────────────── */

  .site-header__search {
    width: 52px;
    height: 52px;
    background: #f5ede3;
    border: none;
    border-radius: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    &:hover { background: #ede4d8; }

    svg {
      width: 24px;
      height: 24px;
      fill: none;
      stroke: #39323b;
      stroke-width: 2;
    }
  }

  /* ── Search / close icon crossfade (both trigger buttons) ─── */

  .site-header__search-icon,
  .site-header__close-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;

    svg { fill: none; }
  }

  /* Default: search visible, close hidden */
  .site-header__search-icon { opacity: 1; transform: scale(1) rotate(0deg); }
  .site-header__close-icon  { opacity: 0; transform: scale(0.6) rotate(-45deg); }

  /* When open: swap */
  .js-search-trigger[aria-expanded="true"] {
    .site-header__search-icon { opacity: 0; transform: scale(0.6) rotate(45deg); }
    .site-header__close-icon  { opacity: 1; transform: scale(1) rotate(0deg); }
  }

  /* ── Mobile controls (hidden on desktop) ──────────────────── */

  .site-header__mob-controls {
    display: none;
    align-items: center;
    gap: 4px;
  }

  .site-header__mob-cart,
  .site-header__mob-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #fff;
    text-decoration: none;

    svg {
      stroke: #fff;
      fill: none;
      flex-shrink: 0;
    }

    /* Contain the crossfade search/close icon spans inside the button */
    .site-header__search-icon svg,
    .site-header__close-icon svg { stroke: #fff; }

    &:hover { opacity: 0.75; }
  }

  /* ── Hamburger button ──────────────────────────────────────── */

  .site-header__mob-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 35px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
  }

  .site-header__mob-menu-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  .site-header__mob-menu.is-open {
    .site-header__mob-menu-bar:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }
    .site-header__mob-menu-bar:nth-child(2) {
      opacity: 0;
      transform: scaleX(0);
    }
    .site-header__mob-menu-bar:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }
  }

  /* ── Responsive ────────────────────────────────────────────── */

  @media (max-width: 1100px) {
    .site-header__inner { padding: 0 40px; }
    .site-header__utils  { gap: 24px; }

    .site-header__menu > li + li { margin-left: 24px; }
  }

  @media (max-width: 1024px) {
    position: sticky;
    top: 0;

    .site-header__bottom { display: none; }

    .site-header__utils      { display: none; }
    .site-header__mob-controls { display: flex; }

    .site-header__inner { padding: 0 16px; }

    .site-header__top {
      padding: 0;
      height: 60px;
    }

    .site-header__logo img { width: 106px; }
  }
}

/* =============================================================
   MOBILE NAV OVERLAY  (multi-level slide-in)
   All rules nested under .mob-nav.mob-nav (0,2,0) to outrank
   .elementor-kit-5 a (0,1,1) without !important.
   ============================================================= */

.mob-nav.mob-nav {
  position: fixed;
  /* top is set dynamically by JS (getHeaderBottom()) to account for the
     admin bar and announcement banner; 60px is the CSS fallback. */
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;

  &.is-open {
    opacity: 1;
    visibility: visible;
  }

  /* ── Panes ─────────────────────────────────────────────────
     .is-active  → visible (x = 0)
     .is-exiting → slides slightly left (previous pane peek)
     ────────────────────────────────────────────────────────── */

  .mob-nav__pane {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.28s ease;

    &.is-active  { transform: translateX(0); }
    &.is-exiting { transform: translateX(-28%); }
  }

  /* ── List and items ───────────────────────────────────────── */

  .mob-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mob-nav__item {
    border-bottom: 1px solid rgba(57, 50, 59, 0.12);

    &:first-child { border-top: 1px solid rgba(57, 50, 59, 0.12); }
  }

  /* ── Row (shared by <a>, <button>, <span>) ─────────────────── */

  .mob-nav__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: #39323b;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.3px;
    line-height: 1.5;
    box-sizing: border-box;
    transition: background 0.12s;

    &:hover { background: rgba(57, 50, 59, 0.04); text-decoration: none; }

    /* Explicit compound selector — (0,4,0) beats Elementor kit */
    &.mob-nav__row--bold .mob-nav__row-label,
    &.mob-nav__row--bold { font-weight: 600; }

    &--back {
      justify-content: flex-start;
      gap: 4px;
      color: #39323b;
      opacity: 0.75;

      &:hover { opacity: 1; background: rgba(57, 50, 59, 0.04); }
    }
  }

  .mob-nav__row-label {
    flex: 1;
    min-width: 0;
    text-transform: lowercase;

    &::first-letter { text-transform: uppercase; }
  }

  /* ── Chevron icons ──────────────────────────────────────────── */

  .mob-nav__chevron {
    flex-shrink: 0;
    color: #39323b;
    opacity: 0.5;

    &--left { opacity: 0.75; }
  }

  /* ── Footer links (Contact us / Blog) ──────────────────────── */

  .mob-nav__footer {
    padding: 24px 12px 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mob-nav__footer-link {
    color: #39323b;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.3px;

    &:hover { opacity: 0.7; }
  }
}

html #mpy-chatbot-button {
  background-color: rgb(57, 50, 69) !important;
}

/* =============================================================
   MEGANAV PANEL
   .meganav-anchor is a zero-height div after </header> so panels
   can be absolutely positioned clear of the header's overflow:hidden.
   All panel rules nested under .meganav.meganav (0,2,0) to outrank
   .elementor-kit-5 a (0,1,1) without !important.
   ============================================================= */

.meganav-anchor {
  position: relative;
  height: 0;
  z-index: 101;
  overflow: visible;
}

.meganav.meganav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid rgba(57, 50, 59, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;

  &.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .meganav__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 71px 32px;
  }

  /* ── "View all" link ──────────────────────────────────────── */

  .meganav__view-all {
    display: inline-block;
    color: #39323b;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.5;
    margin-bottom: 16px;
    transition: opacity 0.15s;

    &:hover { opacity: 0.7; }
  }

  /* ── Columns ──────────────────────────────────────────────── */

  .meganav__columns {
    display: flex;
    gap: 34px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .meganav__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 140px;
    min-width: 130px;
    max-width: 200px;
  }

  /* ── Column heading ───────────────────────────────────────── */

  .meganav__col-head {
    border-bottom: 1px solid rgba(57, 50, 59, 0.2);
    padding-bottom: 8px;
  }

  .meganav__col-heading {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #39323b;
    line-height: 1.5;
    letter-spacing: 0.3px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;

    &:hover { opacity: 0.7; text-decoration: underline; text-underline-offset: 3px; }
  }

  /* ── Link list ────────────────────────────────────────────── */

  .meganav__col-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .meganav__col-link {
    display: block;
    font-size: 16px;
    font-weight: 300;
    color: #39323b;
    letter-spacing: 0.3px;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity 0.15s;

    &:hover { opacity: 0.7; text-decoration: underline; text-underline-offset: 3px; }
  }

  /* Explicit compound selector keeps specificity (0,4,0) — beats Elementor kit */
  .meganav__col-link.meganav__col-link--bold {
    font-weight: 600;
  }
}

/* ── Active/open indicator on nav item (lives outside panel) ── */

.site-header__menu > li.has-meganav.meganav-is-open > a::after,
.site-header__menu > li.has-meganav:hover > a::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: -10px;
  width: calc(100% + 20px);
  height: 5px;
  background: #f5ede3;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .meganav.meganav .meganav__inner   { padding: 20px 40px 28px; }
  .meganav.meganav .meganav__columns { gap: 24px; }
}

@media (max-width: 1024px) {
  .meganav-anchor { display: none; }
}