/* Bottom White Space Fix - Targeted Solution */

/* Ensure html and body have no unwanted bottom spacing */
html {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Make main content take available space */
main {
    flex: 1 0 auto;
}

/* Footer should be at the bottom with no extra space */
footer,
.footer,
.site-footer {
    flex-shrink: 0;
    margin: 0 !important;
    padding-bottom: 2rem !important; /* Controlled padding */
    border-bottom: none !important;
}

/* Remove phantom spacing from footer bottom section */
.footer-bottom {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important; /* Match footer padding */
}

/* Ensure footer is the true last element with no spacing after */
.site-footer::after,
footer::after,
body > footer:last-child::after {
    content: none !important;
    display: none !important;
}

/* Remove any spacing from elements immediately after footer */
.site-footer ~ *,
footer ~ * {
    display: none !important;
}

/* Specific fix for payment methods and copyright section */
.payment-methods,
.copyright,
.legal-links {
    margin-bottom: 0 !important;
}

/* Container inside footer bottom */
.footer-bottom .container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Last row in footer */
.footer-bottom .row:last-child {
    margin-bottom: 0 !important;
}

/* Remove extra space from subscribe section if it exists */
.newsletter-section:last-of-type,
.about-section:last-of-type,
section:last-of-type {
    margin-bottom: 0 !important;
}

/* Ensure no rogue elements after body */
body > *:last-child:not(footer):not(.site-footer):not(main) {
    margin-bottom: 0 !important;
}