/* Global Overlay */
.sts-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    font-family: 'Inter', sans-serif;
    overflow-y: auto; /* Enable scroll if modal is too tall */
    padding: 20px;
    box-sizing: border-box;
}
.sts-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.sts-modal-content {
    background: #080808;
    border: 1px solid rgba(204, 255, 0, 0.4);
    border-radius: 12px;
    width: 90%;
    max-width: 900px; /* Wider for desktop side-by-side */
    position: relative;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 40px rgba(204, 255, 0, 0.1);
    overflow: hidden;
    margin: auto; /* Works with flex centering */
}
.sts-modal-overlay.active .sts-modal-content {
    transform: translateY(0) scale(1);
}

/* Close Button */
.sts-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    line-height: 1;
}
.sts-modal-close:hover {
    background: var(--neon-lime, #ccff00);
    color: #000;
    border-color: var(--neon-lime, #ccff00);
    transform: rotate(90deg);
}

/* Split Layout */
.sts-modal-split {
    display: flex;
    flex-direction: row;
}

/* Visual Side (Left on Desktop) */
.sts-modal-visual {
    flex: 1 1 50%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}
.sts-modal-overlay-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}
.sts-modal-logo {
    position: relative;
    z-index: 5;
    max-width: 220px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
}
.sts-modal-products {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 20px;
    align-items: flex-end;
}
.sts-modal-prod-thumb {
    width: 140px;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.9));
    transition: transform 0.3s ease;
}
.sts-modal-prod-thumb:hover {
    transform: translateY(-10px);
}

/* Content Side (Right on Desktop) */
.sts-modal-body {
    flex: 1 1 50%;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.sts-modal-body h3 {
    color: var(--neon-lime, #ccff00);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(204, 255, 0, 0.3);
}
.sts-modal-body p {
    color: #bbb;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Buttons */
.bogo-cta-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}
.btn.bogo-btn {
    background: var(--neon-lime, #ccff00);
    color: #000;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 15px 20px;
    width: 100%;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.2);
    transition: all 0.3s ease;
}
.btn.bogo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(204, 255, 0, 0.5);
    background: #e6ff66;
}
.btn.bogo-secondary-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 14px 20px;
    width: 100%;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn.bogo-secondary-btn:hover {
    border-color: var(--neon-lime, #ccff00);
    color: var(--neon-lime, #ccff00);
}

.success-message {
    color: var(--neon-lime, #ccff00);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Footer Checkbox */
.sts-modal-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}
.sts-modal-footer label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 10px 20px 10px 0;
    font-size: 0.95rem;
    color: #aaa;
    transition: color 0.2s ease;
}
.sts-modal-footer label:hover {
    color: #fff;
}
.sts-modal-footer input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--neon-lime, #ccff00);
    transform: scale(1.2);
}

/* =========================================
   MOBILE RESPONSIVE LAYOUT (Max 767px)
   ========================================= */
@media (max-width: 767px) {
    .sts-modal-overlay {
        align-items: flex-start; /* Align to top on mobile so scrolling works from top-to-bottom */
        padding: 10px;
    }

    .sts-modal-content {
        width: calc(100% - 20px);
        max-width: 450px;
        margin: 20px auto; /* Margin for scrolling breathing room */
    }

    .sts-modal-close {
        width: 44px; /* Tap target compliance */
        height: 44px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }

    .sts-modal-split {
        flex-direction: column;
    }
    
    .sts-modal-visual {
        min-height: 180px; /* Reduced to fit mobile viewports */
        padding: 25px 20px 0;
    }
    
    .sts-modal-logo {
        max-width: 130px;
        margin-bottom: 10px;
    }
    
    .sts-modal-products {
        gap: 8px;
    }
    
    .sts-modal-prod-thumb {
        width: 80px; /* More compact thumbnail size to prevent layout height blowout */
    }

    .sts-modal-body {
        padding: 20px 15px;
        text-align: center; /* Center align on mobile */
    }
    
    .sts-modal-body h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .sts-modal-body p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .bogo-cta-group {
        gap: 10px;
        margin-bottom: 20px;
    }

    .btn.bogo-btn {
        padding: 12px 15px;
        font-size: 1.1rem;
    }

    .btn.bogo-secondary-btn {
        padding: 11px 15px;
        font-size: 1.1rem;
    }
    
    .success-message {
        justify-content: center;
    }
}
