/* Hanwen native mobile navigation. Desktop Fashion layout is untouched. */
.hw-mobile-tabbar { display: none; }
@media (max-width: 959px) {
  body:has(.hw-mobile-tabbar) .header-action-bar.left .header-action-bar__menu { display: none !important; }
  body:has(.hw-mobile-tabbar) .header-nav-drawer__menu > ul > li.hw-mobile-home-entry { display: none !important; }

  .hw-mobile-tabbar {
    box-sizing: border-box;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 6px 5px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(67, 54, 43, .13);
    background: #fff;
    box-shadow: 0 -3px 14px rgba(0, 0, 0, .035);
    font-family: "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
  }
  .hw-mobile-tabbar__item,
  .hw-mobile-tabbar__item:visited,
  .hw-mobile-tabbar__item:hover {
    min-width: 0;
    min-height: 49px;
    margin: 0;
    padding: 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6b655e;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
  }
  .hw-mobile-tabbar__item svg { width: 23px; height: 23px; flex: none; }
  .hw-mobile-tabbar__item span {
    max-width: 100%;
    overflow: hidden;
    font-family: inherit !important;
    font-size: 11px !important;
    line-height: 1.25;
    font-weight: 400 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .hw-mobile-tabbar__item.is-current,
  .hw-mobile-tabbar__menu[aria-expanded="true"] { color: #352a22; }
  .hw-mobile-tabbar__item:focus-visible { outline: 2px solid #6b4c37; outline-offset: -3px; }
  body:has(.hw-mobile-tabbar) { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  /* Do not cover the five-item footer with the product page sticky purchase controls. */
  body:has(.hw-mobile-tabbar) .hw-product-mobile-buybar.is-visible {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.hw-mobile-tabbar):has(.hw-product-mobile-buybar.is-visible) {
    padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  }
  /* The original drawer stays on top; hide the fixed footer while it is open. */
  body.header-nav-drawer--lockscreen .hw-mobile-tabbar,
  body.header-nav-drawer--lockscreen .hw-product-mobile-buybar.is-visible {
    visibility: hidden;
    pointer-events: none;
  }
}
