/* Catalog list: /catalog/glavnaya/{section} */
.cat {
  --cat-ink: #2B2A29;
  --cat-red: #E31E24;
  --cat-red-dark: #a11418;
  --cat-muted: #707070;
  --cat-line: #E4E4E4;
}

/* Filters */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
}
.cat-filters > div:not(.cat-count) { flex: 0 1 280px; min-width: 0; }
.cat-filters select.my-select {
  width: 100%;
  max-width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid #cfcfcf;
  border-radius: 5px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232B2A29' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--cat-ink);
}
.cat-filters select.my-select:hover { border-color: var(--cat-ink); }
.cat-filters select.my-select:focus-visible { outline: 2px solid var(--cat-red); outline-offset: 1px; }
.cat-filters .cat-reset { font-size: 14px; color: var(--cat-red); }
.cat-count {
  margin-left: auto;
  font-size: 14px;
  color: var(--cat-muted);
}
.cat-count b { color: var(--cat-ink); }
@media (max-width: 767px) {
  .cat-filters > div:not(.cat-count) { flex-basis: 100%; }
  .cat-count { margin-left: 0; }
}

/* Card */
.cat-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 190px;
  gap: 20px;
  align-items: start;
  margin-bottom: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cat-line);
  border-radius: 6px;
  color: var(--cat-ink);
  transition: border-color .2s ease;
}
.cat-card:hover { border-color: var(--cat-ink); }
@media (max-width: 991px) {
  .cat-card { grid-template-columns: 120px minmax(0, 1fr); }
  .cat-card-side { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
  .cat-card { grid-template-columns: 1fr; }
}

/* Logo in a specimen frame, like the mark in a registration certificate */
.cat-specimen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--cat-line);
  color: var(--cat-ink);
}
.cat-specimen:hover { text-decoration: none; }
.cat-specimen::before,
.cat-specimen::after,
.cat-specimen > span:first-child::before,
.cat-specimen > span:first-child::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--cat-red);
}
.cat-specimen::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.cat-specimen::after { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.cat-specimen > span:first-child::before { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.cat-specimen > span:first-child::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.cat-specimen img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cat-specimen-word { min-width: 0; font-weight: 700; font-size: 14px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 575px) { .cat-specimen { height: 150px; } }

.cat-kind { font-size: 12px; font-weight: 500; color: var(--cat-muted); }
.cat-kind .cat-vip {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--cat-red);
  color: #fff;
  font-weight: 700;
}
.cat-title {
  margin: 2px 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.cat-title a { color: inherit; }
.cat-title a:hover { color: var(--cat-red); text-decoration: none; }

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.cat-chips li {
  min-width: 30px;
  padding: 3px 6px;
  border: 1px solid var(--cat-ink);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cat-chips li.cat-chips-more { border-style: dashed; color: var(--cat-muted); }

.cat-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
}
.cat-facts div { min-width: 0; }
.cat-facts dt { font-size: 12px; font-weight: 400; color: var(--cat-muted); }
.cat-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 575px) { .cat-facts { grid-template-columns: 1fr; } }

.cat-card-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  padding-left: 20px;
  border-left: 1px dashed var(--cat-line);
}
@media (max-width: 991px) {
  .cat-card-side { padding: 14px 0 0; border-left: 0; border-top: 1px dashed var(--cat-line); }
}
.cat-price-label { font-size: 12px; color: var(--cat-muted); }
.cat-price {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cat-price-extra { margin-top: 4px; font-size: 13px; color: var(--cat-muted); }
.cat-price-extra b { color: var(--cat-ink); font-weight: 500; }
a.cat-btn {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: 9px 14px;
  border-radius: 5px;
  background: var(--cat-red);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
}
.cat-price-block + a.cat-btn { margin-top: 16px; }
@media (min-width: 992px) { .cat-price-block + a.cat-btn { margin-top: auto; } }
a.cat-btn:hover { background: var(--cat-red-dark); color: #fff; text-decoration: none; }
a.cat-btn:focus-visible { outline: 2px solid var(--cat-ink) !important; outline-offset: 2px; }

.cat-empty {
  padding: 30px;
  border: 1px dashed #cfcfcf;
  border-radius: 6px;
  text-align: center;
  font-size: 15px;
}
.cat-empty a { color: var(--cat-red); }

/* Pagination (markup kept from the old site: div.paginator > a/span) */
.cat .paginator {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 20px;
}
.cat .paginator a,
.cat .paginator span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--cat-line);
  border-radius: 5px;
  background: #fff;
  color: var(--cat-ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cat .paginator a:hover { border-color: var(--cat-ink); text-decoration: none; }
.cat .paginator span { background: var(--cat-ink); border-color: var(--cat-ink); color: #fff; font-weight: 700; }

@media (prefers-reduced-motion: reduce) { .cat-card { transition: none; } }
