/* NEMSTORY 1.9.0 — header simplification and WooCommerce add-to-order notice. */

/* There is one desktop CTA only: the header button at the far right.
   The second CTA is reserved exclusively for the opened full-screen mobile menu. */
.site-header .header-inner > .primary-navigation > .nav-order-mobile {
  display: none !important;
}

/* Give WooCommerce's success icon its own reserved column so it cannot overlap
   the product name/message. Keep the action aligned on the far edge. */
body.single-product .woocommerce-notices-wrapper .woocommerce-message,
body.single-product .woocommerce-message,
body.single-product .woocommerce-notices-wrapper .woocommerce-message[role="alert"] {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  column-gap: 18px !important;
  row-gap: 12px !important;
  min-height: 68px !important;
  padding: 17px 18px 17px 58px !important;
  border: 1px solid rgba(217,164,95,.34) !important;
  border-radius: 17px !important;
  background: linear-gradient(145deg,#24211d 0%,#1b1917 100%) !important;
  color: #f5f0e8 !important;
  line-height: 1.55 !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.13) !important;
  overflow: hidden !important;
}

body.single-product .woocommerce-notices-wrapper .woocommerce-message::before,
body.single-product .woocommerce-message::before {
  position: absolute !important;
  left: 19px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  float: none !important;
  margin: 0 !important;
  color: #efbd79 !important;
  line-height: 1 !important;
}

/* WooCommerce outputs the forward link before the text in its HTML. Reorder it
   visually so the sentence reads first and the action sits at the right. */
body.single-product .woocommerce-notices-wrapper .woocommerce-message > a.button.wc-forward,
body.single-product .woocommerce-message > a.button.wc-forward {
  order: 2 !important;
  flex: 0 0 auto !important;
  margin: 0 0 0 auto !important;
  padding: 13px 22px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg,#f5c98f 0%,#d9a45f 100%) !important;
  color: #17130e !important;
  font-family: Inter,Arial,sans-serif !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .055em !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  box-shadow: 0 7px 18px rgba(217,164,95,.13) !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

body.single-product .woocommerce-notices-wrapper .woocommerce-message > a.button.wc-forward:hover,
body.single-product .woocommerce-message > a.button.wc-forward:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06) !important;
  box-shadow: 0 11px 22px rgba(217,164,95,.2) !important;
}

/* Tablet and mobile header: logo + compact order indicator + menu only.
   The large header CTA is hidden; the Click & Collect CTA remains inside menu. */
@media (max-width: 780px) {
  .site-header {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    width: 100% !important;
  }

  .site-header .header-inner {
    width: calc(100% - 28px) !important;
    height: 68px !important;
    min-height: 68px !important;
    gap: 10px !important;
    justify-content: space-between !important;
  }

  .site-header .header-inner > .brand {
    order: 1 !important;
    flex: 0 1 142px !important;
    min-width: 0 !important;
    max-width: 142px !important;
    overflow: hidden !important;
  }

  .site-header .header-inner > .brand .brand-name {
    font-size: clamp(20px,5.4vw,23px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .site-header .header-inner > .brand .brand-subtitle {
    margin-top: 5px !important;
    font-size: 6px !important;
    letter-spacing: .18em !important;
    white-space: nowrap !important;
  }

  .site-header .header-inner > .brand .custom-logo {
    display: block !important;
    width: auto !important;
    max-width: 138px !important;
    max-height: 37px !important;
    height: auto !important;
  }

  .site-header .header-inner > .header-cart {
    order: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid rgba(239,189,121,.24) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.035) !important;
    position: relative !important;
  }

  .site-header .header-inner > .header-cart .cart-label {
    display: none !important;
  }

  .site-header .header-inner > .header-cart .cart-bag {
    display: inline-block !important;
    color: #efbd79 !important;
    font-size: 19px !important;
    line-height: 1 !important;
  }

  .site-header .header-inner > .header-cart .cart-count {
    position: absolute !important;
    top: -4px !important;
    right: -5px !important;
    display: grid !important;
    place-items: center !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border: 2px solid #111110 !important;
    border-radius: 99px !important;
    background: #d9a45f !important;
    color: #17130e !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .site-header .header-inner > .header-order,
  .site-header .header-inner > a.nemstory-header-cta {
    display: none !important;
  }

  .site-header .header-inner > .nav-toggle {
    order: 3 !important;
    display: inline-flex !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 9px !important;
    border: 1px solid rgba(239,189,121,.34) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.035) !important;
    box-shadow: none !important;
  }

  .site-header .header-inner > .nav-toggle span {
    width: 17px !important;
    height: 1.5px !important;
  }

  /* Only show the Click & Collect CTA after the fullscreen menu is opened. */
  .site-header .header-inner > .primary-navigation.is-open > .nav-order-mobile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: min(100%,420px) !important;
    min-height: 50px !important;
    margin: 27px auto 0 !important;
    padding: 14px 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg,#f5c98f 0%,#d9a45f 100%) !important;
    color: #17130e !important;
    font-family: Inter,Arial,sans-serif !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .065em !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: uppercase !important;
  }
}

@media (max-width: 380px) {
  .site-header .header-inner { width: calc(100% - 22px) !important; gap: 7px !important; }
  .site-header .header-inner > .brand { flex-basis: 128px !important; max-width: 128px !important; }
  .site-header .header-inner > .brand .brand-name { font-size: 19px !important; }
  .site-header .header-inner > .brand .brand-subtitle { font-size: 5.5px !important; letter-spacing: .15em !important; }
  .site-header .header-inner > .header-cart,
  .site-header .header-inner > .nav-toggle { flex-basis: 37px !important; width: 37px !important; min-width: 37px !important; height: 37px !important; }
}

@media (max-width: 520px) {
  body.single-product .woocommerce-notices-wrapper .woocommerce-message,
  body.single-product .woocommerce-message {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 11px !important;
    padding: 17px 15px 16px 48px !important;
    min-height: 0 !important;
  }

  body.single-product .woocommerce-notices-wrapper .woocommerce-message::before,
  body.single-product .woocommerce-message::before {
    left: 15px !important;
    top: 22px !important;
    transform: none !important;
  }

  body.single-product .woocommerce-notices-wrapper .woocommerce-message > a.button.wc-forward,
  body.single-product .woocommerce-message > a.button.wc-forward {
    align-self: flex-end !important;
    margin: 0 0 0 auto !important;
    min-height: 42px !important;
    padding: 12px 19px !important;
  }
}
