/* Mobile sticky add-to-cart bar (inc/pdp-sticky-bar.php) */
.sft-sticky-atc {
  display: none;
}

@media (max-width: 768px) {
  .sft-sticky-atc {
    position: fixed;
    left: 0;
    right: 0;
    /* Sits on top of the bottom nav (css/mobile-nav.css). */
    bottom: calc(var(--sft-bottomnav-h, 0px) + var(--sft-bottomnav-inset, 0px));
    z-index: 99400;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid #e7eaef;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(110%);
    transition: transform 0.22s ease;
  }

  .sft-sticky-atc[hidden] {
    display: none;
  }

  .sft-sticky-atc.is-visible {
    transform: translateY(0);
  }

  .sft-sticky-atc__info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
  }

  .sft-sticky-atc__price {
    overflow: hidden;
    color: var(--ss-ink, #0f172a);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .sft-sticky-atc__price del {
    margin-right: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
  }

  .sft-sticky-atc__price ins {
    text-decoration: none;
  }

  .sft-sticky-atc__size {
    margin-top: 2px;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
  }

  .sft-sticky-atc__size.is-chosen {
    color: var(--ss-muted, #64748b);
  }

  .sft-sticky-atc__actions {
    display: flex;
    flex: none;
    gap: 6px;
  }

  .sft-sticky-atc__btn {
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
  }

  .sft-sticky-atc__btn--cart {
    background: #fff;
    color: var(--ss-ink, #0f172a);
    box-shadow: inset 0 0 0 1.5px var(--ss-ink, #0f172a);
  }

  .sft-sticky-atc__btn--buy {
    background: var(--ss-brand, #0e7490);
    color: #fff;
  }

  /* Keep page content clear of the bar while it is up. */
  body.sft-sticky-atc-on {
    padding-bottom: calc(var(--sft-bottomnav-h, 0px) + var(--sft-bottomnav-inset, 0px) + 64px);
  }

  /* WhatsApp float would cover the bar: hide it while the bar is shown. */
  body.sft-sticky-atc-on .sft-wa {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .sft-sticky-atc {
    transition: none;
  }
}

@media (max-width: 359px) {
  .sft-sticky-atc__btn {
    padding: 0 10px;
    font-size: 13px;
  }
}
