/* IPEKERP_463_1_2_STOREFRONT_DIRECTORY_POLISH_V1
   Scope: /storefront/categories + /storefront/brands only.
   Detail routes, data services and shared-search redirects remain untouched. */

:root {
  --sf-directory-max: 1240px;
  --sf-directory-gap: 16px;
  --sf-directory-text: #20252a;
  --sf-directory-muted: #69727a;
  --sf-directory-line: #e1e4e7;
  --sf-directory-soft: #f7f8f9;
}

.sfc-final-index__hero > .sf-shell,
.sfb-index-hero > .sf-shell,
.sfc-final-index__content,
.sfb-index-content {
  width: min(calc(100% - 40px), var(--sf-directory-max));
  margin-inline: auto;
}

.sfc-final-index__hero h1,
.sfb-index-hero h1 {
  max-width: 820px;
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.sfc-final-index__head h2,
.sfb-index-head h2 {
  margin-top: 7px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.sfc-final-category-grid,
.sfb-brand-grid {
  gap: var(--sf-directory-gap);
}

.sfc-final-category-card,
.sfb-brand-card {
  border-color: var(--sf-directory-line);
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 27, 34, .045);
}

.sfc-final-category-card {
  min-height: 148px;
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.sfc-final-category-card__index,
.sfc-final-category-card__copy > small {
  display: none;
}

.sfc-final-category-card__copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.sfc-final-category-card__copy > strong {
  color: var(--sf-directory-text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.sfc-final-category-card__copy > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--sf-directory-muted);
  font-size: .86rem;
  line-height: 1.55;
}

.sfc-final-category-card__count {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 3px;
  min-width: 116px;
  color: var(--sf-directory-muted);
  text-align: right;
}

.sfc-final-category-card__count small {
  color: var(--sf-directory-muted);
  font-size: .68rem;
  font-weight: 750;
}

.sfc-final-category-card__count b {
  color: var(--sf-directory-text);
  font-size: .94rem;
  white-space: nowrap;
}

.sfc-final-category-card > i,
.sfb-brand-card > i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e5e8;
  border-radius: 999px;
  background: var(--sf-directory-soft);
  color: #4c555d;
  font-style: normal;
  font-size: .95rem;
  line-height: 1;
}

.sfb-index-stat {
  color: var(--sf-directory-text);
  background: #fff;
}

.sfb-index-stat strong {
  color: #171a1d !important;
  background: transparent !important;
  text-shadow: none !important;
}

.sfb-index-stat small,
.sfb-index-stat span {
  color: #5d666e !important;
}

.sfb-brand-card {
  min-height: 126px;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  align-content: center;
  align-items: center;
  column-gap: 14px;
  padding: 17px;
}

.sfb-brand-card__copy > span {
  color: var(--sf-directory-muted);
  font-size: .73rem;
  line-height: 1.35;
}

.sfc-final-category-card:focus-visible,
.sfb-brand-card:focus-visible {
  outline: 3px solid rgba(200, 25, 32, .28);
  outline-offset: 3px;
}

@media (hover: hover) {
  .sfc-final-category-card:hover,
  .sfb-brand-card:hover {
    transform: translateY(-2px);
    border-color: #c9cdd1;
    box-shadow: 0 14px 30px rgba(20, 27, 34, .07);
  }
}

@media (max-width: 760px) {
  .sfc-final-index__hero > .sf-shell,
  .sfb-index-hero > .sf-shell,
  .sfc-final-index__content,
  .sfb-index-content {
    width: min(calc(100% - 28px), var(--sf-directory-max));
  }

  .sfc-final-category-grid,
  .sfb-brand-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .sfc-final-index__hero,
  .sfb-index-hero {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .sfc-final-index__content,
  .sfb-index-content {
    padding-top: 28px;
    padding-bottom: 56px;
  }

  .sfc-final-index__head,
  .sfb-index-head {
    align-items: flex-start;
    gap: 10px;
  }

  .sfc-final-category-card {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 10px 12px;
    padding: 17px;
  }

  .sfc-final-category-card__copy {
    grid-column: 1;
    grid-row: 1;
  }

  .sfc-final-category-card__count {
    grid-column: 1;
    grid-row: 2;
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .sfc-final-category-card > i {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .sfb-brand-card {
    min-height: 112px;
  }
}

@media (max-width: 420px) {
  .sfc-final-index__hero h1,
  .sfb-index-hero h1 {
    font-size: 2rem;
  }

  .sfb-brand-card {
    grid-template-columns: 56px minmax(0, 1fr) 30px;
  }

  .sfb-brand-card__visual {
    width: 56px;
    height: 56px;
  }
}
