/* ============================================================================
   msera-convert.css — Conversion layer (ADDITIVE)
   Sticky add-to-cart bar (PDP), social-proof toasts, exit-intent popup.
   Mobile-first; namespaced; loaded site-wide from footer.php.
   ========================================================================== */

/* ── Sticky add-to-cart bar (product page) ───────────────────────────────── */
.ms-sticky-cart {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9800;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    box-shadow: 0 -6px 24px rgba(0,0,0,.14);
    border-top: 1px solid #ece6da;
    transform: translateY(120%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.ms-sticky-cart.show { transform: translateY(0); }
.ms-sticky-cart__img { width: 46px; height: 46px; border-radius: 8px; object-fit: contain; background: #faf7f1; flex-shrink: 0; }
.ms-sticky-cart__info { min-width: 0; flex: 1; line-height: 1.2; }
.ms-sticky-cart__name { font-size: 13px; font-weight: 600; color: #0E2A1B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-sticky-cart__price { font-size: 15px; font-weight: 800; color: #0E2A1B; }
.ms-sticky-cart__price small { font-weight: 400; }
.ms-sticky-cart__btn {
    flex-shrink: 0;
    background: #0E2A1B; color: #fff; border: none;
    padding: 13px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit;
}
.ms-sticky-cart__btn:hover { background: #1a3a28; }
@media (min-width: 992px) {
    .ms-sticky-cart { left: auto; right: 24px; bottom: 24px; max-width: 420px; border-radius: 14px; border: 1px solid #ece6da; }
}

/* ── Social-proof toast ──────────────────────────────────────────────────── */
.ms-toast {
    position: fixed;
    left: 16px; bottom: 16px;
    z-index: 9700;
    display: flex; align-items: center; gap: 12px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #ece6da;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 36px rgba(14,42,27,.16);
    transform: translateY(20px); opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
    pointer-events: auto;
}
.ms-toast.show { transform: translateY(0); opacity: 1; }
.ms-toast__icon { width: 38px; height: 38px; border-radius: 50%; background: #f3f8f4; color: #1E7B45;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.ms-toast__txt { font-size: 12.5px; color: #2d3a31; line-height: 1.4; }
.ms-toast__txt b { color: #0E2A1B; }
.ms-toast__time { display: block; font-size: 10.5px; color: #9aa39c; margin-top: 2px; }
.ms-toast__close { background: none; border: none; color: #bbb; font-size: 16px; cursor: pointer; align-self: flex-start; line-height: 1; }
@media (max-width: 600px) {
    .ms-toast { left: 10px; right: 10px; bottom: 10px; max-width: none; }
    /* keep clear of the sticky cart bar when both show */
    body.ms-has-sticky .ms-toast { bottom: 78px; }
}
/* Reserve space so the fixed sticky add-to-cart bar never covers the page
   footer / last content on mobile. On desktop (>=992px) the bar is a small
   floating card, so no page padding is needed there. */
@media (max-width: 991px) {
    body.ms-has-sticky { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Exit-intent / newsletter modal ──────────────────────────────────────── */
.ms-exit-overlay {
    position: fixed; inset: 0; z-index: 9900;
    display: none; align-items: center; justify-content: center;
    background: rgba(7,20,16,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 18px;
}
.ms-exit-overlay.show { display: flex; }
.ms-exit {
    position: relative; background: #fff; border-radius: 18px; max-width: 420px; width: 100%;
    padding: 38px 30px 30px; text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,.4);
    animation: msExitRise .35s cubic-bezier(.4,0,.2,1);
}
@keyframes msExitRise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.ms-exit__eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #C9A227; }
.ms-exit__title { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: #0E2A1B; margin: 8px 0 6px; line-height: 1.15; }
.ms-exit__sub { font-size: 14px; color: #5b6b5f; line-height: 1.55; margin-bottom: 20px; }
.ms-exit__form { display: flex; flex-direction: column; gap: 10px; }
.ms-exit__form input { padding: 14px 16px; border: 1px solid #e0d8c8; border-radius: 10px; font-size: 16px; font-family: inherit; }
.ms-exit__form button { padding: 14px; border: none; border-radius: 10px; background: #0E2A1B; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.ms-exit__form button:hover { background: #1a3a28; }
.ms-exit__dismiss { margin-top: 12px; background: none; border: none; color: #9aa39c; font-size: 13px; text-decoration: underline; cursor: pointer; }
.ms-exit__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: none;
    background: #f4f0ea; color: #555; font-size: 20px; cursor: pointer; }
