* {
    box-sizing: border-box;
}

:root {
    --background-color: #f4f6f8;
    --background-color-light: #dfe3e7;
    --background-color-success: #d9f99d;
    --background-color-failure: #fecaca;
    --text-color: #1f2933;
    --text-color-light: #52606d;
    --text-color-success: #365314;
    --text-color-failure: #7f1d1d;
    --border-color: #bcccdc;
    --border-radius: 8px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.catalog {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.catalog__header {
    margin-bottom: 24px;
}

.catalog__title {
    margin: 0 0 8px;
    font-size: 2rem;
}

.catalog__intro {
    margin: 0;
    color: var(--text-color-light);
}

.catalog__controls,
.catalog__summary,
.catalog__results {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.controls__title,
.summary__title,
.catalog__results-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.controls__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.controls__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.controls__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.controls__label {
    font-weight: 700;
}

.controls__label--checkbox {
    font-weight: 400;
}

.controls__input, .controls__select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font: inherit;
    background-color: white;
}

.controls__checkbox {
    width: 18px;
    height: 18px;
}

.summary__text {
    margin: 0 0 8px;
    color: var(--text-color-light);
}

.summary__text:last-child {
    margin-bottom: 0;
}

.catalog__empty {
    margin: 0;
    padding: 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color-light);
    color: var(--text-color-light);
}

.catalog__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.catalog-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    background-color: white;
}

.catalog-card__name {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.catalog-card__meta {
    margin: 0 0 8px;
    color: var(--text-color-light);
}

.catalog-card__badge {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
}

.catalog-card__badge--in-stock {
    background-color: var(--background-color-success);
    color: var(--text-color-success);
}

.catalog-card__badge--out-of-stock {
    background-color: var(--background-color-failure);
    color: var(--text-color-failure);
}