/**
 * Critical CSS Fixes for Gon Child Theme
 * Add this to functions.php or enqueue separately
 */

/* FULL WIDTH FIXES */
body,
html {
    width: 100% !important;
    overflow-x: hidden;
}

#page,
#main,
.site,
.site-content {
    max-width: 100% !important;
    width: 100% !important;
}

/* Container should be full width but content centered */
.page-container,
#main > .page-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Inner content at reasonable width */
.page-container > .container,
.entry-content {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

/* HYPERLINK FIXES */
a {
    color: #e67e22 !important;
    cursor: pointer !important;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #d35400 !important;
    text-decoration: underline;
}

/* Menu links */
.menu a,
nav a,
header a {
    color: inherit !important;
    cursor: pointer !important;
}

.menu a:hover,
nav a:hover {
    color: #e67e22 !important;
}

/* WooCommerce links */
.woocommerce a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product a {
    cursor: pointer !important;
}

/* IMAGE FIXES */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Product images */
.woocommerce img,
.woocommerce-page img,
.product-thumbnail img,
.product-image img {
    max-width: 100% !important;
    height: auto !important;
}

/* Fix stretched images */
img[width],
img[height] {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Featured images */
.post-thumbnail img,
.entry-thumbnail img,
.wp-post-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

/* Gallery images */
.gallery-item img,
.wp-block-gallery img {
    width: 100% !important;
    height: auto !important;
}

/* BUTTON FIXES */
a.button,
button,
input[type="button"],
input[type="submit"],
.wp-block-button__link {
    cursor: pointer !important;
    pointer-events: all !important;
}

/* WPBakery Container Overrides */
.vc_row,
.vc_column,
.vc_column_container,
.wpb_column {
    max-width: 100% !important;
    width: 100% !important;
}

.vc_row[data-vc-full-width="true"] {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* WordPress Block Widths */
.alignfull {
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.alignwide {
    max-width: 1400px !important;
    width: 100% !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-container > .container,
    .entry-content {
        padding: 0 10px !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
