/* =========================================
   FLOATING UI: Back to Top + Order Popup
   (standalone so it always loads)
   ========================================= */

#backToTop.back-to-top {
    position: fixed !important;
    right: 22px !important;
    bottom: 22px !important;
    width: 48px !important;
    height: 48px !important;
    border: none !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #8f2a27, #4e100f) !important;
    color: #fff !important;
    font-size: 1rem !important;
    box-shadow: 0 12px 28px rgba(114, 24, 22, 0.35) !important;
    cursor: pointer !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 99999 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

#backToTop.back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#openOrderPopup.order-float-btn {
    position: fixed !important;
    left: 22px !important;
    bottom: 22px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
    border: none !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.2rem !important;
    background: linear-gradient(135deg, #8f2a27, #4e100f) !important;
    color: #fffcf8 !important;
    font-family: Outfit, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 14px 30px rgba(114, 24, 22, 0.4) !important;
    cursor: pointer !important;
    z-index: 99999 !important;
}

#orderPopup.order-popup {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

#orderPopup.order-popup.active {
    display: flex !important;
}

#orderPopup .order-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 20, 18, 0.7);
    backdrop-filter: blur(4px);
}

#orderPopup .order-popup-dialog {
    position: relative;
    width: min(520px, 100%);
    background: #fffcf8;
    border-radius: 22px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 24px 60px rgba(28, 20, 18, 0.35);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
}

#orderPopup .order-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(114, 24, 22, 0.08);
    color: #721816;
    cursor: pointer;
}

#orderPopup .order-popup-badge {
    display: inline-block;
    background: rgba(114, 24, 22, 0.08);
    color: #721816;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

#orderPopup .order-popup-header h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #1c1412;
    margin-bottom: 0.5rem;
}

#orderPopup .order-popup-header p {
    color: #6b625c;
    margin-bottom: 1.35rem;
    font-size: 0.95rem;
}

#orderPopup .order-popup-actions {
    display: grid;
    gap: 0.75rem;
}

#orderPopup .order-action-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(114, 24, 22, 0.1);
    background: #fff;
    text-decoration: none !important;
    color: inherit;
}

#orderPopup .order-action-card.highlight {
    background: linear-gradient(135deg, rgba(114, 24, 22, 0.95), #4e100f);
    border-color: transparent;
    color: #fffcf8;
}

#orderPopup .order-action-card.highlight span {
    color: rgba(225, 220, 211, 0.85);
}

#orderPopup .order-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(114, 24, 22, 0.08);
    color: #721816;
    flex-shrink: 0;
}

#orderPopup .order-action-card.highlight .order-action-icon {
    background: rgba(225, 220, 211, 0.16);
    color: #e1dcd3;
}

#orderPopup .order-action-card strong {
    display: block;
    font-size: 0.98rem;
    margin-bottom: 0.1rem;
}

#orderPopup .order-action-card span {
    display: block;
    font-size: 0.82rem;
    color: #6b625c;
}

body.popup-open {
    overflow: hidden !important;
}

@media (max-width: 576px) {
    #openOrderPopup.order-float-btn span {
        display: none;
    }

    #openOrderPopup.order-float-btn {
        width: 52px !important;
        height: 52px !important;
        padding: 0 !important;
        justify-content: center;
        border-radius: 50% !important;
    }

    #backToTop.back-to-top {
        right: 16px !important;
        bottom: 86px !important;
    }

    #openOrderPopup.order-float-btn {
        left: 16px !important;
        bottom: 22px !important;
    }
}
