/* IQ-Biz Contacts and Store Pages CSS */

.contacts-page-title {
  font-size: 28px;
  font-weight: 700;
  color: #222222;
  margin: 15px 0 25px;
  line-height: 1.25;
}

/* Сетка страницы Контакты (Список) */
.iqbiz-contacts-main {
  margin-bottom: 40px;
}

.iqbiz-contacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.iqbiz-contacts-map-wrap {
  flex: 1 1 calc(60% - 15px);
  min-height: 420px;
}

#contacts-map {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

.iqbiz-contacts-form-wrap {
  flex: 1 1 calc(40% - 10px);
  min-width: 320px;
}

.iqbiz-contacts-form-card {
  background: #f8faf8;
  border: 1px solid #dce4dd;
  border-radius: 10px;
  padding: 25px 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.iqbiz-cf-title {
  font-size: 20px;
  font-weight: 700;
  color: #455c48;
  margin-bottom: 6px;
  line-height: 1.3;
}

.iqbiz-cf-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 18px;
  line-height: 1.4;
}

.iqbiz-cf-field {
  margin-bottom: 12px;
}

.iqbiz-contacts-stores-wrap {
  flex: 1 1 100%;
  margin-top: 15px;
}

.iqbiz-stores-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 18px;
}

/* Карточка магазина */
.iqbiz-store-card {
  background: #ffffff;
  border: 1px solid #e3e8e4;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.iqbiz-store-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.iqbiz-store-name {
  font-size: 20px;
  font-weight: 700;
  color: #455c48;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 15px;
  transition: color 0.15s;
}

.iqbiz-store-name:hover {
  color: #2e3e30;
  text-decoration: underline;
}

.iqbiz-store-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 20px;
  margin-bottom: 20px;
}

.iqbiz-store-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

.iqbiz-store-info-row i {
  color: #455c48;
  font-size: 16px;
  margin-top: 2px;
}

.metro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background-color: #e8f5e9;
  color: #2e7d32;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.metro-badge i {
  color: #2e7d32 !important;
  font-size: 12px !important;
  margin-top: 0 !important;
}

.iqbiz-store-phone {
  color: #222;
  font-weight: 700;
  text-decoration: none;
}

.iqbiz-store-phone:hover {
  color: #455c48;
  text-decoration: underline;
}

/* ================================================= */
/* Кнопки действий карточки магазина (ИДЕАЛЬНОЕ ВЫРАВНИВАНИЕ) */
/* ================================================= */
.iqbiz-store-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.iqbiz-store-actions .btn,
.iqbiz-store-actions .btn-group > .btn,
.iqbiz-store-top-actions .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 1 !important;
  padding: 0 16px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.iqbiz-store-actions .btn span,
.iqbiz-store-top-actions .btn span {
  line-height: 1 !important;
}

.iqbiz-store-actions .btn i,
.iqbiz-store-top-actions .btn i {
  font-size: 13px !important;
  line-height: 1 !important;
  margin-right: 6px !important;
}

.iqbiz-store-actions .btn i.fa-angle-right {
  margin-right: 0 !important;
  margin-left: 6px !important;
}

.iqbiz-store-actions .btn .caret {
  margin-left: 6px !important;
  vertical-align: middle !important;
}

.iqbiz-store-actions .btn-group {
  display: inline-flex !important;
  vertical-align: middle !important;
  height: 38px !important;
  margin: 0 !important;
  position: relative !important;
}

/* Кнопка 1: "Показать на карте" (белая с зеленой обводкой) */
.iqbiz-store-actions .btn-show-on-map {
  background-color: #ffffff !important;
  color: #455c48 !important;
  border: 1px solid #c2d4c5 !important;
}
.iqbiz-store-actions .btn-show-on-map:hover {
  background-color: #f4f8f5 !important;
  border-color: #455c48 !important;
  color: #2e3e30 !important;
}

/* Кнопка 2: "Построить маршрут" (зеленая) */
.iqbiz-store-actions .route-dropdown .dropdown-toggle {
  background-color: #455c48 !important;
  color: #ffffff !important;
  border: 1px solid #455c48 !important;
}
.iqbiz-store-actions .route-dropdown .dropdown-toggle:hover,
.iqbiz-store-actions .route-dropdown.open .dropdown-toggle {
  background-color: #394d3c !important;
  border-color: #394d3c !important;
  color: #ffffff !important;
}

/* Кнопка 3: "Подробнее о салоне" (зеленая, полностью синхронная) */
.iqbiz-store-actions .btn-store-details {
  background-color: #455c48 !important;
  color: #ffffff !important;
  border: 1px solid #455c48 !important;
}
.iqbiz-store-actions .btn-store-details:hover {
  background-color: #394d3c !important;
  border-color: #394d3c !important;
  color: #ffffff !important;
}

/* ================================================= */
/* Стили страницы салона (/contacts/ilyushina-1k1/)   */
/* ================================================= */
.iqbiz-store-page-main {
  margin-bottom: 45px;
}

.iqbiz-store-top-grid {
  display: flex;
  gap: 25px;
  align-items: stretch;
  margin-bottom: 40px;
}

.iqbiz-store-map-col {
  flex: 1 1 50%;
  min-height: 420px;
}

#store-detail-map {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

.iqbiz-store-info-col {
  flex: 1 1 50%;
  display: flex;
}

.iqbiz-store-info-card {
  background: #ffffff;
  border: 1px solid #e3e8e4;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.iqbiz-store-card-name {
  font-size: 22px;
  font-weight: 700;
  color: #455c48;
  margin-top: 0;
  margin-bottom: 20px;
}

.iqbiz-store-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #444;
  margin-bottom: 16px;
  line-height: 1.45;
}

.iqbiz-store-item i {
  color: #455c48;
  font-size: 18px;
  margin-top: 2px;
  width: 20px;
  text-align: center;
}

.iqbiz-store-item .store-tel {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  text-decoration: none;
}

.iqbiz-store-item .store-tel:hover {
  color: #455c48;
}

.iqbiz-store-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.iqbiz-store-top-actions .btn-route-yandex,
.iqbiz-store-top-actions .btn-route-2gis {
  background-color: #ffffff !important;
  color: #455c48 !important;
  border: 1px solid #c2d4c5 !important;
}
.iqbiz-store-top-actions .btn-route-yandex:hover,
.iqbiz-store-top-actions .btn-route-2gis:hover {
  background-color: #f4f8f5 !important;
  border-color: #455c48 !important;
  color: #2e3e30 !important;
}

.iqbiz-store-top-actions .btn-call-request {
  background-color: #455c48 !important;
  color: #ffffff !important;
  border: 1px solid #455c48 !important;
}
.iqbiz-store-top-actions .btn-call-request:hover {
  background-color: #394d3c !important;
  border-color: #394d3c !important;
  color: #ffffff !important;
}

/* Галерея фотографий магазина (сеткой вниз) */
.iqbiz-store-gallery-section {
  margin-top: 40px;
}

.iqbiz-gallery-title {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.iqbiz-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.iqbiz-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: block;
  background: #eee;
  cursor: pointer;
}

.iqbiz-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.iqbiz-photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(69, 92, 72, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  color: #ffffff;
  font-size: 28px;
}

.iqbiz-photo-item:hover img {
  transform: scale(1.06);
}

.iqbiz-photo-item:hover .iqbiz-photo-overlay {
  opacity: 1;
}

/* ================================================= */
/* Адаптив для Мобильных устройств по ТЗ              */
/* ================================================= */
@media (max-width: 991px) {
  /* ТЗ 3: Заголовок -> Карта -> Форма -> Список магазинов */
  .iqbiz-contacts-main {
    display: flex;
    flex-direction: column;
  }

  .contacts-page-title {
    order: 1 !important;
    font-size: 22px !important;
    margin: 12px 0 16px !important;
    line-height: 1.3 !important;
  }

  .iqbiz-contacts-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    order: 2 !important;
  }

  .iqbiz-contacts-map-wrap {
    order: 1 !important;
    width: 100%;
    min-height: 320px;
  }

  #contacts-map {
    height: 320px !important;
  }

  .iqbiz-contacts-form-wrap {
    order: 2 !important;
    width: 100%;
    min-width: 100%;
  }

  .iqbiz-contacts-stores-wrap {
    order: 3 !important;
    width: 100%;
    margin-top: 10px;
  }

  .iqbiz-store-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .iqbiz-store-actions .btn,
  .iqbiz-store-actions .btn-group {
    width: 100%;
  }

  .iqbiz-store-actions .dropdown-toggle {
    width: 100%;
  }

  .iqbiz-store-actions .route-dropdown .dropdown-menu {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ТЗ 4: Заголовок -> Карта -> Информация -> Галерея */
  .iqbiz-store-page-main {
    display: flex;
    flex-direction: column;
  }

  .iqbiz-store-page-main .contacts-page-title {
    order: 1 !important;
    font-size: 22px !important;
    margin: 12px 0 16px !important;
    line-height: 1.3 !important;
  }

  .iqbiz-store-top-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
    order: 2 !important;
  }

  .iqbiz-store-map-col {
    order: 1 !important;
    width: 100%;
    min-height: 300px;
  }

  #store-detail-map {
    height: 300px !important;
    min-height: 300px !important;
  }

  .iqbiz-store-info-col {
    order: 2 !important;
    width: 100%;
  }

  .iqbiz-store-top-actions {
    flex-direction: column;
  }

  .iqbiz-store-top-actions .btn {
    width: 100%;
  }

  .iqbiz-store-gallery-section {
    order: 3 !important;
    margin-top: 20px;
  }

  .iqbiz-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
