.product-shelf {
  --ps-ink: #30243d;
  --ps-accent: #6835a5;
  --ps-border: #ded7e5;
  color: var(--ps-ink);
  min-width: 0;
}
.product-shelf :is(button, select, input, textarea) {
  font: inherit;
  box-sizing: border-box;
}
.product-shelf button,
.product-shelf select,
.product-shelf input,
.product-shelf textarea {
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  background: white;
  color: var(--ps-ink);
  padding: 0.55rem 0.8rem;
}
.product-shelf button {
  font-weight: 600;
  cursor: pointer;
}
.product-shelf button:hover {
  border-color: var(--ps-accent);
}
.product-shelf button.ps-primary {
  color: white;
  background: var(--ps-accent);
  border-color: var(--ps-accent);
}
.ps-filter,
.ps-body {
  background: #fff;
  border: 1px solid var(--ps-border);
  border-radius: 14px;
  padding: clamp(14px, 2vw, 24px);
  margin-bottom: 12px;
}
.ps-filter,
.ps-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
  gap: 12px;
}
.product-shelf label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 0.9rem;
}
.product-shelf :is(textarea, input, select) {
  width: 100%;
  min-width: 0;
}
.ps-fields textarea {
  min-height: 5rem;
}
.ps-head,
.ps-row,
.ps-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ps-body h2,
.ps-body h3,
.ps-body h4,
.ps-body p,
.ps-dialog h2,
.ps-dialog p {
  margin: 0 0 0.48rem;
}
.ps-body h4 {
  font-size: 1.12rem;
}
.ps-row,
.ps-post,
.ps-result {
  border-top: 1px solid var(--ps-border);
  padding: 1rem 0;
}
.ps-head {
  margin-bottom: 0.75rem;
}
.product-shelf .ps-title,
.product-shelf .ps-back {
  padding: 0;
  color: var(--ps-accent);
  border: 0;
  background: none;
  text-align: left;
}
.product-shelf .ps-title {
  font-size: 1.13rem;
}
.ps-back {
  margin-bottom: 1rem;
}
.ps-meta {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}
.ps-badge {
  font-size: 0.85rem;
  border-radius: 20px;
  padding: 0.24rem 0.65rem;
  background: #f4eff9;
  color: #543071;
}
.ps-empty {
  border: 1px dashed var(--ps-border);
  padding: 1.65rem;
  border-radius: 10px;
  background: #fbf9fd;
}
.ps-empty p,
.ps-sub,
.ps-body small {
  color: #61596a;
}
.ps-facts {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) minmax(0, 2fr);
  gap: 6px 12px;
  font-size: 0.95rem;
  margin: 12px 0 24px;
}
.ps-facts dt {
  color: #685f71;
}
.ps-facts dd {
  margin: 0;
}
.ps-body,
.ps-dialog {
  overflow-wrap: anywhere;
}
.ps-post details {
  margin: 10px 0;
}
.ps-post summary {
  cursor: pointer;
}
.ps-actions {
  justify-content: flex-start;
}
.ps-result {
  display: grid;
  gap: 0.25rem;
  margin: 12px 0;
}
.ps-result button {
  justify-self: start;
}
.ps-result p {
  margin: 0;
}
.ps-dialog {
  color: var(--ps-ink);
  background: white;
  border: 1px solid var(--ps-border);
  border-radius: 14px;
  width: min(640px, 95vw);
  max-height: 88dvh;
  padding: clamp(16px, 3vw, 26px);
  margin: auto;
  box-sizing: border-box;
}
.ps-dialog::backdrop {
  background: #20182a70;
}
.ps-dialog .ps-fields {
  margin: 16px 0;
}
.ps-dialog .ps-actions {
  justify-content: flex-end;
}
.ps-dialog[open] {
  display: block;
}
.ps-dialog .ps-error,
.ps-error {
  color: #8f294b;
}
.ps-message:empty,
.ps-error:empty {
  display: none;
}
.ps-filter[hidden] {
  display: none;
}
@media (max-width: 570px) {
  .ps-filter,
  .ps-fields {
    grid-template-columns: 1fr;
  }
  .ps-facts {
    grid-template-columns: 1fr;
  }
  .ps-facts dd {
    margin-bottom: 0.55rem;
  }
  .ps-meta {
    justify-items: start;
  }
  .ps-body small {
    font-size: 0.85rem;
  }
}
