/* Карточки сетей только в блоке популярных магазинов на главной. */
.category-store-cards .col-6 {
  display: flex;
  align-items: stretch;
  margin-bottom: 24px;
}
.category-store-cards .chain_card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  color: #263126;
  background: #fff;
  border: 1px solid #e4e8e2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(35, 52, 29, .04);
  transition: border-color .2s, box-shadow .2s;
}
.category-store-cards .chain_card:hover {
  color: #263126;
  border-color: #acc49d;
  box-shadow: 0 6px 20px rgba(35, 52, 29, .09);
}
.category-store-cards .chain_card:focus-visible {
  outline: 3px solid #589442;
  outline-offset: -3px;
}
.category-store-cards .chain_card_logo {
  display: block;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 0;
  padding-top: 62.5%;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid #f0f2ef;
}
.category-store-cards .chain_card_logo img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category-store-cards .chain_card_body {
  flex: 1;
  padding: 12px;
}
.category-store-cards .chain_card_logo_fitted {
  background-size: contain;
}
.category-store-cards .chain_card_logo_fitted img {
  object-fit: contain;
}
.category-store-cards .chain_card_logo_badge_space {
  background-size: 90% auto;
  background-position: center 24px;
}
.category-store-cards .chain_card_logo_dark {
  background-color: #000;
}
.category-store-cards .chain_card_logo_badge_compact {
  background-size: auto calc(100% - 36px);
  background-position: center 32px;
}
.category-store-cards .chain_card_logo_badge_compact img {
  top: 32px;
  height: calc(100% - 36px);
}
.category-store-cards .chain_card_logo_badge_high .chain_card_recommended {
  top: 6px;
}
.category-store-cards .chain_card h3 {
  color: #263126;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px;
  overflow-wrap: break-word;
}
.category-store-cards .chain_card_category {
  color: #6b7369;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 8px;
  overflow-wrap: break-word;
}
.category-store-cards .chain_card_count {
  display: block;
  color: #3e5137;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.category-store-cards .chain_card_status {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.4;
}
.category-store-cards .chain_card_recommended {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  border: 1px solid #dce9d5;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.4;
  color: #39712a;
  background: #eef5e9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}
.category-store-cards .chain_card_status {
  color: #775326;
  background: #fff3df;
}
.category-store-cards .chain_card_footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid #edf0eb;
  background: #fafbf8;
}
.category-store-cards .chain_card_rating {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 9px;
  background: #ecefe9;
  color: #46513e;
  font-size: 16px;
  font-weight: 600;
}
.category-store-cards .chain_card_rating_good {
  color: #fff;
  background: #589442;
}
.category-store-cards .chain_card_rating_empty {
  color: #8c9587;
}
.category-store-cards .chain_card_feedback {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.category-store-cards .chain_card_grade,
.category-store-cards .chain_card_reviews {
  display: block;
  font-size: 12px;
  overflow-wrap: break-word;
}
.category-store-cards .chain_card_grade {
  font-weight: 500;
}
.category-store-cards .chain_card_reviews {
  color: #6b7369;
}
.category-store-cards .chain_card_arrow {
  flex: 0 0 16px;
  color: #589442;
}
@media (max-width: 767px) {
  .category-store-cards .home_swipe_page {
    align-items: stretch;
    grid-auto-rows: 1fr;
  }
  .category-store-cards .col-6 {
    margin-bottom: 0;
  }
  .category-store-cards .chain_card_body {
    padding: 10px 12px;
  }
  .category-store-cards .chain_card h3 {
    font-size: 14px;
  }
  .category-store-cards .chain_card_footer {
    padding: 10px 12px;
    gap: 7px;
  }
  .category-store-cards .chain_card_rating {
    flex-basis: 34px;
    height: 34px;
    font-size: 15px;
  }
  .category-store-cards .chain_card_arrow {
    flex-basis: 14px;
    width: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .category-store-cards .chain_card {
    transition: none;
  }
}

/* Обложка и текст акции разделены; область действия — только главная. */
.category-action-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px 30px;
  margin: 0;
}
.category-action-cards .col-6 {
  display: flex;
  width: auto;
  max-width: none;
  padding: 0;
  margin-bottom: 0;
}
.category-action-cards .action_card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  color: #263126;
  background: #fff;
  border: 1px solid #e4e8e2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(35, 52, 29, .04);
  transition: border-color .2s, box-shadow .2s;
}
.category-action-cards .action_card:hover {
  color: #263126;
  border-color: #acc49d;
  box-shadow: 0 6px 20px rgba(35, 52, 29, .09);
}
.category-action-cards .action_card:focus-visible {
  outline: 3px solid #589442;
  outline-offset: -3px;
}
.category-action-cards .action_card_preview {
  display: block;
  height: 190px;
  flex-shrink: 0;
  padding: 0;
  background: #f5f6f2;
  border-bottom: 1px solid #edf0eb;
}
.category-action-cards .action_card_preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.category-action-cards .action_card_preview_logo img {
  object-fit: contain;
  object-position: center;
}
.category-action-cards .action_card_body {
  display: block;
  flex: 0 0 auto;
  padding: 14px 14px 8px;
}
.category-action-cards .action_card_chain {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  height: 40.5px;
}
.category-action-cards .action_card_chain img {
  flex: 0 0 48px;
  width: 48px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
}
.category-action-cards h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  color: #263126;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: break-word;
}
.category-action-cards .action_card_name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  height: 39px;
  overflow: hidden;
  color: #626d5d;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.category-action-cards .action_card_footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 14px 12px;
  border-top: 1px solid #edf0eb;
  background: #fafbf8;
  font-size: 12px;
  line-height: 1.4;
}
.category-action-cards .action_card_date {
  color: #626d5d;
}
.category-action-cards .action_card_date i {
  margin-right: 4px;
}
.category-action-cards .action_card_open {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #39712a;
  font-weight: 600;
}
@media (max-width: 1199px) {
  .category-action-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .category-action-cards {
    gap: 15px;
  }
  .category-action-cards.home_swipe_active {
    display: flex;
    gap: 0;
  }
  .category-action-cards .home_swipe_page {
    align-items: stretch;
    grid-auto-rows: 1fr;
  }
  .category-action-cards .action_card_preview {
    height: 125px;
  }
  .category-action-cards .action_card_body {
    padding: 10px 10px 6px;
  }
  .category-action-cards .action_card_chain {
    gap: 6px;
    margin-bottom: 8px;
    height: 32.4px;
  }
  .category-action-cards .action_card_chain img {
    flex-basis: 34px;
    width: 34px;
    height: 24px;
  }
  .category-action-cards h3 {
    font-size: 12px;
  }
  .category-action-cards .action_card_name {
    -webkit-line-clamp: 3;
    height: 50.4px;
    font-size: 12px;
    line-height: 1.4;
  }
  .category-action-cards .action_card_footer {
    padding: 6px 10px 10px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .category-action-cards .action_card {
    transition: none;
  }
}

@media (min-width: 1200px) {
  .category-action-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .category-store-cards .col-6 { margin-bottom: 15px; }
}

/* Категории и разделы карточек в общем справочнике сетей. */
.store-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 24px;
}
.store-category-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e4e8e2;
  border-radius: 10px;
  background: #fff;
  color: #3e5137;
  line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.store-category-tile:hover {
  border-color: #acc49d;
  background: #fafbf8;
  color: #39712a;
}
.store-category-tile:focus-visible {
  outline: 3px solid #589442;
  outline-offset: 2px;
}
.store-category-name { min-width: 0; overflow-wrap: break-word; }
.store-category-count {
  flex-shrink: 0;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #eef5e9;
  color: #39712a;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.all-stores-directory .category-store-cards .col-6 { flex-direction: column; }
.all-stores-directory .chain_card { flex: 1; border-radius: 12px 12px 0 0; }
.all-stores-directory .chain_card_sections {
  padding: 10px 12px;
  border: 1px solid #e4e8e2;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
  color: #d1d9cb;
  font-size: 12px;
  line-height: 1.9;
}
.all-stores-directory .chain_card_sections a { color: #39712a; }
.all-stores-directory .chain_card_sections a:hover { text-decoration: underline; }
@media (max-width: 1199px) {
  .store-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .store-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .store-category-tile { padding: 10px; gap: 8px; font-size: 12px; }
  .store-category-count { min-width: 28px; padding: 3px 6px; }
}
@media (max-width: 374px) {
  .store-category-grid { grid-template-columns: minmax(0, 1fr); }
}

.store-live-search { margin: 0 0 24px; }
.store-live-search[hidden], #store-search-clear[hidden], #store-search-empty[hidden],
#store-search-results > [hidden] { display: none !important; }
.store-live-search label { display: block; color: #263126; font-weight: 600; margin-bottom: 8px; }
.store-search-field { display: flex; align-items: center; gap: 10px; max-width: 600px; }
.store-search-field input {
  width: 100%; min-width: 0; padding: 12px 14px;
  border: 1px solid #cdd7c7; border-radius: 10px;
  background: #fff; color: #263126; font-size: 16px;
}
.store-search-field input:focus { outline: 2px solid #589442; outline-offset: 2px; }
.store-search-field button {
  padding: 12px; border: 1px solid #dce9d5; border-radius: 10px;
  background: #eef5e9; color: #39712a; cursor: pointer;
}
#store-search-status { margin: 8px 0 0; color: #6b7369; font-size: 13px; }
#store-search-empty { margin-bottom: 24px; color: #626d5d; }

/* При поиске сначала идут совпадения, затем сохранённые рекламные места. */
#store-search-results.store-search-filtered > .store-directory-ad { order: 1; }
