/* Komparent mobile storefront navigation and catalog search sheet. */
.mobile-bottom-nav,
.mobile-search-sheet,
.mobile-sort-sheet { display: none; }

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overscroll-behavior-x: none;
  }
  body.has-mobile-bottom-nav {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }
  body.mobile-search-open,
  body.mobile-sort-open,
  body.catalog-filter-open { overflow: hidden; }

  /* Retire the former fixed search/cart strip supplied by shared-navbar.css. */
  .shared-nav::after { display: none !important; }
  .shared-nav__search,
  .shared-nav__user,
  .shared-nav__favorite,
  .shared-nav .shared-nav__cart.subpage-cart { display: none !important; }
  body.category-page.has-mobile-bottom-nav .shared-nav__in,
  body.product-page.has-mobile-bottom-nav .shared-nav__in { flex-wrap: wrap; }
  body.category-page.has-mobile-bottom-nav .shared-nav__search,
  body.product-page.has-mobile-bottom-nav .shared-nav__search {
    position: static;
    z-index: auto;
    display: flex !important;
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    height: 44px;
    transform: none;
    border-radius: 8px;
  }

  /* Compact catalog controls: filter, result count, sort and layout. */
  .mobile-catalog-toolbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px !important;
    min-height: 46px !important;
    margin-bottom: 7px !important;
    border-width: 0 0 1px !important;
    box-shadow: 0 2px 8px rgba(17, 20, 24, .05) !important;
  }
  .mobile-catalog-toolbar button,
  .mobile-catalog-toolbar label {
    width: 44px !important;
    height: 44px !important;
  }
  .mobile-catalog-toolbar svg { width: 20px !important; height: 20px !important; }
  .mobile-catalog-toolbar__count { padding: 0 8px !important; text-align: center !important; font-size: 12.5px !important; }
  .mobile-catalog-toolbar [data-mobile-view] { transition: transform .16s ease, color .16s ease; }
  .mobile-catalog-toolbar [data-mobile-view]:active { transform: scale(.9); }
  .catalog-layout .product-grid.mobile-list-view,
  .catalog-layout .grid.mobile-list-view { grid-template-columns: 1fr !important; }

  .mobile-sort-sheet {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: block;
    background: rgba(10, 13, 17, .38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
  }
  .mobile-sort-sheet.is-open { opacity: 1; visibility: visible; }
  .mobile-sort-sheet__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -16px 44px rgba(17, 20, 24, .18);
    transform: translateY(105%);
    transition: transform .28s cubic-bezier(.22, .8, .24, 1);
  }
  .mobile-sort-sheet.is-open .mobile-sort-sheet__panel { transform: none; }
  .mobile-sort-sheet__panel::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 9px;
    border-radius: 99px;
    background: #d6dbe0;
  }
  .mobile-sort-sheet__panel header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e5e8;
  }
  .mobile-sort-sheet__panel header div { display: grid; gap: 3px; }
  .mobile-sort-sheet__panel header small {
    color: #9b5c00;
    font: 700 9px/1.2 'IBM Plex Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .mobile-sort-sheet__panel header strong { color: #111418; font-size: 19px; }
  .mobile-sort-sheet__panel header button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #eff1f3;
    color: #111418;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-sort-sheet__options { display: grid; padding-top: 7px; }
  .mobile-sort-sheet__options button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    border-radius: 10px;
    background: transparent;
    color: #31373e;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }
  .mobile-sort-sheet__options button.is-selected { background: #fff5e5; color: #17120a; }
  .mobile-sort-sheet__check {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #e4941b;
    color: #211606;
    font-size: 14px;
    opacity: 0;
  }
  .mobile-sort-sheet__options button.is-selected .mobile-sort-sheet__check { opacity: 1; }

  /* At the top of the home page the header actions remain available. Once the
     bottom navigation arrives, they slide out while the brand moves to center. */
  body.has-mobile-bottom-nav .topbar__quicksearch { display: none !important; }
  body.has-mobile-bottom-nav .topbar__in {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) max-content;
    min-height: 60px;
  }
  body.has-mobile-bottom-nav .topbar .navacts {
    position: static;
    grid-column: 3;
    display: flex !important;
    align-items: center;
    gap: 1px;
    margin-left: 0;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity .28s ease, transform .38s cubic-bezier(.22,.8,.24,1), visibility .38s;
  }
  body.has-mobile-bottom-nav .topbar .navacts > .navbtn--text { display: none !important; }
  body.has-mobile-bottom-nav .topbar #userNavContainer .navbtn > span,
  body.has-mobile-bottom-nav .topbar .navbtn--user-logged > span:not(.user-avatar-badge),
  body.has-mobile-bottom-nav .topbar .navbtn--cart > span:not(.navbtn__n) { display: none; }
  body.has-mobile-bottom-nav .topbar #userNavContainer .navbtn,
  body.has-mobile-bottom-nav .topbar .navbtn--user-logged,
  body.has-mobile-bottom-nav .topbar .navbtn--icon {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }
  body.has-mobile-bottom-nav .topbar .navbtn--cart {
    width: 48px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }
  body.has-mobile-bottom-nav .topbar .logo {
    position: static;
    grid-column: 2;
    min-width: 0;
    justify-self: start;
    z-index: 1;
    transform: none;
    transition: opacity .28s ease;
  }
  body.has-mobile-bottom-nav .topbar .logo img { max-width: 100%; }
  body.mobile-bottom-nav-visible .topbar__in { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  body.mobile-bottom-nav-visible .topbar .logo {
    justify-self: center;
    transform: none;
  }
  body.mobile-bottom-nav-visible .topbar .navacts {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(calc(100% + 18px));
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 180;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    height: calc(58px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    padding: 0 17px env(safe-area-inset-bottom);
    border: 0;
    border-radius: 32px 32px 0 0;
    background: rgba(247, 248, 249, .80);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .95),
      0 -3px 18px rgba(14, 18, 22, .09);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
    isolation: isolate;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .mobile-bottom-nav::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -5px -4px 0;
    border-radius: 38px 38px 0 0;
    display: none;
    pointer-events: none;
  }
  .mobile-bottom-nav::after {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 1px 1px 0;
    border-radius: inherit;
    border: 1px solid #e1e4e7;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }
  .mobile-bottom-nav.is-visible {
    display: grid;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .mobile-bottom-nav__item {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 100%;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #171b20;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-nav__item svg { width: 24px; height: 24px; }
  .mobile-bottom-nav__item:focus-visible { outline: 3px solid rgba(228, 148, 27, .4); outline-offset: -2px; border-radius: 14px; }
  .mobile-bottom-nav__home {
    width: 52px;
    height: 52px;
    justify-self: center;
    border-radius: 50%;
    background: #111418;
    box-shadow: 0 7px 18px rgba(17, 20, 24, .25);
  }
  .mobile-bottom-nav__home img {
    width: 34px;
    height: 24px;
    object-fit: contain;
    filter: invert(1) brightness(3);
  }
  .mobile-bottom-nav__badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 10px);
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 5px;
    border: 2px solid rgba(255, 255, 255, .94);
    border-radius: 999px;
    background: #111418;
    color: #fff;
    font: 700 9px/1 'IBM Plex Mono', monospace;
  }
  .mobile-bottom-nav__badge:empty,
  .mobile-bottom-nav__badge[data-count="0"] { display: none; }

  .mobile-search-sheet {
    position: fixed;
    z-index: 220;
    inset: 0;
    display: block;
    overflow: hidden auto;
    background: #f7f8f9;
    color: #111418;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .mobile-search-sheet.is-open { opacity: 1; visibility: visible; transform: none; }
  .mobile-search-sheet__inner { width: min(100% - 30px, 620px); margin: auto; padding: max(24px, env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom)); }
  .mobile-search-sheet__head { display: flex; min-height: 54px; align-items: center; justify-content: space-between; }
  .mobile-search-sheet__logo { width: 178px; height: auto; }
  .mobile-search-sheet__close {
    width: 45px; height: 45px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: #111418; font-size: 34px; font-weight: 300; line-height: 1; cursor: pointer;
  }
  .mobile-search-sheet__form {
    display: flex;
    height: 58px;
    margin-top: 21px;
    overflow: hidden;
    border: 1px solid #e1e4e7;
    border-radius: 999px;
    background: #eef0f2;
  }
  .mobile-search-sheet__form:focus-within { border-color: #e4941b; box-shadow: 0 0 0 3px rgba(228, 148, 27, .14); }
  .mobile-search-sheet__form input { min-width: 0; flex: 1; padding: 0 8px 0 21px; border: 0; outline: 0; background: transparent; color: #111418; font: inherit; font-size: 16px; }
  .mobile-search-sheet__form input::placeholder { color: #929aa3; }
  .mobile-search-sheet__submit { width: 58px; flex: 0 0 58px; border: 0; background: transparent; color: #111418; cursor: pointer; }
  .mobile-search-sheet__submit svg { width: 25px; height: 25px; }
  .mobile-search-sheet__suggestions { display: grid; gap: 5px; margin: 10px 4px 0; }
  .mobile-search-sheet__suggestions:empty { display: none; }
  .mobile-search-sheet__suggestion { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 52px; padding: 7px 9px; border-radius: 12px; color: #111418; }
  .mobile-search-sheet__suggestion:hover { background: #fff; }
  .mobile-search-sheet__suggestion img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; }
  .mobile-search-sheet__suggestion strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-search-sheet__suggestion span { display: block; margin-top: 3px; color: #69727d; font-size: 11px; }
  .mobile-search-sheet__shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 25px 0 20px; }
  .mobile-search-sheet__shortcut {
    position: relative; min-height: 154px; overflow: hidden; border-radius: 14px; padding: 18px;
    background: #14191e; color: #fff; isolation: isolate;
  }
  .mobile-search-sheet__shortcut::before { content: ''; position: absolute; z-index: -1; width: 145px; height: 145px; right: -45px; top: -50px; border: 24px solid rgba(228,148,27,.9); border-radius: 50%; }
  .mobile-search-sheet__shortcut:nth-child(2) { background: #e4941b; color: #211606; }
  .mobile-search-sheet__shortcut:nth-child(2)::before { border-color: rgba(255,255,255,.55); }
  .mobile-search-sheet__shortcut small { display: block; font: 600 10px/1.3 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-search-sheet__shortcut strong { position: absolute; right: 16px; bottom: 16px; left: 16px; font-size: 18px; line-height: 1.1; }
  .mobile-search-sheet__eyebrow { margin: 28px 0 8px; color: #9b5c00; font: 700 11px/1.2 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
  .mobile-search-sheet__categories { border-top: 1px solid #dfe3e7; }
  .mobile-search-sheet__categories a { display: flex; min-height: 57px; align-items: center; justify-content: space-between; border-bottom: 1px solid #dfe3e7; color: #252a30; font-size: 16px; font-weight: 650; }
  .mobile-search-sheet__categories a::after { content: '→'; color: #9b5c00; font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav,
  .mobile-search-sheet,
  .mobile-sort-sheet,
  .mobile-sort-sheet__panel,
  body.has-mobile-bottom-nav .topbar .logo,
  body.has-mobile-bottom-nav .topbar .navacts { transition: none !important; }
}
