/* ==========  STS toasts + Porto add-to-bag popup (sts-product plugin, all front-end pages)  ========== */

/* Toast stack */
.sts-toasts { position: fixed; z-index: 100000; right: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.sts-toast {
  --tacc: var(--acc, var(--sts-blue, #00BFFF));
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px; align-items: start; gap: 4px 14px; width: 100%; overflow: hidden; pointer-events: auto;
  padding: 16px 14px 16px 16px; background: var(--sts-panel, #141414); color: var(--sts-white, #fff);
  border: 1px solid rgba(255,255,255,.1); border-radius: 18px; box-shadow: 4px 4px 0 var(--tacc), 0 18px 40px rgba(0,0,0,.45);
  font: 500 15px/1.45 var(--sts-f-body, Inter, system-ui, sans-serif); text-align: left;
  opacity: 0; transform: translateY(16px) scale(.96); transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .45s cubic-bezier(.34,1.6,.64,1);
}
.sts-toast.is-in { opacity: 1; transform: none; }
.sts-toast.is-out { opacity: 0; transform: translateX(24px); transition-duration: .25s; }
.sts-toast.is-error { --tacc: var(--sts-red, #FF3B5C); }
.sts-toast__ico { grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tacc); color: #000; }
.sts-toast.is-error .sts-toast__ico { color: #fff; }
.sts-toast__msg { grid-column: 2; align-self: center; min-height: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .3em; padding-top: 1px; }
.sts-toast__msg a { color: var(--tacc); text-decoration: underline; text-underline-offset: 3px; }
.sts-toast__msg :is(strong, b) { color: var(--sts-white, #fff); font-weight: 700; }
.sts-toast__acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sts-toast__btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid #000; border-radius: 10px; background: var(--tacc); color: #000 !important;
  font: 700 12px/1 var(--sts-f-body, Inter, sans-serif); letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important;
  box-shadow: 0 0 0 #fff; transition: transform .24s cubic-bezier(.33,1,.68,1), box-shadow .24s cubic-bezier(.33,1,.68,1);
}
.sts-toast.is-error .sts-toast__btn { background: var(--sts-white, #fff); }
.sts-toast__btn:hover, .sts-toast__btn:focus-visible { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #fff; outline: none; }
.sts-toast__btn:focus-visible { outline: 3px solid var(--sts-yellow, #FFCB05); outline-offset: 3px; }
.sts-toast__btn:active { transform: none; box-shadow: none; }
.sts-toast__x { grid-column: 3; grid-row: 1; justify-self: end; display: grid; place-items: center; width: 32px; height: 32px; margin: 2px 0 0; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: border-color .2s; }
.sts-toast__x:hover { border-color: var(--tacc); }
.sts-toast__x:focus-visible { outline: 3px solid var(--sts-yellow, #FFCB05); outline-offset: 2px; }
.sts-toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tacc); transform-origin: 0 50%; animation: stsToastLife var(--life, 7000ms) linear forwards; }
.sts-toast.is-paused .sts-toast__bar { animation-play-state: paused; }
@keyframes stsToastLife { to { transform: scaleX(0); } }

/* Notices waiting for JS (or with JS off) never sit on top of the overlay nav */
html.sts-toasts-on body.woocommerce:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) .woocommerce-notices-wrapper.is-empty { display: none; }
body.sts-pd-page .woocommerce-notices-wrapper:not(.sts-pd .woocommerce-notices-wrapper) {
  position: fixed; z-index: 100000; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); margin: 0;
}
body.sts-pd-page :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) {
  margin: 0 0 10px !important; padding: 16px 20px !important; list-style: none;
  background: var(--sts-panel, #141414) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.1) !important; border-left: 4px solid var(--acc, var(--sts-blue, #00BFFF)) !important; border-radius: 18px !important;
  font: 500 15px/1.45 var(--sts-f-body, Inter, sans-serif) !important;
}
body.sts-pd-page .woocommerce-error { border-left-color: var(--sts-red, #FF3B5C) !important; }
body.sts-pd-page :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::before { display: none !important; }
body.sts-pd-page :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) .button { float: none !important; display: inline-block; margin: 8px 0 0 !important; padding: 10px 16px !important; border: 2px solid #000 !important; border-radius: 10px !important; background: var(--acc, var(--sts-blue, #00BFFF)) !important; color: #000 !important; font: 700 12px/1 var(--sts-f-body, Inter, sans-serif) !important; letter-spacing: .06em; text-transform: uppercase; }

/* Tiles: the shop tile shows its own tick, so hide WooCommerce's "View basket" link after AJAX adds */
.sts-ptile .added_to_cart { display: none !important; }

/* Porto AJAX add-to-bag popup (style 3, bottom right) */
.after-loading-success-message.style-3 { right: 24px; bottom: 24px; }
.after-loading-success-message .success-message-container {
  width: min(380px, calc(100vw - 32px)) !important; margin: 0 0 12px !important; padding: 18px !important; text-align: left;
  background: var(--sts-panel, #141414) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.1) !important; border-radius: 18px !important;
  box-shadow: 4px 4px 0 var(--sts-blue, #00BFFF), 0 18px 40px rgba(0,0,0,.45) !important;
  font-family: var(--sts-f-body, Inter, sans-serif);
}
.after-loading-success-message .success-message-container .msg-box { display: flex; align-items: center; gap: 14px; margin-bottom: 16px !important; }
.after-loading-success-message .success-message-container img { width: 64px !important; height: 64px; margin: 0 !important; padding: 4px; object-fit: contain; border-radius: 12px; background: var(--sts-ink, #0A0A0A); border: 1px solid rgba(255,255,255,.08); }
.after-loading-success-message .success-message-container .msg { order: 2; margin: 0 !important; color: rgba(255,255,255,.75) !important; font: 500 14px/1.45 var(--sts-f-body, Inter, sans-serif) !important; letter-spacing: 0 !important; }
.after-loading-success-message .success-message-container .product-name,
.after-loading-success-message .success-message-container .product-name a,
.after-loading-success-message .success-message-container .woocommerce-loop-product__title { color: #fff !important; font: 400 15px/1.2 var(--sts-f-display, "Archivo Black", sans-serif) !important; text-transform: none; }
.after-loading-success-message .success-message-container .btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 0 !important; width: calc(50% - 5px); padding: 12px 10px !important; margin: 0 !important; float: none !important;
  border: 2px solid #000 !important; border-radius: 10px !important; font: 700 12px/1 var(--sts-f-body, Inter, sans-serif) !important; letter-spacing: .06em !important; text-transform: uppercase;
  transition: transform .24s cubic-bezier(.33,1,.68,1), box-shadow .24s cubic-bezier(.33,1,.68,1); box-shadow: 0 0 0 #fff;
}
.after-loading-success-message .success-message-container .viewcart { background: var(--sts-ink, #0A0A0A) !important; color: #fff !important; border-color: #fff !important; margin-right: 10px !important; }
.after-loading-success-message .success-message-container .continue_shopping { background: var(--sts-blue, #00BFFF) !important; color: #000 !important; }
.after-loading-success-message .success-message-container .btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 #fff; }
.after-loading-success-message .success-message-container .mfp-close { top: 8px !important; right: 8px !important; width: 30px !important; height: 30px !important; line-height: 28px !important; border-radius: 50%; border: 1px solid rgba(255,255,255,.18) !important; color: #fff !important; opacity: 1 !important; }

@media (max-width: 767px) {
  .sts-toasts { left: 16px; right: 16px; bottom: 16px; width: auto; align-items: stretch; }
  .after-loading-success-message.style-3 { left: 16px; right: 16px; bottom: 16px; }
  .after-loading-success-message .success-message-container { width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sts-toast { transition: opacity .2s linear; transform: none !important; }
  .sts-toast__bar { animation: none; display: none; }
}
