/*
Theme Name: One Fse Child
Theme URI:
Author:
Author URI:
Description: Child theme for One Fse
Requires at least: 6.0
Tested up to: 6.4.1
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: onefse
Text Domain: onefsechild
Tags:
*/

/**
* THEME SPECIFIC Section
**/

html {
    scroll-behavior: smooth;
}
.wc-block-product-template__responsive.columns-3{
    grid-template-columns:repeat(auto-fill,minmax(max(250px,calc(33.33333% - .83333em)),1fr))
}

.wp-block-navigation ul li.current-menu-item {
    border-bottom: 2px solid var(--wp--preset--color--primary);
    color:var(--wp--preset--color--primary);
}
.taxonomy-product_cat.wp-block-post-terms a{
    color:white

}

/**Remove gaps***/
iframe{
    position: relative;
    z-index:-1
}
header + main,
main + footer {
    margin-block: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-block: 0;
}

/**Fixes the horrible text wrapping of gutenberg,
Feel free to add more classes
***/
.wp-block-heading {
    word-break: normal;
    overflow-wrap: normal;
}


/**
* Unmovable css components
**/

.offcanvas-btn{
    cursor:pointer
}

/* Initial hidden position offscreen for offcanvas */
.offcanvas-main {
    position: fixed;
    top: 0;
    right: -100%;
    width: 90%;
    height: 100%;
    background: white;
    transition: right 0.4s ease-in-out;
    overflow-y: auto;
    z-index: 1001; /* Ensure offcanvas is above overlay */
}

/* Slide in when active */
.offcanvas-show {
    right: 0;
}

/* Overlay styling */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1000; /* Behind the offcanvas */
    pointer-events: none; /* Prevent interactions when hidden */
}

/* Show overlay when offcanvas is active */
.overlay-visible {
    opacity: 1;
    pointer-events: auto; /* Allow interactions */
}

@media screen and (min-width: 991px) {
    .offcanvas-main {
        width: 50%;
    }
}

/** Search bar **/
.one-search-bar {
    opacity: 1;
    height: 70px;
    padding-top: 24px;
    position: static;
    transition: all 200ms

}

.d-none {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;

}

p:empty {
    display: none;
}


/**Woo select***/
.orderby {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--wp--preset--color--grey-2);
}


/***WOO***/
div#woo-single-related-group:has(.woo-products-related:empty) {
    display: none;
}

/**Header**/
.wp-site-blocks > header:first-of-type {
    position: sticky;
    top: 0;
    z-index: 999;
    margin-block-start: 0;
}

@media screen and (max-width: 991px) {

    /**SHORTCODE SUBCATS**/
    .pods-categories-list.short-subcats {
        grid-template-columns: repeat(10, 184px);
        gap: 25px;
        overflow: auto;
        /* grid-auto-flow: column; */
        text-align: center;
    }


    .global-header-content {
        padding-top: var(--wp--preset--spacing--30) !important;
        padding-bottom: var(--wp--preset--spacing--30) !important;
        border-bottom: 0;
        box-shadow: 3px 1px 3px 2px #7d7d7dcf;
        position:fixed;
        top:0;
        width: 100%;
        z-index: 999;

    }

    .global-footer-content {
        margin-bottom: 70px !important;
    }
}

/**Menu**/
.wp-block-navigation__responsive-container.has-modal-open {
    padding: 2rem;
}

/**Mobile menu**/
html.has-modal-open {
    overflow-y: hidden !important;
}

.wp-block-navigation__submenu-container.wp-block-navigation-submenu li {
    padding-block: 0.5rem;
    @media screen and (min-width: 991px) {
        padding-block: 0;
    }
}


.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
    padding-left: 1rem;
}

/**Fixed bottom mobile menu**/
@media screen and (max-width: 991px) {
    body .mob-fixed-bottom {
        position: fixed;
        bottom: 0;
        background: #fff;
        width: 100%;
        display: grid;
        place-content: center;
        grid-template-columns: 1fr 80px;
        justify-content: space-evenly;
        justify-items: center;
        border: 0;
        box-shadow: 0 -3px 7px -3px #7d7d7dcf;
        padding: 4px 0 env(safe-area-inset-bottom) 0;
        left: 0;
        transition: all 200ms;
        z-index: 999
    }

    body .mob-fixed-bottom-content{
        opacity:1;
        transition:all 200ms ease-in-out 300ms;
        width:100%
    }

    body .mob-fixed-bottom-content > *{
        margin: 0 auto;
    }

    body .fly-in-menu{
        width: calc(100% - 2rem);
        overflow:auto;
        z-index: 9;
        transition:all 200ms ease-in-out;
    }


    body .fly-in-menu-trigger{
        position:sticky;
        right:0;
        z-index: 999;
        margin-bottom:4px;

    }

    body .fly-in-menu-content{
        flex-wrap: nowrap;
        white-space: nowrap;
        position:absolute;
        right:100%;
        opacity:0;
        transition:all 700ms ease-in-out;

    }
/**And when is active**/
    body .fly-in-menu-active{
        overflow: auto;
        position: fixed;
        background: #000;
        gap:calc(20px - 8vw);
        justify-content: space-between;
    }

    body .mob-fixed-bottom:has(.fly-in-menu-active) .mob-fixed-bottom-content{
        opacity: 0;
    }

    body .fly-in-menu-active .fly-in-menu-trigger{
        z-index: 9999;
    }
    body .fly-in-menu-active .fly-in-menu-content{
        right:0;
        position: relative;
        padding-inline:0.5rem;
        opacity:1;
        height: 45px;

    }


}

/**Social footer link in bio**/
.social-footer-fixed {
    position: fixed;
    bottom: 0;
    z-index: 99;
    width: 100%;
    transform: translateX(-7px);
}

/**Woocommerce Account page**/
.woocommerce-account .account-container {
    margin-inline: 20px;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    text-decoration: none;
    border-bottom: 1px solid var(--wp--preset--color--grey-2);
    padding: 1rem;
    display: block;
    font-weight: bold;
}

.woocommerce-Address-title h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.woocommerce-account .addresses .title .edit {
    display: block;
    margin-bottom: 1rem;
    background: #454545;
    padding: 1rem;
    border-radius: 9px;
    color: white;
    float:left;
}

/**
** Movables
**/


/** WooCommerce mini cart internal **/
.wc-block-components-button.wc-block-components-drawer__close {
    margin-top: -60px
}

h2.wc-block-mini-cart__title {
    justify-content: space-between;
}

span.wp-block-woocommerce-mini-cart-title-items-counter-block {
    font-size: 18px;
}


/*
!** Columns in the mobile view **!
@media screen and (max-width: 991px){
    .wp-block-columns{
        margin-inline:20px!important;
    }
}*/


/**
CLIENT SPECIFIC
***/
/**Completely broken Need the auto-fit to every grid component :(
or at least create a variation of the grid :/
**/

@media screen and (max-width: 991px) {
    .wp-container-core-group-is-layout-19,.wp-container-core-group-is-layout-28 {
        grid-template-columns:repeat(auto-fit, minmax(min(9rem, 100%), 1fr))
    }
}



/**PODS Related***/

.related-product-item {
    padding: 1rem;
    border: 1px solid var(--wp--preset--color--grey-2);
    border-radius: 18px;

}

.related-product-item a {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    align-items: center

}

.related-product-item img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.related-product-item p {
    margin: 10px 0
}



/**PODS CATEGORIES**/
.pods-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 50px;
    list-style-type: none;
    padding: 0
}

.pods-category {
    border-width: 1px;
    border-radius: 13px;
    padding: 16px;
}

.pods-category-img {
    max-width: 100%;
    border-radius: 18px !important
}


/**Woo compat***/
.woocommerce-account .wp-block-post-title, .woocommerce-account main .woocommerce, .woocommerce-cart .wp-block-post-title, .woocommerce-cart main .woocommerce, .woocommerce-checkout .wp-block-post-title, .woocommerce-checkout main .woocommerce{
    max-width: 1440px;
}
:root{
    --wp--preset--color--foreground:#56a783;
}
.woocommerce .wp-block-woocommerce-product-image-gallery span.onsale {
    left: -1rem;
    right: unset;
    z-index: 1;
    height: 50px;
    width: 100px;
    border-radius: 0;
    padding: 0;
}

/**Extra forse rimovibile***/
.offcanvas-link {
    font-weight: bold;
    display: inline-block;
    margin-top: 11px;
    border-bottom: 1px solid #969796ee;
    padding-block: 0.3rem;
}



/**Headings in cart**/
.woocommerce-cart .wc-block-components-product-metadata__description h2, .wc-block-mini-cart__drawer .wc-block-components-product-metadata__description >*{
    font-size: 16px;
}

/**Ordinamento**/
:root :where(.wp-block-woocommerce-catalog-sorting){
    padding: 0;
}

/**Fix mobile margin for footer**/
:where(.wp-site-blocks) > :last-child{
    margin-block-start: 0;
}