:root {
  --card-bg: #EBE3D4;
  --ink: #111827;
  --muted: #5b4d3f;
  --accent: #d73b89;
  --shell: #fbf8f2;
  --card-width: 295.797px;
  --image-size: 235.797px;
  --grid-gap: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: Rubik, Arial, sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 1140px);
  margin: 0 auto;
  padding: 34px 24px 56px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  margin: 0 auto 28px;
  width: min(100%, 943.398px);
}

h1 {
  margin: 0;
  color: #111827;
  font-family: "Bebas Nue", Impact, sans-serif;
  font-size: 54px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.active-filter {
  min-height: 36px;
  max-width: 360px;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #fffaf1;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reset-button,
.pill {
  border: 1px solid rgba(17, 24, 39, 0.22);
  background: #fffaf1;
  color: #111827;
  cursor: pointer;
  line-height: 1;
}

.reset-button {
  min-height: 40px;
  padding: 0 18px;
  font-family: "Bebas Nue", Impact, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
}

.reset-button:hover,
.reset-button:focus-visible,
.pill:hover,
.pill:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.reset-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--card-width));
  gap: var(--grid-gap);
  justify-content: center;
}

.product-card {
  display: flex;
  width: var(--card-width);
  height: 520px;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  overflow: hidden;
}

.product-link {
  display: flex;
  width: var(--card-width);
  height: 382px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.image-stage {
  display: flex;
  width: var(--image-size);
  min-height: 352px;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
}

.product-image {
  display: block;
  width: var(--image-size);
  height: var(--image-size);
  margin: 0 0 20px;
  object-fit: contain;
}

.product-title {
  width: var(--image-size);
  min-height: 96px;
  margin: 0;
  color: #111827;
  font-family: Abril, Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

.pill-row {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 18px 22px;
}

.pill {
  max-width: 100%;
  min-height: 26px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pill[data-filter-type="category"] {
  background: #111827;
  color: #fff;
}

.pill[data-filter-type="size"] {
  background: #fff;
}

.pill[data-filter-type="store"] {
  background: #fff7fb;
}

.pill.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  width: min(100%, 640px);
  margin: 24px auto;
  padding: 28px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #fffaf1;
  text-align: center;
}

@media (max-width: 720px) {
  .page-shell {
    padding-inline: 16px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  h1 {
    font-size: 44px;
  }

  .active-filter {
    max-width: min(100%, var(--card-width));
  }
}
