/* Вітрина матки — night market: charcoal + amber + Syne/Outfit */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Syne:wght@620;700;800&display=swap");

:root {
  --ink: #0c1016;
  --ink-2: #171e28;
  --paper: #f2f4f7;
  --paper-2: #e6ebf1;
  --surface: #ffffff;
  --muted: #5d6b7c;
  --line: #d5dde7;
  --accent: #e2a116;
  --accent-deep: #c4860a;
  --accent-ink: #14120a;
  --teal: #1f9e8a;
  --danger: #c0392b;
  --ok: #1b7a4a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(12, 16, 22, 0.14);
  --font: "Outfit", sans-serif;
  --display: "Syne", sans-serif;
  --wrap: min(1180px, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(226, 161, 22, 0.18), transparent 55%),
    radial-gradient(800px 480px at -5% 20%, rgba(31, 158, 138, 0.12), transparent 50%),
    linear-gradient(180deg, #e9eef4 0%, var(--paper) 38%, #eef1f5 100%);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { width: var(--wrap); margin: 0 auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* —— Header (dnipro-like: top strip + catalog bar) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  background: #0a0e14;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #f4f6f8;
}
.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
}
.header-top .brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
.header-top .brand:hover { color: var(--accent); text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(226, 161, 22, 0.35);
}
.brand-mark--foot { width: 28px; height: 28px; border-radius: 7px; }
.brand-text { line-height: 1; }
.foot-brand {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
}
.header-top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.1rem;
  align-items: center;
  font-size: .92rem;
}
.header-top__nav a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-weight: 500;
}
.header-top__nav a:hover { color: #fff; text-decoration: none; }
.header-top__admin { color: var(--accent) !important; }
.header-top .linkish {
  background: none; border: 0; color: rgba(255,255,255,.78);
  cursor: pointer; font: inherit; padding: 0; font-weight: 500;
}
.header-top .linkish:hover { color: #fff; }

.header-main {
  background: rgba(12, 16, 22, 0.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.header-main__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
}
.header-catalog {
  position: relative;
  flex: 0 0 auto;
}
.mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: .92rem;
  border: 1px solid transparent;
}
.mega-trigger:hover,
.header-catalog.is-open .mega-trigger {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.mega-trigger__grid {
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle, var(--accent) 45%, transparent 46%) 0 0 / 8px 8px no-repeat,
    radial-gradient(circle, var(--accent) 45%, transparent 46%) 10px 0 / 8px 8px no-repeat,
    radial-gradient(circle, var(--accent) 45%, transparent 46%) 0 10px / 8px 8px no-repeat,
    radial-gradient(circle, var(--accent) 45%, transparent 46%) 10px 10px / 8px 8px no-repeat;
}
.header-search {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: #1a222d;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  padding: .7rem 1rem;
  font: inherit;
}
.header-search input::placeholder { color: rgba(255,255,255,.4); }
.header-search button {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 .95rem;
  cursor: pointer;
}
.header-search__icon {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.header-search__icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: currentColor;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 1px;
}

.mega-panel {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 60;
  width: min(1100px, calc(100vw - 2rem));
  /* «міст» без щілини — інакше hover блимає */
  padding-top: 8px;
  margin-top: -2px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.header-catalog.is-open .mega-panel,
.header-catalog:hover .mega-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.mega-panel[hidden] { display: block !important; } /* legacy; visibility керує .is-open / :hover */
.mega-panel__inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mega-panel .mega-cols {
  min-height: 480px;
  max-height: min(70vh, 620px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.crumbs { margin: 1rem 0 0; font-size: .9rem; }
.crumbs a { color: var(--muted); }
.catalog-title { text-align: center; margin-top: .5rem; }

.news-list { display: grid; gap: 1rem; margin: 1rem 0 2rem; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.news-card h2 {
  font-family: var(--display);
  margin: .2rem 0 .45rem;
  font-size: 1.25rem;
}
.news-card__date { margin: 0; font-size: .85rem; }
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
@media (max-width: 860px) {
  .support-grid { grid-template-columns: 1fr; }
  .header-top__inner { flex-direction: column; align-items: flex-start; }
  .header-main__inner { flex-wrap: wrap; }
  .header-catalog { width: 100%; }
  .mega-panel {
    position: fixed;
    left: .75rem;
    right: .75rem;
    width: auto;
    top: auto;
  }
}

/* legacy .top kept for old pages if any */
.top { display: none; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 999px; padding: .62rem 1.15rem; font-weight: 700;
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover, button.btn:hover { background: #f0b531; text-decoration: none; transform: translateY(-1px); }
.btn.secondary {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2);
}
.btn.secondary:hover { background: rgba(255,255,255,.2); color: #fff; }
main .btn.secondary,
.panel .btn.secondary {
  background: #e8eef2; color: var(--ink); border: 1px solid var(--line);
}
main .btn.secondary:hover,
.panel .btn.secondary:hover { background: #dbe3ea; color: var(--ink); }
.btn.ghost-dark {
  background: var(--ink); color: #fff;
}
.btn.ghost-dark:hover { background: #243041; color: #fff; }

/* —— Hero carousel (full-bleed) —— */
.hero-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  min-height: min(78vh, 640px);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.carousel { position: absolute; inset: 0; }
.carousel-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.carousel-slide.is-on { opacity: 1; pointer-events: auto; }
.carousel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.carousel-slide::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,10,14,.88) 0%, rgba(8,10,14,.55) 42%, rgba(8,10,14,.25) 100%),
    linear-gradient(0deg, rgba(8,10,14,.55), transparent 45%);
}
.hero-content {
  position: relative; z-index: 2;
  width: var(--wrap); margin: 0 auto;
  min-height: min(78vh, 640px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 5.5rem 0 2.4rem;
  max-width: 34rem;
}
.hero-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: .95;
  letter-spacing: -0.04em;
  margin: 0 0 .85rem;
  color: #fff;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .55rem;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 .55rem;
  letter-spacing: -0.02em;
}
.hero-text {
  margin: 0 0 1.25rem;
  color: rgba(255,255,255,.78);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 32rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.carousel-dots {
  position: absolute; z-index: 3;
  left: 50%; transform: translateX(-50%);
  bottom: 1.1rem;
  display: flex; gap: .45rem;
}
.carousel-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.35);
}
.carousel-dot.is-on { background: var(--accent); }

/* —— Search strip —— */
.search-strip {
  margin: -1.6rem auto 0;
  position: relative; z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: .85rem;
}
.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .55rem;
}
.search input[type="search"],
.search input[type="number"],
.filter-bar select {
  width: 100%;
  padding: .78rem .95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.search button {
  border: 0; border-radius: 12px;
  background: var(--ink); color: #fff;
  padding: 0 1.25rem; cursor: pointer; font-weight: 700;
}
.search button:hover { background: #243041; }

/* —— Sections —— */
.section { padding: 2.2rem 0 0.4rem; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: end;
  justify-content: space-between; gap: .75rem;
  margin-bottom: 1rem;
}
.section-head h2 {
  font-family: var(--display);
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
}
.section-head p { margin: .25rem 0 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .2rem 0 1.1rem; }
.chip {
  padding: .4rem .8rem; border-radius: 999px;
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
  color: var(--ink); font-size: .92rem; font-weight: 560;
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.is-on {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  padding-bottom: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card img, .ph {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--paper-2);
}
.card-body { padding: .85rem .9rem 1.05rem; }
.card-body h2 {
  margin: 0 0 .35rem; font-size: 1rem; line-height: 1.3;
  font-weight: 650; color: var(--ink);
}
.price { margin: 0; font-weight: 750; font-size: 1.05rem; color: var(--ink); }
.muted { color: var(--muted); }
.shop-pill {
  display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap;
  margin-top: .45rem; font-size: .86rem; color: var(--muted);
}
.shop-name {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Catalog layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .catalog-layout { grid-template-columns: 1fr; }
}
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
  margin-bottom: 1rem;
}
.filter-bar .grow { flex: 1; min-width: 180px; }
.page-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 1.2rem 0 .35rem;
  letter-spacing: -0.03em;
}
.pager {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  padding: .5rem 0 2rem;
}
.pager a, .pager span {
  padding: .4rem .75rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  text-decoration: none; font-weight: 600;
}
.pager .is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.cta-band {
  margin: 1rem 0 2.5rem;
  border-radius: calc(var(--radius) + 6px);
  padding: 1.6rem 1.5rem;
  background:
    linear-gradient(135deg, #141b24, #0c1016 60%),
    radial-gradient(500px 200px at 90% 10%, rgba(226,161,22,.35), transparent 60%);
  color: #fff;
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.cta-band h2 {
  font-family: var(--display); margin: 0 0 .35rem;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
}
.cta-band p { margin: 0; color: rgba(255,255,255,.75); max-width: 36rem; }

/* —— App panels (cabinet / auth) —— */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 8px 28px rgba(12,16,22,.04);
}
.panel h1, .panel h2 {
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.stack { display: grid; gap: .75rem; max-width: 480px; }
.stack label { display: grid; gap: .3rem; font-weight: 600; }
.stack input, .stack select, .table select {
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit;
}
.error { color: var(--danger); }
.ok { color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.list { padding-left: 1.1rem; }
.list li { margin: .6rem 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: .55rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.inline { display: inline; }
.inline-row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.admin-shops {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-shops li { margin: .2rem 0; }
.admin-dl {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: .35rem .75rem;
  margin: 0;
}
.admin-dl dt { color: var(--muted); }
.admin-dl dd { margin: 0; word-break: break-word; }
.admin-dl code { font-size: .9em; }
.rubric-admin-tree {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0 0 0 0.75rem;
  border-left: 1px solid var(--line);
}
.rubric-admin-tree > .rubric-admin-node { margin: 0.65rem 0; }
.rubric-admin-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.rubric-admin-media img {
  display: block;
  object-fit: contain;
  border-radius: 4px;
  background: #f3f5f7;
}
.rubric-admin-node.is-hidden .rubric-admin-meta strong { opacity: 0.55; }
.rubric-admin-edit {
  margin: 0.35rem 0 0.25rem 2.2rem;
}
.rubric-admin-edit summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
}
.rubric-admin-edit[open] summary { margin-bottom: 0.5rem; }
.rubric-admin-edit .stack { max-width: 32rem; }
.partner-ads {
  margin: 1.25rem 0 1.5rem;
  padding: 0.85rem 0 0.25rem;
  border-top: 1px solid var(--line);
}
.partner-ads__label {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.partner-ads__track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: none;
}
.partner-ad {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eef3;
  text-decoration: none;
  color: inherit;
  max-height: 180px;
}
.partner-ad img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.partner-ad__name {
  display: block;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: #f7f9fb;
}
@media (max-width: 640px) {
  .partner-ad,
  .partner-ad img { max-height: 120px; height: 110px; }
}
.admin-banner-thumb {
  width: 120px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: #e8eef3;
}
.advertisers-hero .lead {
  max-width: 40rem;
  font-size: 1.1rem;
  line-height: 1.55;
}
.advertisers-steps { margin-top: 0.75rem; }
.advertisers-steps li { margin: 0.45rem 0; }
.foot {
  padding: 2.4rem 0 2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.foot-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: start;
}
.foot strong {
  font-family: var(--display); color: var(--ink); font-size: 1.1rem;
}
.plan-pick { border: 1px solid var(--line); border-radius: 12px; padding: .85rem; max-width: 560px; }
.plan-pick legend { font-weight: 700; padding: 0 .35rem; font-family: var(--display); }
.plan-card { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; margin: .55rem 0; }
.plan-card input { margin-top: .25rem; }

@media (max-width: 640px) {
  .hero-content { padding-top: 4.5rem; }
  .search { grid-template-columns: 1fr; }
  .search button { padding: .75rem; }
}

/* Home pitch */
.pitch-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pitch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 8px 28px rgba(12,16,22,.04);
}
.pitch-card h3 {
  font-family: var(--display);
  margin: 0 0 .45rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.pitch-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.pitch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}
.catalog-page-head { margin: 1.1rem 0 1rem; }
.catalog-active { margin: 0 0 1rem; }
.section-mega { margin-bottom: 1.5rem; }

@media (max-width: 860px) {
  .pitch-cards { grid-template-columns: 1fr; }
}
.mega-cols {
  display: flex;
  min-height: 520px;
  max-height: min(70vh, 640px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.mega-l1 {
  width: 300px;
  flex: 0 0 300px;
  background: #f0f2f5;
  overflow: auto;
}
.mega-l1__list { list-style: none; margin: 0; padding: .65rem 0; }
.mega-l1__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .85rem;
  margin: 0 .55rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.mega-l1__item.is-active .mega-l1__link,
.mega-l1__link:hover {
  background: #e3e6ea;
  text-decoration: none;
  color: var(--ink);
}
.mega-l1__item.is-active .mega-l1__label { color: var(--accent-deep); font-weight: 600; }
.mega-l1__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 4px;
  object-fit: cover;
}
.mega-l2 {
  flex: 1;
  background: #fff;
  overflow: auto;
  position: relative;
}
.mega-l2__pane { padding: .75rem 1rem 1.1rem; }
.mega-l2__head {
  display: flex; align-items: baseline; gap: .75rem;
  margin-bottom: .65rem; padding: 0 .35rem;
}
.mega-l2__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.mega-l2__title:hover { color: var(--teal); }
.mega-l2__grid {
  list-style: none;
  margin: 0;
  padding: .25rem 0 0;
  display: flex;
  flex-wrap: wrap;
}
.mega-l2__item {
  width: calc(20% - 10px);
  max-width: calc(20% - 10px);
  margin: 0 5px 10px;
}
.mega-l2__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 10px;
  border-radius: 8px;
  min-height: 150px;
}
.mega-l2__card:hover {
  background: #f5f7fa;
  text-decoration: none;
}
.mega-l2__thumb {
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f4;
}
.mega-l2__thumb img {
  width: 100px; height: 100px;
  object-fit: cover;
}
.mega-l2__name {
  font-size: .8rem;
  line-height: 1.25;
  font-weight: 500;
}
.mega-l2__empty { padding: 1rem; }
.mega-l2__foot {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  margin-top: 1rem;
  padding: .85rem .35rem 0;
  border-top: 1px solid var(--line);
}
.mega-l2__full {
  font-weight: 600;
  color: var(--teal);
}

/* Inline mega on home */
.section-mega .section-head { margin-bottom: 1rem; }
.mega-inline {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #fff;
}
.mega-cols--inline {
  min-height: 480px;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  border: 0;
}
.mega-cols--inline .mega-l2 { max-height: 560px; overflow: auto; }
.mega-cols--inline .mega-l1 { max-height: 560px; overflow: auto; }

body.mega-open { /* no overflow lock — інакше стрибає scrollbar */ }

/* —— Catalog filters (Kronix style) —— */
.filter-panel {
  background:
    linear-gradient(165deg, #161d27 0%, #0f141c 55%, #121820 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.15rem 1.1rem 1.25rem;
  position: sticky; top: 4.5rem;
  color: #e8edf3;
  box-shadow: 0 16px 40px rgba(12, 16, 22, 0.22);
}
.filter-panel h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.filter-panel label {
  display: grid;
  gap: .35rem;
  font-weight: 600;
  font-size: .82rem;
  margin-bottom: .85rem;
  color: rgba(232, 237, 243, .72);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: .65rem .75rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.filter-panel input::placeholder { color: rgba(255,255,255,.35); }
.filter-panel select option { color: var(--ink); background: #fff; }
.filter-panel input:focus,
.filter-panel select:focus {
  outline: 2px solid rgba(226, 161, 22, .55);
  outline-offset: 1px;
  border-color: rgba(226, 161, 22, .65);
}
.filter-panel .btn,
.filter-panel button[type="submit"] {
  width: 100%;
  margin-top: .35rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  padding: .7rem 1rem;
  cursor: pointer;
}
.filter-panel .btn:hover,
.filter-panel button[type="submit"]:hover {
  background: var(--accent-deep);
  color: #fff;
}
.filter-panel .filter-reset {
  display: inline-block;
  margin-top: .75rem;
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}
.filter-panel .filter-reset:hover { color: var(--accent); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filter-bar .grow { flex: 1; min-width: 180px; margin: 0; }

/* —— Catalog category hub —— */
.cat-hub { margin: 1.2rem 0 1.5rem; }
.cat-hub__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.cat-card__preview {
  display: block;
  aspect-ratio: 1;
  background: #f0f2f5;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}
.cat-card__preview img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8%;
}
.cat-card__ph {
  display: block; width: 100%; height: 100%;
  background: var(--paper-2);
}
.cat-card__title {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: .98rem;
  line-height: 1.25;
}
.cat-card__title:hover { color: var(--teal); }
.cat-card__teaser {
  list-style: none; margin: 0; padding: 0;
  font-size: .85rem;
}
.cat-card__teaser a { color: var(--muted); }
.cat-card__teaser a:hover { color: var(--teal); }
.cat-card__more {
  align-self: flex-start;
  background: none; border: 0; padding: 0;
  color: var(--ink); font: inherit; font-size: .85rem;
  font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: .25rem;
}
.cat-card__more::after {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .15s ease;
}
.cat-card__more[aria-expanded="true"]::after { transform: rotate(180deg); }
.cat-card__all {
  list-style: none; margin: 0; padding: 0;
  font-size: .85rem;
  display: flex; flex-direction: column; gap: .2rem;
}
.cat-card__all a { color: var(--muted); }
.cat-card__meta { margin: 0; font-size: .8rem; }
.cat-card--compact {
  text-decoration: none;
  color: inherit;
}
.cat-card--compact:hover { text-decoration: none; }
.cat-card--compact .cat-card__title { font-size: .9rem; }
.cat-hub--home .cat-hub__grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .cat-hub__grid,
  .cat-hub--home .cat-hub__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mega-l2__item { width: calc(25% - 10px); max-width: calc(25% - 10px); }
}
@media (max-width: 900px) {
  .cat-hub__grid,
  .cat-hub--home .cat-hub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .mega-cols--inline {
    flex-direction: column;
    min-height: 0;
  }
  .mega-cols--inline .mega-l1 {
    width: 100%;
    flex: none;
    max-height: 220px;
  }
  .mega-cols--inline .mega-l2 { max-height: none; }
  .mega-cols--inline .mega-l2__item {
    width: calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}
@media (max-width: 640px) {
  .cat-hub__grid { gap: .75rem; }
  .cat-card__title { font-size: .92rem; }
}

