:root {
  --main-blue-color: #005999;
  --main-blue-color-hover: #0e73bb;
  --main-blue-color-active: #01487a;
  --main-blue-grey-color: #536B96;
}

@media (max-width: 1210px) {
  .goods-and-services__list {
    justify-content: space-evenly !important;
  }

  .goods-and-services__item {
    flex: 1 1 45%;
  }
  
  .goods-and-services__link {
    width: 400px !important;
  }
}

@media (max-width: 1024px) {

  .modal-table-header-cell,
  .modal-table-cell {
    font-size: 14px;
    padding: 6px;
  }

  .counter__input {
    width: 35px;
  }

}

@media (max-width: 980px) {
  .goods-and-services__item {
    flex: 1 1 90% !important;
    max-width: 500px;
    /* width: 600px; */
  }
  
  .goods-and-services__link {
    width: 350px !important;
  }
}

@media (max-width: 768px) {

  .modal-table {
    border: none !important;
  }

  .modal-table thead {
    display: none;
  }

  .modal-table,
  .modal-table-body,
  .modal-table-row,
  .modal-table-cell {
    display: block;
    width: 100%;
  }

  .modal-table-row {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
  }

  .modal-table-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none !important;
  }

  .modal-table-cell::before {
    font-weight: 600;
    margin-right: 10px;
  }

  .options__item__name {
    justify-content: space-between;
    width: 100% !important;
  }

  .options__item__price {
    justify-content: space-between;
  }

  .options__item__name::before { content: "Опция:"; }
  .options__item__price::before { content: "Цена:"; }
  .options__item__count::before { content: "Кол-во:"; }
  .options__item__sum::before { content: "Итого:"; }
  .options__item__check::before { content: "Выбрать:"; }

  .modal-footer {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .modal-footer div {
    text-align: right;
  }

  .modal-btn {
    width: 100%;
    text-align: center;
  }

}

@media (max-width: 640px) {
  .goods-and-services__link {
    width: 350px !important;
  }
}

@media (max-width: 480px) {
  .goods-and-services__link {
    width: 300px !important;
  }

  .modal-content {
    padding: 15px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-descr {
    font-size: 14px;
  }

  .counter {
    gap: 6px;
  }

  .counter__btn {
    width: 24px;
    height: 24px;
  }

  .counter__input {
    width: 32px;
  }
}

@media (max-width: 360px) {
  .goods-and-services__item {
    padding: 10px;
  }

  .goods-and-services__link {
    width: 280px !important;
    font-size: 14px !important;
  }
}

.goods-and-services__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.goods-and-services__item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-right: 20px;
  margin-bottom: 20px;
  padding: 15px;
  /* min-width: 370px; */
  flex: 1 1 370px;
  min-height: 150px;
  color: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: var(--main-blue-grey-color);
}

.goods-and-services__link {
  margin-bottom: 5px;
  width: 300px;
  font-size: 16px;
}

.goods-and-services__link a {
  color: white;
  text-decoration: underline;
}

.goods-and-services__link a:hover {
  text-decoration: none;
}

.price-and-basket {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.goods-and-services__price {
  margin-bottom: 15px;
  font-size: 15px;
  /* font-weight: bold; */
}

.btn {
  display: inline-block;
  padding: 7px 15px;
  cursor: pointer;
  color: white;
  background-color: var(--main-blue-color);
  border-radius: 3px;
  transition: transform 0.3s ease-in-out;
}

.btn:hover {
  background-color: var(--main-blue-color-hover);
  transform: scale(1.05);
}

.btn:active {
  background-color: var(--main-blue-color-active);
  transform: scale(0.97);
}




/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-body {
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  display: flex;
  justify-content: flex-end;
  padding-right: 10px;
}

.modal-close svg {
  cursor: pointer;
}

.modal-title {
  margin-bottom: 10px;
  text-align: center;
}

.modal-service-name {
  margin-bottom: 10px;
  text-align: center;
}

.modal-descr {
  margin-bottom: 10px;
  text-align: center;
}

.modal-table {
  margin-bottom: 10px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal-table-header-cell {
  padding: 10px;
  font-size: 16px;
  border-bottom: 1px solid #ccc;
}

.modal-table-row {
  padding: 7px 10px;
  min-height: 30px;
  border-bottom: 1px solid #ccc;
  transition: background-color 0.3s ease-in-out;
} 

.modal-table-row:not(:last-child) .modal-table-cell {
  border-bottom: 1px solid #ccc;
}

.modal-table-row:hover {
  background-color: #ddd;
}

.modal-table-cell {
  padding: 5px 10px;
  text-align: left;
  text-wrap: wrap;
}

.options__item__name {
  width: 36%;
}

.modal-table-header-cell,
.options__item__price,
.options__item__count,
.options__item__sum,
.options__item__check {
  text-align: center;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  padding: 5px 15px;
}

.counter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: Arial, sans-serif;
}

.counter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  color: white;
  background: #ccc;
  border: none;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.counter__btn:hover {
  background: var(--main-blue-color-hover);
}

.counter__btn:active {
  background: var(--main-blue-color-active);
}

.counter__btn--minus[disabled] {
  background: #ccc;
  cursor: not-allowed;
}

.counter__input {
  width: 40px;
  height: 24px;
  text-align: center;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}


.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Скрываем стандартный чекбокс */
.custom-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Контейнер чекбокса */
.checkbox-box {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--main-blue-color);
  border-radius: 4px;
  background-color: #fff;
  transition: all 0.3s ease;
  position: relative;
}

/* Эффект при наведении */
.custom-checkbox:hover .checkbox-box {
  border-color: var(--main-blue-color-hover);
  transform: scale(1.05);
}

/* Состояние при фокусе */
.custom-checkbox input:focus + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(14, 115, 187, 0.3);
}

/* Активный чекбокс (выбран) */
.custom-checkbox input:checked + .checkbox-box {
  background-color: var(--main-blue-color);
  border-color: var(--main-blue-color-active);
}

/* Галочка внутри чекбокса */
.custom-checkbox input:checked + .checkbox-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: opacity 0.2s ease;
}


/* Модальное окно уведомления о добавлении услуги в корзину */
.modal-notification {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content-notification {
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  padding: 20px;
  text-align: center;
  overflow-y: auto;
  background-color: white;
  border-radius: 8px;
}

.modal-notification-img {
  margin-bottom: 15px;
}

.modal-notification-title {
  margin-bottom: 15px;
}

.modal-notification-descr {
  margin-bottom: 15px;
}

.modal-notification-descr a {
  text-decoration: underline;
}

.modal-notification-descr a:hover {
  text-decoration: none;
} 

.btn-primary {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.3s ease-in-out;
}

.btn-primary:hover {
  background: #0056b3;
}
