html {
  scroll-behavior: smooth;
}

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

.product { 

    .product-details-wrapper {
        display: flex;

        .left-product-side {

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

        }

        .summary {
            margin-left: 40px;
            width: 42%;
        }
    }


    .left-product-side {
        max-width: 893px;
        display: flex;
        flex-direction: column; 

   
    } 

}

@media (max-width: 1920px) {


.product { 
 
    .product-details-wrapper {
     

        .summary {
            width: 500px;
            min-width: 500px
        } 
    }
    .left-product-side {
        max-width: 65.82%; 
    }

}

}

@media (max-width: 1600px) {
 
.product { 
 
    .left-product-side {
        max-width: calc(100% - 540px); 
    }  
}

}

@media (max-width:1199px) { 
    .product { 
        
        .product-details-wrapper { 
            .summary {
                width: 100%;
                min-width: unset;
                margin-left: 0px;
            } 
            .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;
        }

        .top_stores{
            margin-bottom: 30px !important;
            max-height: 2000px ;
        }
    }

    .stores {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        list-style: none;
        margin: 0;
        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 0.3s ease-in-out;
            color: #111;
            align-items: self-start;

            .location-img {
                max-width: 46px;
            }

            .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;
                    line-height: 1;
                }

                .currency {
                    color: #848484;
                }
            }
        }

        a:hover {
            background: var(--box-hover);
        }
    }

    #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;
}

.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;  
    }
}

@media (max-width: 992px) {
    .country-modal {
        padding: 0px;
        height: 100%;
        background: transparent;
        overflow: visible;

        .container {
            padding:20px;
            max-width: 100%;
            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__subtitle {
            display: none;
        }

        .location-accordion.open {
            .location-accordion__subtitle {
                display: block;
            }
        }

        .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: 20px; 
            top: 20px;
        }
    } 

}



.wp-block-cover,
.wp-block-column img { 
    border-radius: 16px; 
}

 
body.home {
    .light-logo {
        display: block;
    }
    .dark-logo {
        display: none;
    }
}
body:not(.home) {
    .dark-logo {
        display: block;
    }
     .light-logo {
        display: none;
    }
}


.video-icon {
    opacity: 0.8;
}

/* Override default form styles */
.woocommerce-account form#wppb-loginform input,
.wppb-form-field input,
form#wppb-register-user ul li.wppb-form-field input,
form#wppb-register-user ul li.wppb-form-field select {
    padding: 8px 12px !important;
    height: 42px;
    width: 100%; 
}

#wppb-loginform p:last-child{
    display: none;
}

form#wppb-register-user ul li.wppb-form-field br {
    display: none;
}

.wppb-form-field.login-remember>input {
    width: unset !important;
}

.wppb-password-field-container,
form.wppb-register-user .submit.button {
    width: 100% !important;
}

.wppb-password-field-container br {
    display: none;
}

.login_register_wrapper {
    gap: 32px;
}

.login-submit.form-submit>input,
form.wppb-register-user .submit.button {
    text-transform: uppercase;
}

form#wppb-register-user ul li.wppb-form-field {
    display: grid;
}

.comfortel-account-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
}

.comfortel-login,
.comfortel-register {
    width: 100%;
}

/* =====================================================
   ACCOUNT PAGE — Mobile form toggle via .active class
   ===================================================== */

/* Desktop: buttons always hidden, both panels always visible */
@media (min-width: 768px) {
    .comfortel-login .toggle-login,
    .comfortel-register .toggle-register {
        display: none !important;
    }
    .comfortel-login,
    .comfortel-register {
        display: block;
    }
}

/* Mobile: hide everything inside panels by default, show when .active */
@media (max-width: 992px) {

    .shoptimizer-primary-navigation{
        display: flex;
        flex-direction: column;
    }

    .comfortel-account-wrapper {
        grid-template-columns: 1fr;
    }

    .comfortel-login #wppb-loginform,
    .comfortel-register #wppb-register-user {
        display: none;
    }

    .comfortel-login.active #wppb-loginform,
    .comfortel-register.active #wppb-register-user {
        display: block;
    }

    .comfortel-login.active .toggle-login,
    .comfortel-register.active .toggle-register {
        display: none !important;
    }

    .comfortel-login:not(.active) .toggle-login,
    .comfortel-register:not(.active) .toggle-register {
        display: block !important;
    }

    .comfortel-login {
        padding-bottom: 60px;
        border-bottom: 1px solid #e1e1e1;
    }

    .comfortel-register {
        padding-top: 60px;
    }

    .comfortel-nav-country-selector {
        order: 5;
        opacity: 0;
        transition: all 0.35s ease-in-out;
        transition-delay: 0.1s;
    }

    /* .mobile-toggled { */

        .col-full-nav {
            padding: 0;
        }

        .comfortel-nav-country-selector {
            display: block;
            /* position: fixed; */
            width: 100%;
            background: #fff;
            bottom: 0;
            
            opacity: 1;
            transition: all 0.35s ease-in-out;
            transition-delay: 0.1s;

            .inner-selector > span {
                display: block;
                padding: 10px 15px;
            }

            .country-selector {
                border-bottom: 1px solid #e1e1e1;
                border-top: 1px solid #e1e1e1;
                padding: 20px 15px;
                margin-bottom: 30px;
                color: var(--e-global-color-text);

                &:before {
                    display: none;
                }

                span:first-child {
                    display: flex;
                    gap: 12px;
                }

                span:first-child:before {
                    content: '';
                    background: url(../images/globe-svg.svg);
                    width: 20px;
                    display: block;
                    height: 20px;
                    background-size: cover;
                    background-repeat: no-repeat;
                }
            }
        }

    .mobile-toggled { 
        .comfortel-nav-country-selector {
            left: 0;
        }
    } 

    .mobile-extra {

        ul li{
            margin-bottom:-1px;
        }

        .widget_text {
            padding-inline: 15px;
        }

        .widget_nav_menu {
            margin-top: 24px;

            .menu .menu-item a {
                display: flex; 
                align-items: center;
                gap: 12px;
                border-bottom: 1px solid #e1e1e1;
                border-top: 1px solid #e1e1e1;
                padding: 15px 13px;
                flex-direction: row-reverse;
                justify-content: flex-end;

                .icon-wrapper {
                    width: 30px;
                    height: 30px;
                }
            }
        }
    }

    .comfortel-mobile-nav-logo {
        padding-right: 15px;
    }

    .site-search {
        padding-inline: 15px;
    }
}


.custom-image-link-widget {
    display: block;
    text-decoration: none;
}

.custom-image-link-widget__image {
    overflow: hidden;
}

.custom-image-link-widget__img {
    display: block;
    width: 100%;
    height: auto;
}

.custom-image-link-widget__label {
    margin-top: 10px;
}
