/* СБРОС СТИЛЕЙ */
h1,
h2,
h3,
h4,
h5,
h6,
p,
input {
  margin: 0;
}

ul,
ol,
menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  outline: none;
}

button {
  padding: 0;
  cursor: pointer;
  border: none;
  background: none;
}

button,
button:active {
  outline: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ОБЩЕЕ */
:root {
  /* шрифты */
  --font8: 0.5rem;
  --font11: 0.688rem;
  --font12: 0.75rem;
  --font13: 0.813rem;
  --font14: 0.875rem;
  --font16: 1rem;
  --font18: 1.125rem;
  --font20: 1.25rem;
  --font24: 1.5rem;
  --font28: 1.75rem;
  --font32: 2.1rem;
  /* отступы */
  --cardsInRow: 3;
  --cardsGap: 9px;
  /* основные цвета */
  --lime: #7b9329;
  --dark-grey: #424f4b;
  --grey: #70827d;
}
.main {
  /* верхний отступ ПЕРЕНЕСТИ в .cart-page и ИЗМЕНИТЬ */
  padding-top: 46px;
  padding-bottom: 50px;
  min-width: 360px;
}
.section-container {
  width: 100%;
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 10px;
}
.btn {
  width: 139px;
  min-width: 137px;
  padding: 15px;
  border-radius: 10px;
  font-size: var(--font14);
  flex-grow: 1;
}

/* Чекбокс */
.custom-checkbox {
  cursor: pointer;
}
input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg filter='url(%23filter0_i_1_1681)'%3E%3Crect width='24' height='24' rx='5' fill='%23E8E8E8'/%3E%3C/g%3E%3Cdefs%3E%3Cfilter id='filter0_i_1_1681' x='0' y='0' width='24' height='25' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'%3E%3CfeFlood flood-opacity='0' result='BackgroundImageFix'/%3E%3CfeBlend mode='normal' in='SourceGraphic' in2='BackgroundImageFix' result='shape'/%3E%3CfeColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/%3E%3CfeOffset dy='1'/%3E%3CfeGaussianBlur stdDeviation='1.75'/%3E%3CfeComposite in2='hardAlpha' operator='arithmetic' k2='-1' k3='1'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0'/%3E%3CfeBlend mode='normal' in2='shape' result='effect1_innerShadow_1_1681'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
}
.custom-checkbox input:checked ~ .checkbox-icon {
  background-image: url('data:image/svg+xml,%3Csvg width="16" height="11" viewBox="0 0 16 11" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M15.5018 0.442536C15.8096 0.71963 15.8346 1.19385 15.5575 1.50173L7.8199 10.0991C6.84536 11.1819 5.19549 11.3168 4.05793 10.4068L0.531506 7.58566C0.20806 7.3269 0.155619 6.85493 0.414376 6.53149C0.673133 6.20804 1.1451 6.1556 1.46855 6.41436L4.99497 9.23549C5.51204 9.64915 6.26199 9.5878 6.70496 9.09561L14.4426 0.498283C14.7197 0.1904 15.1939 0.165442 15.5018 0.442536Z" fill="%230F3027"/%3E%3C/svg%3E'),
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='24' height='24' rx='5' fill='%237B9329'/%3E%3C/svg%3E");
  background-position: center, center;
  background-size: 16px 11px, 24px 24px;
  background-repeat: no-repeat;
}

/* СТИЛИ СТРАНИЦЫ */
/* Заголовок */
.cart-page__title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 17px;
  margin-bottom: 34px;
}
.cart__title-arrow {
  display: none;
}
h1.cart-page__title {
  font-size: var(--font32);
  color: var(--dark-grey);
}
.cart-page__title-services {
  font-size: var(--font14);
  color: var(--grey);
}

/* Операции */
.cart-page__operate-wrapper {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 19px;
  font-size: var(--font14);
  color: var(--grey);
}
.cart-page__checkbox {
  display: flex;
  align-items: center;
  gap: 15px;
}
.cart-page__delete-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font14);
  color: var(--grey);
}

/* Содержание */
.cart-page__block {
  display: flex;
  gap: 45px;
}
.cart-page__list {
  display: flex;
  flex-direction: column;
  max-width: 756px;
  width: 100%;
  gap: 15px;
}
.cart-page__item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 13px 14px 21px 10px;
  background-color: #ffffff;
  border-radius: 10px;
}
.cart-page__item-header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cart-page__company-img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}
.cart-page__company-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cart-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  cursor: pointer;
}
.cart-page__company-title {
  font-weight: 700;
  font-size: var(--font16);
  color: var(--dark-grey);
}
.cart-page__company-descr {
  font-size: var(--font12);
  color: var(--grey);
}
.cart-page__service-block {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
.cart-page__service-checkbox {
  margin-right: 13px;
}
.cart-page__service-img {
  flex: 0 0 96px;
  height: 96px;
  margin-right: 0;
  border-radius: 5px;
  cursor: pointer;
  object-fit: cover;
}
.cart-page__service-wrapper {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  gap: 15px;
  margin-right: 30px;
  cursor: pointer;
}
.cart-page__service-descr-block {
  flex: 1 1 auto;
  display: flex;
  flex-flow: column;
  max-width: 392px;
}
.cart-page__service-descr {
  flex: 1 1 auto;
  margin-bottom: 16px;
  padding-left: 7px;
  font-family: Inter;
  font-size: var(--font16);
  color: var(--dark-grey);
}
.cart-page__service-location {
  margin-bottom: 10px;
  padding-left: 7px;
}
.cart-page__service-location-key {
  font-size: var(--font12);
  color: var(--grey);
}
.cart-page__service-location-value {
  font-weight: 500;
  font-size: var(--font12);
  line-height: 125%;
  color: var(--dark-grey);
}
.cart-page__service-btn {
  min-width: 140px;
  width: fit-content;
  padding: 3px;
  background-color: var(--lime);
  border-radius: 16px;
  font-size: var(--font14);
  color: #ffffff;
}
.cart-page__service-price {
  white-space: nowrap;
  font-weight: 700;
  font-size: var(--font20);
  color: var(--lime);
  line-height: 120%;
}
.cart-page__buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: flex-start;
  flex: 1 1 auto;
}

/* Перейти к оформлению блок */
.cart-page__order-block {
  display: flex;
  flex-direction: column;
  min-height: 244px;
  height: 100%;
  gap: 28px;
  padding: 25px 18px;
  background-color: #e6e8eb;
  border-radius: 10px;
}
.cart-page__order-btn {
  width: 100%;
  padding: 20px;
  background-color: var(--lime);
  border-radius: 10px;
  font-family: Inter;
  font-weight: 500;
  font-size: var(--font16);
  color: #ffffff;
}
.cart-page__order-btn--tablet {
  display: none;
}
.cart-page__order-total-block {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.cart-page__order-amount {
  white-space: nowrap;
  font-size: var(--font16);
  color: var(--dark-grey);
}
.cart-page__line {
  width: 100%;
  border-bottom: solid 1px #cad5e0;
}
.cart-page__order-total {
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--font16);
  color: var(--dark-grey);
}
.cart-page__info-text {
  max-width: 403px;
  font-size: var(--font14);
  line-height: 125%;
  color: var(--grey);
}

.new-service__block-checkbox {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    width: fit-content;
    margin-bottom: 20px;
}

.new-service__block-checkbox:hover {
    opacity: 0.9;
}

.new-service__block-checkbox span {
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    color: #424F4B;
}
.new-service__block-checkbox.availability {
    margin: 0;
    width: 100%;
    padding: 8px 0;
    /*border-top: 1px solid #CAD5E0;
    border-bottom: 1px solid #CAD5E0;*/
}
.checkbox-input {
    position: absolute;
    opacity: 0;
}
.checkbox-input:checked+.checkbox-control {
    background-color: #7B9429;
    background-image: url('../img/icon/checkbox-icon.svg');
    background-repeat: no-repeat;
    background-position: center;
}
.checkbox-control {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    background-color: #F0EFEC;
    border: 1px solid #ddd;
    position: relative;
    transition: background-color 0.2s;
}
/* The switch - the box around the slider */
.switch-container {
  width: 41px;
  height: 24px;
  position: relative;
  display: none;
}

/* Hide default HTML checkbox */
.switch-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #D2D8D7;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

/* The slider */
.switch-slider {
  width: 18px;
  height: 18px;
  position: absolute;
  left: calc(50% - 18px/2 - 8px);
  top: calc(50% - 18px/2);
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15), 0px 3px 1px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease-out;
  cursor: pointer;
}

.switch-checkbox:checked + .switch {
  background-color: #7B9329;
}

.switch-checkbox:checked + .switch .switch-slider {
  left: calc(50% - 18px/2 + 8px);
  top: calc(50% - 18px/2);
}


/* Ховер */
@media (hover: hover) {
  .cart-page__delete-btn:hover,
  .cart-page__checkbox:hover {
    color: var(--lime);
  }
  .cart-page-title-wrap:hover h2 {
    color: var(--lime);
  }
  .cart-page-title-wrap:hover svg path,
  .cart-page__button-favorite:hover svg path {
    stroke: var(--lime);
  }
  .cart-page__button-delete:hover svg path {
    fill: var(--lime);
  }
  .cart-page__order-btn:hover,
  .cart-page__service-btn:hover {
    background-color: #657C19;
  }
}

/* Фокус */
.cart-page__delete-btn:focus-visible,
.card__text-block:focus-visible,
.cart-page-title-wrap:focus-visible svg,
.cart-page__button-favorite:focus-visible,
.cart-page__button-delete:focus-visible,
.cart-page__order-btn:focus-visible {
  outline: 1px solid var(--dark-grey);
  outline-offset: 2px;
}
input[type="checkbox"]:focus-visible + .checkbox-icon {
  outline: 1px solid var(--dark-grey);
  outline-offset: 2px;
}
.cart-page_hascards-out {
  position: relative;
  display: flex;
  align-items: center;
}
.cart-page_cardscontainer {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px;
  gap: 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}
.cart-page_cardscontainer::-webkit-scrollbar {
  display: none;
}
.cart-page_card {
  min-width: 80px;
  height: 60px;
  background: linear-gradient(135deg, rgb(30,30,30) 0%, rgb(123, 147, 41) 100%);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.cart-page_card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.cart-page_card.selected {
    background: linear-gradient(135deg, rgb(123, 147, 41) 0%, rgb(123, 200, 41) 100%);
    transform: scale(1.1);
    box-shadow: 0 0px 6px var(--lime);
    z-index: 5;
    border: 3px solid var(--dark-grey);
}
.cart-page_card_scroll-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: white;
  color: var(--dark-grey);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}
.cart-page_card_scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.cart-page_card_scroll-btn.left {
  left: -20px;
}
.cart-page_card_scroll-btn.right {
  right: -20px;
}
.cart-page_card_scroll-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
.cart-page_card_scroll-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%);
}

/* Медиа */
@media (max-width: 1024px) {
  .main {
    padding: 0;
  }
  .section-container {
    padding: 0;
  }
  .cart-page__block {
    padding: 0 6px;
    flex-direction: column;
    gap: 30px;
  }
  .cart-page__title-wrapper {
    margin-bottom: 0;
    padding: 30px 15px;
    padding-bottom: 50px;
    justify-content: space-between;
  }
  .cart__title-arrow {
    display: block;
  }
  .cart-page__operate-wrapper {
    padding: 0 15px;
    justify-content: space-between;
  }
  .cart-page__checkbox {
    order: 1;
    gap: 10px;
  }
  .cart-page__checkbox span {
    order: -1;
    font-size: var(--font12);
  }
  .cart-page__delete-btn svg {
    width: 10px;
    height: 10px;
  }
  .cart-page__delete-btn span {
    font-size: var(--font12);
  }
  .cart-page-title-wrap {
    padding-right: 50px;
  }
  h1.cart-page__title {
    font-size: var(--font16);
    color: #0f3027;
  }
  .cart-page__title-services {
    font-size: var(--font12);
  }
  .cart-page__list {
    max-width: initial;
    gap: 12px;
  }
  .cart-page__item {
    position: relative;
    gap: 18px;
    padding: 16px 7px 20px 7px;
  }
  .cart-page__service-checkbox {
    position: absolute;
    top: 16px;
    right: -4px;
  }
  .cart-page__service-wrapper {
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    margin: 0;
  }
  .cart-page__service-img {
    margin-right: 13px;
  }
  .cart-page__service-descr-block {
    order: 1;
    max-width: initial;
    
  }
  .cart-page__service-price {
    font-size: var(--font14);
  }
  .cart-page__service-descr {
    margin-bottom: 4px;
    padding: 0;
    font-size: var(--font14);
    line-height: 125%;
  }
  .cart-page__service-location {
    padding: 0;
  }
  .cart-page__service-btn {
    min-width: 100px;
    font-size: var(--font8);
  }
  .cart-page__order-block {
    min-height: initial;
    margin-bottom: 62px;
    padding: 0 10px;
    background-color: initial;
  }
  .cart-page__order-btn {
    display: none;
  }
  .cart-page__info-text {
    max-width: 542px;
    font-size: var(--font13);
  }
  .cart-page__order-tablet {
    padding: 17px;
    background-color: #ffffff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0px -11px 22.2px 0px #00000014;
  }
  .cart-page__order-btn--tablet {
    display: block;
    padding: 13px;
  }
  .checkbox-control {
      display: none;
  }
   .new-service__block-checkbox.availability {
      justify-content: space-between;
  }
  .switch-container {
    display: block;
  }
}
@media (max-width: 480px) {
  .cart-page__service-descr {
    font-size: var(--font13);
  }

  .cart-page__title-wrapper {
    padding: 15px;
  }
}
