body.fpw-popup-open { overflow: hidden !important; }
.fpw-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    background: rgba(10, 12, 16, .76);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}
.fpw-overlay.fpw-is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.fpw-dialog {
    width: fit-content !important;
    max-width: calc(100vw - 28px) !important;
    padding: 8px !important;
    gap: 10px !important;
    box-sizing: border-box;
    align-items: stretch;
    background:#ffffff;
    border-radius:8px;
}
.fpw-is-visible .fpw-dialog { transform: translateY(0) scale(1); }
.fpw-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 18, 18, .78);
    color: #fff;
    font: 400 29px/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.16);
    transition: background .2s ease, transform .2s ease;
}
.fpw-close:hover { background: #111; transform: scale(1.04); }
.fpw-image-wrap {
    width: fit-content !important;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}
.fpw-flyer-image {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 44px) !important;
    max-height: calc(100dvh - 120px) !important;
    object-fit: contain;
    border-radius: 6px;
}

.fpw-whatsapp {
    width: 100% !important;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-top:8px;
}
.fpw-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #16a34a;
    color: #fff !important;
    font: 700 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 5px 14px rgba(22, 163, 74, .2);
    transition: background .2s ease, transform .2s ease;
}
.fpw-whatsapp:hover, .fpw-whatsapp:focus {
    background: #12833d;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}
.fpw-whatsapp svg { width: 21px; height: 21px; fill: currentColor; flex: 0 0 21px; }
@media (max-width: 600px) {
    .fpw-overlay { padding: 14px; }
    .fpw-dialog {
        max-width: calc(100vw - 48px) !important;
    }

    .fpw-flyer-image {
        max-width: calc(100vw - 64px) !important;
        max-height: calc(100dvh - 140px) !important;
    }
    .fpw-close { top: 6px; right: 6px; width: 36px; height: 36px; }
    .fpw-whatsapp { min-height: 46px; padding: 11px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .fpw-overlay, .fpw-dialog, .fpw-close, .fpw-whatsapp { transition: none !important; }
}
