/*
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
*/

/* ==========================================================
   PATCHMD MIX & MATCH BUNDLE BUILDER
   ========================================================== */


/* ----------------------------------------------------------
   MAIN LAYOUT
   ---------------------------------------------------------- */

#patchmd-mnm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 30px;
    width: 100%;
    align-items: start;
}

span.woocommerce-Price-amount.amount {
    color: black !important;
}


/* ----------------------------------------------------------
   PRODUCT AREA
   ---------------------------------------------------------- */

#patchmd-mnm-products-column {
    min-width: 0;
}


/*
 * Make sure the existing Mix & Match grid
 * continues to behave normally.
 */

#patchmd-mnm-products-column
.mnm_child_products {
    width: 100%;
}


/* ----------------------------------------------------------
   STICKY BUNDLE SIDEBAR
   ---------------------------------------------------------- */

#patchmd-mnm-summary {
    position: sticky;
    top: 120px;
    width: 100%;
    z-index: 20;
}


.patchmd-summary-inner {
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}


/* ----------------------------------------------------------
   HEADER
   ---------------------------------------------------------- */

.patchmd-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}


.patchmd-summary-header h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}


.patchmd-summary-count {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}


.patchmd-selected-count {
    font-size: 18px;
}


/* ----------------------------------------------------------
   PROGRESS BAR
   ---------------------------------------------------------- */

.patchmd-progress {
    width: 100%;
    height: 8px;
    background: #eeeeee;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 14px;
}


.patchmd-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 20px;
    transition: width 0.25s ease;
}


/* ----------------------------------------------------------
   MESSAGE
   ---------------------------------------------------------- */

.patchmd-summary-message {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}


/* ----------------------------------------------------------
   SELECTED PRODUCT LIST
   ---------------------------------------------------------- */

.patchmd-selected-products {
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}


/* ----------------------------------------------------------
   SELECTED PRODUCT
   ---------------------------------------------------------- */

.patchmd-selected-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eeeeee;
}


.patchmd-selected-product:last-child {
    border-bottom: 0;
}


/* ----------------------------------------------------------
   PRODUCT IMAGE
   ---------------------------------------------------------- */

.patchmd-selected-image {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
}


.patchmd-selected-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}


/* ----------------------------------------------------------
   PRODUCT INFORMATION
   ---------------------------------------------------------- */

.patchmd-selected-info {
    flex: 1;
    min-width: 0;
}


.patchmd-selected-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}


.patchmd-selected-qty {
    margin-top: 3px;
    font-size: 13px;
}


/* ----------------------------------------------------------
   REMOVE BUTTON
   ---------------------------------------------------------- */

.patchmd-remove-product {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;

    font-size: 24px;
    line-height: 30px;

    cursor: pointer;
}


.patchmd-remove-product:hover {
    opacity: 0.6;
}


/* ----------------------------------------------------------
   EMPTY STATE
   ---------------------------------------------------------- */

.patchmd-empty-bundle {
    padding: 25px 10px;
    text-align: center;
    font-size: 14px;
}


/* ----------------------------------------------------------
   REVIEW BUTTON
   ---------------------------------------------------------- */

.patchmd-review-bundle {
    display: block;
    width: 100%;

    margin-top: 18px;
    padding: 13px 18px;

    border: 0;
    border-radius: 6px;

    cursor: pointer;

    font-size: 15px;
    font-weight: 600;

    transition: opacity 0.2s ease;
}


.patchmd-review-bundle:hover {
    opacity: 0.85;
}


/* ----------------------------------------------------------
   TABLET
   ---------------------------------------------------------- */

@media (max-width: 991px) {

    #patchmd-mnm-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }


    #patchmd-mnm-summary {
        position: sticky;
        top: 80px;
        order: -1;
    }


    .patchmd-summary-inner {
        padding: 16px;
    }


    .patchmd-selected-products {
        max-height: 250px;
    }

}


/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */

@media (max-width: 600px) {

    #patchmd-mnm-layout {
        display: block;
    }


    #patchmd-mnm-summary {
        position: sticky;
        top: 60px;
        margin-bottom: 20px;
    }


    .patchmd-summary-inner {
        padding: 14px;
        border-radius: 8px;
    }


    .patchmd-summary-header h3 {
        font-size: 19px;
    }


    .patchmd-summary-count {
        font-size: 13px;
    }


    .patchmd-selected-count {
        font-size: 16px;
    }


    .patchmd-selected-products {
        max-height: 220px;
    }


    .patchmd-selected-image {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }


    .patchmd-selected-name {
        font-size: 13px;
    }

}