.home-products {
  width: min(calc(100% - 32px), 1280px);
  max-width: 1280px;
  margin-inline: auto;
  padding: 40px 0 72px;
}

.category-product-section + .category-product-section {
  margin-top: 56px;
}

.category-section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.category-heading-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.category-heading-bar {
  width: 4px;
  height: 25px;
  flex: 0 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #4058e8, #784de8);
}

.category-heading-main h2 {
  margin: 0;
  color: #211d43;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.category-heading-rule {
  height: 1px;
  min-width: 20px;
  flex: 1;
  background: #e1e2ed;
}

.category-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 10px;
}

.category-view-all img {
  display: block;
  width: auto;
  max-width: 160px;
  max-height: 56px;
  object-fit: contain;
}

.category-view-all:focus-visible {
  outline: 3px solid #4058e866;
  outline-offset: 3px;
}

.view-all-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 10px;
  background: #f0effb;
  color: #4058e8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e8e8f2;
  border-radius: 14px;
  background: #fff;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-product-card:hover {
  border-color: #d5d0fb;
  box-shadow: 0 14px 28px rgba(53, 43, 121, .09);
}

.home-product-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef0ff;
}

.home-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px 14px 14px;
}

.home-product-category {
  color: #6e63d9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-product-body h3 {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  margin: 7px 0 12px;
  color: #282442;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-product-price {
  margin-top: auto;
  color: #4058e8;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.home-product-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0eff6;
  color: #88869c;
  font-size: 11px;
}

.home-product-stats b {
  color: #4e4b6b;
  font-weight: 700;
}

.home-empty {
  padding: 40px 0;
  text-align: center;
}

@media (min-width: 1500px) {
  .home-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .home-products {
    width: min(calc(100% - 24px), 1280px);
    padding: 24px 0 48px;
  }

  .category-product-section + .category-product-section {
    margin-top: 40px;
  }

  .category-section-heading {
    gap: 10px;
    margin-bottom: 14px;
  }

  .category-heading-main {
    gap: 8px;
  }

  .category-heading-main h2 {
    min-width: 0;
    overflow: hidden;
    font-size: 23px;
    text-overflow: ellipsis;
  }

  .category-heading-rule {
    min-width: 10px;
  }

  .category-view-all {
    max-width: 108px;
  }

  .category-view-all img {
    max-width: 108px;
    max-height: 38px;
  }

  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-product-image {
    aspect-ratio: 16 / 10;
  }

  .home-product-body {
    padding: 12px;
  }

  .home-product-body h3 {
    min-height: 38px;
    margin: 6px 0 8px;
    font-size: 14px;
    line-height: 1.3;
  }

  .home-product-price {
    font-size: 18px;
  }

  .home-product-stats {
    display: flex;
    align-items: center;
    font-size: 12px;
  }
}
