/* Keep the live component, including its translated links and featured row span. */
#katalog:has(a[href*="?category="]) {
  scroll-margin-top: 80px;
  padding-block: clamp(30px, 3.4vw, 54px);
}
#katalog > div:has(> h2) { margin-bottom: clamp(20px, 2vw, 32px); }
#katalog > .grid:has(a[href*="?category="]) { gap: clamp(12px, 1.15vw, 18px); }
#katalog .glass-card:has(a[href*="?category="]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(155px, 11.7vw, 184px);
  padding: clamp(17px, 1.55vw, 26px);
  justify-content: center;
}
#katalog .glass-card:has(a[href*="?category="])::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 55%;
  z-index: -1;
  pointer-events: none;
  background: var(--photo) var(--focus, 50% 50%) / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, rgb(0 0 0 / .06) 15%, rgb(0 0 0 / .45) 38%, #000 68%);
}
#katalog .glass-card:has(a[href*="?category="]) > div:first-child { width: 64%; }
#katalog .glass-card h3 { margin-bottom: 6px; line-height: 1.18; font-weight: 650; }
#katalog .glass-card p { margin-bottom: 12px; font-size: 14px; line-height: 1.42; }
#katalog .glass-card h3:last-of-type + a { margin-top: 8px; }
#katalog .glass-card a.btn-blue { padding: 7px 15px; }
#katalog .glass-card:has(a[href$="=mexanik-schyotchiki"]) { --photo: url('./mexanik-schyotchiki.webp'); --focus: 50% 15%; }
#katalog .glass-card:has(a[href$="=impuls-schyotchiki"]) { --photo: url('./impuls-schyotchiki.webp'); --focus: 28% 49%; }
#katalog .glass-card:has(a[href$="=ultrazvuk-schyotchiki"]) { --photo: url('./ultrazvuk-schyotchiki.webp'); --focus: 51% 38%; }
#katalog .glass-card:has(a[href$="=modems"]) { --photo: url('./modems.webp'); --focus: 50% 42%; }
#katalog .glass-card:has(a[href$="=zadvijki"]) { --photo: url('./zadvijki.webp'); --focus: 48% 62%; }
#katalog .glass-card:has(a[href$="=filter"]) { --photo: url('./filter.webp'); --focus: 48% 42%; }
#katalog .glass-card:has(a[href$="=zadvijki-elektr"]) { --photo: url('./zadvijki-elektr.webp'); --focus: 50% 34%; }
#katalog .glass-card:has(a[href$="=FlowMeters"]) { --photo: url('./FlowMeters.webp'); --focus: 48% 48%; }
#katalog .glass-card:has(a[href$="=pumps"]) { --photo: url('./pumps.webp'); --focus: 50% 48%; }
.dark #katalog .glass-card::after { filter: brightness(.78); }
@media (min-width: 768px) {
  #katalog .glass-card:has(a[href$="=impuls-schyotchiki"]) { justify-content: flex-start; }
  #katalog .glass-card:has(a[href$="=impuls-schyotchiki"])::after {
    width: 87%;
    mask-image: linear-gradient(118deg, transparent 6%, rgb(0 0 0 / .08) 30%, rgb(0 0 0 / .65) 53%, #000 74%);
  }
}
@media (max-width: 640px) {
  #katalog:has(a[href*="?category="]) { padding-inline: 16px; }
  #katalog h2 { min-width: 0; font-size: clamp(25px, 7vw, 36px); overflow-wrap: anywhere; }
  #katalog .glass-card:has(a[href*="?category="]) > div:first-child { width: 71%; }
  #katalog .glass-card:has(a[href*="?category="])::after {
    mask-image: linear-gradient(90deg, transparent 8%, rgb(0 0 0 / .08) 37%, rgb(0 0 0 / .52) 62%, #000 90%);
  }
}



#katalog .glass-card:has(a[href*="?category="])::after {
  inset: -5% -2% -5% auto;
  width: 62%;
  mask-image: linear-gradient(90deg, transparent 15%, rgb(0 0 0 / .025) 32%, rgb(0 0 0 / .12) 45%, rgb(0 0 0 / .72) 70%, #000 87%);
}
@media (min-width: 768px) {
  #katalog .glass-card:has(a[href$="=impuls-schyotchiki"]) {
    grid-row: auto;
    justify-content: center;
  }
  #katalog .glass-card:has(a[href$="=mexanik-schyotchiki"]) {
    grid-row: span 2;
    justify-content: flex-start;
  }
  #katalog .glass-card:has(a[href$="=mexanik-schyotchiki"])::after {
    width: 96%;
    mask-image: linear-gradient(122deg, transparent 15%, rgb(0 0 0 / .025) 34%, rgb(0 0 0 / .12) 48%, rgb(0 0 0 / .76) 70%, #000 86%);
  }
}
@media (max-width: 640px) {
  #katalog .glass-card:has(a[href*="?category="])::after {
    mask-image: linear-gradient(90deg, transparent 18%, rgb(0 0 0 / .025) 46%, rgb(0 0 0 / .13) 59%, rgb(0 0 0 / .65) 78%, #000 94%);
  }
}
