.category-banner {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-4);
  background: var(--color-surface);
}

.category-banner--has-image {
  background: var(--color-bg);
}

.category-banner__media {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.category-banner__media picture {
  display: block;
  width: 100%;
}

.category-banner__bg-img {
  display: block;
  width: 100%;
  height: auto;
}

.category-banner__content {
  width: 100%;
  padding: var(--space-4) var(--space-3) var(--space-3);
  text-align: center;
}

.category-banner__title {
  margin: 0;
  font-size: clamp(1.125rem, 4.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-text);
}

.category-banner:not(.category-banner--has-image) .category-banner__content {
  padding-block: var(--space-5);
}

@media (min-width: 768px) {
	.category-banner {
		position: relative;
		display: block;
		height: 380px;
		max-height: 380px;
		margin-bottom: var(--space-6);
	}

	.category-banner__media {
		position: absolute;
		inset: 0;
		height: 380px;
		max-height: 380px;
	}

	.category-banner__media picture {
		height: 100%;
	}

  .category-banner__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .category-banner__content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: var(--space-5) var(--space-4);
  }

  .category-banner__title {
    max-width: 79.375rem;
  }

  .category-banner--has-image .category-banner__title {
    text-shadow: 0 1px 12px rgb(255 255 255 / 0.65);
  }

  .category-banner:not(.category-banner--has-image) .category-banner__content {
    position: relative;
    inset: auto;
    display: block;
    padding-block: var(--space-6);
  }
}
