/* NikkiFlower redesigned mobile hamburger menu
   Scoped for mobile header (mbhd). Desktop keeps mega-menu. */

.navigation.nf-mnav {
  display: none;
}

@media (max-width: 767px) {
  .navigation.nf-mnav {
    display: block;
    position: fixed !important;
    top: 43px;
    top: calc(43px + env(safe-area-inset-top, 0px));
    left: -110% !important;
    width: 86% !important;
    max-width: 360px !important;
    height: calc(100% - 45px) !important;
    height: calc(100% - 45px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
    z-index: 21;
    transition: left 0.25s ease-in;
    -webkit-transition: left 0.25s ease-in;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    border: 0 !important;
    list-style: none;
    text-align: left;
    float: none !important;
  }
  .navigation.nf-mnav.show {
    left: 0 !important;
  }

  /*
   * Overlay behind drawer (not over it).
   * Drawer sits inside header.mbhd stacking context.
   */
  body.nf-menu-open {
    overflow: hidden;
    position: relative;
    height: 100%;
  }
  body.nf-menu-open header.mbhd {
    z-index: 2000;
  }
  body.nf-menu-open .hoverlay.show {
    z-index: 1900 !important;
  }
  body.nf-menu-open .buy-now-section,
  body.nf-menu-open .fixed_buynow,
  body.nf-menu-open .scroll_top1 {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .nf-mnav-panels {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .nf-mnav-panel {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    box-sizing: border-box;
  }
  .nf-mnav-panel.is-active {
    display: -webkit-flex;
    display: flex;
  }
  .nf-mnav-scroll {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px 18px;
    box-sizing: border-box;
  }
  .nf-mnav-signin-card {
    background: #c40d11;
    border-radius: 16px;
    padding: 18px 16px 16px;
    color: #fff;
    margin-bottom: 12px;
  }
  .nf-mnav-signin-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    word-wrap: break-word;
  }
  .nf-mnav-signin-copy {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 14px;
    padding: 0;
  }
  .nf-mnav-signin-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #fff;
    color: #c40d11 !important;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 44px;
    padding: 0 12px;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
  }
  .nf-mnav-quick {
    display: -webkit-flex;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .nf-mnav-quick-btn {
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    min-width: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
    color: #0f7a86 !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    padding: 8px 4px;
    text-decoration: none !important;
    box-sizing: border-box;
  }
  .nf-mnav-quick-ico {
    font-size: 18px;
    line-height: 1;
  }
  .nf-mnav-search {
    position: relative;
    margin-bottom: 16px;
  }
  .nf-mnav-search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
  }
  .nf-mnav-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
    padding: 0 16px 0 38px;
    font-size: 13px;
    color: #333;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }
  .nf-mnav-search input::placeholder {
    color: #9a9a9a;
  }
  .nf-mnav-section {
    margin-bottom: 10px;
  }
  .nf-mnav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a8a;
    padding: 10px 2px 6px;
  }
  .nf-mnav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #eee;
    width: 100%;
    float: none;
  }
  .nf-mnav-list > li {
    border-bottom: 1px solid #eee;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .nf-mnav-link {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 2px;
    color: #222 !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    box-sizing: border-box;
  }
  .nf-mnav-link-ico {
    width: 28px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
    -webkit-flex: 0 0 28px;
    flex: 0 0 28px;
  }
  .nf-mnav-link-text {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    word-wrap: break-word;
  }
  .nf-mnav-link .fa-angle-right {
    color: #c0c0c0;
    font-size: 16px;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
  }
  .nf-mnav-link--emphasis .nf-mnav-link-text {
    color: #c40d11;
  }
  .nf-mnav-badge {
    display: inline-block;
    background: #c40d11;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    margin-right: 4px;
    white-space: nowrap;
  }
  .nf-mnav-subhead {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid #eee;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
  }
  .nf-mnav-subhead h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    text-align: left;
  }
  .nf-mnav-back {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 22px;
  }
  .nf-mnav-wa-cta {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    padding: 10px 14px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    background: #fff;
  }
  .nf-mnav-wa-cta a {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 12px;
    background: #25d366;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
  }
  .nf-mnav-wa-ico {
    font-size: 16px;
  }
  .nf-mnav-logout-wrap {
    padding: 12px 2px 4px;
  }
  .nf-mnav-logout {
    display: block;
    color: #c40d11 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
  }

  /* Header logo strip after removing search icon */
  .mbhd .logo_strip > li > ul > li:last-child a.search_click,
  .mbhd .logo_strip .search_click {
    display: none !important;
  }
  .mbhd .logo_strip > li:first-child {
    width: 48px !important;
  }
  .mbhd .logo_strip > li:nth-child(2) {
    width: calc(100% - 118px) !important;
  }
}

/* Narrow phones */
@media (max-width: 479px) {
  .navigation.nf-mnav {
    width: 92% !important;
    max-width: none !important;
  }
  .nf-mnav-scroll {
    padding: 12px 12px 16px;
  }
  .nf-mnav-signin-title {
    font-size: 18px;
  }
  .nf-mnav-signin-copy {
    font-size: 12px;
  }
  .nf-mnav-quick {
    gap: 6px;
  }
  .nf-mnav-quick-btn {
    min-height: 58px;
    font-size: 10px;
    padding: 6px 2px;
  }
  .nf-mnav-link {
    font-size: 14px;
    min-height: 46px;
  }
  .nf-mnav-wa-cta a {
    font-size: 13px;
  }
}

/* Very small phones */
@media (max-width: 359px) {
  .navigation.nf-mnav {
    width: 100% !important;
  }
  .nf-mnav-quick-btn {
    font-size: 9px;
    min-height: 54px;
  }
  .nf-mnav-signin-card {
    padding: 14px 12px 12px;
    border-radius: 12px;
  }
  .nf-mnav-signin-title {
    font-size: 16px;
  }
}

/* Short landscape screens — keep CTA reachable, tighten chrome */
@media (max-width: 767px) and (max-height: 480px) {
  .nf-mnav-signin-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  .nf-mnav-signin-copy {
    margin-bottom: 8px;
  }
  .nf-mnav-signin-btn {
    line-height: 38px;
  }
  .nf-mnav-quick-btn {
    min-height: 48px;
  }
  .nf-mnav-link {
    min-height: 40px;
    padding: 6px 2px;
  }
  .nf-mnav-wa-cta {
    padding: 8px 12px;
  }
  .nf-mnav-wa-cta a {
    min-height: 40px;
  }
}

/* Desktop / tablet landscape with desktop header — never show drawer chrome */
@media (min-width: 768px) {
  .navigation.nf-mnav,
  .navigation.nf-mnav.show {
    display: none !important;
    left: -110% !important;
  }
  body.nf-menu-open {
    overflow: auto;
  }
  body.nf-menu-open .hoverlay.show {
    display: none !important;
  }
}
