.shop-categories {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(56px, 7vw, 100px);
  color: #17231b;
  background: #fff;
}

.shop-categories h2 {
  margin: 0 0 34px;
  font-size: clamp(34px, 4.3vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.055em;
}

.shop-categories h2 > span {
  color: #147024;
}

.shop-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.shop-category {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #dce4de;
  border-radius: 12px;
  color: #17231b;
  background: #fff;
  transition: border-color .3s ease;
}

.shop-category-visual {
  position: relative;
  min-height: 280px;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3f6f3;
}

.shop-category-visual::before,
.shop-category-visual::after {
  content: '';
  position: absolute;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-color: rgba(255, 255, 255, .75);
  border-style: solid;
  pointer-events: none;
}

.shop-category-visual::before {
  inset: 20px auto auto 20px;
  border-width: 1px 0 0 1px;
}

.shop-category-visual::after {
  inset: auto 20px 20px auto;
  border-width: 0 1px 1px 0;
}

.shop-category-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transform-origin: center bottom;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}

.shop-category-arrow {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #c8d7cc;
  border-radius: 8px;
  color: #147024;
  background: #fff;
  font-size: 23px;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease;
}

.shop-category-caption {
  position: relative;
  flex: 1;
  padding: clamp(18px, 2vw, 28px);
  border-top: 1px solid #dce4de;
  background: #fff;
}

.shop-category h3 {
  min-height: 2.12em;
  margin: 0;
  font-size: clamp(21px, 2.1vw, 32px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.045em;
}

.shop-category-description {
  min-height: 3.2em;
  margin-top: 14px;
  color: #5a6c5f;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
}

.shop-category-description p {
  margin: 0;
  text-wrap: pretty;
}

.shop-category:focus-visible {
  border-color: #147024;
  outline: 2px solid #147024;
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .shop-category:is(:hover, :focus-visible) {
    border-color: #147024;
  }

  .shop-category:is(:hover, :focus-visible) .shop-category-visual img {
    transform: scale(1.04);
  }

  .shop-category:is(:hover, :focus-visible) .shop-category-arrow {
    border-color: #147024;
    color: #fff;
    background: #147024;
  }
}

@media (max-width: 700px) {
  .shop-categories h2 {
    margin-bottom: 24px;
  }

  .shop-categories-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .shop-category-visual {
    min-height: 300px;
  }

  .shop-category-caption {
    padding: 24px;
  }

  .shop-category h3 {
    min-height: 0;
    font-size: 28px;
  }

  .shop-category-description {
    min-height: 0;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-category,
  .shop-category-visual img,
  .shop-category-arrow {
    transition: none;
  }

  .shop-category:is(:hover, :focus-visible) .shop-category-visual img {
    transform: none;
  }
}
