:root {
  --purple: #7220cf;
  --purple-dark: #4b148f;
  --purple-soft: #f4ecff;
  --ink: #20172e;
  --muted: #716979;
  --line: #e8e1ee;
  --surface: #fff;
  --success: #159667;
  --shadow: 0 18px 46px rgba(51, 24, 80, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  background: #f7f5f9;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.catalog-shell { width: min(1220px, calc(100% - 32px)); margin-inline: auto; }

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(114, 32, 207, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}
.catalog-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  min-height: 76px;
  margin-inline: auto;
}
.catalog-brand img { width: 210px; height: 56px; object-fit: contain; object-position: left; }
.catalog-header nav { display: flex; align-items: center; gap: 8px; }
.catalog-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding-inline: 13px;
  border-radius: 11px;
  color: #50465a;
  font-size: .82rem;
  font-weight: 800;
}
.catalog-header nav a:hover { background: var(--purple-soft); color: var(--purple-dark); }
.catalog-header nav svg { width: 17px; height: 17px; }
.catalog-cart-link {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark)) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(75, 20, 143, .2);
}
.catalog-cart-link span {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding-inline: 5px;
  border-radius: 99px;
  background: #fff;
  color: var(--purple-dark);
  font-size: .68rem;
}

.catalog-hero {
  padding: 62px 0 86px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(216, 174, 255, .34), transparent 28%),
    radial-gradient(circle at 15% 110%, rgba(183, 102, 255, .28), transparent 32%),
    linear-gradient(135deg, #3d0d75, #7220cf 65%, #8e39dd);
}
.catalog-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 54px; align-items: center; }
.catalog-eyebrow {
  color: #a85bf3;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.catalog-hero .catalog-eyebrow { color: #e2c7ff; }
.catalog-hero h1 { max-width: 760px; margin: 10px 0 14px; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.05em; }
.catalog-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.78); font-size: 1.04rem; line-height: 1.65; }
.catalog-hero-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 260px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}
.catalog-hero-summary > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: #fff; color: var(--purple); }
.catalog-hero-summary svg { width: 23px; height: 23px; }
.catalog-hero-summary strong { display: block; font-size: 1.7rem; line-height: 1; }
.catalog-hero-summary small { display: block; margin-top: 5px; color: rgba(255,255,255,.72); line-height: 1.3; }

.catalog-toolbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  margin-top: -34px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.catalog-search-field { display: grid; grid-template-columns: 42px 1fr; align-items: center; min-height: 54px; border: 1px solid #ddd1e8; border-radius: 12px; background: #fcfbfd; }
.catalog-search-field svg { justify-self: center; width: 20px; color: var(--purple); }
.catalog-search-field input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.catalog-sort-field { display: grid; gap: 3px; padding: 7px 12px; border: 1px solid #ddd1e8; border-radius: 12px; }
.catalog-sort-field span { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.catalog-sort-field select { border: 0; outline: 0; background: #fff; color: var(--ink); font-weight: 750; }

.catalog-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding-block: 42px 80px; }
.catalog-sidebar-page { align-self: start; position: sticky; top: 96px; }
.catalog-sidebar-title { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.catalog-sidebar-title > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--purple-soft); color: var(--purple); }
.catalog-sidebar-title svg { width: 18px; }
.catalog-sidebar-title strong, .catalog-sidebar-title small { display: block; }
.catalog-sidebar-title small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.catalog-category-list { display: grid; gap: 5px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(51,24,80,.06); }
.catalog-category-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 41px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5d5366;
  text-align: left;
  font-size: .78rem;
  font-weight: 750;
}
.catalog-category-list button:hover { background: var(--purple-soft); color: var(--purple-dark); }
.catalog-category-list button.is-active { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; box-shadow: 0 8px 18px rgba(75,20,143,.18); }
.catalog-category-list em { font-style: normal; opacity: .68; font-size: .68rem; }
.catalog-support-card { margin-top: 14px; padding: 18px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #562092, #32105b); box-shadow: var(--shadow); }
.catalog-support-card > svg { width: 26px; height: 26px; color: #d9b4ff; }
.catalog-support-card strong { display: block; margin: 11px 0 4px; }
.catalog-support-card p { margin: 0 0 13px; color: rgba(255,255,255,.7); font-size: .75rem; line-height: 1.5; }
.catalog-support-card a { display: inline-flex; padding: 9px 11px; border-radius: 8px; background: #fff; color: var(--purple-dark); font-size: .72rem; font-weight: 850; }

.catalog-results-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.catalog-results-header h2 { margin: 5px 0 0; font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.04em; }
.catalog-result-count { padding: 8px 11px; border: 1px solid #ddcfea; border-radius: 999px; background: #fff; color: var(--purple-dark); font-size: .76rem; font-weight: 850; }
.catalog-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.catalog-product-card { display: flex; min-width: 0; min-height: 356px; padding: 9px; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.catalog-product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(51,24,80,.13); }
.catalog-product-image { display: grid; place-items: center; height: 165px; padding: 12px; border-radius: 11px; background: linear-gradient(145deg, #fff, #f5effb); }
.catalog-product-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-product-card small { margin-top: 10px; color: var(--success); font-size: .69rem; font-weight: 850; }
.catalog-product-card h3 { display: -webkit-box; min-height: 42px; margin: 6px 0; overflow: hidden; font-size: .83rem; line-height: 1.38; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.catalog-product-card strong { color: var(--purple-dark); font-size: 1.02rem; }
.catalog-product-card p { margin: 3px 0 9px; color: var(--muted); font-size: .67rem; line-height: 1.4; }
.catalog-add-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 39px; margin-top: auto; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--purple), var(--purple-dark)); font-size: .74rem; font-weight: 850; box-shadow: 0 8px 18px rgba(75,20,143,.17); }
.catalog-add-button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(75,20,143,.25); }
.catalog-add-button svg { width: 15px; height: 15px; }
.catalog-empty { display: grid; place-items: center; min-height: 380px; text-align: center; }
.catalog-empty[hidden] { display: none; }
.catalog-empty svg { width: 48px; height: 48px; color: var(--purple); }
.catalog-empty h3 { margin: 12px 0 3px; }
.catalog-empty p { color: var(--muted); }
.catalog-toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: 320px; padding: 13px 16px; border-radius: 12px; background: #251335; color: #fff; font-size: .8rem; font-weight: 750; box-shadow: 0 18px 42px rgba(25,10,38,.3); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .22s ease; }
.catalog-toast.is-visible { opacity: 1; transform: translateY(0); }
.catalog-footer { padding: 24px 0; color: rgba(255,255,255,.7); background: #251335; font-size: .76rem; }
.catalog-footer .catalog-shell { display: flex; justify-content: space-between; gap: 20px; }
.catalog-footer a { color: #fff; font-weight: 800; }

@media (max-width: 1060px) {
  .catalog-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .catalog-header-inner { min-height: 68px; }
  .catalog-brand img { width: 160px; }
  .catalog-header nav > a:not(.catalog-cart-link) { display: none; }
  .catalog-hero { padding: 44px 0 72px; }
  .catalog-hero-grid, .catalog-layout { grid-template-columns: 1fr; }
  .catalog-hero-summary { width: 100%; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-sidebar-page { position: static; }
  .catalog-category-list { display: flex; overflow-x: auto; }
  .catalog-category-list button { flex: 0 0 auto; }
  .catalog-support-card { display: none; }
  .catalog-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-footer .catalog-shell { flex-direction: column; }
}
@media (max-width: 480px) {
  .catalog-product-grid { grid-template-columns: 1fr; }
  .catalog-results-header { align-items: flex-start; flex-direction: column; }
}
