.proso-product-card-action,
.proso-notify-action {
  max-width: 100%;
  min-width: 0;
  text-align: center;
  white-space: normal;
  touch-action: manipulation;
}

.product-item .proso-cart-action.proso-product-card-action {
  width: 10.5rem;
}

/* Long words in list descriptions must not widen a narrow mobile viewport. */
.products-container .list .product-text {
  overflow-wrap: anywhere;
}

/* Keep names and prices equally readable, with the product name as the
   stronger scanning anchor (R-1377). */
.product-item .product-name,
.product-item .price,
.product-item .product-controls > small.d-block {
  text-align: center;
}

.product-item .product-name .h6,
.product-item .price > .h6 {
  font-size: 1.125rem;
  line-height: 1.4;
}

.product-item .product-name .h6 {
  /* Override Frame's Bootstrap font-weight-normal utility on the link. */
  font-weight: 600 !important;
}

.product-item .price > .h6 {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

/* Keep the discount legible over both light and red packaging. */
.badge.stiker-special {
  display: inline-flex;
  align-items: center;
  min-height: 1.875rem;
  padding: .1875rem .5rem;
  border: 2px solid currentColor;
  border-radius: .375rem;
  background-color: #a52537;
  color: var(--white, #fff);
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.product-item .product-controls > small.d-block > .row {
  justify-content: center;
}

.product-item .product-controls > small.d-block > .row > .col {
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 1rem);
}

/* Frame toggles btn-light and btn-danger on card hover. Keep that native
   behaviour, but make the Proso primary action visually stable and legible. */
.product-item .proso-cart-action.btn-cart-add {
  border-color: #2f7a46;
  background-color: #2f7a46;
  color: #fff;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.product-item .proso-cart-action.btn-cart-add:hover {
  border-color: #245e36;
  background-color: #245e36;
  color: #fff;
}

.product-item .proso-cart-action.btn-cart-add:active {
  border-color: #1f512f;
  background-color: #1f512f;
  color: #fff;
}

.product-item .proso-cart-action.btn-cart-add:focus {
  color: #fff;
}

.product-item .proso-cart-action.btn-cart-add [class*="ft-icon"] {
  color: #fff !important;
}

.product-item .proso-notify-action.btn-cart-add {
  border-color: #2f7a46;
  background-color: transparent;
  color: #2f7a46;
}

.product-item .proso-notify-action.btn-cart-add:hover,
.product-item .proso-notify-action.btn-cart-add:focus {
  border-color: #2f7a46;
  background-color: #edf7f0;
  color: #245e36;
}

.proso-stock-notify-label {
  min-width: 0;
  overflow-wrap: break-word;
  white-space: normal;
}

.proso-cart-action:focus-visible,
.proso-notify-action:focus-visible {
  outline: 3px solid rgba(47, 122, 70, .32);
  outline-offset: 2px;
}

/* Keep the original heart and scales, with a check that also works without color. */
[data-proso-product-action][data-proso-product-action-saved] {
  background-color: var(--proso-primary-soft, #edf7f0);
  color: var(--proso-primary, #2f7a46);
}

[data-proso-product-action-saved] svg {
  color: inherit !important;
  fill: currentColor;
}

[data-proso-product-action] .proso-product-action-check {
  display: inline-grid;
  width: .875rem;
  height: .875rem;
  place-items: center;
  margin-inline-start: .375rem;
  border: 1px solid var(--proso-primary-soft, #edf7f0);
  border-radius: 50%;
  background-color: var(--proso-primary, #2f7a46);
  color: var(--proso-surface, #fff);
  font-size: .5rem;
  line-height: 1;
  vertical-align: middle;
  pointer-events: none;
}

.btn[data-proso-product-action-saved] {
  position: relative;
}

.btn[data-proso-product-action] .proso-product-action-check {
  position: absolute;
  inset-inline-end: .125rem;
  bottom: .125rem;
  margin-inline-start: 0;
}

.proso-product-action-notice {
  max-width: calc(100% - 20px);
  overflow-wrap: anywhere;
}

/* Frame gallery columns must shrink beside the thumbnail rail. The original
   Frame Bootstrap included this rule; stock Bootstrap 4.6.2 does not. */
@media (min-width: 992px) {
  #product-gallery > .row > .col-lg {
    min-width: 0;
  }
}

/* Long attribute values must stay inside the short-attributes column. */
#content .col.order-lg-2.px-xl-4 .form-row > .col-4 {
  overflow-wrap: anywhere;
}

/* At Frame's narrow three-column breakpoint, put values below labels so
   ordinary words remain readable. The wide and mobile layouts stay native. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  #content .col.order-lg-2.px-xl-4 .form-row > .col {
    display: none;
  }

  #content .col.order-lg-2.px-xl-4 .form-row > .col-4 {
    flex-basis: 100%;
    max-width: 100%;
  }
}

.proso-stock-notify-trigger {
  display: none !important;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.proso-stock-notify-enabled .proso-stock-notify-trigger {
  display: inline-flex !important;
}

.proso-stock-notify-enabled .proso-stock-notify-trigger.btn-block {
  display: flex !important;
}

.proso-stock-notify-enabled .proso-stock-notify-original[disabled] {
  display: none !important;
}

.proso-stock-notify-trigger svg {
  flex: 0 0 auto;
}

.proso-stock-notify-modal .modal-dialog {
  max-width: 520px;
}

.proso-stock-notify-modal .modal-content,
.proso-stock-notify-page,
.proso-stock-notify-panel {
  border-radius: 18px;
}

.proso-stock-notify-modal .modal-content {
  border: 1px solid #d9e2dc;
  box-shadow: 0 18px 50px rgba(23, 34, 27, .18);
  overflow: hidden;
}

.proso-stock-notify-modal .modal-header {
  align-items: center;
  border-bottom: 1px solid #e4ebe6;
  padding: 18px 22px;
}

.proso-stock-notify-modal .modal-title {
  color: #17221b;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.proso-stock-notify-modal .modal-body {
  padding: 22px;
}

.proso-stock-notify-modal .proso-stock-notify-title {
  display: none;
}

.proso-stock-notify-modal .proso-stock-notify-action-title {
  display: none;
}

.proso-stock-notify-page {
  max-width: 620px;
  margin: 24px auto 40px;
  padding: 26px;
  background: #fff;
  border: 1px solid #d9e2dc;
  border-radius: .5rem;
}

.proso-stock-notify-page > h1 {
  color: #17221b;
}

.proso-stock-notify-action > p {
  max-width: 68ch;
  margin-bottom: 0;
  color: #626f67;
  font-size: 16px;
  line-height: 1.5;
}

.proso-stock-notify-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin-top: 20px;
}

.proso-stock-notify-page-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-right: 20px;
  padding-left: 20px;
  border-radius: .5rem;
  font-size: 17px;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

.proso-stock-notify-action-form {
  margin: 0;
}

.proso-stock-notify-product {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.proso-stock-notify-product img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border: 1px solid #e4ebe6;
  border-radius: 14px;
  background: #fff;
}

.proso-stock-notify-title {
  margin: 0 0 6px;
  color: #17221b;
  font-size: 24px;
  line-height: 1.25;
}

.proso-stock-notify-name {
  color: #2f7a46;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.proso-stock-notify-promise {
  margin: 0 0 18px;
  color: #626f67;
  font-size: 16px;
  line-height: 1.5;
}

.proso-stock-notify-form label {
  color: #17221b;
  font-size: 16px;
  font-weight: 600;
}

.proso-stock-notify-form .form-control {
  min-height: 48px;
  border-color: #b9c8be;
  border-radius: 12px;
  font-size: 18px;
}

.proso-stock-notify-form .form-control:focus {
  border-color: #2f7a46;
  box-shadow: 0 0 0 .2rem rgba(47, 122, 70, .2);
}

.proso-stock-notify-form .btn {
  min-height: 48px;
  border-radius: 12px;
  font-size: 17px;
}

.proso-stock-notify-result:not(:empty) {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #edf7f0;
  color: #245f37;
}

.proso-stock-notify-result.is-error {
  background: #fff3cd;
  color: #7a5500;
}

.proso-stock-notify-privacy {
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
}

.proso-stock-notify-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 575.98px) {
  .proso-stock-notify-modal .modal-dialog {
    margin: 8px;
  }

  .proso-stock-notify-modal .modal-header,
  .proso-stock-notify-modal .modal-body {
    padding: 16px;
  }

  .proso-stock-notify-modal .modal-content,
  .proso-stock-notify-page,
  .proso-stock-notify-panel {
    border-radius: 14px;
  }

  .proso-stock-notify-product {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .proso-stock-notify-product img {
    width: 68px;
    height: 68px;
  }

  .proso-stock-notify-title,
  .proso-stock-notify-modal .modal-title {
    font-size: 20px;
  }

  .proso-stock-notify-page {
    margin-top: 16px;
    padding: 20px;
    border-radius: .5rem;
  }

  .proso-stock-notify-page-actions {
    flex-direction: column;
  }

  .proso-stock-notify-page-actions .btn,
  .proso-stock-notify-action-form {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .proso-stock-notify-modal.fade .modal-dialog {
    transition: none;
  }
}
