/* Category list + create/edit */

.cat-page .pc-catalog-table {
  min-width: 860px;
}

@media (max-width: 1024px) {
  .cat-page .pc-catalog-table {
    min-width: 0;
  }
}

.cat-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.cat-sort-btn i {
  font-size: 0.7rem;
  opacity: 0.65;
}

.cat-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.cat-status.is-on {
  color: #1b7a4a;
}

.cat-status.is-off {
  color: #c0392b;
}

.cat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--pos-border, #eadde4);
  font-size: 0.82rem;
  color: var(--pos-muted, #6b5b63);
}

.cat-pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cat-pager-pages button,
.cat-pager-pages span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pos-maroon, #6b1535);
  font-weight: 700;
  cursor: pointer;
}

.cat-pager-pages button:disabled {
  opacity: 0.35;
  cursor: default;
}

.cat-pager-pages button.is-current {
  background: var(--pos-maroon, #6b1535);
  color: #fff;
}

.cat-form-page .cat-form {
  width: 100%;
  max-width: none;
}

.cat-details-card {
  padding: 22px 24px 18px;
}

.cat-details-head {
  margin-bottom: 18px;
}

.cat-details-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pos-text, #1f2937);
}

.cat-details-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--pos-muted, #6b7280);
}

.cat-details-card .cat-fields-grid,
.cat-details-card > .pf-field {
  padding: 0;
  margin-bottom: 18px;
}

.cat-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 800px) {
  .cat-fields-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.cat-fields-grid > .pf-field {
  min-width: 0;
  margin: 0;
}

.cat-slug-field {
  width: 100%;
  min-width: 0;
}

.cat-slug-field .pf-permalink-prefix {
  flex: 0 0 auto;
  max-width: none;
}

.cat-slug-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--pos-muted, #6b7280);
  word-break: break-all;
}

.cat-status-field {
  max-width: 280px;
}

.cat-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--pos-border, #eadde4);
}

.brand-logo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--pos-border, #eadde4);
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--pos-muted, #6b7280);
}

.brand-logo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name-cell small {
  color: var(--pos-muted, #6b7280);
  font-size: 0.75rem;
}

.brand-logo-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

@media (max-width: 720px) {
  .cat-details-card {
    padding: 16px;
  }

  .cat-form-actions {
    flex-direction: column-reverse;
  }

  .cat-form-actions .pos-chip-btn {
    width: 100%;
    justify-content: center;
  }
}
