.category-page {
  padding-top: 18px;
  padding-bottom: 40px;
}

.nav-row a.is-active {
  color: var(--accent);
}

.nav-row a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.category-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.category-breadcrumbs a:hover {
  color: var(--accent);
}

.category-breadcrumbs__separator {
  color: #98a2b3;
}

.category-layout {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.category-sidebar {
  position: sticky;
  top: 112px;
}

.category-sidebar__intro {
  margin-bottom: 18px;
}

.category-sidebar__intro h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.category-sidebar__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.filter-card {
  padding: 18px 16px;
  border: 1px solid rgba(225, 231, 239, 0.88);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.filter-card + .filter-card {
  margin-top: 14px;
}

.filter-card__header {
  margin-bottom: 14px;
}

.filter-card__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.filter-card__header--spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-reset {
  padding: 0;
  border: 0;
  background: none;
  color: #1677ff;
  font-weight: 700;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 7px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  transition: background-color 0.2s ease;
}

.sidebar-item:hover {
  background: #f8fafc;
}

.sidebar-item__thumb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sidebar-item__thumb img {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}

.sidebar-item__label {
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-item__count {
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-group + .filter-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.filter-group h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.price-range__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
}

.price-range__inputs label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-range__inputs span {
  color: var(--muted);
  font-size: 0.88rem;
}

.price-range__inputs input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.price-range__dash {
  padding-bottom: 10px;
  color: #98a2b3;
}

.price-range__go {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-size: 1.2rem;
}

.price-range__track {
  position: relative;
  height: 18px;
  margin: 14px 2px 8px;
}

.price-range__line {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: #dde3ed;
}

.price-range__line.is-active {
  left: 8%;
  right: 12%;
  background: #2e79ff;
}

.price-range__thumb {
  position: absolute;
  top: 0;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1f2937;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.price-range__thumb--left {
  left: 8%;
}

.price-range__thumb--right {
  left: calc(88% - 18px);
}

.price-range__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-checkbox {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #344054;
}

.brand-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.brand-checkbox__count {
  color: var(--muted);
}

.brand-list__more {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #1677ff;
  font-weight: 700;
}

.category-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.category-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(225, 231, 239, 0.88);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.category-hero--banner {
  display: grid;
  aspect-ratio: var(--category-banner-ratio, 1922 / 534);
}

.category-hero--composed {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  min-height: 176px;
  padding: 24px 30px;
  color: #fff;
}

.category-hero--composed::before {
  content: "";
  position: absolute;
  inset: auto auto -80px -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(8px);
}

.category-hero--electronics {
  --hero-accent: #66c5ff;
  background:
    radial-gradient(circle at 20% 20%, rgba(101, 198, 255, 0.25), transparent 24%),
    linear-gradient(120deg, #0c1d39 0%, #102a55 48%, #0b1730 100%);
}

.category-hero--fashion {
  --hero-accent: #ff8ab0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(120deg, #35202c 0%, #6f4054 52%, #2a1422 100%);
}

.category-hero--kids {
  --hero-accent: #ffca63;
  color: #1a2b44;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.55), transparent 24%),
    linear-gradient(120deg, #f4f8ff 0%, #e8f5ff 46%, #fef1ff 100%);
}

.category-hero--sport {
  --hero-accent: #8dd05d;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(120deg, #10231d 0%, #1e4739 48%, #122923 100%);
}

.category-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 430px;
}

.category-hero__eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.category-hero--kids .category-hero__eyebrow {
  color: rgba(26, 43, 68, 0.62);
}

.category-hero__title {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.category-hero__title span {
  color: var(--hero-accent);
}

.category-hero__description {
  margin: 14px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.55;
}

.category-hero--kids .category-hero__description {
  color: rgba(26, 43, 68, 0.82);
}

.category-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 146px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #fff;
  color: #102a55;
  font-weight: 800;
}

.category-hero--fashion .category-hero__cta {
  color: #582d43;
}

.category-hero--sport .category-hero__cta {
  color: #153528;
}

.category-hero--kids .category-hero__cta {
  background: #58c14f;
  color: #fff;
}

.category-hero__visual {
  position: relative;
  min-height: 136px;
}

.category-hero__product {
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(7, 14, 28, 0.22));
}

.category-hero__product--1 {
  right: 220px;
  bottom: -4px;
  width: 154px;
  transform: rotate(-7deg);
}

.category-hero__product--2 {
  right: 102px;
  width: 168px;
}

.category-hero__product--3 {
  right: 6px;
  width: 146px;
  transform: rotate(7deg);
}

.subcategory-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 132px);
  justify-content: safe center;
  gap: 14px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subcategory-strip::-webkit-scrollbar {
  display: none;
}

.subcategory-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 108px;
  padding: 14px 12px;
  border: 1px solid rgba(225, 231, 239, 0.88);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.subcategory-chip:hover,
.subcategory-chip.is-active {
  border-color: rgba(255, 105, 0, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(11, 19, 32, 0.08);
}

.subcategory-chip.is-active .subcategory-chip__label {
  color: var(--accent);
}

.subcategory-chip img {
  max-width: 62px;
  max-height: 54px;
  object-fit: contain;
}

.subcategory-chip__label {
  min-height: 36px;
  font-weight: 700;
  line-height: 1.35;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.catalog-toolbar__count {
  margin: 0;
  color: #344054;
  font-size: 1rem;
}

.catalog-toolbar__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-toolbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #475467;
}

.catalog-toolbar__sort select {
  min-width: 170px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.view-toggle {
  display: inline-flex;
  gap: 8px;
}

.view-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #475467;
}

.view-toggle button.is-active {
  border-color: rgba(255, 105, 0, 0.34);
  color: var(--accent);
}

.view-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.view-icon--grid::before,
.view-icon--list::before {
  content: "";
  position: absolute;
}

.view-icon--grid::before {
  inset: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 0 / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 0 12px / 6px 6px no-repeat,
    linear-gradient(currentColor, currentColor) 12px 12px / 6px 6px no-repeat;
}

.view-icon--list::before {
  inset: 1px 0 auto;
  height: 3px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.catalog-empty {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.catalog-empty p {
  margin: 8px auto 18px;
  max-width: 520px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.55;
}

.catalog-empty button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 105, 0, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff4ea, #ffe8d7);
  color: var(--accent-dark);
  font-weight: 800;
}

.catalog-grid.is-list {
  grid-template-columns: 1fr;
}

.catalog-product-card {
  position: relative;
  padding: 14px 14px 16px;
  border: 1px solid rgba(225, 231, 239, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fcfdff);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(11, 19, 32, 0.08);
}

.catalog-grid.is-list .catalog-product-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.catalog-product-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #98a2b3;
}

.catalog-product-card__media {
  display: grid;
  place-items: center;
  height: 172px;
  margin-bottom: 14px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 62%),
    linear-gradient(180deg, #ffffff, #fafcff);
}

.catalog-product-card__media:hover img {
  transform: scale(1.04);
}

.catalog-grid.is-list .catalog-product-card__media {
  margin-bottom: 0;
}

.catalog-product-card__media img {
  max-width: 100%;
  max-height: 156px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.catalog-product-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  min-height: 58px;
}

.catalog-product-card__title a:hover {
  color: var(--accent);
}

.catalog-grid.is-list .catalog-product-card__title {
  min-height: unset;
}

.catalog-product-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  color: #475467;
  font-size: 0.93rem;
}

.catalog-product-card__rating .stars {
  color: #ffb91c;
  letter-spacing: 0.04em;
}

.catalog-product-card__price {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.catalog-product-card__shipping {
  margin: 8px 0 0;
  color: var(--green);
  font-weight: 700;
}

.catalog-product-card__shipping.is-free {
  color: #179657;
}

.catalog-product-card__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid rgba(255, 105, 0, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff4ea, #ffe8d7);
  color: var(--accent-dark);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.catalog-product-card__add:hover,
.catalog-product-card__add.is-added {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(255, 105, 0, 0.14);
  background: linear-gradient(180deg, #ff7a17, var(--accent));
  color: #fff;
}

.catalog-grid.is-list .catalog-product-card__purchase {
  min-width: 140px;
  text-align: right;
}

.catalog-grid.is-list .catalog-product-card__add {
  margin-left: auto;
  max-width: 180px;
}

@media (max-width: 1300px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
  }

  .category-main {
    order: -1;
  }

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

@media (max-width: 980px) {
  .category-hero--composed {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: unset;
  }

  .category-hero__visual {
    min-height: 180px;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-toolbar__controls {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid.is-list .catalog-product-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .catalog-grid.is-list .catalog-product-card__purchase {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .category-page {
    padding-top: 14px;
  }

  .category-breadcrumbs {
    flex-wrap: wrap;
  }

  .category-hero--composed {
    padding: 18px;
    border-radius: 18px;
  }

  .category-hero__title {
    font-size: 1.85rem;
  }

  .category-hero__visual {
    min-height: 164px;
  }

  .category-hero__product--1 {
    right: 160px;
    width: 126px;
  }

  .category-hero__product--2 {
    right: 74px;
    width: 136px;
  }

  .category-hero__product--3 {
    right: 0;
    width: 118px;
  }

  .subcategory-strip {
    grid-auto-columns: minmax(124px, 132px);
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-grid.is-list .catalog-product-card {
    grid-template-columns: 1fr;
  }

  .catalog-product-card__media {
    height: 190px;
  }
}
