.category-hero-section {
  padding: 64px 0 12px;
}

.category-hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .88fr);
  align-items: center;
  gap: 54px;
  padding: 48px;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .18);
}

.category-hero-copy {
  max-width: 560px;
}

.category-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--rose2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1px;
}

.category-eyebrow::before {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--rose);
  border-radius: 999px;
}

.category-hero h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.2;
  letter-spacing: -1.2px;
}

.category-hero h2 strong {
  color: var(--rose2);
}

.category-hero-copy p {
  max-width: 520px;
  margin: 0 0 28px;
  color: var(--text2);
  font-size: 14px;
  line-height: 2;
}

.category-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-primary-action,
.category-secondary-action {
  min-height: 46px;
  padding: 0 21px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.category-primary-action {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 12px 30px rgba(196, 92, 138, .24);
}

.category-primary-action:hover {
  background: var(--rose2);
  transform: translateY(-2px);
}

.category-primary-action img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.category-secondary-action {
  color: var(--text);
  border: 1px solid var(--border2);
  background: var(--bg3);
}

.category-secondary-action:hover {
  border-color: rgba(196, 92, 138, .35);
}

.category-hero-visual {
  min-height: 300px;
  position: relative;
  direction: ltr;
}

.category-hero-card {
  position: absolute;
  overflow: hidden;
  border-radius: 22px;
  border: 7px solid var(--bg2);
  background: var(--bg3);
  box-shadow: 0 22px 56px rgba(0, 0, 0, .26);
}

.category-hero-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.category-hero-card:nth-child(1) {
  width: 61%;
  aspect-ratio: 1;
  left: 20%;
  top: 0;
  z-index: 3;
}

.category-hero-card:nth-child(2) {
  width: 43%;
  aspect-ratio: 1;
  left: 0;
  bottom: 0;
  z-index: 2;
  transform: rotate(-5deg);
}

.category-hero-card:nth-child(3) {
  width: 43%;
  aspect-ratio: 1;
  right: 0;
  bottom: 2%;
  z-index: 1;
  transform: rotate(5deg);
}

.active-category-filter {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  width: fit-content;
  color: var(--rose2);
  background: rgba(196, 92, 138, .08);
  border: 1px solid rgba(196, 92, 138, .24);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.active-category-filter.show {
  display: inline-flex;
}

.active-category-filter button {
  border: 0;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--text2);
  background: var(--bg3);
  font: 11px inherit;
  cursor: pointer;
}

.categories-page {
  min-height: 100vh;
  padding: 118px 0 80px;
}

.categories-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 34px;
}

.categories-intro h1 {
  margin: 6px 0 10px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.2;
  letter-spacing: -1.2px;
}

.categories-intro p {
  max-width: 610px;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.9;
}

.categories-count {
  min-width: 116px;
  padding: 15px 18px;
  border: 1px solid var(--border2);
  border-radius: 14px;
  background: var(--bg2);
  text-align: center;
}

.categories-count strong {
  display: block;
  color: var(--rose);
  font-size: 27px;
}

.categories-count span {
  color: var(--text2);
  font-size: 11px;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(196, 92, 138, .32);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .2);
}

.category-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg3);
}

.category-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.category-card:hover .category-card-media img {
  transform: scale(1.04);
}

.category-card-body {
  padding: 17px 17px 18px;
}

.category-card h2 {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 800;
}

.category-card p {
  min-height: 49px;
  margin: 0 0 16px;
  color: var(--text2);
  font-size: 11.5px;
  line-height: 1.8;
}

.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--rose);
  font-size: 11px;
  font-weight: 700;
}

.category-card-footer img {
  width: 15px;
  height: 15px;
  opacity: .8;
  filter: invert(56%) sepia(40%) saturate(1044%) hue-rotate(287deg) brightness(90%);
}

.category-back-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 12px;
}

.category-back-link:hover {
  color: var(--rose2);
}

html[data-theme="light"] .category-hero,
html[data-theme="light"] .category-card {
  box-shadow: 0 18px 50px rgba(38, 42, 68, .08);
}

@media (max-width: 920px) {
  .category-hero {
    grid-template-columns: minmax(0, 1fr) minmax(290px, .8fr);
    gap: 28px;
    padding: 34px;
  }

  .category-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .category-hero-section {
    padding-top: 34px;
  }

  .category-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 27px 22px 22px;
    border-radius: 20px;
  }

  .category-hero h2 {
    font-size: 31px;
  }

  .category-hero-copy p {
    margin-bottom: 21px;
    font-size: 13px;
  }

  .category-hero-visual {
    min-height: 230px;
  }

  .category-hero-card:nth-child(1) {
    width: 55%;
    left: 22.5%;
  }

  .categories-page {
    padding-top: 90px;
  }

  .categories-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .categories-count {
    min-width: 0;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
  }

  .categories-count strong {
    font-size: 18px;
  }

  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .category-card {
    border-radius: 14px;
  }

  .category-card-body {
    padding: 13px;
  }

  .category-card h2 {
    font-size: 13px;
  }

  .category-card p {
    min-height: 0;
    margin-bottom: 11px;
    font-size: 10.5px;
  }
}

@media (max-width: 420px) {
  .category-primary-action,
  .category-secondary-action {
    width: 100%;
  }

  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .category-card-media {
    aspect-ratio: 16 / 10;
  }
}
