/* Cats catalog */
.cats-cafe-page { padding-bottom: 64px; }

.cats-cafe-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  align-items: center;
  padding: clamp(42px, 7vw, 86px) 0 46px;
}

.cats-cafe-hero h1 {
  max-width: 850px;
  margin: 14px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.cats-cafe-hero p { max-width: 770px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.cats-cafe-hero__doodle {
  position: relative;
  display: grid;
  place-content: center;
  min-height: 220px;
  border-radius: 48% 52% 44% 56%;
  color: var(--accent);
  background: #fff1c8;
  font-family: Georgia, serif;
  text-align: center;
  transform: rotate(2deg);
}

.cats-cafe-hero__slogan {
  max-width: 620px;
  margin: 22px 0 0 !important;
  color: var(--accent) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2vw, 28px) !important;
  font-style: italic;
  line-height: 1.22 !important;
}

.cats-cafe-hero__doodle span { position: absolute; right: 18px; top: 2px; color: #eeb000; font-size: 76px; }
.cats-cafe-hero__doodle strong { font-size: 44px; font-style: italic; font-weight: 500; }
.cats-cafe-tools {
  display: grid;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: var(--shadow);
}

.cats-filter-group { display: grid; gap: 10px; }
.cats-filter-group__label,
.cats-name-search > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cats-filter-pills { display: flex; gap: 9px; flex-wrap: wrap; }
.cats-filter-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(86, 113, 63, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: #fffdf8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.cats-filter-pill:hover { background: #f0f5ea; }
.cats-filter-pill.is-active { color: #fff; border-color: var(--accent); background: var(--accent); }
.cats-filter-pills--categories .cats-filter-pill.is-active { color: #2f311f; border-color: #efb200; background: #ffe28b; }
.cats-filter-pill small {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.cats-name-search { display: grid; gap: 9px; max-width: 420px; }
.cats-name-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  background: #fff;
  font: inherit;
}

.cats-name-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(86, 113, 63, 0.12); }
.cats-catalog-section,
.cats-at-cafe,
.cat-related-section { padding: 58px 0 20px; }
.cats-catalog-section__head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.cats-catalog-section__head h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.05;
  font-weight: 500;
}

.cats-catalog-section__head > p { max-width: 470px; margin: 0; color: var(--muted); line-height: 1.55; }
.cats-all-link { color: var(--accent); font-weight: 800; text-decoration: none; }
.cats-state,
.kgorod-cats__empty {
  padding: 26px;
  border-radius: 20px;
  color: var(--muted);
  background: #fff6dc;
  text-align: center;
}

.kgorod-cats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kgorod-cats__card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.kgorod-cats__card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(75, 58, 35, 0.12); }
.kgorod-cats__card[hidden] { display: none; }
.kgorod-cats__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #f2eadc;
}

.kgorod-cats__image-wrap::after {
  content: "♡";
  position: absolute;
  right: 14px;
  bottom: 8px;
  z-index: 2;
  color: #f2b000;
  font-family: Georgia, serif;
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 1px 0 #fff);
}

.kgorod-cats__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.kgorod-cats__card:hover .kgorod-cats__image { transform: scale(1.025); }
.kgorod-cats__badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #63502b;
  background: rgba(255, 246, 220, 0.92);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.kgorod-cats__new-badge { position: absolute; top: 14px; left: 14px; z-index: 3; padding: 5px 9px; border-radius: 999px; color: #fff; background: #ef6f68; box-shadow: 0 3px 10px rgba(169, 57, 57, .22); font-size: 12px; font-weight: 800; line-height: 1.1; }
.kgorod-cats__badge[data-has-new=true] { right: 14px; left: auto; }
.kgorod-cats__body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.kgorod-cats__name {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 500;
}

.kgv-cat-category { align-self: flex-start; margin-bottom: 9px; color: var(--accent); font-size: 13px; font-weight: 800; }
.kgorod-cats__facts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.kgorod-cats__fact { padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #f3eee5; font-size: 12px; }
.kgorod-cats__desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 1050px) {
  .kgorod-cats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .cats-cafe-hero { grid-template-columns: 1fr; padding-top: 34px; }
  .cats-cafe-hero__doodle { display: none; }
  .cats-cafe-hero h1 { font-size: clamp(44px, 14vw, 62px); }
  .cats-cafe-tools { padding: 18px; border-radius: 22px; }
  .cats-filter-pills { flex-wrap: nowrap; margin-right: -18px; padding-right: 18px; overflow-x: auto; }
  .cats-filter-pill { flex: 0 0 auto; }
  .cats-catalog-section__head { display: block; }
  .cats-catalog-section__head > p,
  .cats-catalog-section__head > a { display: block; margin-top: 12px; }
  .kgorod-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kgorod-cats__card { border-radius: 18px; }
  .kgorod-cats__body { padding: 13px; }
  .kgorod-cats__name { font-size: 23px; }
  .kgorod-cats__desc { display: none; }
  .kgorod-cats__image-wrap { aspect-ratio: 1 / 1.18; }
  .kgorod-cats__badge { left: 9px; top: 9px; padding: 5px 8px; font-size: 10px; }
  .kgorod-cats__new-badge { top: 9px; left: 9px; padding: 4px 7px; font-size: 10px; }
  .kgorod-cats__badge[data-has-new=true] { right: 9px; }
  .kgorod-cats__image-wrap::after { right: 8px; bottom: 4px; font-size: 36px; }
}

.cats-catalog-section__title-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.cats-cafe-tools[hidden] { display: none; }

.cats-search-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(86, 113, 63, .34);
  border-radius: 50%;
  color: var(--accent);
  background: #fffdf8;
  box-shadow: 0 5px 14px rgba(47, 39, 28, .09);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.cats-search-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.cats-search-toggle:hover,
.cats-search-toggle:focus-visible,
.cats-search-toggle[aria-expanded="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}

/* Компактная панель каталога: подсказка слева, поиск у правого края. */
.cats-catalog-section__head { align-items: center; }
.cats-catalog-section__head > p { max-width: 640px; }
.cats-catalog-section__head > .cats-search-toggle { flex: 0 0 auto; margin-left: auto; }
@media (max-width: 760px) {
  .cats-catalog-section__head { display: flex; align-items: center; gap: 16px; }
  .cats-catalog-section__head > p { margin: 0; max-width: none; }
  .cats-catalog-section__head > .cats-search-toggle { margin-left: auto; }
}

/* Выпадающие фильтры и поиск закреплены у кнопки-лупы. */
.cats-catalog-section__head { position: relative; }
.cats-catalog-section__head > .cats-cafe-tools {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(720px, calc(100vw - 48px));
  margin: 0;
}
@media (max-width: 760px) {
  .cats-catalog-section__head > .cats-cafe-tools {
    width: min(520px, calc(100vw - 32px));
  }
}

/* Mobile catalog: compact controls and a content-first card. */
.cats-filter-summary { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.cats-filter-apply { min-height: 44px; border: 0; border-radius: 14px; color: #fff; background: var(--accent); font: inherit; font-weight: 800; cursor: pointer; }
.cats-search-toggle > span { display: none; }

@media (max-width: 760px) {
  .cats-cafe-page { padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
  .cats-cafe-page .page-container { width: 100%; }
  .cats-cafe-hero { padding: 26px 0 22px; gap: 0; }
  .cats-cafe-hero h1 { margin: 10px 0 12px; font-size: clamp(38px, 11vw, 52px); }
  .cats-cafe-hero p { font-size: 16px; line-height: 1.45; }
  .cats-cafe-hero__slogan { display: none; }
  .cats-catalog-section { padding: 20px 0; }
  .cats-catalog-section__head { align-items: flex-start; margin-bottom: 16px; }
  .cats-catalog-section__head > p { font-size: 14px; line-height: 1.45; }
  .cats-search-toggle { width: auto; min-width: 44px; min-height: 44px; height: 44px; padding: 0 14px; border-radius: 14px; }
  .cats-search-toggle > span { display: inline; font-size: 14px; font-weight: 800; }
  .cats-search-toggle svg { width: 18px; height: 18px; }
  .cats-catalog-section__head > .cats-cafe-tools { right: 0; width: 100%; max-height: min(70vh, 560px); gap: 16px; padding: 16px; overflow-y: auto; border-radius: 20px; }
  .cats-filter-group { gap: 8px; }
  .cats-filter-pills { flex-wrap: wrap; margin-right: 0; padding-right: 0; overflow: visible; }
  .cats-filter-pill { min-height: 44px; padding: 0 13px; font-size: 13px; }
  .cats-name-search { max-width: none; gap: 7px; }
  .cats-name-search input { min-height: 44px; padding: 0 14px; font-size: 16px; }
  .cats-cafe-page .kgorod-cats__grid { gap: 14px; }
  .cats-cafe-page .cats-catalog-card { border-radius: 16px; }
  .cats-cafe-page .cats-catalog-card .kgorod-cats__image-wrap::after { display: none; }
  .cats-cafe-page .cats-catalog-card .kgorod-cats__body { padding: 12px; }
  .cats-cafe-page .cats-catalog-card .kgorod-cats__name { display: -webkit-box; margin-bottom: 7px; overflow: hidden; font-size: 21px; line-height: 1.08; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .cats-cafe-page .cats-catalog-card .kgv-cat-category,
  .cats-cafe-page .cats-catalog-card .kgorod-cats__facts { display: none; }
  .cats-cafe-page .cats-catalog-card .kgorod-cats__desc { display: -webkit-box; color: var(--muted); font-size: 15px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
}

.cats-cafe-page .breadcrumbs { margin-top: 22px; margin-bottom: 0; }
.cats-cafe-hero { grid-template-columns: minmax(0, 1fr) 130px; gap: 24px; padding: 20px 0 24px; }
.cats-cafe-hero h1 { max-width: none; margin: 0 0 12px; font-size: clamp(50px, 4.2vw, 60px); line-height: 1; }
.cats-cafe-hero .cafe-kicker { display: none; }
.cats-cafe-hero__lead { max-width: 760px; font-size: 17px !important; line-height: 1.48 !important; }
.cats-cafe-hero__slogan { display: none; }
.cats-cafe-hero__doodle { min-height: 126px; border-radius: 48% 52% 44% 56%; }
.cats-cafe-hero__doodle span { right: 10px; top: 0; font-size: 43px; }
.cats-cafe-hero__doodle strong { font-size: 30px; }
.cats-cafe-tools { display: flex !important; align-items: end; gap: 12px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.cats-cafe-tools .cats-filter-group:first-child, .cats-filter-summary, .cats-filter-apply { display: none; }
.cats-cafe-tools .cats-filter-group { flex: 1 1 auto; min-width: 0; }
.cats-cafe-tools .cats-filter-group__label { display: none; }
.cats-filter-pills { flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.cats-filter-pill { min-height: 38px; padding: 0 13px; white-space: nowrap; }
.cats-filter-pill small { display: none; }
.cats-filter-pills--categories .cats-filter-pill.is-active { background: #ffe28b; border-color: #efb200; }
.cats-name-search { flex: 0 0 220px; gap: 5px; }
.cats-name-search > span { font-size: 11px; }
.cats-name-search input { min-height: 38px; border-radius: 999px; padding: 0 14px; }
.cats-new-info { margin-top: 18px; padding: 14px 18px; border-radius: 14px; color: #3e6234; background: #e7f2df; font-size: 14px; font-weight: 700; line-height: 1.35; }
.cats-catalog-section { padding-top: 24px; }
.cats-catalog-section__head { margin-bottom: 18px; }
.cats-catalog-section__head > p { max-width: none; font-size: 14px; }
.cats-search-toggle { display: none; }
@media (max-width: 760px) { .cats-cafe-page .breadcrumbs { margin-top: 12px; } .cats-cafe-hero { grid-template-columns: 1fr; padding: 14px 0 18px; } .cats-cafe-hero h1 { font-size: clamp(38px, 11vw, 44px); } .cats-cafe-hero__lead { font-size: 16px !important; } .cats-cafe-hero__doodle { display: none; } .cats-cafe-tools { display: grid !important; gap: 12px; } .cats-filter-pills { padding-bottom: 4px; } .cats-filter-pill { min-height: 38px; } .cats-name-search { width: 100%; max-width: none; } .cats-new-info { margin-top: 14px; padding: 13px 14px; } .cats-catalog-section { padding-top: 18px; } }
@media (max-width: 340px) {
  .cats-cafe-page .kgorod-cats__grid { grid-template-columns: 1fr; }
}
