/*
 * Hurt Sufitow: layout-only correction for the product quick-buy popup.
 * Scoped to #fast_buy, so the cart, login and callback popups are unchanged.
 * Do not change form names, classes, actions, or its Javascript hooks.
 */
#fast_buy .im-popup-inside {
  width: min(820px, calc(100% - 36px));
  max-width: 820px;
  margin-inline: auto;
}

#fast_buy .b-popup_buy {
  box-sizing: border-box;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0, 20, 27, .22);
}

#fast_buy .b-popup__table {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  table-layout: auto;
}

#fast_buy .b-popup__cell-l,
#fast_buy .b-popup__cell-r {
  box-sizing: border-box;
  display: block;
  width: auto;
  min-width: 0;
}

#fast_buy .b-popup__cell-l {
  padding: 28px 30px;
  background: #fff;
}

#fast_buy .b-popup__cell-r {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 40px 36px;
  background: #f4f6f8;
  border-radius: 0;
}

#fast_buy .b-product-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#fast_buy .b-product-item:hover::before,
#fast_buy .b-product-item::before {
  display: none;
  content: none;
}

#fast_buy .b-product-item__img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 246px;
  padding: 12px;
  margin: 0 0 16px;
  object-fit: contain;
  object-position: center;
  background: #f8fafb;
  border-radius: 8px;
}

#fast_buy .b-product-item__title {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 8px;
  color: #141e22;
  font-size: 17px;
  line-height: 1.32;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

#fast_buy .b-product-item__subtitle {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 8px;
  color: #758189;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}

/* Hide an empty, unrated star strip, not actual product ratings. */
#fast_buy .b-rating_rating- {
  display: none;
}

#fast_buy .b-product-item .b-rating {
  margin: 0 0 10px;
}

#fast_buy .b-product-item .b-price {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  color: #101e23;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow: visible;
}

#fast_buy .b-product-item .b-price sup {
  font-size: 13px;
  line-height: 0;
  vertical-align: super;
}

#fast_buy .b-title-2 {
  display: block;
  margin: 0 38px 14px 0;
  font-size: 26px;
  line-height: 1.15;
}

#fast_buy .b-popup__text {
  margin: 0 0 24px;
  color: #65747d;
  font-size: 14px;
  line-height: 1.5;
}

#fast_buy .b-form_popup-buy {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}

#fast_buy .b-form_popup-buy .b-input {
  box-sizing: border-box;
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0 0 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d9e0e5;
  border-radius: 7px;
  color: #152126;
  font-size: 14px;
  line-height: normal;
}

#fast_buy .b-form_popup-buy .b-input:focus {
  border-color: #1296b3;
  outline: 2px solid rgba(18, 150, 179, .12);
  outline-offset: 0;
}

#fast_buy .b-form_popup-buy input[type="submit"].b-btn {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  margin: 14px 0 0;
  padding: 0 10px;
  border: 0;
  border-radius: 24px;
  background: #1296b3;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#fast_buy .b-form_popup-buy input[type="submit"].b-btn:hover,
#fast_buy .b-form_popup-buy input[type="submit"].b-btn:focus-visible {
  background: #0b819b;
}

#fast_buy .b-form_popup-buy ._error-message:empty {
  display: none;
}

#fast_buy .b-form_popup-buy ._error-message:not(:empty) {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

#fast_buy .b-popup > .b-popup__close {
  top: 16px;
  right: 16px;
}

@media (max-width: 700px) {
  #fast_buy {
    padding: 16px 0;
  }

  #fast_buy .im-popup-inside {
    width: calc(100% - 24px);
  }

  #fast_buy .b-popup__table {
    grid-template-columns: minmax(0, 1fr);
  }

  #fast_buy .b-popup__cell-l {
    padding: 20px 22px 18px;
  }

  #fast_buy .b-popup__cell-r {
    padding: 26px 22px 28px;
  }

  #fast_buy .b-product-item {
    display: grid;
    grid-template-columns: minmax(0, 108px) minmax(0, 1fr);
    column-gap: 16px;
    align-content: start;
  }

  #fast_buy .b-product-item__img {
    grid-row: 1 / span 4;
    width: 108px;
    height: 108px;
    margin: 0;
    padding: 6px;
  }

  #fast_buy .b-product-item__title {
    box-sizing: border-box;
    padding-right: 40px; /* Keep the title clear of the close control. */
    font-size: 15px;
    line-height: 1.3;
  }

  #fast_buy .b-product-item .b-price {
    font-size: 20px;
  }

  #fast_buy .b-title-2 {
    font-size: 23px;
  }

  #fast_buy .b-popup__text {
    margin-bottom: 17px;
  }
}

@media (max-width: 375px) {
  #fast_buy .b-popup__cell-l,
  #fast_buy .b-popup__cell-r {
    padding-left: 18px;
    padding-right: 18px;
  }

  #fast_buy .b-product-item {
    grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
    column-gap: 12px;
  }

  #fast_buy .b-product-item__img {
    width: 92px;
    height: 92px;
  }

  #fast_buy .b-form_popup-buy input[type="submit"].b-btn {
    font-size: 13px;
  }
}
