/**
 * @author Telegram @okgeceo
 */

.ok-shop-layout {
  display: grid;
  grid-template-columns: 18.75rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  width: 100%;
}

.ok-shop-sidebar {
  /* 分类图标槽位（Fa/国旗/上传图/首字） */
  --ok-nav-icon-size: 1.625rem;
  --ok-nav-icon-size-all: 1.125rem;
  --ok-nav-chevron-size: 1.125rem;
  --ok-nav-indent-step: 0.875rem;
  --ok-nav-tree-line: color-mix(in oklch, var(--muted-foreground) 18%, transparent);
  --ok-nav-padding-base: 0.625rem;
  position: sticky;
  top: calc(var(--header-h) + var(--space-4));
  align-self: start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  height: calc(100vh - var(--header-h) - var(--space-6));
  height: calc(100dvh - var(--header-h) - var(--space-6));
  max-height: calc(100vh - var(--header-h) - var(--space-6));
  max-height: calc(100dvh - var(--header-h) - var(--space-6));
  animation: ok-slide-in-from-bottom var(--duration-enter) var(--ease-snappy) both;
  animation-delay: calc(var(--stagger-step) * 1);
}

.ok-shop-sidebar .ok-panel--sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.ok-shop-sidebar__summary {
  margin-bottom: 0;
  flex-shrink: 0;
}

.ok-shop-sidebar__summary-text {
  min-width: 0;
}

.ok-shop-sidebar__avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--foreground) 7%, transparent);
  color: var(--foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ok-shop-sidebar__avatar .ok-icon,
.ok-shop-sidebar__avatar svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.ok-shop-sidebar__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.ok-shop-sidebar__meta {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  line-height: 1.35;
}

.ok-shop-sidebar__meta .ok-value {
  font-size: 0.75rem;
}

.ok-shop-sidebar__meta-sep {
  margin: 0 0.125rem;
  color: color-mix(in oklch, var(--muted-foreground) 70%, transparent);
}

.ok-shop-sidebar__toolbar {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 38%, transparent);
}

.ok-shop-sidebar__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 2.5rem;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in oklch, var(--border) 45%, transparent);
  background: var(--background);
  color: var(--muted-foreground);
  transition: border-color var(--duration-fast) var(--ease-snappy),
              background-color var(--duration-fast) var(--ease-snappy),
              color var(--duration-fast) var(--ease-snappy);
}

.ok-shop-sidebar__search:focus-within {
  border-color: color-mix(in oklch, var(--ring) 40%, var(--border));
  background: var(--background);
  color: var(--foreground);
}

.ok-shop-sidebar__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 0.875rem;
  outline: none;
}

.ok-shop-sidebar__search-input::placeholder {
  color: color-mix(in oklch, var(--muted-foreground) 80%, transparent);
}

.ok-shop-sidebar__content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.ok-shop-sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.ok-shop-sidebar__scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-1) var(--space-2);
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ok-shop-sidebar__scroll:hover,
.ok-shop-sidebar__scroll:focus-within {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklch, var(--muted-foreground) 35%, transparent) transparent;
}

.ok-shop-sidebar__scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.ok-shop-sidebar__scroll:hover::-webkit-scrollbar,
.ok-shop-sidebar__scroll:focus-within::-webkit-scrollbar {
  width: 3px;
}

.ok-shop-sidebar__scroll::-webkit-scrollbar-thumb {
  border-radius: var(--radius-full);
  background: color-mix(in oklch, var(--muted-foreground) 35%, transparent);
  border: none;
}

.ok-shop-sidebar__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.ok-shop-sidebar__group + .ok-shop-sidebar__group {
  margin-top: var(--space-3);
  padding-top: 0;
  border-top: none;
}

.ok-shop-sidebar__group-label {
  padding: 0 0.375rem;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--muted-foreground) 62%, transparent);
}

.ok-shop-sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.ok-shop-sidebar__menu-item.is-hidden {
  display: none;
}

.ok-shop-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ok-shop-sidebar__item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.ok-shop-sidebar__thumb {
  flex-shrink: 0;
  width: var(--ok-nav-icon-size);
  height: var(--ok-nav-icon-size);
  border-radius: 0.25rem;
  overflow: hidden;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ok-shop-sidebar__thumb .ok-icon,
.ok-shop-sidebar__thumb svg {
  width: var(--ok-nav-icon-size);
  height: var(--ok-nav-icon-size);
  flex-shrink: 0;
}

.ok-shop-sidebar__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ok-shop-sidebar__thumb .ok-group-icon {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ok-shop-sidebar__thumb .ok-group-icon--class i {
  font-size: calc(var(--ok-nav-icon-size) * 0.72);
  line-height: 1;
}

.ok-shop-sidebar__thumb .ok-group-icon--class .fi {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.ok-shop-sidebar__thumb .ok-group-icon--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: calc(var(--ok-nav-icon-size) * 0.55);
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.ok-shop-sidebar__thumb:has(.ok-group-icon--letter) {
  background: color-mix(in oklch, var(--muted) 70%, transparent);
}

.ok-category-section__icon .ok-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
}

.ok-category-section__icon .ok-group-icon--class i {
  font-size: 1rem;
  line-height: 1;
}

.ok-category-section__icon .ok-group-icon--class .fi {
  width: 1.375rem;
  height: 1rem;
}

.ok-category-section__icon .ok-group-icon--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.25rem;
}

.ok-shop-sidebar__thumb--all {
  width: var(--ok-nav-icon-size-all);
  height: var(--ok-nav-icon-size-all);
  color: var(--muted-foreground);
  background: color-mix(in oklch, var(--muted) 75%, transparent);
}

.ok-shop-sidebar__thumb--all .ok-icon,
.ok-shop-sidebar__thumb--all svg {
  width: var(--ok-nav-icon-size-all);
  height: var(--ok-nav-icon-size-all);
}

.ok-shop-sidebar__thumb:has(.ok-shop-sidebar__thumb-letter) {
  background: color-mix(in oklch, var(--muted) 70%, transparent);
}

.ok-shop-sidebar__thumb-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ok-nav-icon-size);
  height: var(--ok-nav-icon-size);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  text-transform: uppercase;
}

.ok-shop-sidebar__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--ok-nav-icon-size) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4375rem var(--ok-nav-padding-base);
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-snappy),
              color var(--duration-fast) var(--ease-snappy),
              border-color var(--duration-fast) var(--ease-snappy),
              box-shadow var(--duration-fast) var(--ease-snappy),
              transform var(--duration-fast) var(--ease-snappy);
}

.ok-shop-sidebar__item[data-level="1"] {
  padding-left: calc(var(--ok-nav-padding-base) + var(--ok-nav-indent-step));
}

.ok-shop-sidebar__item-trailing {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  min-width: 0;
}

.ok-shop-sidebar__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: var(--radius-full);
  background: var(--primary);
  transform: translateY(-50%);
  transition: height var(--duration-normal) var(--ease-spring),
              opacity var(--duration-fast) var(--ease-out);
  opacity: 0;
}

.ok-shop-sidebar__item:hover {
  background: color-mix(in oklch, var(--foreground) 5%, transparent);
  color: color-mix(in oklch, var(--foreground) 92%, transparent);
}

.dark .ok-shop-sidebar__item:hover {
  background: color-mix(in oklch, var(--foreground) 8%, transparent);
}

.ok-shop-sidebar__item.is-active,
.ok-shop-sidebar__item.active {
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--foreground);
  border-color: transparent;
  font-weight: 600;
  box-shadow: none;
}

.ok-shop-sidebar__item.is-active::before,
.ok-shop-sidebar__item.active::before {
  height: 60%;
  opacity: 1;
  background: var(--primary);
}

.ok-shop-sidebar__item.is-active .ok-shop-sidebar__thumb--all,
.ok-shop-sidebar__item.active .ok-shop-sidebar__thumb--all {
  color: var(--primary);
  background: color-mix(in oklch, var(--primary) 12%, transparent);
}

.dark .ok-shop-sidebar__item.is-active,
.dark .ok-shop-sidebar__item.active {
  background: color-mix(in oklch, var(--primary) 14%, transparent);
}

.dark .ok-shop-sidebar__item:hover {
  background: color-mix(in oklch, var(--foreground) 8%, transparent);
}

.ok-shop-sidebar__item:active {
  transform: scale(0.99);
}

.ok-shop-sidebar__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ok-shop-sidebar__item.is-active .ok-badge--neutral,
.ok-shop-sidebar__item.active .ok-badge--neutral {
  background: color-mix(in oklch, var(--primary) 14%, transparent);
  color: var(--primary);
  border-color: color-mix(in oklch, var(--primary) 20%, transparent);
}

.ok-category-section.is-category-hidden {
  display: none !important;
}

.ok-shop-sidebar__empty {
  display: none;
  padding: var(--space-5) var(--space-2);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.ok-shop-sidebar__empty.is-visible {
  display: block;
}

.ok-shop-sidebar__menu-item--parent {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.ok-shop-sidebar__toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ok-nav-chevron-size);
  height: var(--ok-nav-chevron-size);
  color: var(--muted-foreground);
  pointer-events: none;
}

.ok-shop-sidebar__toggle .ok-icon,
.ok-shop-sidebar__toggle svg {
  width: var(--ok-nav-chevron-size);
  height: var(--ok-nav-chevron-size);
  transition: transform var(--duration-fast) var(--ease-out);
}

.ok-shop-sidebar__submenu {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  position: relative;
  margin: 0;
  padding: 0.125rem 0 0;
  list-style: none;
}

.ok-shop-sidebar__submenu::before {
  content: "";
  position: absolute;
  left: calc(var(--ok-nav-padding-base) + (var(--ok-nav-indent-step) / 2) - 0.5px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ok-nav-tree-line);
  pointer-events: none;
}


.ok-shop-sidebar__menu-item--parent:has(.ok-shop-sidebar__item--child.is-active) > .ok-shop-sidebar__item--parent.is-active::before {
  height: 0;
  opacity: 0;
}

.ok-shop-sidebar__menu-item--parent:has(.ok-shop-sidebar__item--child.is-active) > .ok-shop-sidebar__item--parent.is-active {
  background: color-mix(in oklch, var(--primary) 5%, transparent);
  color: color-mix(in oklch, var(--foreground) 88%, var(--primary));
  font-weight: 500;
  box-shadow: none;
}

.ok-shop-sidebar__menu-item--child {
  padding: 0;
}

/* 子项选中时：父级弱高亮（无左侧条、不加粗） */
.ok-shop-sidebar__menu-item--parent:has(.ok-shop-sidebar__item--child.is-active) > .ok-shop-sidebar__item--parent:not(.is-active) {
  background: color-mix(in oklch, var(--primary) 5%, transparent);
  color: color-mix(in oklch, var(--foreground) 88%, var(--primary));
  font-weight: 500;
}

.ok-shop-sidebar__menu-item--parent:has(.ok-shop-sidebar__item--child.is-active) > .ok-shop-sidebar__item--parent:not(.is-active)::before {
  height: 0;
  opacity: 0;
}

.ok-shop-sidebar__menu-item--parent:has(.ok-shop-sidebar__item--child.is-active) > .ok-shop-sidebar__item--parent:not(.is-active) .ok-badge--neutral {
  background: color-mix(in oklch, var(--muted) 55%, transparent);
  color: var(--muted-foreground);
  border-color: transparent;
}

.ok-shop-sidebar__menu-item--parent.is-hidden,
.ok-shop-sidebar__menu-item--child.is-hidden {
  display: none;
}

.ok-shop-main {
  min-width: 0;
  width: 100%;
  padding-left: 0;
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
  isolation: isolate;
}

.ok-shop-category-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  min-height: 3rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--foreground);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-snappy),
              border-color var(--duration-fast) var(--ease-snappy),
              color var(--duration-fast) var(--ease-snappy);
}

.ok-shop-category-toggle:hover {
  background: color-mix(in oklch, var(--muted) 40%, transparent);
}

.ok-shop-category-backdrop {
  display: none;
}

.ok-shop-main__head {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 42%, transparent);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
  animation: ok-slide-in-from-bottom var(--duration-slow) var(--ease-snappy) both;
  animation-delay: calc(var(--stagger-step) * 2);
}

.ok-shop-main__head-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.ok-shop-main__head-copy {
  min-width: 0;
  flex: 1;
  transition: opacity var(--duration-fast) var(--ease-snappy);
}

.ok-shop-main__head-copy.is-head-crossfade {
  opacity: 0.32;
}

.ok-shop-main__title {
  margin: 0 0 0.125rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--foreground);
}

.ok-shop-main__subtitle {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.ok-home-products {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: opacity var(--duration-fast) var(--ease-snappy);
}

.ok-home-products.is-filter-loading {
  opacity: 0.55;
  pointer-events: none;
}

.ok-category-section {
  position: relative;
  margin-bottom: 0;
  padding-bottom: var(--space-4);
  content-visibility: auto;
  contain-intrinsic-size: auto 14rem;
}

.ok-category-section:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.6875rem;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in oklch, var(--border) 72%, transparent) 0%,
    color-mix(in oklch, var(--border) 28%, transparent) 42%,
    transparent 100%
  );
  pointer-events: none;
}

.ok-category-section.is-entering {
  animation: ok-section-in var(--duration-slow) var(--ease-snappy) both;
}

@keyframes ok-section-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ok-category-section.is-filter-hidden {
  display: none;
}

.ok-category-section__head {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding: 0.5rem 0.625rem 0.5625rem 1.375rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: color-mix(in oklch, var(--muted) 22%, transparent);
}

.dark .ok-category-section__head {
  background: color-mix(in oklch, var(--muted) 34%, transparent);
}

/* 左侧短段斜纹，右侧为纯色底 */
.ok-category-section__head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4.75rem;
  z-index: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background-color: color-mix(in oklch, var(--muted) 42%, transparent);
  background-image: repeating-linear-gradient(
    -52deg,
    transparent 0,
    transparent 5px,
    color-mix(in oklch, var(--foreground) 7%, transparent) 5px,
    color-mix(in oklch, var(--foreground) 7%, transparent) 10px
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 58%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 58%,
    transparent 100%
  );
  pointer-events: none;
}

.ok-category-section__head::after {
  content: "";
  position: absolute;
  left: 1.375rem;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in oklch, var(--foreground) 14%, transparent) 0%,
    color-mix(in oklch, var(--border) 45%, transparent) 28%,
    transparent 88%
  );
  pointer-events: none;
}

.ok-category-section__head > * {
  position: relative;
  z-index: 2;
}

.ok-category-section__mark {
  position: absolute;
  left: 0.4375rem;
  top: 50%;
  z-index: 3;
  width: 0.1875rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  background: linear-gradient(
    180deg,
    var(--foreground) 0%,
    color-mix(in oklch, var(--foreground) 38%, transparent) 100%
  );
  opacity: 0.88;
  transform: translateY(-50%);
}

.ok-category-section__lead {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5625rem;
}

.ok-category-section__icon {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ok-category-section__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ok-category-section__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ok-category-section__head .ok-badge--count {
  flex-shrink: 0;
}

.ok-category-section__content {
  position: relative;
  margin-left: 0.6875rem;
  padding-left: 0.6875rem;
  border-left: 1px solid color-mix(in oklch, var(--border) 32%, transparent);
}

.ok-product-list {
  display: flex;
  flex-direction: column;
}

.ok-product-list .ok-product-row {
  animation: ok-row-in var(--duration-normal) var(--ease-snappy) both;
}

/* 首屏/切换分类：前几行 stagger，其余同一延迟，避免长列表「波浪」拖太久 */
.ok-product-list .ok-product-row:nth-child(1) { animation-delay: 0ms; }
.ok-product-list .ok-product-row:nth-child(2) { animation-delay: 32ms; }
.ok-product-list .ok-product-row:nth-child(3) { animation-delay: 64ms; }
.ok-product-list .ok-product-row:nth-child(4) { animation-delay: 96ms; }
.ok-product-list .ok-product-row:nth-child(5) { animation-delay: 128ms; }
.ok-product-list .ok-product-row:nth-child(n+6) { animation-delay: 128ms; }

/* 无限滚动追加的行：轻量淡入，不重复长 stagger */
.ok-product-list .ok-product-row.is-appended {
  animation: ok-fade-in var(--duration-fast) var(--ease-out) both;
  animation-delay: 0ms;
}

/* 商品行样式见 commerce.css */

.ok-home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  border: 1px dashed var(--border);
  border-radius: var(--radius-2xl);
  background: color-mix(in oklch, var(--muted) 25%, transparent);
}

.ok-home-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--muted);
  color: var(--muted-foreground);
}

.ok-home-empty__title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.ok-home-empty__desc {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  max-width: 26rem;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .ok-shop-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ok-shop-main {
    padding-left: 0;
  }

  .ok-shop-category-toggle {
    display: inline-flex;
  }

  .ok-shop-category-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: color-mix(in oklch, var(--foreground) 28%, transparent);
  }

  .ok-shop-category-backdrop:not([hidden]) {
    display: block;
  }

  .ok-shop-sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    z-index: 85;
    align-self: auto;
    display: flex;
    flex-direction: column;
    width: min(20rem, 88vw);
    height: auto;
    max-height: none;
    padding: var(--space-3);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
    background: var(--background);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform var(--duration-normal) var(--ease-out);
    animation: none;
    overflow: hidden;
  }

  body.ok-shop-category-open .ok-shop-sidebar {
    transform: translateX(0);
  }

  .ok-shop-sidebar .ok-panel--sidebar {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
  }

  .ok-shop-sidebar__summary,
  .ok-shop-sidebar__toolbar {
    flex-shrink: 0;
  }

  .ok-shop-sidebar__content,
  .ok-panel--sidebar .ok-panel__body.ok-shop-sidebar__content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
  }

  .ok-shop-sidebar__nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .ok-shop-sidebar__scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: var(--space-1) var(--space-2);
    padding-bottom: var(--space-3);
  }

  .ok-shop-sidebar__empty {
    flex-shrink: 0;
  }

  .ok-shop-sidebar__group {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.125rem;
  }

  .ok-shop-sidebar__group + .ok-shop-sidebar__group {
    margin-top: var(--space-4);
    padding-left: 0;
    border-left: none;
  }

  .ok-shop-sidebar__group-label {
    display: block;
  }

  .ok-shop-sidebar__menu {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.125rem;
  }

  .ok-shop-sidebar__item {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .ok-shop-sidebar__menu-item.is-hidden {
    display: none;
  }

  .ok-shop-sidebar__summary {
    margin-bottom: var(--space-3);
  }
}

@media (max-width: 767px) {
  .ok-shop-main__head {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
  }

  .ok-home-products {
    gap: var(--space-4);
  }

  .ok-category-section {
    padding-bottom: var(--space-3);
  }

  .ok-category-section__head {
    padding-left: 1.25rem;
  }

  .ok-category-section__content {
    margin-left: 0.5625rem;
    padding-left: 0.5625rem;
  }

  .ok-product-row {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.375rem;
    padding: 0.4375rem 0 0.4375rem 0.0625rem;
  }

  .ok-product-row__thumb {
    width: 2rem;
    height: 2rem;
  }

  .ok-product-row__aside {
    grid-column: auto;
    gap: 0.375rem;
    width: auto;
    min-width: 0;
    padding-left: 0;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
  }

  .ok-product-row__aside > * {
    flex-shrink: 0;
  }
}

@media (max-width: 359px) {
  .ok-product-row {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    gap: 0.25rem;
  }

  .ok-product-row__thumb {
    width: 1.75rem;
    height: 1.75rem;
  }

  .ok-product-row__sold-pill .ok-icon {
    display: none;
  }
}

.ok-home-foot {
  margin-top: var(--space-6);
  padding: var(--space-2) 0 var(--space-4);
}

.ok-home-foot[hidden] {
  display: none !important;
}

.ok-home-foot__sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.ok-home-foot__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  margin: var(--space-3) 0 0;
  min-height: 1.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  color: color-mix(in oklch, var(--muted-foreground) 88%, transparent);
}

.ok-home-foot__spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duration-fast) var(--ease-snappy),
              transform var(--duration-fast) var(--ease-snappy);
}

.ok-home-foot__spinner-ring {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid color-mix(in oklch, var(--muted-foreground) 24%, transparent);
  border-top-color: color-mix(in oklch, var(--muted-foreground) 72%, transparent);
  border-radius: 999px;
  box-sizing: border-box;
}

.ok-home-foot--loading.is-loading .ok-home-foot__spinner {
  opacity: 1;
  transform: scale(1);
}

.ok-home-foot--loading.is-loading .ok-home-foot__spinner-ring {
  animation: ok-home-foot-spin 0.7s linear infinite;
}

.ok-home-foot--loading.is-idle .ok-home-foot__spinner {
  display: none;
}

@keyframes ok-home-foot-spin {
  to { transform: rotate(360deg); }
}

.ok-home-foot__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 22rem;
  margin: var(--space-2) auto 0;
}

.ok-home-foot__line {
  flex: 1 1 0;
  height: 1px;
  background: color-mix(in oklch, var(--border) 62%, transparent);
}

.ok-home-foot__label {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: color-mix(in oklch, var(--muted-foreground) 88%, transparent);
  white-space: nowrap;
}

.ok-home-foot__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 18rem;
  margin: var(--space-2) auto 0;
  padding: var(--space-4) 0;
  color: var(--muted-foreground);
  text-align: center;
}

.ok-home-foot__empty-text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}

@media (max-width: 767px) {
  .ok-home-foot {
    margin-top: var(--space-5);
  }

  .ok-home-foot__divider {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ok-shop-sidebar,
  .ok-shop-main__head,
  .ok-category-section.is-entering,
  .ok-product-list .ok-product-row,
  .ok-product-list .ok-product-row.is-appended,
  .ok-home-products {
    animation: none !important;
    transition: none !important;
  }

  .ok-shop-sidebar__toggle .ok-icon,
  .ok-shop-sidebar__toggle svg {
    transition: none !important;
  }

  .ok-home-foot--loading.is-loading .ok-home-foot__spinner-ring {
    animation: none;
  }
}
/* 服务端可抓取分页；JS 仍可在当前页继续无限滚动。 */
.ok-catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 8px;
}

.ok-catalog-pagination__link,
.ok-catalog-pagination__status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--ok-border, #e5e7eb);
  border-radius: 10px;
  background: var(--ok-surface, #fff);
  color: var(--ok-foreground, #111827);
  font-size: 13px;
  text-decoration: none;
}

.ok-catalog-pagination__link:hover {
  border-color: var(--ok-primary, #2563eb);
  color: var(--ok-primary, #2563eb);
}

.ok-catalog-pagination__status {
  color: var(--ok-muted-foreground, #6b7280);
}
