.apx-catalog-page,
.apx-catalog-page * {
  box-sizing: border-box;
}

.apx-catalog-page {
  color: #0f172a;
  font-family: Inter, sans-serif;
}

.apx-catalog-header {
  background: #fff;
  border-bottom: 1px solid rgba(27, 48, 59, 0.05);
}

.apx-catalog-breadcrumbs {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.apx-catalog-breadcrumb-link {
  color: inherit;
  text-decoration: none;
}

.apx-catalog-breadcrumb-current {
  color: #1b303b;
}

.apx-catalog-title {
  color: #1b303b;
  font-size: clamp(2.5rem, 2vw + 1.8rem, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.apx-catalog-subtitle {
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1.65;
  margin-top: 0.5rem;
  max-width: 42rem;
}

.apx-catalog-sort-wrap {
  align-items: center;
  gap: 0.75rem;
}

.apx-catalog-sort-label {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.apx-catalog-sort-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231b303b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.6rem center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.125rem;
  color: #1b303b;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 2.25rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
}

.apx-catalog-sort-select:focus {
  border-color: #1b303b;
  box-shadow: 0 0 0 2px rgba(27, 48, 59, 0.12);
  outline: none;
}

.apx-catalog-page .apx-catalog-sidebar {
  max-width: 16rem;
}

.apx-catalog-page .apx-catalog-filter-group + .apx-catalog-filter-group {
  margin-top: 2.25rem;
}

.apx-catalog-page .apx-catalog-filter-title {
  align-items: center;
  color: #1b303b;
  display: flex;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.625rem;
  letter-spacing: 0.14em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}

.apx-catalog-page .apx-catalog-filter-icon {
  color: #1b303b;
  font-size: 1.05rem;
}

.apx-catalog-page .apx-catalog-filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.apx-catalog-page .apx-catalog-filter-tree {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.apx-catalog-page .apx-catalog-filter-tree-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.apx-catalog-page .apx-catalog-filter-option {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.apx-catalog-page .apx-catalog-filter-option-depth-0 .apx-catalog-filter-label {
  color: #1b303b;
  font-weight: 700;
}

.apx-catalog-page .apx-catalog-filter-children {
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
}

.apx-catalog-page .apx-catalog-filter-option-depth-1 .apx-catalog-filter-label,
.apx-catalog-page .apx-catalog-filter-option-depth-2 .apx-catalog-filter-label,
.apx-catalog-page .apx-catalog-filter-option-depth-3 .apx-catalog-filter-label {
  color: #475569;
  font-weight: 500;
}

.apx-catalog-page .apx-catalog-checkbox {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.125rem;
  box-shadow: none;
  display: inline-block;
  flex: 0 0 auto;
  height: 1rem;
  margin: 0;
  position: relative;
  width: 1rem;
}

.apx-catalog-page .apx-catalog-checkbox:checked {
  background: #1b303b;
  border-color: #1b303b;
}

.apx-catalog-page .apx-catalog-checkbox:checked::after {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 0.5rem;
  left: 0.3rem;
  position: absolute;
  top: 0.1rem;
  transform: rotate(45deg);
  width: 0.2rem;
}

.apx-catalog-page .apx-catalog-checkbox:focus {
  border-color: #1b303b;
  box-shadow: 0 0 0 2px rgba(27, 48, 59, 0.12);
  outline: none;
}

.apx-catalog-page .apx-catalog-filter-label {
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.15s ease;
}

.apx-catalog-page .apx-catalog-filter-empty {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.apx-catalog-page .apx-catalog-filter-actions {
  border-top: 0;
  display: grid;
  gap: 0.625rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 2rem;
  padding-top: 0;
}

.apx-catalog-page .apx-catalog-filter-button {
  align-items: center;
  border-radius: 0;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.16em;
  line-height: 1.25;
  min-height: 2.625rem;
  padding: 0.75rem 1rem;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: normal;
  word-break: keep-all;
}

.apx-catalog-page .apx-catalog-filter-button-primary {
  background: #f3f4f6;
  border: 1px solid #cbd5e1;
  color: #1b303b;
}

.apx-catalog-page .apx-catalog-filter-button-primary:hover,
.apx-catalog-page .apx-catalog-filter-button-primary:focus {
  background: #1b303b;
  border-color: #1b303b;
  color: #fff;
}

.apx-catalog-page .apx-catalog-filter-button-secondary {
  background: #fff;
  border: 1px solid #d7dee7;
  color: #64748b;
}

.apx-catalog-page .apx-catalog-filter-button-secondary:hover,
.apx-catalog-page .apx-catalog-filter-button-secondary:focus {
  border-color: #1b303b;
  color: #1b303b;
}

.apx-catalog-page button.apx-catalog-filter-button,
.apx-catalog-page a.apx-catalog-filter-button {
  box-shadow: none;
}

.apx-catalog-page button.apx-catalog-filter-button-primary,
.apx-catalog-page a.apx-catalog-filter-button-primary {
  background: #f3f4f6 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1b303b !important;
}

.apx-catalog-page button.apx-catalog-filter-button-primary:hover,
.apx-catalog-page button.apx-catalog-filter-button-primary:focus,
.apx-catalog-page a.apx-catalog-filter-button-primary:hover,
.apx-catalog-page a.apx-catalog-filter-button-primary:focus {
  background: #1b303b !important;
  border-color: #1b303b !important;
  color: #fff !important;
}

.apx-catalog-page button.apx-catalog-filter-button-secondary,
.apx-catalog-page a.apx-catalog-filter-button-secondary {
  background: #fff !important;
  border: 1px solid #d7dee7 !important;
  color: #64748b !important;
}

.apx-catalog-page button.apx-catalog-filter-button-secondary:hover,
.apx-catalog-page button.apx-catalog-filter-button-secondary:focus,
.apx-catalog-page a.apx-catalog-filter-button-secondary:hover,
.apx-catalog-page a.apx-catalog-filter-button-secondary:focus {
  background: #fff !important;
  border-color: #1b303b !important;
  color: #1b303b !important;
}

.apx-catalog-page .apx-catalog-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.125rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.apx-catalog-page .apx-catalog-card:hover {
  border-color: #d7dee7;
  box-shadow: 0 20px 30px -18px rgba(27, 48, 59, 0.18);
  transform: translateY(-1px);
}

.apx-catalog-page .apx-catalog-card-badge {
  background: rgba(27, 48, 59, 0.92);
  border-radius: 0.125rem;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0.45rem 0.55rem;
}

.apx-catalog-page .apx-catalog-card-title {
  color: #1b303b;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.apx-catalog-page .apx-catalog-card-title a {
  color: inherit;
  text-decoration: none;
}

.apx-catalog-page .apx-catalog-card-sku {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.apx-catalog-page .apx-catalog-card-material {
  background: rgba(27, 48, 59, 0.08);
  color: #1b303b;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.apx-catalog-page .apx-catalog-card-meta {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.apx-catalog-page .apx-catalog-card-meta-label {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.apx-catalog-page .apx-catalog-card-meta-value {
  color: #1b303b;
  font-size: 0.75rem;
  font-weight: 700;
}

.apx-catalog-page .apx-catalog-card-button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(27, 48, 59, 0.08);
  border-radius: 0.125rem;
  color: #1b303b;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.04em;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.apx-catalog-page .apx-catalog-card-button:hover,
.apx-catalog-page .apx-catalog-card-button:focus {
  background: #1b303b;
  border-color: #1b303b;
  color: #fff;
  text-decoration: none;
}

.apx-catalog-results-row {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.apx-catalog-results-text {
  color: #64748b;
  font-size: 0.875rem;
}

.apx-catalog-results-count {
  color: #1b303b;
  font-weight: 700;
}

.apx-catalog-grid,
.apx-catalog-pagination {
  transition: opacity 0.22s ease, transform 0.22s ease;
  will-change: opacity, transform;
}

.apx-catalog-grid.is-loading,
.apx-catalog-pagination.is-loading {
  opacity: 0.55;
  transform: translateY(4px);
  pointer-events: none;
}

.apx-catalog-active-filters {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1rem 0.9rem;
}

.apx-catalog-active-filters-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.apx-catalog-active-filters-title {
  color: #1b303b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0;
  text-transform: uppercase;
}

.apx-catalog-clear-filters {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0;
  text-transform: uppercase;
}

.apx-catalog-clear-filters:hover,
.apx-catalog-clear-filters:focus {
  color: #1b303b;
}

.apx-catalog-active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.apx-catalog-filter-chip {
  align-items: center;
  background: rgba(27, 48, 59, 0.08);
  border: 1px solid rgba(27, 48, 59, 0.1);
  border-radius: 999px;
  color: #1b303b;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.5rem;
  line-height: 1;
  min-height: 2rem;
  padding: 0.5rem 0.8rem;
}

.apx-catalog-filter-chip:hover,
.apx-catalog-filter-chip:focus {
  background: rgba(27, 48, 59, 0.12);
  border-color: rgba(27, 48, 59, 0.3);
}

.apx-catalog-filter-chip-secondary {
  background: rgba(176, 141, 87, 0.12);
  border-color: rgba(176, 141, 87, 0.2);
  color: #7b5f32;
}

.apx-catalog-filter-chip-secondary:hover,
.apx-catalog-filter-chip-secondary:focus {
  background: rgba(176, 141, 87, 0.18);
  border-color: rgba(176, 141, 87, 0.32);
}

.apx-catalog-filter-chip-tertiary {
  background: #fff;
  border-color: #cbd5e1;
  color: #475569;
}

.apx-catalog-filter-chip-close {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
}

.apx-catalog-pagination {
  gap: 0.5rem;
  margin-top: 4rem;
}

.apx-catalog-pagination .apx-page-link-item {
  display: inline-flex;
}

.apx-catalog-pagination .page-numbers,
.apx-catalog-pagination .current {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.125rem;
  color: #475569;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  height: 2.5rem;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0 0.75rem;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.apx-catalog-pagination .current {
  background: #1b303b;
  border-color: #1b303b;
  color: #fff;
}

.apx-catalog-pagination a.page-numbers:hover,
.apx-catalog-pagination a.page-numbers:focus {
  border-color: #1b303b;
  color: #1b303b;
  text-decoration: none;
}

@media (max-width: 1023px) {
  .apx-catalog-page .apx-catalog-sidebar {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 639px) {
  .apx-catalog-sort-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .apx-catalog-page .apx-catalog-filter-actions {
    grid-template-columns: 1fr;
  }
}
