/* =========================================================
   INNERJOY PREMIUM MOBILE HEADER — 1.4.1
   Everything in this file is restricted to mobile screens.
   ========================================================= */

.ijmh {
  display: none;
}

@media (max-width: 768px) {
  /* Remove Woodmart's promotional header-banner carousel on mobile and
     collapse every height hook it uses so no empty strip remains. */
  body .wd-hb-wrapp,
  body .wd-hb-wrapp.wd-display {
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;
    overflow: hidden !important;
    border: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html,
  body {
    --wd-header-banner-h: 0px !important;
    --wd-header-banner-height: 0px !important;
  }

  /* Hide only Woodmart's original header on mobile. Its links remain in the
     DOM so the plugin can safely proxy the theme's native drawer actions. */
  .whb-header {
    display: none !important;
  }

  .ijmh,
  .ijmh *,
  .ijmh *::before,
  .ijmh *::after {
    box-sizing: border-box;
  }

  :root {
    --ijmh-drawer-offset: 0px;
  }

  body {
    --ijmh-blue: #0968dc;
    --ijmh-blue-deep: #0756bd;
    --ijmh-blue-soft: #eaf3ff;
    --ijmh-accent-end: #187ae3;
    --ijmh-ink: #0b1f3a;
    --ijmh-muted: #62738a;
    --ijmh-on-accent: #ffffff;
    --ijmh-on-accent-muted: rgba(255, 255, 255, 0.74);
    --ijmh-control-border: rgba(255, 255, 255, 0.27);
    --ijmh-control-bg: rgba(255, 255, 255, 0.10);
    --ijmh-focus: #ffffff;
    --ijmh-header-backdrop: rgba(245, 249, 255, 0.96);
    --ijmh-header-border: rgba(8, 54, 112, 0.08);
  }

  body.ijmh-context-women {
    --ijmh-blue: #a95770;
    --ijmh-blue-deep: #703246;
    --ijmh-blue-soft: #f8e6ec;
    --ijmh-accent-end: #d1879b;
    --ijmh-header-backdrop: rgba(253, 247, 249, 0.96);
    --ijmh-header-border: rgba(112, 50, 70, 0.10);
  }

  body.ijmh-context-men {
    --ijmh-blue: #0968dc;
    --ijmh-blue-deep: #0756bd;
    --ijmh-blue-soft: #eaf3ff;
    --ijmh-accent-end: #187ae3;
  }

  body.ijmh-context-kids {
    --ijmh-blue: #f0b91d;
    --ijmh-blue-deep: #9a6800;
    --ijmh-blue-soft: #fff3c5;
    --ijmh-accent-end: #ffd65b;
    --ijmh-on-accent: #10243d;
    --ijmh-on-accent-muted: rgba(16, 36, 61, 0.68);
    --ijmh-control-border: rgba(16, 36, 61, 0.15);
    --ijmh-control-bg: rgba(255, 255, 255, 0.26);
    --ijmh-focus: #10243d;
    --ijmh-header-backdrop: rgba(255, 251, 235, 0.97);
    --ijmh-header-border: rgba(154, 104, 0, 0.12);
  }

  .ijmh {

    position: sticky;
    z-index: 10050;
    top: 0;
    width: 100%;
    display: block;
    padding: 6px 8px;
    background: var(--ijmh-header-backdrop);
    border-bottom: 1px solid var(--ijmh-header-border);
    box-shadow: none !important;
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    transition: padding 0.24s ease;
  }

  body.admin-bar .ijmh {
    top: 46px;
  }

  .ijmh__shell {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 720px;
    max-height: 142px;
    margin: 0 auto;
    padding: 5px;
    overflow: hidden;
    border: 1px solid var(--ijmh-control-border);
    border-radius: 21px;
    background:
      radial-gradient(circle at 93% -30%, rgba(255, 255, 255, 0.22), transparent 34%),
      linear-gradient(135deg, var(--ijmh-blue-deep) 0%, var(--ijmh-blue) 58%, var(--ijmh-accent-end) 100%);
    box-shadow: none !important;
    transition:
      max-height 0.25s ease,
      border-radius 0.25s ease,
      padding 0.25s ease;
  }

  .ijmh__shell::before {
    position: absolute;
    z-index: -1;
    top: -54px;
    right: -32px;
    width: 120px;
    height: 120px;
    border: 18px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: "";
    pointer-events: none;
  }

  .ijmh__microbar {
    height: 20px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: var(--ijmh-on-accent-muted);
    font-size: 7.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 1;
    transition:
      height 0.22s ease,
      opacity 0.18s ease,
      transform 0.22s ease;
  }

  .ijmh__microbrand {
    color: var(--ijmh-on-accent);
    font-weight: 950;
  }

  .ijmh__microbar i {
    width: 16px;
    height: 2px;
    flex: 0 0 16px;
    border-radius: 999px;
    background: var(--ijmh-on-accent-muted);
  }

  .ijmh__row {
    min-height: 56px;
    padding: 0 4px;
    display: grid;
    grid-template-columns: 42px minmax(112px, 1fr) auto;
    align-items: center;
    gap: 7px;
  }

  .ijmh button,
  .ijmh a {
    -webkit-tap-highlight-color: transparent;
  }

  .ijmh button {
    appearance: none !important;
    -webkit-appearance: none !important;
    text-transform: none !important;
  }

  .ijmh button::before,
  .ijmh button::after {
    display: none !important;
    content: none !important;
  }

  .ijmh__tool {
    position: relative;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
    overflow: visible !important;
    border: 1px solid var(--ijmh-control-border) !important;
    border-radius: 13px !important;
    outline: none;
    background: var(--ijmh-control-bg) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
    filter: none !important;
    cursor: pointer;
    text-decoration: none !important;
    transition:
      border-color 0.2s ease,
      background-color 0.2s ease,
      color 0.2s ease;
  }

  .ijmh__tool:hover,
  .ijmh__tool:active,
  .ijmh__tool[aria-expanded="true"] {
    border-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }

  .ijmh__menu {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    background: #ffffff !important;
    color: var(--ijmh-blue-deep) !important;
  }

  .ijmh__menu-lines {
    position: relative;
    width: 19px;
    height: 14px;
    display: block;
  }

  .ijmh__menu-lines i {
    position: absolute;
    left: 0;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    transition:
      top 0.22s ease,
      width 0.22s ease,
      transform 0.22s ease;
  }

  .ijmh__menu-lines i:first-child {
    top: 2px;
    width: 19px;
  }

  .ijmh__menu-lines i:last-child {
    top: 10px;
    width: 13px;
  }

  .ijmh__menu[aria-expanded="true"] .ijmh__menu-lines i:first-child {
    top: 6px;
    transform: rotate(45deg);
  }

  .ijmh__menu[aria-expanded="true"] .ijmh__menu-lines i:last-child {
    top: 6px;
    width: 19px;
    transform: rotate(-45deg);
  }

  .ijmh__logo {
    width: min(100%, 138px);
    height: 42px;
    margin: 0 auto;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    box-shadow: none !important;
    text-decoration: none !important;
  }

  .ijmh__logo img {
    width: 100%;
    height: auto;
    max-height: 31px;
    display: block;
    object-fit: contain;
  }

  .ijmh__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  /* CSS masks prevent Woodmart's global button rules from hiding icons. */
  .ijmh__icon {
    width: 20px;
    height: 20px;
    display: block !important;
    flex: 0 0 20px;
    opacity: 1 !important;
    visibility: visible !important;
    background-color: currentColor;
    transform: none !important;
  }

  .ijmh__icon--account {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.5' r='3.5'/%3E%3Cpath d='M5.5 20c.7-4.1 3-6.2 6.5-6.2s5.8 2.1 6.5 6.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.5' r='3.5'/%3E%3Cpath d='M5.5 20c.7-4.1 3-6.2 6.5-6.2s5.8 2.1 6.5 6.2'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .ijmh__icon--cart {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8.5h13l-1 11h-11l-1-11Z'/%3E%3Cpath d='M9 9V6.8a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8.5h13l-1 11h-11l-1-11Z'/%3E%3Cpath d='M9 9V6.8a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .ijmh__icon--search {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.2'/%3E%3Cpath d='m15.2 15.2 4.6 4.6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.2'/%3E%3Cpath d='m15.2 15.2 4.6 4.6'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .ijmh__count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ijmh-blue) !important;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ijmh-blue-deep);
    box-shadow: none !important;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
  }

  .ijmh__count[data-count="0"] {
    display: none;
  }

  .ijmh__searchbar {
    width: calc(100% - 8px) !important;
    height: 41px !important;
    min-height: 41px !important;
    max-height: 41px !important;
    margin: 0 4px 4px !important;
    padding: 0 7px 0 13px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 13px !important;
    outline: none;
    background: #ffffff !important;
    color: var(--ijmh-muted) !important;
    box-shadow: none !important;
    filter: none !important;
    cursor: text;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    text-align: left;
    opacity: 1;
    transform-origin: top;
    transition:
      height 0.22s ease,
      min-height 0.22s ease,
      max-height 0.22s ease,
      margin 0.22s ease,
      padding 0.22s ease,
      opacity 0.16s ease,
      transform 0.22s ease;
  }

  .ijmh__searchbar .ijmh__icon {
    color: var(--ijmh-blue-deep);
  }

  .ijmh__searchbar input[type="search"] {
    min-width: 0;
    flex: 1 1 auto;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    color: var(--ijmh-ink) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .ijmh__searchbar input[type="search"]::-webkit-search-cancel-button {
    margin-right: 4px;
    opacity: 0.55;
  }

  .ijmh__searchbar input[type="search"]::placeholder {
    color: var(--ijmh-muted) !important;
    opacity: 1 !important;
  }

  .ijmh__search-submit {
    min-height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ijmh-blue-soft);
    color: var(--ijmh-blue-deep);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.55px;
    text-transform: uppercase;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
  }

  .ijmh__searchbar:hover,
  .ijmh__searchbar:focus-within {
    border-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }

  .ijmh__tool:focus-visible,
  .ijmh__logo:focus-visible,
  .ijmh__searchbar:focus-within {
    outline: 2px solid var(--ijmh-focus);
    outline-offset: 2px;
    box-shadow: none !important;
  }

  /* The compact state has explicit zero min/max dimensions so Woodmart's
     global button min-height cannot leave the white scrolling void. */
  .ijmh--compact {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .ijmh--compact .ijmh__shell {
    max-height: 62px;
    padding-top: 2px;
    padding-bottom: 2px;
    border-radius: 18px;
  }

  .ijmh--compact .ijmh__microbar {
    height: 0;
    opacity: 0;
    transform: translateY(-5px);
  }

  .ijmh--compact .ijmh__searchbar {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 4px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    opacity: 0;
    transform: scaleY(0.75);
    pointer-events: none;
  }

  /* =======================================================
     WOODMART DRAWERS — positioning and interaction fixes
     ======================================================= */

  body .mobile-nav,
  body .cart-widget-side {
    top: var(--ijmh-drawer-offset) !important;
    bottom: auto !important;
    height: calc(100vh - var(--ijmh-drawer-offset)) !important;
    height: calc(100dvh - var(--ijmh-drawer-offset)) !important;
    max-height: calc(100dvh - var(--ijmh-drawer-offset)) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1;
    z-index: 10040 !important;
    overscroll-behavior: contain;
  }

  body .mobile-nav {
    width: min(calc(100vw - 18px), 430px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border-right: 1px solid #dbe7f5 !important;
    border-radius: 0 24px 24px 0 !important;
    background:
      radial-gradient(circle at 100% 0%, rgba(9, 104, 220, 0.10), transparent 26%),
      linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%) !important;
    -webkit-overflow-scrolling: touch;
  }

  body .cart-widget-side {
    width: min(92vw, 420px) !important;
    border-left: 1px solid #dbe7f5 !important;
    background: #f5f9ff !important;
  }

  body .cart-widget-side.wd-opened,
  body.ijmh-cart-open .cart-widget-side {
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
  }

  /* Hard isolation protects against stale Woodmart open classes. */
  body.ijmh-cart-open .mobile-nav {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(-100%, 0, 0) !important;
  }

  body.ijmh-menu-open .cart-widget-side {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body .wd-close-side {
    top: var(--ijmh-drawer-offset) !important;
    height: calc(100vh - var(--ijmh-drawer-offset)) !important;
    height: calc(100dvh - var(--ijmh-drawer-offset)) !important;
    background: rgba(5, 24, 51, 0.44) !important;
    box-shadow: none !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10030 !important;
  }

  body.ijmh-drawer-open .wd-toolbar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(110%) !important;
  }

  /* The site's custom app tab bar uses z-index:99999, which is above the
     Woodmart cart drawer. Move it beyond the safe-area edge and disable it
     whenever a menu or cart drawer is active. The JS class is an independent
     fallback for themes that update drawer classes one animation frame late. */
  body.ijmh-drawer-open .ij-app-tabbar,
  body.ijmh-menu-open .ij-app-tabbar,
  body.ijmh-cart-open .ij-app-tabbar,
  body .ij-app-tabbar.ijmh-navigation-suspended,
  body .wd-toolbar.ijmh-navigation-suspended,
  body .woodmart-toolbar.ijmh-navigation-suspended,
  body .wd-toolbar-wrapper.ijmh-navigation-suspended {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(-50%, calc(100% + 34px + env(safe-area-inset-bottom)), 0) scale(.96) !important;
    transition:
      transform .26s cubic-bezier(.2, .75, .25, 1),
      opacity .18s ease,
      visibility 0s linear .26s !important;
  }

  body .wd-toolbar.ijmh-navigation-suspended,
  body .woodmart-toolbar.ijmh-navigation-suspended,
  body .wd-toolbar-wrapper.ijmh-navigation-suspended {
    transform: translate3d(0, calc(100% + 34px + env(safe-area-inset-bottom)), 0) !important;
  }

  /* =======================================================
     PREMIUM INNERJOY MOBILE MENU
     ======================================================= */

  body .mobile-nav .wd-heading,
  body .mobile-nav .widget-heading {
    min-height: 54px;
    margin: 0 !important;
    padding: 0 16px !important;
    display: flex;
    align-items: center;
    border: 0 !important;
    background: transparent !important;
    color: var(--ijmh-ink) !important;
    box-shadow: none !important;
  }

  body .mobile-nav .ijmh-menu-intro {
    position: relative;
    isolation: isolate;
    min-height: 118px;
    margin: 14px 14px 11px;
    padding: 20px 22px;
    overflow: hidden;
    border: 1px solid var(--ijmh-control-border);
    border-radius: 21px;
    background:
      radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.20), transparent 30%),
      linear-gradient(135deg, var(--ijmh-blue-deep) 0%, var(--ijmh-blue) 62%, var(--ijmh-accent-end) 100%);
    color: var(--ijmh-on-accent);
    box-shadow: none !important;
  }

  body .mobile-nav .ijmh-menu-intro::after {
    position: absolute;
    z-index: -1;
    top: -45px;
    right: -31px;
    width: 116px;
    height: 116px;
    border: 17px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
  }

  body .mobile-nav .ijmh-menu-intro__eyebrow {
    margin-bottom: 10px;
    display: block;
    color: var(--ijmh-on-accent-muted);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1.35px;
    text-transform: uppercase;
  }

  body .mobile-nav .ijmh-menu-intro strong {
    display: block;
    color: var(--ijmh-on-accent) !important;
    font-size: 24px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.75px;
  }

  body .mobile-nav .ijmh-menu-intro p {
    max-width: 260px;
    margin: 10px 0 0 !important;
    color: var(--ijmh-on-accent-muted) !important;
    font-size: 11px;
    line-height: 1.4;
  }

  /* Search becomes a contained utility card rather than a full-width strip. */
  body .mobile-nav .ijmh-menu-search,
  body .mobile-nav .wd-search-form {
    margin: 0 14px 11px !important;
    padding: 5px !important;
    border: 1px solid #d9e5f3 !important;
    border-radius: 17px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body .mobile-nav .ijmh-menu-search form,
  body .mobile-nav .wd-search-form form,
  body .mobile-nav form.searchform {
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 4px 0 12px !important;
    display: flex !important;
    align-items: center;
    border: 0 !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body .mobile-nav .ijmh-menu-search input,
  body .mobile-nav .wd-search-form input,
  body .mobile-nav form.searchform input[type="text"],
  body .mobile-nav form.searchform input[type="search"] {
    min-width: 0;
    min-height: 44px !important;
    padding: 0 8px 0 0 !important;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    color: var(--ijmh-ink) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 650 !important;
  }

  body .mobile-nav .ijmh-menu-search input::placeholder,
  body .mobile-nav .wd-search-form input::placeholder {
    color: #78879a !important;
    opacity: 1 !important;
  }

  body .mobile-nav .ijmh-menu-search button,
  body .mobile-nav .wd-search-form button,
  body .mobile-nav form.searchform button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--ijmh-blue-soft) !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
  }

  /* Woodmart's two tabs become a clear segmented control. */
  body .mobile-nav .wd-nav-mob-tab,
  body .mobile-nav .ijmh-menu-tabs {
    width: auto !important;
    min-height: 48px;
    margin: 0 14px 14px !important;
    padding: 4px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid #d9e5f3 !important;
    border-radius: 16px !important;
    background: #eaf0f8 !important;
    box-shadow: none !important;
  }

  body .mobile-nav .wd-nav-mob-tab > li,
  body .mobile-nav .ijmh-menu-tabs > li {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body .mobile-nav .wd-nav-mob-tab > li > a,
  body .mobile-nav .ijmh-menu-tabs > li > a {
    min-height: 38px !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #6e7a8b !important;
    box-shadow: none !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 0.55px;
    text-transform: uppercase;
  }

  body .mobile-nav .wd-nav-mob-tab > li.wd-active > a,
  body .mobile-nav .wd-nav-mob-tab > li.active > a,
  body .mobile-nav .ijmh-menu-tabs > li.wd-active > a,
  body .mobile-nav .ijmh-menu-tabs > li.active > a {
    background: var(--ijmh-blue) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
  }

  body .mobile-nav .wd-nav-mob-tab > li > a::after,
  body .mobile-nav .ijmh-menu-tabs > li > a::after {
    display: none !important;
    content: none !important;
  }

  /* Category links become editorial cards. Nested submenus keep Woodmart's
     native structure and are not rewritten. */
  body .mobile-nav .menu,
  body .mobile-nav .wd-nav-mobile:not(.wd-nav-mob-tab) {
    margin: 0 !important;
    padding: 0 14px 88px !important;
    overflow: visible !important;
    overscroll-behavior: contain;
  }

  body .mobile-nav .ijmh-premium-menu-item {
    --ijmh-menu-card: #eef5ff;
    --ijmh-menu-card-ink: #0968dc;

    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body .mobile-nav .ijmh-premium-menu-item:last-child {
    margin-bottom: 0 !important;
  }

  body .mobile-nav .ijmh-menu-item--women {
    --ijmh-menu-card: #f9e9ed;
    --ijmh-menu-card-ink: #9d5365;
  }

  body .mobile-nav .ijmh-menu-item--men {
    --ijmh-menu-card: #e7f1ff;
    --ijmh-menu-card-ink: #1768d2;
  }

  body .mobile-nav .ijmh-menu-item--kids {
    --ijmh-menu-card: #fff3c9;
    --ijmh-menu-card-ink: #9b6b00;
  }

  body .mobile-nav .ijmh-premium-menu-link {
    position: relative;
    min-height: 72px !important;
    padding: 15px 18px 12px 65px !important;
    display: block !important;
    overflow: hidden;
    border: 1px solid #dce6f2 !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--ijmh-ink) !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.1px;
    text-decoration: none !important;
    transition:
      border-color 0.2s ease,
      background-color 0.2s ease,
      color 0.2s ease,
      transform 0.2s ease;
  }

  body .mobile-nav .ijmh-premium-menu-link::before {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(9, 104, 220, 0.13);
    border-radius: 14px;
    background: var(--ijmh-menu-card);
    color: var(--ijmh-menu-card-ink);
    content: attr(data-ijmh-initial);
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
  }

  body .mobile-nav .ijmh-premium-menu-link::after {
    display: none !important;
    content: none !important;
  }

  body .mobile-nav .ijmh-premium-menu-link__meta {
    margin-top: 6px;
    display: block;
    color: #7c899a;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.45px;
    text-transform: uppercase;
  }

  body .mobile-nav .ijmh-premium-menu-link:hover,
  body .mobile-nav .ijmh-premium-menu-link:active,
  body .mobile-nav .current-menu-item > .ijmh-premium-menu-link,
  body .mobile-nav .current-menu-ancestor > .ijmh-premium-menu-link {
    border-color: var(--ijmh-menu-card-ink) !important;
    background: var(--ijmh-menu-card) !important;
    color: var(--ijmh-menu-card-ink) !important;
    box-shadow: none !important;
    transform: translateX(3px);
  }

  body .mobile-nav .ijmh-premium-menu-link:focus-visible {
    outline: 2px solid var(--ijmh-blue);
    outline-offset: 2px;
    box-shadow: none !important;
  }

  /* =======================================================
     CART DRAWER — premium empty and populated states
     ======================================================= */

  body .cart-widget-side > .wd-heading,
  body .cart-widget-side .ijmh-cart-heading,
  body .cart-widget-side .widget-heading {
    position: relative;
    isolation: isolate;
    width: 100% !important;
    min-height: 64px;
    margin: 0 !important;
    padding: 0 17px 0 20px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0 !important;
    background-color: var(--ijmh-blue-deep) !important;
    background-image: linear-gradient(135deg, var(--ijmh-blue-deep), var(--ijmh-blue)) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  body .cart-widget-side .wd-heading .title,
  body .cart-widget-side .widget-heading .title {
    color: var(--ijmh-on-accent) !important;
    font-size: 17px !important;
    font-weight: 850 !important;
    letter-spacing: -0.25px;
  }

  body .cart-widget-side .close-side-widget,
  body .cart-widget-side .ijmh-cart-close {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: grid !important;
    place-items: center;
    border: 1px solid var(--ijmh-control-border) !important;
    border-radius: 12px !important;
    background: var(--ijmh-control-bg) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
  }

  body .cart-widget-side .close-side-widget > span:not(.ijmh-cart-close__icon) {
    display: none !important;
  }

  body .cart-widget-side .close-side-widget::before,
  body .cart-widget-side .close-side-widget::after {
    display: none !important;
    content: none !important;
  }

  body .cart-widget-side .ijmh-cart-close__icon {
    position: relative;
    width: 16px;
    height: 16px;
    display: block !important;
  }

  body .cart-widget-side .ijmh-cart-close__icon::before,
  body .cart-widget-side .ijmh-cart-close__icon::after {
    position: absolute;
    top: 7px;
    left: 0;
    width: 16px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    content: "";
  }

  body .cart-widget-side .ijmh-cart-close__icon::before {
    transform: rotate(45deg);
  }

  body .cart-widget-side .ijmh-cart-close__icon::after {
    transform: rotate(-45deg);
  }

  body .cart-widget-side .close-side-widget:hover,
  body .cart-widget-side .close-side-widget:active,
  body .cart-widget-side .ijmh-cart-close:hover,
  body .cart-widget-side .ijmh-cart-close:active {
    background: #ffffff !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
  }

  body .cart-widget-side .widget_shopping_cart,
  body .cart-widget-side .widget_shopping_cart_content {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #f5f9ff !important;
    opacity: 1 !important;
    filter: none !important;
  }

  body .cart-widget-side .wd-empty-mini-cart {
    min-height: calc(100dvh - var(--ijmh-drawer-offset) - 64px);
    margin: 0 !important;
    padding: 36px 26px calc(32px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
      radial-gradient(circle at 50% 30%, rgba(9, 104, 220, 0.10), transparent 28%),
      linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%) !important;
  }

  body .cart-widget-side .wd-empty-mini-cart::before,
  body .cart-widget-side .wd-empty-mini-cart::after,
  body .cart-widget-side .woocommerce-mini-cart__empty-message::before,
  body .cart-widget-side .woocommerce-mini-cart__empty-message::after {
    display: none !important;
    content: none !important;
  }

  body .cart-widget-side .ijmh-empty-cart__eyebrow {
    margin-bottom: 14px;
    color: var(--ijmh-blue-deep);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
  }

  body .cart-widget-side .ijmh-empty-cart__icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
    border: 1px solid #cfe1f8;
    border-radius: 25px;
    background: var(--ijmh-blue-soft);
    color: var(--ijmh-blue-deep);
    box-shadow: none !important;
  }

  body .cart-widget-side .ijmh-empty-cart__icon::before {
    width: 31px;
    height: 31px;
    display: block;
    background: currentColor;
    content: "";
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8.5h13l-1 11h-11l-1-11Z'/%3E%3Cpath d='M9 9V6.8a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8.5h13l-1 11h-11l-1-11Z'/%3E%3Cpath d='M9 9V6.8a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  body .cart-widget-side .woocommerce-mini-cart__empty-message {
    max-width: 270px;
    margin: 0 0 9px !important;
    color: var(--ijmh-ink) !important;
    font-family: inherit !important;
    font-size: 22px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.6px;
  }

  body .cart-widget-side .ijmh-empty-cart__copy {
    max-width: 280px;
    margin: 0 0 23px;
    color: var(--ijmh-muted);
    font-size: 13px;
    line-height: 1.55;
  }

  body .cart-widget-side .wd-empty-mini-cart .wc-backward {
    width: min(100%, 245px) !important;
    min-height: 49px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid var(--ijmh-blue-deep) !important;
    border-radius: 14px !important;
    background: var(--ijmh-blue) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: 0.25px;
    text-decoration: none !important;
    text-transform: none !important;
  }

  body .cart-widget-side .wd-empty-mini-cart .wc-backward::after {
    content: "→";
    font-size: 17px;
    line-height: 1;
    transition: transform 0.2s ease;
  }

  body .cart-widget-side .wd-empty-mini-cart .wc-backward:hover,
  body .cart-widget-side .wd-empty-mini-cart .wc-backward:active {
    border-color: var(--ijmh-blue-deep) !important;
    background: var(--ijmh-blue-deep) !important;
    color: var(--ijmh-on-accent) !important;
    box-shadow: none !important;
  }

  body .cart-widget-side .wd-empty-mini-cart .wc-backward:hover::after {
    transform: translateX(3px);
  }

  /* Populated cart. */
  body .cart-widget-side .woocommerce-mini-cart {
    margin: 0 !important;
    padding: 14px 14px 190px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .cart-widget-side .woocommerce-mini-cart .mini_cart_item {
    min-height: 102px;
    margin: 0 0 10px !important;
    padding: 12px 34px 12px 104px !important;
    border: 1px solid #dce8f6 !important;
    border-radius: 17px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body .cart-widget-side .woocommerce-mini-cart .mini_cart_item img {
    top: 11px !important;
    left: 11px !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 12px !important;
    object-fit: cover;
  }

  body .cart-widget-side .woocommerce-mini-cart .mini_cart_item > a:not(.remove) {
    color: var(--ijmh-ink) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
  }

  body .cart-widget-side .woocommerce-mini-cart .quantity {
    color: var(--ijmh-muted) !important;
    font-size: 12px !important;
  }

  body .cart-widget-side .woocommerce-mini-cart .remove {
    top: 10px !important;
    right: 10px !important;
    border: 1px solid #dce8f6 !important;
    background: #f5f9ff !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
  }

  body .cart-widget-side .shopping-cart-widget-footer,
  body .cart-widget-side .woocommerce-mini-cart__total,
  body .cart-widget-side .woocommerce-mini-cart__buttons {
    box-shadow: none !important;
  }

  body .cart-widget-side .shopping-cart-widget-footer {
    padding: 15px 16px calc(18px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #dce8f6 !important;
    background: #ffffff !important;
  }

  body .cart-widget-side .woocommerce-mini-cart__total {
    margin-bottom: 12px !important;
    color: var(--ijmh-ink) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  body .cart-widget-side .woocommerce-mini-cart__buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  body .cart-widget-side .woocommerce-mini-cart__buttons .button {
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    border: 1px solid var(--ijmh-blue) !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    color: var(--ijmh-blue-deep) !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    text-transform: none !important;
  }

  body .cart-widget-side .woocommerce-mini-cart__buttons .checkout {
    background: var(--ijmh-blue) !important;
    color: var(--ijmh-on-accent) !important;
  }
}

@media (max-width: 370px) {
  .ijmh__row {
    grid-template-columns: 40px minmax(98px, 1fr) auto;
    gap: 5px;
  }

  .ijmh__tool {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
  }

  .ijmh__menu {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
  }

  .ijmh__logo {
    max-width: 119px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .ijmh__actions {
    gap: 4px;
  }

  .ijmh__searchbar {
    font-size: 9.5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ijmh,
  .ijmh *,
  .ijmh *::before,
  .ijmh *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
