.public-drawers-main {
  padding: 28px 0 40px;
}

.public-drawers-hero h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
}

.public-drawers-hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}

.public-drawers-hero-title-row h1 {
  flex: 1;
  min-width: 0;
}

.public-drawers-hero > p {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}

.public-drawers-hero .public-drawer-ip-filter {
  flex: 0 0 auto;
  margin: 0;
}

.public-drawers-hero .ip-role-trigger {
  min-width: 0;
  max-width: 42vw;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-drawers-status.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.public-drawer-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* 寄售抽屉 IP 弹窗：与首页共用 style.css 的 .ip-role-*，仅提高层级 */
.drawer-ip-role-modal.ip-role-modal {
  z-index: 1500;
}

@media (max-width: 768px) {
  .public-drawers-main {
    padding: 18px 0 28px;
  }

  .public-drawers-hero h1 {
    font-size: 22px;
  }

  .public-drawers-hero > p {
    font-size: 13px;
  }

  .public-drawer-cell {
    min-width: 64px;
    min-height: 0;
    border-radius: 8px;
    padding: 6px 8px;
  }
}

.public-drawer-grid {
  display: grid;
  gap: 8px;
  width: max-content;
  min-width: 100%;
}

.public-drawer-axis-corner,
.public-drawer-axis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.public-drawer-cell {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 10px;
  min-width: 72px;
  min-height: 0;
  height: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.public-drawer-cell:hover,
.public-drawer-cell:focus-visible {
  border-color: #111827;
  outline: none;
}

.public-drawer-cell.is-merged {
  background: #f0fdf4;
  border-color: #86efac;
}

.public-drawer-cell.is-merged.has-products {
  background: #ecfdf5;
}

.public-drawer-cell.is-frozen {
  opacity: 0.55;
}

.public-drawer-cell.is-selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
}

.public-drawer-grid.is-ip-filtering .public-drawer-cell.is-ip-dimmed {
  opacity: 0.38;
  filter: grayscale(0.55);
  background: #f3f4f6;
  border-color: #e5e7eb;
  box-shadow: none;
}

.public-drawer-grid.is-ip-filtering .public-drawer-cell.is-ip-matched {
  opacity: 1;
  filter: none;
  background: #ffffff;
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12);
}

.public-drawer-grid.is-ip-filtering .public-drawer-cell.is-ip-matched.has-products {
  background: #f8fafc;
}

.public-drawer-grid.is-ip-filtering .public-drawer-cell.is-ip-matched.is-selected {
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.22);
}

.public-drawer-cell-code {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  flex: 0 0 auto;
  white-space: nowrap;
}

.public-drawer-cell-meta {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-drawers-empty {
  margin-top: 24px;
  padding: 28px 16px;
  text-align: center;
  color: #6b7280;
  background: #ffffff;
  border-radius: 14px;
  border: 1px dashed #e5e7eb;
}

.public-drawer-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.public-drawer-sheet.hidden {
  display: none;
}

.public-drawer-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.public-drawer-sheet-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 720px);
  overflow: auto;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
}

.public-drawer-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.public-drawer-sheet-head h2 {
  margin: 0;
  font-size: 20px;
}

.public-drawer-sheet-meta {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.public-drawer-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-drawer-product-card.product-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
}

.public-drawer-product-card .product-body {
  padding: 10px 10px 12px;
}

.public-drawer-product-card .product-price {
  font-size: 16px;
}

.public-drawer-product-card .product-title {
  font-size: 13px;
}

@media (min-width: 900px) {
  .public-drawer-sheet {
    align-items: center;
    padding: 24px;
  }

  .public-drawer-sheet-panel {
    border-radius: 18px;
    max-height: min(80vh, 800px);
    padding: 20px;
  }

  .public-drawer-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

