/*
Theme Name: Avada Child
Description: Child theme for Avada theme
Author: ThemeFusion
Author URI: https://theme-fusion.com
Template: Avada
Version: 1.0.0
Text Domain:  Avada
*/

/**
 * Ideally, this custom theme would add a unique class to each styled element rather than attempt
 * to override the parent styles. This would increase ease of maintenance and efficiency of CSS
 * selectors. Descendant selectors are grossly inefficient. Eliminate if given the chance.
 *
 * All instances in which I have used the CSS hack "!important" are the results of an anomalous
 * stylesheet "fusion-global.css" which seems to be loaded AFTER the child theme's stylesheet.
 * I have no idea of what the "fusion-global.css" stylsheet is comprised. Its path is:
 * wp-content/uploads/fusion-styles/fusion-global.css. The combination of WP, WC, and Avada creates
 * utter spaghetti and so for time's sake I'm just going to use the "!important" hack.
 *
 * fusion-global.css is likely part of the "sepcial feature" of CSS and JS compilation under Fusion
 * themes. If CSS compilation is disabled, all the styles are simply dumped directly into the HTML
 * head in a single line as inline CSS.
 *
 * If time were permitted, I would strip all Avada markup from the WooCommerce product loop hooks
 * and disable all WC styles, permitting a much cleaner CSS structure. Also, I would design for
 * mobile first with a sane CSS framework.
 *
 * @see https://theme-fusion.com/avada-doc/special-features/css-compiler/
 */

/*********************************
 * Loop product list item styles *
 *********************************/
.fusion-woo-product-design-clean .products .product-list-view .fusion-clean-product-image-wrapper,
.products .product-list-view .product-details,
.products .product-list-view .product-excerpt.product-list {
    display: initial !important;
    float: none !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    width: auto !important;
}

.products .product-list-view {
    border: 0 !important;
    display: flex !important;
    flex-direction: row;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.products .product-list-view.odd {
    flex-direction: row-reverse;
}

.products .product-list-view:active .avadachild_product_details_container,
.products .product-list-view:focus .avadachild_product_details_container,
.products .product-list-view:hover .avadachild_product_details_container {
    background-color: #7a93bd;
}

.products .product-list-view .product-buttons {
    padding: 0 !important;
}

@media (max-width: 750px) {
    .products .product-list-view,
    .products .product-list-view.odd {
        border-top: 1px solid #ddd !important;
        flex-direction: column;
        margin-bottom: 2rem !important;
    }
}


/**************************************
 * Loop product featured image styles *
 **************************************/
.fusion-image-wrapper.fusion-image-size-fixed,
.fusion-image-wrapper.fusion-image-size-fixed img {
    max-width: none !important;
    transition: transform 0.3s;
    width: 100%;
}

.fusion-image-wrapper.fusion-image-size-fixed img:active,
.fusion-image-wrapper.fusion-image-size-fixed img:focus,
.fusion-image-wrapper.fusion-image-size-fixed img:hover {
    transform: scale(1.1);
}

.fusion-woo-product-design-clean .products .product-list-view .fusion-clean-product-image-wrapper {
    align-items: center;
    display: flex !important;
    flex: 1;
}


/*******************************
 * Loop product details styles *
 *******************************/
.avadachild_button_learn_more {
    flex-shrink: 0;
}

.avadachild_button_learn_more_link,
.avadachild_button_request_quote .add-request-quote-button.button {
    align-items: center;
    background-color: transparent !important;
    border: 1px solid #111 !important;
    color: white !important;
    display: flex !important;
    justify-content: center;
    padding: .5rem 1rem !important;
    text-transform: uppercase !important;
}

.avadachild_button_learn_more_link:active,
.avadachild_button_learn_more_link:focus,
.avadachild_button_learn_more_link:hover,
.avadachild_button_request_quote .add-request-quote-button.button:active,
.avadachild_button_request_quote .add-request-quote-button.button:focus,
.avadachild_button_request_quote .add-request-quote-button.button:hover {
    background-color: #111 !important;
}

.avadachild_product_details_button {
    display: flex;
    flex-basis: auto;
    flex-direction: column;
    justify-content: center;
    margin-right: 1rem;
}

.avadachild_product_details_button_container {
    display: flex;
}

.avadachild_product_details_button_container,
.avadachild_product_details_categories_container,
.products .product-list-view .product-details,
.products .product-list-view .product-excerpt.product-list {
    margin: 1.3rem 1.5rem !important;
}

.avadachild_product_details_categories_container {
    font-size: 0.8rem;
    line-height: 1.5;
}

.avadachild_product_details_categories_container,
.avadachild_product_details_category_link {
    color: #333;
}

.avadachild_product_details_category_link {
    text-transform: uppercase;
    transition: color 0.2s linear;
}

.avadachild_product_details_category_link:active,
.avadachild_product_details_category_link:focus,
.avadachild_product_details_category_link:hover {
    color: white;
}

.avadachild_product_details_category_list {
    display: inline;
    list-style: none;
    padding: 0;
}

.avadachild_product_details_category_list_item {
    display: inline;
    margin: 0;
}

.avadachild_product_details_container {
    background-color: #8ca4bc;
    flex: 1;
    transition: background-color 0.3s ease 0s;
}

.avadachild_product_details_container .product-title {
    font-size: 1.4rem !important;
}

.fusion-content-sep.sep-single.sep-solid {
    display: none !important;
}

.fusion-woo-product-design-clean .products .product-list-view .product-excerpt-container {
    color: white !important;
    padding: 0 !important;
}

.fusion-woo-product-design-clean .products .product-title {
    margin: 0 !important;
}

.fusion-woo-product-design-clean .products .product-title > a {
    color: white !important;
    font-style: normal;
    text-transform: uppercase;
}

.fusion-woo-product-design-clean .products .product-title > a:active,
.fusion-woo-product-design-clean .products .product-title > a:focus,
.fusion-woo-product-design-clean .products .product-title > a:hover {
    color: black !important;
}

.product-details-container {
    min-height: unset!important;
}

.products .product-list-view .product-details,
.products .product-list-view .product-excerpt.product-list {
    display: block !important;
}

.yith-ywraq-add-button > img {
    display: none;
}

.yith_ywraq_add_item_browse_message,
.yith_ywraq_add_item_response_message {
    color: #333;
    line-height: 1.5;
}

.yith_ywraq_add_item_browse_message > a {
    color: #333;
    text-decoration: underline;
    transition: color 0.2s linear;
}

.yith_ywraq_add_item_browse_message > a:active,
.yith_ywraq_add_item_browse_message > a:focus,
.yith_ywraq_add_item_browse_message > a:hover {
    color: white;
}

@media (max-width: 900px) {
    .avadachild_product_details_button {
        margin: 1rem 0 0;
    }

    .avadachild_product_details_button_container {
        flex-direction: column;
        line-height: 1.5;
    }
}

@media (max-width: 750px) {
    .avadachild_product_details_button {
        margin: 0 1rem 0 0;
    }

    .avadachild_product_details_button_container {
        flex-direction: row;
    }
}

@media (max-width: 600px) {
    .avadachild_product_details_button {
        margin: 1rem 0 0;
    }

    .avadachild_product_details_button_container {
        flex-direction: column;
    }
}

/****************************************
 * WC upsells (related products) styles *
 ****************************************/
.avadachild_upsell_list_item.last {
    margin-right: 0;
}

.avadachild_upsell_list_item_img_container {
    position: relative;
}

.avadachild_upsell_list_item_img_link {
    align-items: center;
    background: linear-gradient(to bottom, rgba(122,147,189,0.5) 0%, rgba(122,147,189,0.22) 100%);
    color: white;
    display: flex;
    font-size: 0.8rem;
    height: 100%;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    transform: scaleX(0);
    transition: transform 0.3s;
}

.avadachild_upsell_list_item_img_link_wrapper {
    height: 100%;
    position: absolute;
    top: 0;
    width: 100%;
}

.avadachild_upsell_list_item_img_link_wrapper:active .avadachild_upsell_list_item_img_link,
.avadachild_upsell_list_item_img_link_wrapper:focus .avadachild_upsell_list_item_img_link,
.avadachild_upsell_list_item_img_link_wrapper:hover .avadachild_upsell_list_item_img_link {
    color: white;
    transform: scaleX(1);
}

.avadachild_upsell_list_item_title_link {
    color: #627a94;
    display: block;
    font-size: 1.4rem;
    font-style: italic;
    padding: 1rem 0.8rem;
    text-align: center;
}

.avadachild_upsell_list_item_title_link:active,
.avadachild_upsell_list_item_title_link:focus,
.avadachild_upsell_list_item_title_link:hover {
    color: #7a93bd;
}

.up-sells.upsells.products > .products {
    display: flex;
}
