.yc-category-grid {
  padding-block: 48px;
  background: var(--yc-bg-white, #fff);
}

.yc-category-grid__header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 28px;
}

.yc-category-grid__heading-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  flex: 1 1 auto;
}

.yc-category-grid__heading {
  margin: 0;
  color: var(--yc-text-primary, #172b40);
  font-family: var(--yc-font-heading, "Montserrat", sans-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.yc-category-grid__subtitle {
  margin: 0;
  color: var(--yc-text-muted, #647184);
  font-size: 14px;
  line-height: 1.4;
}

.yc-category-grid__link,
.yc-category-grid__link:hover,
.yc-category-grid__link:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yc-green-accent, #d90012);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.yc-category-grid__link i {
  color: var(--yc-green-accent, #d90012);
}

/* Figma "Category Tiles": white photo cards (image + name + chevron),
   border + soft shadow. Columns set inline per breakpoint by
   category_grid.tpl (admin-configurable max tiles); the last tile spans
   the full row below 768px (5 items in a 2-col grid, same as the Figma
   mobile mockup). */
.yc-category-grid__list {
  display: grid;
  gap: 20px;
}

.yc-category-grid__card,
.yc-category-grid__card:hover,
.yc-category-grid__card:visited {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--yc-border-default, #dce2e8);
  border-radius: 0;
  overflow: hidden;
  background: var(--yc-bg-white, #fff);
  box-shadow: 0 2px 10px rgba(16, 32, 51, 0.06);
  transition: box-shadow 0.15s ease;
}

.yc-category-grid__card:hover {
  box-shadow: 0 4px 16px rgba(16, 32, 51, 0.12);
}

.yc-category-grid__image {
  display: block;
  width: 100%;
  height: 150px;
  background-color: var(--yc-bg-white, #fff);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 0;
}

.yc-category-grid__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 14px 18px 16px;
}

.yc-category-grid__name {
  overflow: hidden;
  color: var(--yc-text-primary, #172b40);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.yc-category-grid__count {
  flex: 0 0 auto;
  font-size: 0;
  line-height: 1;
}

.yc-category-grid__count i {
  color: var(--yc-text-muted, #647184);
  font-size: 10px;
}

@media (max-width: 767px) {
  .yc-category-grid {
    padding-block: 28px;
  }

  .yc-category-grid__heading {
    font-size: 22px;
  }

  .yc-category-grid__list {
    gap: 14px;
  }

  .yc-category-grid__image {
    height: 110px;
  }

  .yc-category-grid__body {
    padding: 10px 12px 12px;
  }

  .yc-category-grid__list a:nth-child(5) {
    grid-column: 1 / -1;
  }
}
