.fs-mobile-purchase-bar,
.fs-product-mobile-contact,
.fs-mobile-purchase-sheet:not([open]) { display: none; }

@media (max-width: 767px) {
  body.fs-mobile-purchase-sheet-open { overflow: hidden; }
  .fs-has-mobile-purchase .fs-footer { margin-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .fs-mobile-purchase-bar:not([hidden]) {
    position: fixed;
    z-index: 100;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #ddd;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, .12);
    animation: fs-mobile-purchase-enter 180ms ease-out;
  }
  .fs-mobile-purchase-bar button {
    width: min(100%, 520px);
    min-height: 52px;
    border: 1px solid #1d1f21;
    border-radius: 3px;
    padding: 0 20px;
    color: #fff;
    background: #1d1f21;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }
  .fs-product-mobile-contact { display: block; }
  .fs-product-mobile-contact .prime-whatsapp {
    z-index: 101;
    right: 18px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    color: #fff;
    background: #79be61;
    transition: bottom 180ms ease;
  }
  .fs-product-mobile-contact .prime-whatsapp svg { width: 36px; height: 36px; }
  .fs-mobile-purchase-bar-visible .fs-product-mobile-contact .prime-whatsapp { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .fs-drawer-is-open .fs-product-mobile-contact,
  .fs-mobile-purchase-sheet-open .fs-product-mobile-contact { display: none; }
  .fs-mobile-purchase-sheet[open] {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 54px);
    margin: 0;
    border: 0;
    border-radius: 8px 8px 0 0;
    padding: 18px 15px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    color: #1d1f21;
    background: #fff;
    box-shadow: 0 -18px 42px rgba(0, 0, 0, .18);
    animation: fs-mobile-purchase-enter 180ms ease-out;
  }
  .fs-mobile-purchase-sheet::backdrop { background: rgba(0, 0, 0, .42); }
  .fs-mobile-purchase-sheet__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .fs-mobile-purchase-sheet__header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
  .fs-mobile-purchase-sheet__header button { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #d8d8d8; border-radius: 50%; padding: 0; background: #fff; font-size: 24px; cursor: pointer; }
  .fs-mobile-purchase-sheet__product { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; }
  .fs-mobile-purchase-sheet__product > img { width: 76px; height: 76px; object-fit: contain; }
  .fs-mobile-purchase-sheet__product strong { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
  .fs-mobile-purchase-sheet__price,
  .fs-mobile-purchase-sheet__price > .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
  .fs-mobile-purchase-sheet__price { margin-top: 6px; color: #ae2238; font-size: 18px; }
  .fs-mobile-purchase-sheet__price strong { font-size: 18px; }
  .fs-mobile-purchase-sheet__price del { color: #999; font-size: 14px; }
  .fs-mobile-purchase-sheet__price ins { background: transparent; text-decoration: none; }
  .fs-mobile-purchase-sheet__price > span:not(.price) { font-size: 12px; }
  .single-product .fs-mobile-purchase-sheet .fs-product-purchase { margin: 0; }
  .single-product .fs-mobile-purchase-sheet .fs-product-purchase .single_add_to_cart_button { display: none; }
  .single-product .fs-mobile-purchase-sheet .fs-product-quantity { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .single-product .fs-mobile-purchase-sheet .fs-product-purchase .fs-buy-now-button { min-height: 52px; color: #fff !important; background: #507d41 !important; border-color: #507d41 !important; font-weight: 700; }
  .fs-mobile-purchase-sheet button:focus-visible,
  .fs-mobile-purchase-bar button:focus-visible,
  .fs-product-mobile-contact a:focus-visible { outline: 2px solid #1d1f21; outline-offset: 3px; }
}

@keyframes fs-mobile-purchase-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fs-mobile-purchase-bar,
  .fs-mobile-purchase-sheet[open] { animation: none; }
  .fs-product-mobile-contact .prime-whatsapp { transition: none; }
}
