/* Global Height and Layout Fixes for OpenCart */

/* Fix the absolute positioning issue in default stylesheet */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#container {
    position: relative !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Reset excessive padding from default stylesheet */
#content {
    padding-bottom: 40px !important;
}

#column-left, #column-right {
    padding-bottom: 40px !important;
}

/* Ensure main content area grows to fill space */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Footer stays at bottom */
footer {
    margin-top: auto;
}

/* Specific page fixes */
#account-login #content,
#account-register #content,
#information-contact #content {
    padding-bottom: 40px !important;
}

/* Homepage and product pages */
#common-home #content,
#product-product #content,
#product-category #content {
    padding-bottom: 60px !important;
}

/* Warehouse pages */
#warehouse-dashboard #content,
#warehouse-inventory #content {
    padding-bottom: 60px !important;
}

/* Cart and checkout pages */
#checkout-cart #content,
#checkout-checkout #content {
    padding-bottom: 60px !important;
}

/* Account pages */
#account-account #content,
#account-order #content,
#account-wishlist #content {
    padding-bottom: 60px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #content, #column-left, #column-right {
        padding-bottom: 30px !important;
    }
}
