:root { --nc-purchase-bottom-gap: max(120px, calc(var(--nc-visual-bottom-gap, 0px) + 16px)); }
.ps-product-page .ps-detail-controls .ps-btn,
.ps-cart-page .ps-btn.ps-cart-checkout,
.ps-checkout-page .ps-btn.nc-checkout-submit {
  min-height: 64px;
  padding: 14px 18px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  scroll-margin-bottom: 24px;
}
.ps-product-page .ps-detail-controls .ps-btn.primary,
.ps-cart-page .ps-btn.ps-cart-checkout,
.ps-checkout-page .ps-btn.nc-checkout-submit {
  border-color: #b52b3f;
  background: #b52b3f;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgb(181 43 63 / 22%);
}
.ps-product-page .ps-detail-controls .ps-btn.primary:hover,
.ps-cart-page .ps-btn.ps-cart-checkout:hover,
.ps-checkout-page .ps-btn.nc-checkout-submit:hover { border-color: #942136; background: #942136; }
.ps-product-page .ps-detail-controls .ps-btn:focus-visible,
.ps-cart-page .ps-cart-checkout:focus-visible,
.ps-checkout-page .nc-checkout-submit:focus-visible { outline: 3px solid #183e34; outline-offset: 4px; }
.ps-checkout-page .nc-checkout-submit { width: 100%; }
@media (min-width: 901px) {
  .ps-product-page .ps-detail-controls .ps-btn.primary { min-height: 68px; }
  .ps-product-page .ps-detail-controls .ps-btn:not(.primary) { font-size: 17px; }
}
@media (max-width: 900px) {
  html { scroll-padding-bottom: calc(var(--nc-purchase-bottom-gap) + 24px); }
  body.nc-purchase-product {
    padding-bottom: calc(var(--nc-purchase-bar-height, 164px) + 24px + env(safe-area-inset-bottom, 0px));
  }
  .ps-product-page .ps-detail-controls {
    /* Fixed controls follow the browser viewport; safe area belongs inside the bar. */
    bottom: 0;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-bottom: 1px solid #d8e3df;
    border-radius: 14px 14px 0 0;
  }
  .ps-product-page .ps-detail-controls .ps-btn { min-height: 64px; min-width: 0; padding: 12px 6px; font-size: 18px; }
  .ps-product-page .ps-detail-controls .ps-btn.primary { font-size: 22px; }
  .ps-product-page .ps-detail-controls .ps-field input { min-height: 48px; font-size: 18px; }
  .ps-cart-page .ps-cart-top-actions > .ps-btn { min-height: 64px; }
  .ps-cart-page .ps-cart-bottom-actions { margin-bottom: calc(var(--nc-purchase-bottom-gap) + env(safe-area-inset-bottom, 0px)); }
  .ps-cart-page .ps-cart-bottom-actions > .ps-btn { min-height: 64px; }
  .ps-checkout-page #shopCheckoutForm { padding-bottom: calc(var(--nc-purchase-bottom-gap) + env(safe-area-inset-bottom, 0px)); }
  .ps-cart-page, .ps-checkout-page { padding-bottom: calc(var(--nc-purchase-bottom-gap) + 24px); }
  .ps-cart-page .ps-cart-checkout, .ps-checkout-page .nc-checkout-submit {
    scroll-margin-bottom: calc(var(--nc-purchase-bottom-gap) + 24px);
    min-width: 0;
  }
  .ps-checkout-page #shopCheckoutForm .ps-check {
    box-sizing: border-box;
    min-width: 0;
    min-height: 60px;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border: 1px solid #bccfc7;
    border-radius: 8px;
    background: #f6faf7;
    cursor: pointer;
    touch-action: manipulation;
  }
  .ps-checkout-page #shopCheckoutForm .ps-check input[type="checkbox"] {
    box-sizing: border-box;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: 0;
    accent-color: #173e38;
    cursor: pointer;
  }
  .ps-checkout-page #shopCheckoutForm .ps-check span {
    min-width: 0;
    margin: 0;
    color: #183e34;
    font-size: 18px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .ps-checkout-page #shopCheckoutForm .ps-check:focus-within {
    outline: 3px solid #b79757;
    outline-offset: 3px;
  }
}
