/* =========================================================
   WEBIXA CATEGORY PREMIUM V2
   Фильтр слева на уровне названия категории + компактное описание
   ========================================================= */

.wx-cat-v2 {
  position: relative;
  overflow: hidden;
  padding: 46px 0 72px;
  min-height: 680px;
  background:
    radial-gradient(circle at 80% 15%, rgba(121, 74, 255, .22), transparent 36%),
    radial-gradient(circle at 18% 22%, rgba(40, 156, 255, .09), transparent 32%),
    linear-gradient(135deg, #050812 0%, #070b15 52%, #110920 100%);
}

.wx-cat-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 118px 118px;
  opacity: .42;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
  pointer-events: none;
}

.wx-cat-v2-bg {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(58px);
}

.wx-cat-v2-bg-a {
  width: 520px;
  height: 520px;
  right: -130px;
  top: 58px;
  background: rgba(130, 77, 255, .26);
}

.wx-cat-v2-bg-b {
  width: 360px;
  height: 360px;
  left: -120px;
  top: 170px;
  background: rgba(52, 155, 255, .12);
}

.wx-cat-v2-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.wx-cat-v2-mobile-filter {
  display: none;
}

.wx-cat-v2-filter {
  position: sticky;
  top: 94px;
  align-self: start;
}

.wx-cat-v2-filter-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: rgba(180, 207, 255, .92);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.wx-cat-v2-filter-label::before {
  content: "✦";
  color: #65a3ff;
  text-shadow: 0 0 18px rgba(93, 146, 255, .8);
}

.wx-cat-v2-filter-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 8%, rgba(125, 77, 255, .30), transparent 38%),
    linear-gradient(180deg, rgba(16, 22, 42, .92), rgba(8, 11, 20, .92));
  border: 1px solid rgba(134, 112, 255, .28);
  box-shadow:
    0 24px 70px rgba(0,0,0,.38),
    0 0 0 1px rgba(255,255,255,.025) inset,
    0 0 48px rgba(119, 78, 255, .16);
}

.wx-cat-v2-filter-card::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -80px;
  width: 180px;
  height: 360px;
  background: linear-gradient(180deg, transparent, rgba(214, 68, 255, .30), transparent);
  filter: blur(18px);
  opacity: .52;
  transform: rotate(8deg);
  pointer-events: none;
}

.wx-cat-v2-filter-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.wx-cat-v2-filter-top span {
  display: block;
  color: rgba(255,255,255,.42);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  margin-bottom: 4px;
}

.wx-cat-v2-filter-top h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 920;
}

.wx-cat-v2-filter-close {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.06);
  font-size: 24px;
}

.wx-cat-v2-group {
  position: relative;
  z-index: 2;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
}

.wx-cat-v2-group:last-of-type {
  border-bottom: 0;
}

.wx-cat-v2-group-title {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.wx-cat-v2-group-title span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.wx-cat-v2-group-title span::before {
  content: "⌘";
  color: rgba(138, 170, 255, .95);
  font-size: 13px;
}

.wx-cat-v2-group-title em {
  font-style: normal;
  color: rgba(255,255,255,.55);
  transition: transform .18s ease;
}

.wx-cat-v2-group.is-collapsed .wx-cat-v2-group-title em {
  transform: rotate(180deg);
}

.wx-cat-v2-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.wx-cat-v2-group.is-collapsed .wx-cat-v2-options {
  display: none;
}

.wx-cat-v2-chip {
  position: relative;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  cursor: pointer;
  overflow: hidden;
  transition: .18s ease;
}

.wx-cat-v2-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wx-cat-v2-chip span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  line-height: 1;
}

.wx-cat-v2-chip b {
  color: rgba(255,255,255,.52);
  font-size: 12px;
  font-weight: 750;
}

.wx-cat-v2-chip:hover,
.wx-cat-v2-chip.active,
.wx-cat-v2-chip:has(input:checked) {
  color: #fff;
  border-color: rgba(118, 84, 255, .72);
  background: linear-gradient(135deg, rgba(118, 84, 255, .34), rgba(40, 105, 255, .20));
  box-shadow: 0 0 22px rgba(118, 84, 255, .18), inset 0 0 0 1px rgba(255,255,255,.03);
}

.wx-cat-v2-chip.active::after,
.wx-cat-v2-chip:has(input:checked)::after {
  content: "✓";
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}

.wx-cat-v2-filter-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  margin-top: 6px;
}

.wx-cat-v2-reset,
.wx-cat-v2-apply {
  min-height: 48px;
  border-radius: 11px;
  font-weight: 900;
  font-size: 14px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wx-cat-v2-reset {
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.11);
}

.wx-cat-v2-reset:hover {
  color: #fff;
}

.wx-cat-v2-apply {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #7c4dff, #2f7bff);
  box-shadow: 0 16px 38px rgba(78, 100, 255, .28);
  cursor: pointer;
}

.wx-cat-v2-main {
  min-width: 0;
}

.wx-cat-v2-head {
  margin-bottom: 28px;
}

.wx-cat-v2-breadcrumbs {
  margin: 0 0 22px;
}

.wx-cat-v2-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: end;
  gap: 28px;
}

.wx-cat-v2-title-row h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 4.2vw, 72px);
  line-height: .98;
  letter-spacing: -.06em;
  font-weight: 940;
}

.wx-cat-v2-desc {
  max-width: 760px;
  margin-top: 16px;
  color: rgba(255,255,255,.64);
  font-size: 17px;
  line-height: 1.52;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wx-cat-v2-count {
  min-height: 105px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(134, 112, 255, .25);
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: inset 0 0 28px rgba(120,83,255,.08), 0 18px 48px rgba(0,0,0,.24);
}

.wx-cat-v2-count span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.54);
  font-size: 13px;
  line-height: 1.25;
}

.wx-cat-v2-count strong {
  display: block;
  font-size: 42px;
  line-height: .95;
  font-weight: 950;
  background: linear-gradient(135deg,#fff,#8fd7ff,#a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wx-cat-v2-toolbar {
  min-height: 78px;
  padding: 15px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
}

.wx-cat-v2-results strong {
  color: rgba(255,255,255,.76);
  font-size: 14px;
  font-weight: 720;
}

.wx-cat-v2-results span {
  margin-left: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  background: rgba(124,77,255,.22);
  border: 1px solid rgba(124,77,255,.32);
}

.wx-cat-v2-sort {
  min-width: 220px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  color: #fff;
  background: #101420;
  border: 1px solid rgba(255,255,255,.12);
  outline: none;
}

.wx-cat-v2-product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.wx-cat-v2-product-card .wx-product-image-wrap {
  height: 175px !important;
  min-height: 175px !important;
}

.wx-cat-v2-product-card .wx-product-body {
  min-height: 198px !important;
  padding: 16px 16px 14px !important;
}

.wx-cat-v2-product-card .wx-product-body h3 {
  font-size: 19px !important;
  line-height: 1.18 !important;
  margin-bottom: 7px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wx-cat-v2-product-card .wx-product-body p {
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  -webkit-line-clamp: 2 !important;
}

.wx-cat-v2-product-card .wx-product-tags {
  margin-top: 12px !important;
}

.wx-cat-v2-product-card .wx-product-tags span {
  min-height: 26px !important;
  padding: 0 9px !important;
  font-size: 11.5px !important;
}

.wx-cat-v2-product-card .wx-price-row {
  margin-top: auto !important;
}

.wx-cat-v2-pagination {
  margin-top: 28px;
}

.wx-cat-v2-empty {
  margin-top: 0;
}

/* Адаптация: планшет */
@media (max-width: 1180px) {
  .wx-cat-v2 {
    padding-top: 38px;
  }

  .wx-cat-v2-layout {
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 24px;
  }

  .wx-cat-v2-options {
    grid-template-columns: 1fr;
  }

  .wx-cat-v2-title-row h1 {
    font-size: clamp(38px, 5.5vw, 58px);
  }

  .wx-cat-v2-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wx-cat-v2-count {
    display: none;
  }

  .wx-cat-v2-title-row {
    grid-template-columns: 1fr;
  }
}

/* Адаптация: планшет вертикально и мобильная */
@media (max-width: 980px) {
  .wx-cat-v2 {
    padding: 30px 0 54px;
  }

  .wx-cat-v2-layout {
    display: block;
  }

  .wx-cat-v2-mobile-filter {
    position: sticky;
    top: 74px;
    z-index: 15;
    width: 100%;
    min-height: 56px;
    margin-bottom: 22px;
    border-radius: 18px;
    border: 1px solid rgba(125,105,255,.34);
    background: linear-gradient(135deg, rgba(124,77,255,.23), rgba(37,99,235,.14));
    color: #fff;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 42px rgba(0,0,0,.22);
  }

  .wx-cat-v2-filter {
    display: none;
    position: relative;
    top: auto;
    margin-bottom: 24px;
  }

  body.wx-cat-v2-filter-open .wx-cat-v2-filter {
    display: block;
  }

  .wx-cat-v2-filter-label {
    display: none;
  }

  .wx-cat-v2-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .wx-cat-v2-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wx-cat-v2-head {
    margin-bottom: 20px;
  }

  .wx-cat-v2-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .wx-cat-v2-sort {
    width: 100%;
  }

  .wx-cat-v2-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Мобильная */
@media (max-width: 620px) {
  .wx-cat-v2-title-row h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .wx-cat-v2-desc {
    font-size: 15.5px;
    -webkit-line-clamp: 2;
  }

  .wx-cat-v2-options {
    grid-template-columns: 1fr;
  }

  .wx-cat-v2-filter-card {
    border-radius: 22px;
    padding: 16px;
  }

  .wx-cat-v2-filter-actions {
    grid-template-columns: 1fr;
  }

  .wx-cat-v2-product-grid {
    grid-template-columns: 1fr;
  }

  .wx-cat-v2-product-card .wx-product-image-wrap {
    height: 205px !important;
    min-height: 205px !important;
  }
}

@media (max-width: 420px) {
  .wx-cat-v2-product-card .wx-product-image-wrap {
    height: 185px !important;
    min-height: 185px !important;
  }
}
