/**
 * Product category grid component.
 * Used by [pm_category_grid].
 */

.pm-category-grid-section {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 48px 0;
  overflow: hidden;
  background: transparent;
}

.pm-category-grid-section__inner {
  width: min(100% - 64px, 1780px);
  margin-inline: auto;
}

.pm-category-grid-section__title {
  margin: 0 0 30px;
  color: var(--pm-white);
  font-family: var(--pm-font-main);
  font-size: clamp(26px, 2.2vw, 38px);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.pm-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.pm-category-card {
  position: relative;
  display: grid;
  grid-template-columns: 44% 56%;
  height: clamp(245px, 14.5vw, 295px);
  overflow: hidden;
  background: var(--pm-surface);
  color: var(--pm-white);
  text-decoration: none !important;
  text-decoration-line: none !important;
  box-shadow: none;
  isolation: isolate;
}

.pm-category-card:link,
.pm-category-card:visited,
.pm-category-card:hover,
.pm-category-card:focus,
.pm-category-card:focus-visible {
  color: var(--pm-white);
  text-decoration: none !important;
  text-decoration-line: none !important;
  box-shadow: none;
  outline-offset: 3px;
}

/* Prevent global theme link hover styles from underlining card text */
.pm-category-card *,
.pm-category-card *::before,
.pm-category-card *::after {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.pm-category-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 28px 28px 28px 46px;
  background: var(--pm-surface);
}

.pm-category-card__title {
  display: block;
  max-width: 360px;
  color: var(--pm-white);
  font-family: var(--pm-font-main);
  font-size: clamp(28px, 2.25vw, 38px);
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
}

.pm-category-card__title-main {
  color: var(--pm-white);
}

.pm-category-card__title-accent {
  color: var(--pm-yellow);
}

.pm-category-card__media {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--pm-grey-dark);
  color: transparent;
  font-size: 0;
}

.pm-category-card__media::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 82px;
  background-image: url("../img/product-category-sep.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 100% 100%;
  pointer-events: none;
}

.pm-category-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.pm-category-card:hover .pm-category-card__image,
.pm-category-card:focus-visible .pm-category-card__image {
  transform: scale(1.035);
}

@media (max-width: 991px) {
  .pm-category-grid-section {
    padding: 42px 0;
  }

  .pm-category-grid-section__inner {
    width: min(100% - 48px, 1780px);
  }

  .pm-category-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pm-category-card {
    height: 230px;
  }
}

@media (max-width: 575px) {
  .pm-category-grid-section {
    padding: 34px 0;
  }

  .pm-category-grid-section__inner {
    width: min(100% - 28px, 1780px);
  }

  .pm-category-grid-section__title {
    margin-bottom: 24px;
    font-size: 24px;
  }

  .pm-category-card {
    grid-template-columns: 52% 48%;
    height: 175px;
  }

  .pm-category-card__content {
    padding: 22px 18px 22px 26px;
  }

  .pm-category-card__title {
    max-width: 220px;
    font-size: 22px;
  }

  .pm-category-card__media::before {
    width: 58px;
  }
}