/* Product-led category navigation for every Bellstore surface. */
.bellstore-category-visual {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cat-theme-from, #64748b) 9%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.86));
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.bellstore-category-visual img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
  object-position: center;
}

.bellstore-category-visual--all::before,
.bellstore-category-visual--fallback::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2.5px;
  background: var(--cat-theme-from, #64748b);
  box-shadow:
    10px 0 0 color-mix(in srgb, var(--cat-theme-to, #94a3b8) 82%, white),
    0 10px 0 color-mix(in srgb, var(--cat-theme-to, #94a3b8) 82%, white),
    10px 10px 0 var(--cat-theme-from, #64748b);
  transform: translate(-5px, -5px);
}

.category-pill.bellstore-category-has-visual {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
}

.category-pill .bellstore-category-visual {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
}

.category-pill.active .bellstore-category-visual,
.category-sidebar-item.active .bellstore-category-visual,
.catalog-ios-sheet__item.active .bellstore-category-visual {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 5px 14px rgba(15, 23, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.category-sidebar-item.bellstore-category-has-visual,
.category-sidebar-flyout__item.bellstore-category-has-visual {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.category-sidebar-item .category-sidebar-item__label {
  min-width: 0;
  flex: 1;
}

.page-catalog .category-sidebar-item.bellstore-category-has-visual {
  column-gap: 14px !important;
}

.page-catalog .category-sidebar-item > .bellstore-category-visual {
  margin: 0 2px 0 0;
}

.page-catalog .category-sidebar-item > .category-sidebar-item__label {
  position: relative;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  color: inherit;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.category-sidebar-item .category-sidebar-item__chevron {
  margin-left: auto;
}

.category-sidebar-flyout__item .bellstore-category-visual {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
}

.page-catalog .catalog-category-hero__content {
  position: relative;
  z-index: 2;
}

.bellstore-category-hero-nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 2px 2px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.bellstore-category-hero-nav::-webkit-scrollbar {
  display: none;
}

.bellstore-category-hero-nav__item {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.bellstore-category-hero-nav__item .bellstore-category-visual {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.13);
}

.bellstore-category-hero-nav__item.active {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.94);
  color: var(--cat-theme-from, #1428a0);
  box-shadow:
    0 8px 22px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 #fff;
}

.bellstore-category-hero-nav__item:active {
  transform: scale(0.98);
}

.bellstore-category-hero-nav__item:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.56);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  html.is-desktop-layout .page-catalog {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  html.is-desktop-layout .page-catalog .catalog-sidebar {
    z-index: 300;
  }

  html.is-desktop-layout .page-catalog .category-sidebar-item-wrap--open {
    z-index: 310;
  }

  html.is-desktop-layout .page-catalog .category-sidebar-item {
    min-height: 56px;
    padding: 7px 11px;
    font-size: 13px;
  }

  html.is-desktop-layout .page-catalog .category-sidebar-item > .bellstore-category-visual {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  html.is-desktop-layout .page-catalog .category-sidebar-flyout {
    z-index: 1000;
    min-width: 290px;
    padding: 9px;
    overflow: hidden;
    isolation: isolate;
    border-color: rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow:
      0 22px 55px rgba(15, 23, 42, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  html.is-desktop-layout .page-catalog .category-sidebar-flyout__item {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 52px;
    padding: 6px 9px;
    overflow: hidden;
    background: #fff;
    font-size: 14px;
    line-height: 1.25;
  }

  html.is-desktop-layout .page-catalog .category-sidebar-flyout__item:hover {
    background: color-mix(in srgb, var(--cat-theme-tint, #eff6ff) 68%, white);
  }

  html.is-desktop-layout .page-catalog .category-sidebar-flyout__item.active {
    background: color-mix(in srgb, var(--cat-theme-tint, #eff6ff) 76%, white);
  }

  html.is-desktop-layout .page-catalog .category-sidebar-flyout .product-card-colors {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .page-catalog .catalog-category-switcher__button.bellstore-category-has-visual::before {
    display: none;
  }

  .page-catalog .catalog-category-switcher__button .bellstore-category-visual {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .catalog-ios-sheet__item.bellstore-category-has-visual {
    min-height: 86px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    justify-content: initial;
    column-gap: 11px;
    row-gap: 3px;
    padding: 10px;
  }

  .catalog-ios-sheet__item.bellstore-category-has-visual::before {
    display: none;
  }

  .catalog-ios-sheet__item .bellstore-category-visual {
    width: 48px;
    height: 48px;
    grid-row: 1 / 3;
    border-radius: 14px;
  }

  .catalog-ios-sheet__item.bellstore-category-has-visual strong,
  .catalog-ios-sheet__item.bellstore-category-has-visual > span:not(.bellstore-category-visual) {
    min-width: 0;
    align-self: end;
  }

  .catalog-ios-sheet__item.bellstore-category-has-visual > span:not(.bellstore-category-visual) {
    align-self: start;
  }
}

@media (max-width: 420px) {
  .catalog-ios-sheet__grid {
    grid-template-columns: 1fr;
  }

  .catalog-ios-sheet__item.bellstore-category-has-visual {
    min-height: 72px;
  }

  .home-categories .category-pill .bellstore-category-visual {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .page-catalog .catalog-category-hero__content {
    padding: 18px 16px;
  }

  .bellstore-category-hero-nav {
    width: calc(100% + 16px);
    margin-top: 13px;
    padding-right: 16px;
  }

  .bellstore-category-hero-nav__item {
    min-height: 42px;
    padding-right: 11px;
    font-size: 11px;
  }

  .bellstore-category-hero-nav__item .bellstore-category-visual {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bellstore-category-visual img {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @media (hover: hover) and (pointer: fine) {
    .category-pill:hover .bellstore-category-visual img,
    .category-sidebar-item:hover .bellstore-category-visual img,
    .catalog-ios-sheet__item:hover .bellstore-category-visual img {
      transform: scale(1.06);
    }
  }
}
