/* Mobile catalog — homelino-style split sheet above bottom nav */
@media (max-width: 991.98px) {
  .mobile-bottom-nav {
    z-index: 1065;
  }

  .catalog-offcanvas--sheet.offcanvas-bottom {
    --catalog-sheet-height: calc(
      100dvh - var(--mobile-nav-height, 3.55rem) - env(safe-area-inset-bottom, 0px)
    );
    top: auto;
    bottom: calc(var(--mobile-nav-height, 3.55rem) + env(safe-area-inset-bottom, 0px));
    height: var(--catalog-sheet-height);
    max-height: var(--catalog-sheet-height);
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
    z-index: 1055;
  }

  .offcanvas-backdrop {
    z-index: 1050;
  }

  .catalog-offcanvas--sheet .offcanvas-header {
    flex-shrink: 0;
    padding: .2rem 1rem .45rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
  }

  .catalog-offcanvas--sheet .offcanvas-title {
    font-size: .95rem;
  }

  .catalog-sheet-grabber {
    flex-shrink: 0;
    width: 2.75rem;
    height: .24rem;
    margin: .35rem auto .05rem;
    border-radius: 999px;
    background: #d1d5db;
    touch-action: none;
  }

  .catalog-offcanvas--sheet .offcanvas-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
  }

  .catalog-offcanvas-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .catalog-offcanvas--sheet .catalog-search {
    flex-shrink: 0;
    padding: .55rem .85rem;
  }

  .catalog-offcanvas--sheet .catalog-search .form-control {
    padding: .38rem .6rem;
    font-size: .88rem;
    min-height: 0;
  }

  .catalog-offcanvas--sheet .catalog-search-btn {
    padding: .38rem .7rem;
  }

  .catalog-offcanvas--sheet .catalog-menu-footer {
    flex-shrink: 0;
  }

  .catalog-nav--split {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .catalog-split-layout {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    border-top: 1px solid #ececef;
  }

  .catalog-main-rail {
    flex: 0 0 5.6rem;
    width: 5.6rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f5f5f4;
    border-left: 1px solid #ececef;
  }

  .catalog-main-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    width: 100%;
    min-height: 4.35rem;
    padding: .45rem .25rem;
    border: 0;
    border-right: 3px solid transparent;
    background: transparent;
    color: #57534e;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
  }

  .catalog-main-chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.2rem;
    line-height: 1;
    color: #1c1917;
  }

  .catalog-main-chip-label {
    font-size: .58rem;
    line-height: 1.3;
    font-weight: 600;
    max-width: 100%;
    word-break: break-word;
  }

  .catalog-main-chip.is-active {
    background: #fff;
    color: #1c1917;
    border-right-color: #ef4056;
  }

  .catalog-main-chip.is-active .catalog-main-chip-icon {
    color: #1c1917;
  }

  .catalog-main-chip--link:hover,
  .catalog-main-chip:hover {
    background: #ececec;
  }

  .catalog-sub-panels {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #fff;
  }

  .catalog-sub-panel {
    display: none;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .catalog-sub-panel.is-active {
    display: block;
  }

  .catalog-offcanvas--sheet .catalog-sub-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: .55rem .8rem;
    border-bottom: 1px solid #f5f5f4;
    text-decoration: none !important;
    color: #1c1917 !important;
    text-align: right;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile:hover {
    background: #fafaf9;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile > .catalog-sub-tile-icon,
  .catalog-offcanvas--sheet .catalog-sub-tile--toggle > .catalog-sub-tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
    flex-shrink: 0;
    color: #1c1917 !important;
    background: #fff;
    border: 1px solid #e7e5e4;
    box-shadow: none;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile-label {
    flex: 1;
    font-size: .8rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1c1917;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile-chevron {
    font-size: .65rem;
    color: #a8a29e;
    flex-shrink: 0;
    transition: transform .2s ease;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile--toggle {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile--toggle[aria-expanded="true"] .catalog-sub-tile-chevron {
    transform: rotate(-90deg);
  }

  .catalog-offcanvas--sheet .catalog-sub-nested {
    background: #fafaf9;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem .4rem;
    padding: .65rem .7rem .75rem;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    min-width: 0;
    text-decoration: none !important;
    color: #3f3f46 !important;
    text-align: center;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
    background: #f0f0f1;
    border: 1px solid #ececef;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
    transition: transform .16s ease, box-shadow .16s ease;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-tile:hover .catalog-sub-tile-icon {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .1);
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-label {
    font-size: .64rem;
    line-height: 1.35;
    font-weight: 600;
    max-width: 100%;
    word-break: break-word;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-tile--all .catalog-sub-nested-label {
    color: #008eb2;
  }

  .catalog-offcanvas--sheet .catalog-sub-tile--all .catalog-sub-tile-label {
    color: #1c1917;
  }

  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-all { color: #008eb2; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-1 { color: #ef4056; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-2 { color: #f57c00; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-3 { color: #f9a825; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-4 { color: #43a047; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-5 { color: #00acc1; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-6 { color: #5c6bc0; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-7 { color: #8e24aa; }
  .catalog-offcanvas--sheet .catalog-sub-nested-tile .catalog-sub-tile-icon--tone-8 { color: #ec407a; }

  .catalog-offcanvas--sheet .catalog-menu-footer {
    margin-top: .15rem;
    border-top: 1px solid var(--border);
  }

  .catalog-offcanvas--sheet .catalog-footer-item {
    padding: .5rem 1rem;
    font-size: .86rem;
  }

  .catalog-offcanvas--sheet.is-dragging {
    transition: none !important;
  }

  body.catalog-menu-open {
    overflow: hidden;
  }

  .offcanvas-backdrop.show {
    opacity: .5;
  }
}
