/* Оплата частинами — UI 1:1 з лендингу (папка 32) */

.leader-shell-host [modal='pay-part'],
body.product-page [modal='pay-part'] {
  display: none !important;
}

.leader-shell-host [data-leader-installments-mount],
body.product-page [data-leader-installments-mount] {
  display: none !important;
}

.leader-paypart-bank {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.fs-prod-buy-alternative{
  min-height: 4em;
}

/* Текст і логотипи банків поруч; на мобайлі кнопка лишається на всю ширину. */
.leader-shell-host [modal-open='pay-part'].fs-prod-buy-alternative,
body.product-page [modal-open='pay-part'].fs-prod-buy-alternative {
  justify-content: center;
  column-gap: clamp(8px, 0.7em, 12px);
  row-gap: clamp(8px, 0.7em, 12px);
  width: fit-content;
  max-width: 100%;
}
.leader-paypart-bank img,
.leader-paypart-bank .fs-prod-buy-alternative-img-wrapper {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
  aspect-ratio: 1 / 1;
  height: auto;
  width: 2.5em;
}

.leader-paypart-bank-count {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  line-height: 1;
}

.installments-card {
  margin-top: 16px;
  margin-bottom: 24px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
}

.installments-banks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bank-badge {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.bank-badge-inner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f5f5;
}

.bank-badge-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bank-badge-count {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
}

.installments-price {
  font-size: 15px;
  color: #111;
  margin-bottom: 14px;
}

.installments-price strong {
  font-size: 24px;
  font-weight: 800;
}

.installments-cta {
  width: 100%;
  padding: 16px 24px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
  text-align: center;
}

.installments-cta:hover {
  background: #2e7d32;
}

.installments-cta:active {
  transform: scale(0.98);
}

.leader-cart-installment {
  margin: 12px 0 4px;
}

.leader-cart-installment-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}

.leader-cart-installment-toggle input {
  margin-top: 3px;
  accent-color: #b3191d;
}

.leader-cart-installment-toggle-text {
  font-size: 14px;
  font-weight: 600;
  color: #121323;
  line-height: 1.35;
}

.cart-installment-summary {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
  border-left: 3px solid #b3191d;
}

.cart-installment-summary.is-visible {
  display: block;
}

.cart-installment-summary-label {
  font-weight: 600;
  margin-right: 6px;
}

.cart-installment-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cart-installment-summary-actions button {
  border: 0;
  background: transparent;
  color: #b3191d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== INSTALLMENTS MODAL ========== */
.installments-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 11000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.installments-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.installments-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  height: 100%;
  overflow-y: auto;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.installments-overlay.open .installments-modal {
  transform: translateX(0);
}

.installments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.installments-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.installments-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.installments-close-btn:hover {
  background: #f5f5f5;
}

.installments-close-btn svg {
  width: 24px;
  height: 24px;
  color: #6b6b6b;
}

.installments-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.installment-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.installment-option:hover {
  border-color: #d1d1d1;
  background: #f5f5f5;
}

.installment-option.selected {
  border-color: #4caf50;
  background: #f1f8f1;
}

.installment-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #f5f5f5;
}

.installment-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.installment-logo.abank {
  background: #ff9800;
}

.installment-logo.monobank {
  background: #111;
}

.installment-info {
  flex: 1;
  min-width: 0;
}

.installment-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
}

.installment-subtitle {
  font-size: 12px;
  color: #6b6b6b;
}

.installment-price {
  text-align: right;
  flex-shrink: 0;
}

.installment-amount {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.installment-term {
  font-size: 12px;
  color: #6b6b6b;
}

.installment-details {
  display: none;
  width: 100%;
  flex-basis: 100%;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
}

.installment-option.selected .installment-details {
  display: block;
}

.installment-terms {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.term-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #d1d1d1;
  background: #fff;
  border-radius: 8px;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.term-btn:hover {
  border-color: #9e9e9e;
}

.term-btn.active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
}

.installment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.installment-row-label {
  color: #444;
}

.installment-row-value {
  color: #111;
  font-weight: 600;
}

.installment-select-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 24px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.installment-select-btn:hover {
  background: #2e7d32;
}

.installment-select-btn:active {
  transform: scale(0.98);
}

.installment-disclaimer {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #6b6b6b;
  text-align: center;
}

.leader-checkout-installment {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: #f5f5f5;
  /* border-radius: 8px; */
  font-size: 14px;
  color: #444;
  border-left: 3px solid #b3191d;
}

.leader-checkout-installment-note {
  margin: 0;
  line-height: 1.45;
}

.leader-checkout-installment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.leader-checkout-installment-actions button {
  border: 0;
  background: transparent;
  color: #b3191d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.installments-card-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #666;
}

.leader-cart-intent-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3ece4;
  color: #7a3e12;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.leader-cart-guide {
  margin: 14px 0 8px;
  padding: 16px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
}

.leader-cart-guide-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: #121323;
}

.leader-cart-guide-lead,
.leader-cart-guide-preview,
.leader-cart-guide-step-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #3d3d46;
}

.leader-cart-guide-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 8px;
}

.leader-cart-guide-preview strong {
  color: #121323;
  font-size: 15px;
}

.leader-cart-guide-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leader-cart-guide-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.leader-cart-guide-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b3191d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.leader-cart-guide-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #121323;
  margin-bottom: 2px;
}

.leader-cart-guide-banks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: #6b6b6b;
}

.leader-cart-guide-bank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.leader-cart-guide-bank.abank {
  background: #ff9800;
}

.leader-cart-guide-bank.monobank {
  background: #111;
}

.leader-cart-guide-bank img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media screen and (max-width: 1354px) {
  .leader-paypart-bank .fs-prod-buy-alternative-img-wrapper {
    width: 2.5em;
  }
}

@media screen and (max-width: 991px) {
  .leader-paypart-bank .fs-prod-buy-alternative-img-wrapper {
    width: 2.5em;
  }
}
@media screen and (max-width: 480px) {
  .leader-shell-host [modal-open='pay-part'].fs-prod-buy-alternative,
  body.product-page [modal-open='pay-part'].fs-prod-buy-alternative{
    min-height: 17em!important;
    border-radius: 2.66667em!important;
  }
    .leader-paypart-bank .fs-prod-buy-alternative-img-wrapper {
      width: 9.5em !important;
  }
    .leader-paypart-bank-count {
      width: 18px!important;
      height: 18px!important;
      font-size: 11px!important;
  }
}

@media screen and (max-width: 771px) {
  .leader-paypart-bank-count {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    line-height: 1;
  }
}


@media screen and (max-width: 767px) {
  .installments-card {
    padding: 16px;
  }

  .installments-price strong {
    font-size: 20px;
  }

  .installments-cta {
    padding: 14px 18px;
    font-size: 15px;
  }

  .installments-header,
  .installments-body {
    padding: 16px;
  }

  .installment-title {
    font-size: 14px;
  }

  .leader-paypart-bank .fs-prod-buy-alternative-img-wrapper {
    width: 3em;
  }

  .leader-paypart-bank-count {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    line-height: 1;
  }

  .leader-shell-host [modal-open='pay-part'].fs-prod-buy-alternative,
  body.product-page [modal-open='pay-part'].fs-prod-buy-alternative {
    grid-column-gap: clamp(8px, 0.7em, 12px);
    grid-row-gap: clamp(8px, 0.7em, 12px);
    cursor: pointer;
    border: 0.0694445em solid #c61717;
    border-radius: 0.694444em;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    min-height: 4em;
    padding: 0 0.694444em 0 1.73611em;
    display: flex;
    width: fit-content;
    max-width: 100%;
  }
}

@media screen and (max-width: 479px) {
  .leader-shell-host [modal-open='pay-part'].fs-prod-buy-alternative,
  body.product-page [modal-open='pay-part'].fs-prod-buy-alternative {
    width: 100%;
    max-width: 100%;
    column-gap: clamp(8px, 2.2em, 12px);
    row-gap: clamp(8px, 2.2em, 12px);
  }
}
