/* =============================
PRODUCT BASE LAYOUT
============================= */

.product { 

    .product-details-wrapper {
        display: flex;

        .left-product-side {

            .flex-control-thumbs {
                display: none;
            }

        }
    }


    .left-product-side {
        max-width: 60%;
        display: flex;
        flex-direction: column;
        margin-right: 60px;

        .thumb-grid-close {
            display: none;
        }
    } 

}

@media (max-width:1199px) { 
    .product { 
        
        .product-details-wrapper { 

            .left-product-side {

                .flex-control-thumbs {
                    display: block;
                }

            }
        }
    }
}

/* =============================
PRODUCT TYPE RULES
============================= */

.product {

 
&.product-type-composite {

    .summary {
        .product_title + .price {
            display: none;
        }
    }

}

&.product-type-woosb {
 
    .woosb-availability .in-stock{
        display: none;
    }

    .woosb-thumb a,
    .woosb-name {
        pointer-events: none;

        a {
            color: inherit;
        }
    }

}
 

}

/* =============================
GUEST USERS (NOT LOGGED IN)
============================= */

body:not(.logged-in) {

 
.product {

    .product-details-wrapper {
 
        .summary {

            p.price {
                float: unset;
            }

            .product-label {
                margin-left: 0 !important;
                margin-bottom: 24px;
            }

        }

    }


    &.product-type-variable,
    &.product-type-simple,
    &.product-type-woosb,
    &.product-type-composite {

        .summary {

            .product-label {
                margin-bottom: 0;
            }

        }

        &:not(.sale) {
            .product_type_variable,
            .add_to_cart_button,
            .woosb-price,
            .price,
            form.cart {
                display: none;
            }

        }

    }


    &.product-type-composite {

        .summary {
            .product_title + .price {
                display: none;
            }
        }
         &:not(.sale) {
            form.cart {
                display: block;
            } 
                .composite_button,
                .composite_availability .in-stock,
                .thumbnail_price{
                    display: none !important
                }
         }
      

    }

} 

}

/* =============================
LOGGED IN USERS
============================= */

.logged-in {
 
.product {

    .product-details-wrapper {

        .summary {

            .composite_price {

                .price {
                    display: block;
                }

            }

            .product-label {
                margin-bottom: 0;
                left: 7px;
                top: 3px;
            }

        }

    }

} 
}

/* =============================
Country Selector
============================= */
body.no-scroll {
    overflow: hidden;
}
.country-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    background: #FFF;
    width: 100%;
    overflow-y: auto;
    max-height: 100vh;

    /* Slide-from-bottom transition */
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                visibility 0s linear 0.4s;

    .container{
        max-width: 1500px;
        margin: 0 auto;
        padding-block: 90px;
     

        .location-title{
            margin-bottom: 48px;
            text-align: center;
                font-size: 56px;
        }
    }  
    

    .stores{
        display: grid;
        grid-template-columns: repeat(5,1fr);
        list-style: none;
        margin: 0px;
        gap: 16px;
    }
    .locations{
        h3{
            margin-bottom: 32px;
            font-size: 40px;
        }

        .location-accordion{
            margin-bottom: 40px;
        }
    }

    .location-accordion__caret {
        display: none;
    }
    .store-item{
        a{
            display: flex;
            border: 1px solid #000;
            border-radius: 6px;
            padding: 12px 24px;
            gap: 16px;
            transition: all .3s ease-in-out;
            color:#111 ;

            .location-svg {
                background: url(../images/pin-svg.svg);
                width: 28px;
                display: block;
                height: 28px;
                background-size: cover;
                background-repeat: no-repeat; 
                margin-top: 3px;
                opacity: 0.5
            }
            .details{
                display: flex;
                flex-direction: column;
                gap: 6px;

                .name{
                    font-size: 22px;
                }
                .currency{
                    color:#848484
                }
            }
        }
        a:hover{
            background:var(--box-hover);
            transition: all .3s ease-in-out;
        }
    }

    #close-modal { 
        position: absolute;
        right: 50px;
        top: 50px;
        width: 32px;
        height: 32px;
        background: #000;
        padding: 2px;
        transition: all .3s ease-in-out;
        cursor: pointer;

        &:before{
            content: '';
            display: block;
            background: url(../images/close-modal.svg);
            width: 28px;
            display: block;
            height: 28px;
            background-size: cover;
            background-repeat: no-repeat; 
            filter: invert(1);
            transition: all .3s ease-in-out;
        }
    }
    #close-modal:hover {
        background: #848484;
        transition: all .3s ease-in-out;

        &::before{
            filter: unset;
            transition: all .3s ease-in-out;
        }
    }
}


.country-modal.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                visibility 0s linear 0s;
}

@media (max-width: 992px) {
    .country-modal.active {
        transform: translateX(0);
    }
}

.country-modal::-webkit-scrollbar {
    width: 5px;
}

.country-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0px;
}

.country-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 0px;
    transition: background 0.3s ease;
}

.country-modal::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.country-selector {
    display: flex;
    align-items: center;
    gap:10px;
    text-transform: uppercase;

    &:before{
        content: ''; 
        background: url(../images/globe-svg.svg);
        width: 20px;
        display: block;
        height: 20px;
        background-size: cover;
        background-repeat: no-repeat;  
    }
}
.mobile-extra {
    .country-selector {
        border-bottom: 1px solid #e1e1e1;
        border-top: 1px solid #e1e1e1;
        padding-block: 10px;
        margin-top: 20px;
    }
}

@media (max-width: 992px) {
    .country-modal { 
        /* Slide from left on mobile */
        transform: translateX(-100%);
        padding: 0px;
        height: 100%;
        background: transparent;
        overflow: visible;

        .container {
            padding:20px;
            max-width: 300px;
            margin: 0;
            background: #fff;
            height: 100%;
            overflow: auto;
            
            .location-title {
                font-size: 24px;
                margin-bottom: 24px;
                text-align: left;
            }
        }

        .locations {
            display: flex;
            flex-direction: column;
            gap: 0;

            h3{
                font-size: 16px;
            }

            .location-accordion{
                margin-bottom: 0px;
            }
        }

        .location-accordion {
            border-bottom: 1px solid #e1e1e1;

            /* &:first-child {
                border-top: 1px solid #e1e1e1;
            } */
        }

        .location-accordion__title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 22px;
            margin: 0;
            padding: 10px 0;
            cursor: pointer;
            user-select: none;
            margin-bottom: 0px !important;
        }

        .location-accordion__caret {
            display: block;
            width: 8px;
            height: 8px;
            border-right: 1px solid #111;
            border-bottom: 1px solid #111;
            transform: rotate(45deg);
            transition: transform 0.3s ease;
            flex-shrink: 0;
            margin-right: 4px;
        }

        .location-accordion.open .location-accordion__caret {
            transform: rotate(-135deg);
        }

        .stores {
            display: flex;
            flex-direction: column;
            gap: 10px;
            grid-template-columns: unset;
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.35s ease, padding 0.35s ease;
            padding-bottom: 0;
        }

        .store-item{
            a{
                padding:5px;
                gap: 5px;

                .location-svg{
                    width: 20px; 
                    height: 20px;
                }
                & .details {
                    .name {
                        font-size: 14px;
                    }
                    .currency{
                        font-size: 12px;
                    }
                }
            }
        }

        .location-accordion.open .stores {
            max-height: 2000px;
            padding-bottom: 20px;
        }

        #close-modal { 
            right: unset;
            left: 315px;
            top: 20px;
        }
    }
}