/* "PP" Buy now with PayPal: Add to cart 3/4, PayPal 1/4 (js/ift-pp-buy.js) */

#wrapper .product-miniature .product-add-cart .input-group-add-cart .btn-product-list.add-to-cart,
.product-miniature .product-add-cart .input-group-add-cart .btn.btn-product-list.add-to-cart {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
}

.ift-pp-buy {
  position: relative;
  display: inline-flex;
  flex: 0 0 25%;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease;
}
.ift-pp-buy img { display: block; width: 20px; height: 20px; }
.ift-pp-buy:hover,
.ift-pp-buy:focus-visible { border-color: #002991; background: #f5f8ff; }
.ift-pp-buy:focus-visible { outline: 2px solid #003087; outline-offset: 2px; }
.ift-pp-buy:disabled { opacity: .45; cursor: not-allowed; }
.ift-pp-buy.is-busy img { opacity: 0; }
.ift-pp-buy.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(0, 48, 135, .25);
  border-top-color: #003087;
  border-radius: 50%;
  animation: ift-pp-spin .7s linear infinite;
}
@keyframes ift-pp-spin { to { transform: rotate(360deg); } }

@media (max-width: 575.98px) {
  #wrapper .product-miniature-grid .ift-pp-buy {
    min-height: 34px;
    height: 34px;
  }
  #wrapper .product-miniature-grid .ift-pp-buy { border: 1.5px solid #cbd5e1; }
  .ift-pp-buy img { width: 18px; height: 18px; }
}

.ift-pp-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 1080;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}
.ift-pp-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .ift-pp-buy.is-busy::after { animation-duration: 1.6s; }
  .ift-pp-toast { transition: none; }
}

/* Combination picker before PayPal */
html.ift-ppo-open { overflow: hidden; }
.ift-ppo { position: fixed; inset: 0; z-index: 1070; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ift-ppo[hidden] { display: none; }
.ift-ppo__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .18s ease; }
.ift-ppo__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(560px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.ift-ppo.is-visible .ift-ppo__backdrop,
.ift-ppo.is-visible .ift-ppo__dialog { opacity: 1; transform: none; }
.ift-ppo__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid #eef1f4; }
.ift-ppo__eyebrow { display: block; margin-bottom: 2px; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ift-ppo__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ift-ppo__close { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid #e2e8f0; border-radius: 50%; background: #fff; color: #0f172a; cursor: pointer; }
.ift-ppo__close:hover { background: #f1f5f9; }
.ift-ppo__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ift-ppo__body { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 16px 18px 18px; overflow-y: auto; }
.ift-ppo__msg { grid-column: 1 / -1; margin: 12px 0; color: #475569; font-size: 14px; }
.ift-ppo__media img { display: block; width: 100%; height: auto; border: 1px solid #eef1f4; border-radius: 10px; object-fit: contain; }
.ift-ppo__group { margin: 0 0 12px; padding: 0; border: 0; }
.ift-ppo__group legend { margin-bottom: 6px; color: #475569; font-size: 12.5px; font-weight: 700; }
.ift-ppo__group legend span { color: #0f172a; font-weight: 600; }
.ift-ppo__values { display: flex; flex-wrap: wrap; gap: 6px; }
.ift-ppo__value { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; font-size: 13px; font-weight: 600; cursor: pointer; }
.ift-ppo__value i { width: 14px; height: 14px; border: 1px solid rgba(15, 23, 42, .2); border-radius: 50%; }
.ift-ppo__value:hover { border-color: #0f172a; }
.ift-ppo__value.is-selected { border-color: #0f172a; box-shadow: inset 0 0 0 1px #0f172a; }
.ift-ppo__value.is-unavailable { color: #94a3b8; text-decoration: line-through; }
.ift-ppo__summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.ift-ppo__price span { font-size: 20px; font-weight: 800; }
.ift-ppo__price s { color: #94a3b8; font-size: 13px; }
.ift-ppo__info { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; }
.ift-ppo__stock { font-weight: 700; }
.ift-ppo__stock.is-in { color: #15803d; }
.ift-ppo__stock.is-order { color: #b45309; }
.ift-ppo__stock.is-out { color: #b91c1c; }
.ift-ppo__ref { color: #64748b; }
.ift-ppo__buy { display: flex; gap: 10px; }
.ift-ppo__qty { display: inline-flex; flex: 0 0 auto; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 10px; }
.ift-ppo__qty button { width: 36px; border: 0; background: #f8fafc; color: #0f172a; font-size: 18px; cursor: pointer; }
.ift-ppo__qty input { width: 46px; border: 0; border-inline: 1px solid #e2e8f0; text-align: center; font-size: 15px; font-weight: 700; -moz-appearance: textfield; }
.ift-ppo__qty input::-webkit-inner-spin-button,
.ift-ppo__qty input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.ift-ppo__pay { position: relative; display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1.5px solid #0f172a; border-radius: 10px; background: #fff; color: #0f172a; font-size: 15px; font-weight: 700; cursor: pointer; }
.ift-ppo__pay img { width: 22px; height: 22px; }
.ift-ppo__pay:hover { background: #f5f8ff; border-color: #002991; }
.ift-ppo__pay:disabled { border-color: #e2e8f0; color: #94a3b8; opacity: .7; cursor: not-allowed; }
.ift-ppo__pay.is-busy > * { opacity: 0; }
.ift-ppo__pay.is-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(0, 48, 135, .25); border-top-color: #003087; border-radius: 50%; animation: ift-pp-spin .7s linear infinite; }
.ift-ppo__full { display: inline-block; margin-top: 10px; color: #475569; font-size: 12.5px; text-decoration: underline; }

@media (max-width: 575.98px) {
  .ift-ppo { align-items: flex-end; padding: 0; }
  .ift-ppo__dialog { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; }
  .ift-ppo__body { grid-template-columns: 1fr; gap: 12px; padding: 12px 14px 16px; }
  .ift-ppo__media img { width: 120px; margin: 0 auto; }
}
.ift-ppo__add { position: relative; display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 0; height: 46px; border: 1.5px solid #0f172a; border-radius: 10px; background: #0f172a; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.ift-ppo__add:hover { background: #1e293b; }
.ift-ppo__add:disabled { border-color: #e2e8f0; background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.ift-ppo__add.is-busy > * { opacity: 0; }
.ift-ppo__add.is-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: ift-pp-spin .7s linear infinite; }
.ift-ppo__pay--small { flex: 0 0 25%; border-color: #cbd5e1; }
