.collections {
  max-width: calc(var(--max-width) + var(--horizontal-padding) * 2);
  width: 100%;

  margin: 16px auto;
  padding: 0 var(--horizontal-padding);
}

.collections__title {
  color: var(--color-primary-foreground);

  margin-bottom: 16px;
}

.collections__title--size-sm {
  font-size: 24px;
  line-height: 1.3333;

  font-weight: var(--font-weight-semibold);
}

.collections__title--size-md {
  font-size: 36px;
  line-height: 1.25;

  font-weight: var(--font-weight-semibold);
}

.collections__title--size-lg {
  font-size: 44px;
  line-height: 1.2;

  font-weight: var(--font-weight-bold);
}

.collections__show-more {
  display: inline-block;

  font-size: 16px;
  line-height: 24px;

  font-weight: var(--font-weight-semibold);

  color: var(--color-primary-foreground);

  text-decoration: none;

  margin-bottom: 24px;
}

.collections__show-more:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-primary-foreground);
}

.collections__show-more i {
  font-size: 14px;

  margin-left: 4px;
}

.collections__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.collections__list:has(> a:only-child),
.collections__list:has(> .collection:only-child) {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.collections__list a {
  text-decoration: none;
}

.collections__list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-white);
}

.collections .collection {
  display: flex;
  align-items: flex-end;

  position: relative;

  overflow: hidden;

  height: 400px;

  border-radius: var(--border-radius-sm);
}

.collections__list--overlay .collection:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: var(--color-image-placeholder);
}

.collection__image {
  position: absolute;

  width: 100%;
  height: 100%;

  object-fit: var(--object-fit, cover);
}

.collection__name {
  font-size: 20px;
  line-height: 28px;

  font-weight: var(--font-weight-semibold);

  width: 100%;

  margin: 0;
  padding: 24px 0 16px;

  color: var(--color-primary-foreground);

  position: relative;
  z-index: 1;

  text-align: center;
}

.collections__list--overlay .collection__name {
  color: var(--color-white);
  background-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6),
    rgba(0, 0, 0, 0)
  );
}

.collection-cleanstate {
  display: flex;

  width: 100%;
  height: 400px;
}

@media (max-width: 1000px) {
  .collections__title {
    margin-bottom: 8px;
  }

  .collections .collection, .collection-cleanstate {
    height: 350px;
  }
}

@media (max-width: 820px) {
  .collections__list {
    gap: 16px;
  }
}

@media (max-width: 576px) {
  .collections .collection, .collection-cleanstate {
    height: 230px;
  }
}
