/*
 * Catalog layout: every filter lives in the left column, the results column
 * holds only a compact header (count · list/map · sort) and the cards.
 * Loaded after catalog_places.css / catalog_polish.css. The
 * :not(#kmc-a):not(#kmc-b) prefix only lifts specificity over those files'
 * !important chains.
 */

/* Shared: hidden really hides, even where a rule sets display with !important. */
html body .page-place_list [hidden]:not(#kmc-a):not(#kmc-b),
html body.page-place_list [hidden]:not(#kmc-a):not(#kmc-b) {
  display: none !important;
}

@media (min-width: 821px) {
  /* ---------- Results column: just the header and the cards ---------- */
  body.page-place_list .catalog-category-picker,
  body.page-place_list .catalog-top-stack .active-filter-bar:not(#kmc-a):not(#kmc-b) {
    display: none !important;
  }

  body.page-place_list .catalog-layout .catalog-top-stack:not(#kmc-a):not(#kmc-b) {
    gap: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
  }

  body.page-place_list .catalog-layout .results-toolbar:not(#kmc-a):not(#kmc-b) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.page-place_list .results-toolbar .results-count:not(#kmc-a):not(#kmc-b) {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--kmc-ink, #1d2b23) !important;
    white-space: nowrap !important;
  }

  body.page-place_list .results-toolbar .results-toolbar-actions:not(#kmc-a):not(#kmc-b) {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  body.page-place_list .results-toolbar .results-toolbar-sort-label:not(#kmc-a) {
    display: none !important;
  }

  body.page-place_list .results-toolbar .km-sort-trigger:not(#kmc-a):not(#kmc-b) {
    min-height: 44px !important;
    border-radius: 14px !important;
    background: #fff !important;
  }

  body.page-place_list .results-toolbar .results-view-mode:not(#kmc-a):not(#kmc-b) {
    background: #e9f0ec !important;
  }

  /* ---------- Hero: shorter, so the first cards are visible sooner ---------- */
  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) {
    padding: 22px 28px !important;
    margin-bottom: 18px !important;
    gap: 28px !important;
    animation-duration: 0.35s !important;
  }

  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) h1 {
    max-width: none !important;
    font-size: clamp(24px, 2.4vw, 30px) !important;
    margin-bottom: 6px !important;
  }

  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) .hero-intro-text {
    margin-bottom: 14px !important;
  }

  /* The count already sits above the cards: the stats column only pushed them down. */
  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) .catalog-hero-stats {
    display: none !important;
  }

  body.page-place_list .hero.catalog-faq-hero:not(#kmc-a):not(#kmc-b) .hero-intro-text {
    max-width: none !important;
  }

  /* ---------- Sidebar: categories as a list ---------- */
  body.page-place_list .filters-catalog > [data-cat-custom-select-wrap]:not(#kmc-a):not(#kmc-b) {
    display: none !important;
  }
}

@media (max-width: 820px) {
  body.page-place_list .km-cat-list:not(#kmc-a):not(#kmc-b),
  body.page-place_list .km-side-chips:not(#kmc-a):not(#kmc-b) {
    display: none !important;
  }
}

/* ---------- Category list ---------- */
html body .km-cat-list:not(#kmc-a) {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

html body .km-cat-list__title:not(#kmc-a) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--kmc-ink, #1d2b23) !important;
  line-height: 1.25 !important;
}

html body .km-cat-list__items:not(#kmc-a) {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

html body .km-cat-item:not(#kmc-a):not(#kmc-b) {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 5px 10px 5px 6px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #33463a !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.25s var(--kmc-spring, ease) !important;
}

html body .km-cat-item:not(#kmc-a):not(#kmc-b):hover {
  background: #f2f8f4 !important;
  color: var(--kmc-green-deep, #0e5f30) !important;
}

html body .km-cat-item:not(#kmc-a):not(#kmc-b):active {
  transform: scale(0.98) !important;
}

html body .km-cat-item:not(#kmc-a):not(#kmc-b):focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(22, 122, 63, 0.25) !important;
}

html body .km-cat-item.is-active:not(#kmc-a):not(#kmc-b) {
  background: var(--kmc-green-soft, #e9f6ee) !important;
  color: var(--kmc-green-deep, #0e5f30) !important;
  font-weight: 800 !important;
}

html body .km-cat-item.is-active:not(#kmc-a):not(#kmc-b)::before {
  content: "" !important;
  position: absolute !important;
  left: -6px !important;
  top: 10px !important;
  bottom: 10px !important;
  width: 3px !important;
  border-radius: 3px !important;
  background: var(--kmc-green, #167a3f) !important;
  animation: kmc-bar-in 0.35s var(--kmc-spring, ease) both;
}

html body .km-cat-item__icon:not(#kmc-a) {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: var(--cat-bg, #f0f5f2) !important;
  color: var(--cat-fg, #47584d) !important;
  transition: transform 0.3s var(--kmc-spring, ease) !important;
}

html body .km-cat-item__icon--all:not(#kmc-a) {
  background: #eef3f0 !important;
  color: var(--kmc-green, #167a3f) !important;
}

html body .km-cat-item__icon:not(#kmc-a) :is(svg, img, .category-visual-icon) {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  font-size: 17px !important;
}

html body .km-cat-item:not(#kmc-a):hover .km-cat-item__icon,
html body .km-cat-item.is-active:not(#kmc-a) .km-cat-item__icon {
  transform: scale(1.08) rotate(-4deg) !important;
}

html body .km-cat-item__label:not(#kmc-a) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .km-cat-item__count:not(#kmc-a) {
  flex: 0 0 auto !important;
  min-width: 26px !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: #f1f5f2 !important;
  color: #6a7d71 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

html body .km-cat-item.is-active:not(#kmc-a) .km-cat-item__count {
  background: #fff !important;
  color: var(--kmc-green-deep, #0e5f30) !important;
}

/* Long list: the rest opens on demand. */
html body .km-cat-list:not(.is-expanded):not(#kmc-a) .km-cat-item.is-extra:not(#kmc-b):not(#kmc-c) {
  display: none !important;
}

html body .km-cat-list.is-expanded:not(#kmc-a) .km-cat-item.is-extra {
  animation: kmc-item-in 0.26s var(--kmc-out, ease) both;
}

html body .km-cat-list__more:not(#kmc-a):not(#kmc-b) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  align-self: flex-start !important;
  margin: 0 0 0 8px !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--kmc-green, #167a3f) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

html body .km-cat-list__more:not(#kmc-a):hover {
  background: #f2f8f4 !important;
}

html body .km-cat-list__more:not(#kmc-a) svg {
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.3s var(--kmc-spring, ease) !important;
}

html body .km-cat-list__more[aria-expanded="true"]:not(#kmc-a) svg {
  transform: rotate(180deg) !important;
}

/* ---------- Applied filters in the sidebar ---------- */
html body .km-side-chips:not(#kmc-a):not(#kmc-b) {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: -4px 0 4px !important;
}

html body .km-side-chips:not(#kmc-a) .active-filter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 30px !important;
  padding: 0 6px 0 11px !important;
  border: 1.5px solid #bfe0cb !important;
  border-radius: 999px !important;
  background: var(--kmc-green-soft, #e9f6ee) !important;
  color: var(--kmc-green-deep, #0e5f30) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  animation: kmc-badge-in 0.35s var(--kmc-spring, ease) both;
  transition: background-color 0.16s ease, border-color 0.16s ease !important;
}

html body .km-side-chips:not(#kmc-a) .active-filter-chip:hover {
  background: #d6efe0 !important;
  border-color: var(--kmc-green, #167a3f) !important;
}

html body .km-side-chips:not(#kmc-a) .active-filter-chip-remove {
  display: inline-grid !important;
  place-items: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: rgba(22, 122, 63, 0.12) !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

/* Inline outline icons (no icon-font wait). */
html body .filters .km-icon:not(#kmc-a) {
  flex: 0 0 20px !important;
  width: 20px !important;
  height: 20px !important;
  color: var(--kmc-green, #167a3f) !important;
  stroke-width: 2 !important;
}

html body .filters .km-filter-actions .km-icon:not(#kmc-a) {
  color: currentColor !important;
  width: 19px !important;
  height: 19px !important;
}

html body .filters .catalog-filter-title h2:not(#kmc-a) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

@media (prefers-reduced-motion: reduce) {
  html body:not(#kmc-a) :is(.km-cat-item, .km-cat-item *, .km-cat-list__more svg, .km-side-chips *) {
    animation: none !important;
    transition: none !important;
  }
}

/* ============ Phone filters: compact bottom sheet ============ */
@media (max-width: 760px) {
  body.page-place_list .filters-catalog:not(#kmc-a):not(#kmc-b) {
    top: auto !important;
    bottom: 0 !important;
    max-height: min(86dvh, 760px) !important;
    padding: 0 16px !important;
    gap: 14px !important;
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -18px 40px -20px rgba(17, 54, 33, 0.35) !important;
    overscroll-behavior: contain !important;
  }

  /* Sticky header: grabber, title, close — one compact row */
  body.page-place_list .filters-catalog .mobile-filters-head:not(#kmc-a):not(#kmc-b) {
    position: sticky !important;
    z-index: 6 !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 0 !important;
    margin: 0 -16px !important;
    padding: 18px 16px 10px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #edf2ee !important;
  }

  body.page-place_list .filters-catalog .mobile-filters-handle:not(#kmc-a):not(#kmc-b) {
    position: absolute !important;
    top: 7px !important;
    left: 50% !important;
    width: 40px !important;
    height: 4px !important;
    margin: 0 0 0 -20px !important;
    border-radius: 4px !important;
    background: #d5e2d9 !important;
  }

  body.page-place_list .filters-catalog .mobile-filters-head h2:not(#kmc-a):not(#kmc-b) {
    margin: 0 !important;
    font-size: 19px !important;
    font-weight: 850 !important;
  }

  body.page-place_list .filters-catalog .mobile-filters-close:not(#kmc-a):not(#kmc-b) {
    width: 36px !important;
    height: 36px !important;
    min-height: 0 !important;
  }

  /* The desktop "Filtrlər" title repeats the sheet title: hide it on phones */
  body.page-place_list .filters-catalog .catalog-filter-title:not(#kmc-a):not(#kmc-b) {
    display: none !important;
  }

  /* Groups: tight, labels aligned with their icons */
  body.page-place_list .filters-catalog > *:not(#kmc-a):not(#kmc-b) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body.page-place_list .filters-catalog :is(label, legend, .km-cat-list__title):not(#kmc-a):not(#kmc-b) {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  body.page-place_list .filters-catalog :is(label, legend) :is(svg, .km-icon, .material-symbols-rounded):not(#kmc-a):not(#kmc-b) {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    font-size: 18px !important;
    vertical-align: middle !important;
  }

  body.page-place_list .filters-catalog .range-filter-head:not(#kmc-a):not(#kmc-b) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 !important;
  }

  body.page-place_list .filters-catalog .range-filter-head label:not(#kmc-a):not(#kmc-b) {
    margin: 0 !important;
  }

  /* No odd tinted box behind one of the sliders */
  body.page-place_list .filters-catalog :is(.range-filter, [data-price-filter-slot]):not(#kmc-a):not(#kmc-b) {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.page-place_list .filters-catalog .kmr-host:not(#kmc-a):not(#kmc-b) {
    margin-top: 6px !important;
  }

  body.page-place_list .filters-catalog :is(.km-custom-select__trigger, .km-tree-trigger):not(#kmc-a):not(#kmc-b) {
    min-height: 46px !important;
    border-radius: 14px !important;
  }

  body.page-place_list .filters-catalog .event-type-filter:not(#kmc-a):not(#kmc-b) > * {
    min-height: 38px !important;
  }

  body.page-place_list .filters-catalog .rating-filter-pill:not(#kmc-a):not(#kmc-b) {
    min-height: 40px !important;
  }

  /* Sticky footer: Apply + Reset always reachable */
  body.page-place_list .filters-catalog .km-filter-actions:not(#kmc-a):not(#kmc-b) {
    position: sticky !important;
    z-index: 6 !important;
    bottom: 0 !important;
    display: flex !important;
    gap: 8px !important;
    margin: 4px -16px 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    justify-self: stretch !important;
    width: auto !important;
    max-width: none !important;
    border-top: 1px solid #edf2ee !important;
    background: rgba(255, 255, 255, 0.97) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  body.page-place_list .filters-catalog .km-filter-actions > .km-btn-apply:not(#kmc-a):not(#kmc-b) {
    flex: 1.6 1 0 !important;
  }

  body.page-place_list .filters-catalog .km-filter-actions > .km-btn-reset:not(#kmc-a):not(#kmc-b) {
    flex: 1 1 0 !important;
  }

  /* Sheet slides up */
  body.page-place_list.filters-drawer-open .filters-catalog:not(#kmc-a) {
    animation: kmc-sheet-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes kmc-sheet-in {
    from { transform: translateY(40px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  body.page-place_list.filters-drawer-open .filters-catalog:not(#kmc-a) {
    animation: none !important;
  }
}

/* Applied filters share one touch-height row. Only the chips scroll. */
@media (max-width: 820px) {
  .page-place_list .catalog-category-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
    color: var(--ink);
  }

  .page-place_list .catalog-top-stack .catalog-category-strip-wrap {
    margin-bottom: 0 !important;
  }

  .page-place_list .catalog-category-picker .catalog-category-strip {
    padding: 0 !important;
    gap: 12px !important;
    border-bottom: 1px solid var(--tint-line-200);
  }

  .page-place_list .catalog-category-strip .catalog-category-chip {
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0 3px !important;
    min-height: 44px;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .page-place_list .catalog-category-strip .catalog-category-chip .catalog-category-chip__icon {
    background: var(--cat-bg, var(--tint-turf-100)) !important;
    color: var(--cat-fg, var(--brand-spruce)) !important;
  }

  .page-place_list .catalog-category-strip .catalog-category-chip[aria-selected="true"] {
    color: var(--brand-spruce) !important;
    border-bottom-color: var(--brand-turf) !important;
  }

  .page-place_list .catalog-category-strip .catalog-category-chip .catalog-category-chip__count {
    min-width: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
  }

  .page-place_list .catalog-category-strip .catalog-category-chip:focus-visible {
    outline: 2px solid var(--brand-turf) !important;
    outline-offset: -3px;
  }

  .page-place_list .catalog-top-stack .active-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .page-place_list .catalog-top-stack .active-filter-chips {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .page-place_list .catalog-top-stack .active-filter-chip {
    box-sizing: border-box;
    flex: none;
    max-width: 100%;
    min-height: 44px;
    gap: 4px !important;
    padding: 0 8px !important;
    border: solid transparent !important;
    border-width: 7px 0 !important;
    background: var(--tint-turf-100) padding-box !important;
    white-space: nowrap;
  }

  .page-place_list .active-filter-chip > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-place_list .active-filter-chip-remove {
    flex: none;
  }

  .page-place_list .active-filter-chip:focus-visible {
    outline: 2px solid var(--brand-turf);
    outline-offset: -3px;
  }

  .page-place_list .catalog-top-stack .active-filter-reset:not(#kmc-a):not(#kmc-b) {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
  }

  .page-place_list .active-filter-reset span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.catalog-card-info {
  display: contents;
}

/* The summary's contents inherit the shared card body's margin reset. */
.page-place_list .catalog-card-info > * {
  margin: 0 !important;
}

@media (max-width: 760px) {
  .page-place_list main > .km-breadcrumbs {
    margin-block: 0 4px;
  }

  #top.page-place_list .hero.catalog-faq-hero {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .page-place_list .catalog-faq-hero .catalog-hero-decoration {
    display: none;
  }

  #top.page-place_list .hero.catalog-faq-hero h1 {
    margin: 0 0 8px !important;
  }

  #top.page-place_list .hero .catalog-hero-search {
    padding: 2px 3px 2px 12px !important;
    box-shadow: none !important;
  }

  .page-place_list .catalog-layout .catalog-top-stack {
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .page-place_list .catalog-layout .results-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 4px 8px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #top.page-place_list .results-view-mode:not(#kmc-a) .results-view-btn {
    min-width: 44px;
    padding: 0 6px !important;
    gap: 4px !important;
  }
}

/* Each place owns its photo panel and action row. */
@media (max-width: 820px) {
  #top.page-place_list .grid .place-card:not(#kc-a) {
    --catalog-thumb: clamp(96px, 32vw, 150px);
    display: grid !important;
    /* Size the footer to its translated controls. The thumbnail has its own width. */
    grid-template-columns: minmax(0, 1fr) max-content 44px;
    grid-template-areas:
      "summary summary  summary"
      "summary summary  summary"
      "price   actions  favorite";
    align-items: start;
    gap: 0 4px !important;
    padding: 0 10px 4px !important;
    border: 1px solid var(--tint-line-200) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface) !important;
    box-shadow: 0 3px 9px -4px rgba(13, 73, 36, .18) !important;
    animation: none;
  }

  #top.page-place_list .grid:has(> .place-card) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  #top.page-place_list .grid .place-card::before {
    content: "";
    grid-area: summary;
    align-self: stretch;
    margin-inline: -10px;
    background: linear-gradient(105deg, var(--cat-bg, var(--tint-turf-100)), var(--surface) 88%);
    border-bottom: 1px solid var(--tint-line-200);
    pointer-events: none;
  }

  #top.page-place_list .grid:has(> .place-card) > .card-placeholder {
    display: none !important;
  }

  #top.page-place_list .place-card:not(#kc-a) :is(.card-media, .card-body) {
    display: contents !important;
  }

  #top.page-place_list .place-card .card-media::after,
  #top.page-place_list .place-card .card-event-badge {
    display: none !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-media-link {
    grid-area: summary;
    position: relative !important;
    justify-self: start;
    width: var(--catalog-thumb) !important;
    margin: 8px 0 8px -2px;
    aspect-ratio: 1.18;
    height: auto !important;
    border-radius: var(--radius-md, 12px) !important;
    overflow: hidden !important;
  }

  #top.page-place_list .place-card:not(#kc-a) :is(.card-category-overlay, .card-price-pill) {
    position: static !important;
    justify-self: start;
    max-width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
    line-height: 1.3 !important;
  }

  #top.page-place_list .place-card:not(#kc-a) :is(.category-name, .card-price-pill__amount) {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-category-overlay {
    grid-area: 1 / 1 / 2 / -1;
    gap: 5px !important;
    color: var(--ink) !important;
    color: color-mix(in srgb, var(--ink) 72%, var(--cat-fg)) !important;
    font-size: 12px !important;
    align-self: end;
    margin-block: 9px 4px !important;
  }

  #top.page-place_list .place-card:not(#kc-a) :is(.card-category-overlay, .catalog-card-info) {
    margin-inline-start: calc(var(--catalog-thumb) + 10px) !important;
  }

  #top.page-place_list .place-card .card-category-overlay .category-name {
    color: inherit !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-category-overlay .category-icon {
    flex-basis: 24px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: var(--radius-sm);
    background: var(--cat-bg) !important;
    color: var(--cat-fg) !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-price-pill {
    grid-area: price;
    align-self: center;
    color: var(--ink) !important;
    font-size: 17px !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a) :is(.card-price-pill, .card-action-stack, .like-form) {
    margin-top: 5px !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a):has(.card-price-pill--long) {
    grid-template-areas:
      "summary summary  summary"
      "summary summary  summary"
      "price   price    price"
      "actions actions  favorite";
  }

  #top.page-place_list .place-card:not(#kc-a) .like-form {
    grid-area: favorite;
    position: static !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .like-btn {
    position: static !important;
    width: 44px !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: var(--radius-md, 12px) !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  #top.page-place_list .place-card .like-btn:focus-visible {
    outline: 2px solid var(--brand-turf);
    outline-offset: 1px;
  }

  #top.page-place_list .place-card:not(#kc-a) .image-placeholder {
    padding: 0 !important;
    background: var(--cat-bg, var(--tint-turf-100)) !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .image-placeholder-icon {
    color: var(--cat-fg, var(--brand-spruce)) !important;
  }

  #top.page-place_list .place-card .image-placeholder-text {
    display: none !important;
  }

  .page-place_list .catalog-card-info {
    grid-area: 2 / 1 / 3 / -1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    padding-bottom: 9px;
    overflow-wrap: anywhere;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-tags-row:has(.card-meta-chip--permanent:only-child),
  #top.page-place_list .place-card:not(#kc-a) .card-meta-chip--permanent {
    display: none !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-meta-chip {
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    line-height: 1.35 !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-rating-row:has(.card-score-empty) {
    display: none !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-action-stack {
    grid-area: actions;
    padding-top: 0 !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-bottom-row {
    justify-content: flex-end;
    gap: 2px !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-bottom-row .card-contact-toggle {
    border: 0 !important;
    color: var(--muted) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #top.page-place_list .place-card .card-bottom-row:has(.km-phone-error) {
    flex-wrap: wrap !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .card-bottom-row > .km-phone-error {
    display: block !important;
    flex: 1 0 100% !important;
    width: auto !important;
    height: auto !important;
  }

  #top.page-place_list .place-card:not(#kc-a) :is(.card-title, .card-description) {
    height: auto !important;
  }

  #top.page-place_list .place-card:not(#kc-a) .km-loc-badge {
    color: var(--muted) !important;
    font-weight: 500 !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a):is(:hover, :active) {
    transform: none !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a) .card-go-btn {
    width: auto !important;
    padding-inline: 12px !important;
    flex: 0 1 auto !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: var(--radius-md) !important;
    background: var(--brand-turf) !important;
    color: var(--surface) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a) .card-go-btn:is(:active, .is-touch-pressed) {
    background: var(--brand-spruce) !important;
  }

  #top.page-place_list .grid .place-card:not(#kc-a) .card-go-btn:focus-visible {
    outline: 2px solid var(--brand-spruce) !important;
    outline-offset: 2px;
  }

  .page-place_list .card-offer-details summary {
    padding-block: 10px;
    color: var(--brand-turf);
    font-weight: 700;
    cursor: pointer;
  }

  .page-place_list .card-offer-details summary:focus-visible {
    outline: 2px solid var(--brand-turf);
    outline-offset: 1px;
  }
}

@media (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  #top.page-place_list .grid .place-card:not(#kc-a).is-revealed {
    animation: catalog-place-appear var(--dur-base) var(--ease-out-quint);
  }

  #top.page-place_list .place-card .card-go-arrow {
    transition: transform var(--dur-fast) var(--ease-out-quint) !important;
  }

  #top.page-place_list .place-card .card-go-btn:is(:active, :focus-visible, .is-touch-pressed) .card-go-arrow {
    transform: translateX(3px) !important;
  }

  #top.page-place_list .place-card .card-media-link .card-media-img {
    transition: transform var(--dur-fast) var(--ease-out-quint) !important;
  }

  #top.page-place_list .place-card .card-media-link:active .card-media-img {
    transform: scale(1.05);
  }
}

@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  #top.page-place_list .grid .place-card :is(.card-go-arrow, .card-media-img) {
    transform: none !important;
    transition: none !important;
  }
}

@keyframes catalog-place-appear {
  from { opacity: .72; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Keep both view names and the result count readable on the narrowest phones. */
@media (max-width: 420px) {
  #top.page-place_list .results-view-btn .results-view-btn__icon {
    display: none !important;
  }
}
