.page-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 0 48px;
}

.announce-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
}

.announce-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 111, 169, 0.18), rgba(125, 160, 255, 0.14));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mypro-primary);
  font-size: 18px;
}

.announce-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.announce-text {
  color: var(--mypro-muted);
  line-height: 1.5;
}

.muted-text {
  color: var(--mypro-muted);
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.category-card {
  padding: 14px;
}

.category-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.category-list::-webkit-scrollbar {
  width: 6px;
}

.category-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

.category-list::-webkit-scrollbar-track {
  background: transparent;
}

.category-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--mypro-text);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.category-item.is-primary {
  background: linear-gradient(120deg, rgba(255, 111, 169, 0.15), rgba(125, 160, 255, 0.12));
  border-color: rgba(255, 111, 169, 0.35);
  box-shadow: 0 10px 26px rgba(255, 111, 169, 0.2);
}

.category-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #f2f4ff;
  background-size: cover;
  background-position: center;
  display: inline-block;
}

.category-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-name {
  font-weight: 800;
  font-size: 15px;
}

.category-meta {
  color: var(--mypro-muted);
  font-size: 12px;
}

.category-badge {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  padding: 6px 10px;
  color: var(--mypro-primary);
  font-weight: 700;
  border: 1px solid rgba(255, 111, 169, 0.2);
}

.product-card {
  padding: 16px;
}

.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-title {
  font-weight: 800;
  font-size: 18px;
}

.product-sub {
  color: var(--mypro-muted);
  font-size: 12px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f7f7fb;
  border-radius: 14px;
  padding: 4px 6px 4px 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  padding: 8px 6px;
  width: 200px;
  font-weight: 600;
  color: var(--mypro-text);
}

.search-input::placeholder {
  color: #b6bbca;
}

.search-btn {
  background: linear-gradient(115deg, var(--mypro-primary), var(--mypro-primary-deep));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(255, 111, 169, 0.18);
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8f8ff;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.view-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--mypro-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn.active {
  background: #fff;
  color: var(--mypro-primary);
  box-shadow: 0 8px 16px rgba(255, 111, 169, 0.15);
}

.view-btn.view-list {
  margin-right: auto;
}

.card-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 6px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  margin-left: 4px;
}

.card-mode-group.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.mode-btn {
  border: none;
  padding: 6px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--mypro-muted);
  cursor: pointer;
  font-weight: 700;
}

.mode-btn.active {
  background: #fff;
  color: var(--mypro-primary);
  box-shadow: 0 8px 16px rgba(255, 111, 169, 0.15);
}

.item-list {
  margin-top: 16px;
  width: 100%;
}

.item-list[data-view="list"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-list[data-view="card"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: var(--mypro-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.list-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.list-row.sold-out .buy-btn {
  background: #f0f1f5;
  color: var(--mypro-muted);
  box-shadow: none;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: #f6f7ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.info .title {
  font-weight: 800;
  margin-bottom: 6px;
}

.info .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--mypro-muted);
  font-size: 12px;
}

.info .badge {
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.row-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-wrap {
  text-align: right;
  min-width: 90px;
}

.price {
  font-size: 18px;
  font-weight: 800;
  color: var(--mypro-primary);
}

.price .unit {
  font-size: 12px;
  margin-right: 2px;
}

.card-item {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: var(--mypro-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.card-cover {
  position: relative;
  background-color: #f6f7ff;
  overflow: hidden;
}

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

.card-cover-lg {
  aspect-ratio: 4 / 3;
  min-height: 170px;
}

.card-cover-sm {
  aspect-ratio: 16 / 11;
  min-height: 130px;
}

.card-cover .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 13px;
  padding: 6px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 800;
}

/* 售罄状态的卡片封面添加遮罩 */
.card-item.sold-out .card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 1;
}

/* 售罄标签样式增强 */
.card-cover .stock-danger {
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4);
}

/* 紧张标签样式增强 */
.card-cover .stock-warn {
  background: linear-gradient(135deg, #ffa502, #ffb733);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(255, 165, 2, 0.4);
}

/* 充足标签样式增强 */
.card-cover .stock-safe {
  background: linear-gradient(135deg, #26de81, #20bf6b);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(38, 222, 129, 0.4);
}

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-weight: 800;
  line-height: 1.2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--mypro-muted);
  font-size: 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--mypro-primary);
}

.card-item .ghost-btn {
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 111, 169, 0.12);
  color: var(--mypro-primary);
  font-weight: 700;
}

.item-message,
.item-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--mypro-muted);
}

@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 10px 0;
  }

  .category-title {
    margin: 0 14px 10px;
  }

  .category-list {
    max-height: min(320px, 60vh);
    padding: 0 14px 10px;
    margin-bottom: 6px;
  }

  .nav-inner {
    padding: 10px 0;
  }

  .search-input {
    width: 160px;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 18px 0 36px;
  }

  .content-grid {
    gap: 12px;
  }

  .product-toolbar {
    align-items: flex-start;
    gap: 10px;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .search-box {
    flex: 1;
    width: 100%;
  }

  .view-toggle {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .view-btn.view-list {
    margin-right: auto;
  }

  .item-list[data-view="card"] {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .list-row {
    grid-template-columns: 1fr;
  }

  .row-right {
    width: 100%;
    justify-content: space-between;
  }

  .price-wrap {
    text-align: left;
  }

  .search-input {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .card-cover-lg {
    min-height: 150px;
  }

  .card-cover-sm {
    min-height: 120px;
  }

  .item-list[data-view="card"] {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@supports not (aspect-ratio: 1) {
  .card-cover-lg {
    height: 170px;
  }

  .card-cover-sm {
    height: 130px;
  }
}
