/* Каталог филиалов на главной /autoservices/ (список карточек, ориентир Autospot) */

.autoservice-page.autoservice-catalog-page {
  max-width: 920px;
}

.autoservice-catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.autoservice-catalog-header h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
}

.autoservice-catalog-count {
  margin: 0;
  font-size: 1rem;
  color: var(--autoservice-muted);
}

.autoservice-catalog-hint {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  color: var(--autoservice-muted);
  line-height: 1.45;
}

.autoservice-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.autoservice-catalog-card {
  font-size: 17px;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--autoservice-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.autoservice-catalog-card:hover {
  border-color: #d5d5d5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.autoservice-catalog-card__main {
  flex: 1 1 280px;
  min-width: 0;
}

.autoservice-catalog-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.55rem;
}

.autoservice-catalog-card__title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
}

.autoservice-catalog-card__title a {
  color: var(--autoservice-primary);
  text-decoration: none;
}

.autoservice-catalog-card__title a:hover {
  color: var(--autoservice-accent);
}

.autoservice-catalog-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

.autoservice-catalog-card__badge_type {
  color: #444;
  background: #f3f3f3;
  border: 1px solid #e0e0e0;
}

.autoservice-catalog-card__badge_promo {
  color: #8b3a12;
  background: #fff0e8;
  border: 1px solid #f5c9b0;
}

.autoservice-catalog-card__desc {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: #555;
}

/* Блок контактов: подпись + значение (как в макете) */
.autoservice-catalog-card__contacts,
.autoservice-branch-contacts {
  margin: 0.75rem 0 0.85rem;
  padding: 1rem 1.1rem;
  background: #f3f3f2;
  border-radius: 10px;
  max-width: 420px;
}

.autoservice-branch-page .autoservice-branch-contacts {
  max-width: 480px;
}

/* Контакты и карта в одну строку (50/50) */
.autoservice-catalog-card__location {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin: 0.75rem 0 0.85rem;
}

.autoservice-catalog-card__location--contacts-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}

.autoservice-catalog-card__location-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.autoservice-catalog-card__location-col--contacts .autoservice-catalog-card__contacts,
.autoservice-catalog-card__location-col--contacts .autoservice-branch-contacts {
  margin: 0;
  max-width: none;
  flex: 1 1 auto;
  height: 100%;
  min-height: 200px;
  box-sizing: border-box;
}

.autoservice-catalog-card__location-col--map .autoservice-branch-carousel {
  margin: 0;
  flex: 0 0 auto;
}

.autoservice-catalog-card__location .autoservice-catalog-card__map.branch-map-mini {
  flex: 1 1 auto;
  min-height: 200px;
  height: 100%;
  margin: 0;
  width: 100%;
  max-width: none;
}

.autoservice-catalog-card__location-col--map .autoservice-catalog-card__meta {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}


.catalog-contact-row {
  display: block;
  margin: 0 0 0.85rem;
}

.catalog-contact-row:last-child {
  margin-bottom: 0;
}

.catalog-contact-label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: #888;
  font-weight: 400;
}

.catalog-contact-value {
  display: block;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  color: #353433;
}

.catalog-contact-value a {
  color: var(--autoservice-accent, #E23737);
  text-decoration: none;
  font-weight: 600;
}

.catalog-contact-value a:hover {
  text-decoration: underline;
}

.autoservice-branch-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.75rem;
}

.autoservice-branch-short-desc,
.branch-metro,
.branch-hours {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.45;
}

.branch-metro {
  font-weight: 500;
}

.branch-hours {
  color: #666;
}

.autoservice-catalog-card__address {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  line-height: 1.45;
  color: #444;
}

/* Карусель фото филиала */
.autoservice-branch-carousel {
  margin: 0.55rem 0 0.65rem;
}
.autoservice-branch-carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--autoservice-border);
  background: #f3f3f3;
}
.autoservice-branch-carousel__track {
  position: relative;
  width: 100%;
}
.autoservice-branch-carousel__slide {
  display: none;
  width: 100%;
}
.autoservice-branch-carousel__slide.is-active {
  display: block;
}
.autoservice-branch-carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.autoservice-branch-carousel_full .autoservice-branch-carousel__viewport {
  aspect-ratio: 16 / 9;
  max-height: 320px;
}
.autoservice-branch-carousel_compact .autoservice-branch-carousel__viewport {
  height: 160px;
}
.autoservice-branch-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.autoservice-branch-carousel__nav_prev { left: 8px; }
.autoservice-branch-carousel__nav_next { right: 8px; }
.autoservice-branch-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.autoservice-branch-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}
.autoservice-branch-carousel__dot.is-active {
  background: var(--autoservice-accent, #E23737);
}

.autoservice-catalog-card__map.branch-map-mini {
  width: 100%;
  max-width: 100%;
  height: 180px;
  margin: 0.5rem 0 0.65rem;
  border-radius: 8px;
  overflow: hidden;
}

.autoservice-branch-intro {
  margin-bottom: 2rem;
}

.autoservice-catalog-card--page-intro .autoservice-catalog-card__title--page {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.autoservice-catalog-card--page-intro .autoservice-catalog-card__desc {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
}

.autoservice-catalog-card__phone {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  font-weight: 500;
}

.autoservice-catalog-card__phone a {
  color: var(--autoservice-accent);
  text-decoration: none;
}

.autoservice-catalog-card__phone a:hover {
  text-decoration: underline;
}

.autoservice-catalog-card__meta {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.autoservice-catalog-card__meta a {
  color: var(--autoservice-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.autoservice-catalog-card__meta a:hover {
  color: var(--autoservice-accent);
}

.autoservice-catalog-card__meta-sep {
  margin: 0 0.35rem;
  color: #bbb;
}

.autoservice-catalog-card__side {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.autoservice-catalog-card__photo {
  width: 100%;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
  border: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
}

.autoservice-catalog-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
  box-sizing: border-box;
}

.autoservice-catalog-card__photo-placeholder {
  font-size: 1.35rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.04em;
}

.autoservice-catalog-card__cta.link_btn {
  width: 100%;
  margin: 0;
  min-height: 48px;
  text-shadow: none;
}

/* Как link_btn__dark на ks-auto.ru (перебивает autoservice-page .link_btn__dark → серый) */
.autoservice-page .autoservice-catalog-card__footer .link_btn.link_btn__dark,
.autoservice-lk-catalog-wrap .autoservice-catalog-card__footer .link_btn.link_btn__dark {
  background-color: #e23737;
  color: #fff;
  border: none;
  border-radius: 12px;
}

.autoservice-page .autoservice-catalog-card__footer .link_btn.link_btn__dark:hover,
.autoservice-lk-catalog-wrap .autoservice-catalog-card__footer .link_btn.link_btn__dark:hover {
  background-color: #e54d4d;
  color: #fff;
}

/* Кнопка записи внизу карточки (каталог и ЛК) */
.autoservice-catalog-card--cta-bottom {
  flex-direction: column;
  align-items: stretch;
}

.autoservice-catalog-card--cta-bottom .autoservice-catalog-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem 1.25rem;
  width: 100%;
}

.autoservice-catalog-card--cta-bottom .autoservice-catalog-card__main {
  flex: 1 1 280px;
  min-width: 0;
}

.autoservice-catalog-card--cta-bottom .autoservice-catalog-card__side--photo-only {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
}

.autoservice-catalog-card--cta-bottom .autoservice-catalog-card__footer {
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eee;
}

.autoservice-catalog-card--cta-bottom .autoservice-catalog-card__footer .autoservice-catalog-card__cta.link_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
}

.autoservice-catalog-card__footer--dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}

.autoservice-catalog-card__footer--dual .autoservice-catalog-card__cta-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.autoservice-page .autoservice-catalog-card__footer--dual .link_btn.link_btn__light.autoservice-catalog-card__cta--call {
  background-color: transparent;
  color: #e23737;
  border: 1px solid #e23737;
  border-radius: 12px;
}

.autoservice-page .autoservice-catalog-card__footer--dual .link_btn.link_btn__light.autoservice-catalog-card__cta--call:hover {
  background-color: #e23737;
  color: #fff;
}

/* Фильтр разделов прайса (итерация 3) */

.autoservice-catalog-sections {
  margin-bottom: 2.25rem;
}

.autoservice-catalog-sections__head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 600;
}

.autoservice-catalog-sections__hint {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--autoservice-muted);
  line-height: 1.45;
}

.autoservice-section-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.autoservice-section-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--autoservice-border);
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0;
  text-shadow: none;
  -webkit-font-smoothing: auto;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

button.autoservice-section-filter {
  font-family: inherit;
}

.autoservice-section-filter:hover {
  border-color: #ccc;
  background: #fafafa;
}

.autoservice-section-filter.is-active {
  border-color: var(--autoservice-accent, #c9a227);
  background: #fff8e6;
  color: #333;
}

.autoservice-section-filter__count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--autoservice-muted);
}

.autoservice-section-filter.is-active .autoservice-section-filter__count {
  color: #6a5a20;
}

.autoservice-catalog-price-preview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.autoservice-catalog-price-block {
  border: 1px solid var(--autoservice-border);
  border-radius: 10px;
  padding: 0 0.85rem 0.75rem;
  background: #fff;
}

.autoservice-catalog-price-block > .autoservice-section-title {
  margin: 0;
  padding: 0.75rem 0;
}

.autoservice-catalog-price-category {
  margin: 0 0 0.85rem 0.35rem;
}

.autoservice-catalog-price-category .autoservice-category-title {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 600;
}

.autoservice-catalog-price-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.autoservice-catalog-price-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.autoservice-catalog-price-item:last-child {
  border-bottom: none;
}

.autoservice-catalog-price-item__price {
  flex-shrink: 0;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.autoservice-catalog-price-cta {
  margin: 0.5rem 0 0.25rem;
}

.autoservice-catalog-sections__footer {
  margin: 1.15rem 0 0;
}

.autoservice-section-filters_branch {
  margin-bottom: 1rem;
}

.autoservice-branch-section-cta {
  margin: 0;
}

.autoservice-catalog-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--autoservice-muted);
  border: 1px dashed var(--autoservice-border);
  border-radius: 10px;
  background: #fafafa;
}

@media (max-width: 640px) {
  .autoservice-page.autoservice-catalog-page {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .autoservice-catalog-card {
    flex-direction: column;
    padding: 1rem;
  }

  .autoservice-catalog-card__side,
  .autoservice-catalog-card--cta-bottom .autoservice-catalog-card__side--photo-only {
    flex: 1 1 auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .autoservice-catalog-card__photo {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
  }

  .autoservice-catalog-card__cta {
    flex: 1 1 160px;
    min-width: 0;
  }

  .autoservice-catalog-card--cta-bottom .autoservice-catalog-card__footer .autoservice-catalog-card__cta {
    flex: 1 1 100%;
    width: 100%;
  }

  .autoservice-catalog-card__footer--dual {
    grid-template-columns: 1fr;
  }

  .autoservice-catalog-card__title {
    font-size: 1.15rem;
  }

  .autoservice-catalog-card__location {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .autoservice-catalog-card__location--contacts-only {
    max-width: none;
  }

  .autoservice-catalog-card__location-col--contacts .autoservice-catalog-card__contacts,
  .autoservice-catalog-card__location-col--contacts .autoservice-branch-contacts {
    min-height: 0;
  }

  .autoservice-catalog-card__location .autoservice-catalog-card__map.branch-map-mini {
    min-height: 160px;
    height: 160px;
  }

  .autoservice-catalog-card__map.branch-map-mini {
    height: 140px;
  }

  .autoservice-section-filter {
    font-size: 0.9rem;
    padding: 0.4rem 0.65rem;
  }

  .autoservice-catalog-price-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
