:root {
  --scrollbarBg: rgba(33, 59, 28, 0.17);
  --scrollbarThumb: rgba(33, 59, 28, 0.34);
  --scrollbarWidth: thin;
  --scrollbarHeight: 8px;
  --scrollbarBorder: 2px solid var(--scrollbarBg);
  --scrollbarBorderRadius: calc(var(--scrollbarWidth) / 2);
}

/* W3C standard для Firefox */
* {
  scrollbar-width: var(--scrollbarWidth);
  scrollbar-color: var(--scrollbarThumb) var(--scrollbarBg);
}

/* для Chrome/Edge/Safari */
*::-webkit-scrollbar {
  height: var(--scrollbarHeight);
  width: var(--scrollbarWidth);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbarBg);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbarBg);
  border-radius: var(--scrollbarBorderRadius);
  border: var(--scrollbarBorder);
}

.menu--wrapper {
  scrollbar-width: var(--scrollbarWidth);
  scrollbar-color: var(--scrollbarThumb) var(--scrollbarBg);
}

.menu--wrapper::-webkit-scrollbar {
  width: var(--scrollbarWidth);
}

.menu--wrapper::-webkit-scrollbar-track {
  background: var(--scrollbarBg);
  border-radius: var(--scrollbarBorderRadius);
}

.menu--wrapper::-webkit-scrollbar-thumb {
  background-color: var(--scrollbarThumb);
  border-radius: var(--scrollbarBorderRadius);
  border: var(--scrollbarBorder);
}

[class*="ymaps-2"][class*="-ground-pane"] {
  filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
  -webkit-filter: grayscale(100%);
}

/* Стили для блока проверки заказа */
.checkout-review-info {
  margin-bottom: 20px;
}

.checkout-review-info-item {
  display: flex;
  margin-bottom: 10px;
  align-items: baseline;
}

.checkout-review-info-label {
  font-weight: 500;
  margin-right: 10px;
  min-width: 150px;
}

.checkout-review-info-value {
  flex: 1;
}

.checkout-review-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.sticky-footer--review .checkout-review-buttons {
  margin-top: 0;
}
@media (max-width: 767px) {
  .checkout-review-buttons {
    gap: 12px;
  }
}
@media (max-width: 479px) {
  .checkout-review-buttons {
    gap: 8px;
  }
}

/* Переключатель доставки */
/* Контейнер переключателя */
.shipping--wrapper {
  padding: 1em;
  background: transparent;
  border-radius: 1em;
  border: 1px solid var(--gray);
}

.shipping-layer {
  display: flex;
  border: 0px solid transparent;
  border-radius: 0;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  font-size: 1em;
  justify-content: space-between;
  gap: 15px;
}

.shipping-text {
  font-weight: 500;
  font-size: 1em;
  color: var(--black);
  ;
  flex-grow: 1;
}

/* Material Design переключатель */
.shipping-switch {
  position: relative;
  display: inline-block;
  width: 4.25em;
  height: 2em;
  flex-shrink: 0;
}

.shipping-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.material-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--black);
  transition: .4s;
  border-radius: 2em;
}

.material-switch:before {
  position: absolute;
  content: "";
  height: 2.25em;
  width: 2.25em;
  left: -0.125em;
  bottom: -0.125em;
  background-color: var(--smokie);
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.25);
}

#shipping_toggle:checked+.material-switch {
  background-color: var(--red);
}

#shipping_toggle:checked+.material-switch:before {
  transform: translateX(26px);
}

.fd-leftover-today-badge {
  position: absolute;
  z-index: 5;
  top: .5em;
  left: .5em;
  background: var(--red);
  color: var(--white);
  border-radius: 1em;
  padding: 0 .75em;
  font-size: .875em;
  font-weight: 500;
  line-height: 2em;
  white-space: nowrap;
}

.products__item_sale + .fd-leftover-today-badge {
  top: 3em;
}

.fd-purchase-layer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5em;
  width: 100%;
  margin-bottom: .75em;
}

.fd-purchase-layer__option {
  border: 1px solid var(--gray);
  border-radius: .5em;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 3em;
  padding: .65em .85em;
  color: var(--dark-gray);
  background: var(--white);
  font-size: .875em;
  font-weight: 500;
  line-height: 1.2;
}

.fd-purchase-layer__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fd-purchase-layer__option span {
  display: flex;
  flex-direction: column;
  gap: .15em;
}

.fd-purchase-layer__option em {
  color: inherit;
  font-style: normal;
  font-size: .85em;
  opacity: .8;
}

.fd-purchase-layer__option.is-active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(201, 32, 39, .06);
}

@media screen and (max-width: 479px) {
  .fd-purchase-layer {
    grid-template-columns: 1fr;
  }
}
