/*
Theme Name: Astra Child
Theme URI: https://example.com/astra-child
Description: Astra child theme for custom performance and code tweaks
Author: Gretli Särel
Author URI: teenusedisainer.ee
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

.ast-button-wrap .menu-toggle.main-header-menu-toggle {
    padding: 0em;
}



.mbs-search-form {
    display: flex;
    align-items: center;
}

.mbs-search-input {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.mbs-search-button {
    background: none;
    border: 1px solid #e0e0e0;
    border-left: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}




.woocommerce-product-details__short-description {
    display: none;
}


.yith-add-to-wishlist-button-block {
margin: 0px auto;
}

.woocommerce-js div.product .product_meta {
border-top: 0px;
}

.woocommerce-js div.product form.cart .button.single_add_to_cart_button {
font-size: 18px;
}

.yith-add-to-wishlist-button-block .yith-wcwl-add-to-wishlist-button--themed-button {
    color: var(--ast-global-color-0);
    background-color: transparent;
    margin-left: 30px;
}
@media (max-width: 768px) {
    .yith-add-to-wishlist-button-block .yith-wcwl-add-to-wishlist-button--themed-button {
        margin-left: 0;
    }
}
.yith-wcwl-add-to-wishlist-button:not(.yith-wcwl-add-to-wishlist-button--themed-button) svg.yith-wcwl-add-to-wishlist-button-icon {
color:  var(--ast-global-color-0);
}
.yith-wcwl-add-to-wishlist-button:not(.yith-wcwl-add-to-wishlist-button--themed-button).yith-wcwl-add-to-wishlist-button--added svg.yith-wcwl-add-to-wishlist-button-icon {
color: var(--ast-global-color-0);
}
button, .ast-button, .button, input[type="button"], input[type="reset"], input[type="submit"], a:where(.wp-block-button__link) {
 box-shadow: none;
}

.yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button-over-image {
    margin: 0px;
}



.yith-wcwl-add-to-wishlist-button:is(button) {
font-size: 18px;
padding: 8px 16px;
}

.summary > .yith-add-to-wishlist-button-block {
    display: none;
}


.mbs-wishlist-icon .ti-heart-filled {
    color: var(--ast-global-color-0);
}
.mbs-wishlist-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    color: var(--ast-global-color-0);
}
.mbs-wishlist-count {
    position: absolute;
    top: -7px;
    right: -12px;
    background: var(--ast-global-color-0);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .mbs-product-main {
        display: flex;
        align-items: flex-start;
        gap: 5rem;
    }
    .mbs-product-main .entry-summary {
        position: sticky;
        top: 200px;
        align-self: flex-start;
        flex: 1;
    }
    .mbs-product-main .woocommerce-product-gallery {
        flex: 1;
    }
}


.woocommerce-product-gallery .flex-viewport {
    aspect-ratio: 3 / 4 !important;
    height: auto !important;
}

.woocommerce-product-gallery .flex-viewport img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: relative !important;
    max-height: none !important;
    aspect-ratio: 3 / 4;
}

.woocommerce-js div.product div.summary .single-product-category {
display: none;
}



.custom-full-width-header .page-title {
    margin-bottom: 25px;
    font-size: 1.5rem; /* Saad siit suurust muuta */
}

.custom-full-width-header .term-description {
    max-width: 900px; /* Et pikk tekst ei veniks liiga laiaks */
    margin: 0 auto;
    line-height: 1.6;
}


.custom-full-width-header {
width: 100%;
text-align: center;
order: -1;
flex: 0 0 100%;
box-sizing: border-box;
border-bottom: 1px solid #e2e2e2;
}

/* Lubame Astra konteineril reavahetuse, et päis mahuks üles */
.site-content > .ast-container {
    flex-wrap: wrap !important;
}




h2.woocommerce-loop-product__title {
    font-size: 1em!important;
    font-family: Cormorant Garamond;
    color: #3d3d3d;
}

.product-brand-container {
    text-transform: uppercase;
}



#secondary {
    position: relative;
}

.custom-close-sidebar {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 50;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

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

    border-radius: 50%;
    border: none;

    background: #f5f5f5;
    color: #333;

    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-close-sidebar:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}



/* Mobiil + tahvel */
@media (max-width: 921px) {
  #secondary .sidebar-main {
    position: fixed;
    left: 0px;
    right: 0px;
    bottom: 0px;
    z-index: 9999;
    margin: 0;
    width: auto;
    background-color:  var(--ast-global-color-0);
  }

  #secondary .sidebar-main .wc-block-product-filters {
    margin: 0;
  }

  #secondary .sidebar-main .wc-block-product-filters__open-overlay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    color:white!important;
  }
}


@media (max-width: 921px) {
  #secondary .wc-block-product-filters__open-overlay {
    border: none !important;
  }
  .custom-close-sidebar{
    display:none;
  }
  #toggle-sidebar.wc-block-product-filters__open-overlay {
    display: none!important;
  }
}



#secondary {
    margin: 0em;
}


@media (min-width: 922px) {
    .woocommerce.archive.ast-left-sidebar #secondary,
    .tax-product_cat.ast-left-sidebar #secondary,
    .tax-product_tag.ast-left-sidebar #secondary,
    .post-type-archive-product.ast-left-sidebar #secondary {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px;
    }

    .woocommerce.archive.ast-left-sidebar #secondary.is-open,
    .tax-product_cat.ast-left-sidebar #secondary.is-open,
    .tax-product_tag.ast-left-sidebar #secondary.is-open,
    .post-type-archive-product.ast-left-sidebar #secondary.is-open {
        transform: translateX(0);
    }

    .woocommerce.archive.ast-left-sidebar #primary,
    .tax-product_cat.ast-left-sidebar #primary,
    .tax-product_tag.ast-left-sidebar #primary,
    .post-type-archive-product.ast-left-sidebar #primary {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    body.filter-sidebar-open {
        overflow: hidden;
    }
}





/* Desktop off-canvas sidebar */
@media (min-width: 922px) {
    #secondary {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 90;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 50px!important;
    }

    #secondary.is-open {
        transform: translateX(0);
    }

    body.filter-sidebar-open {
        overflow: hidden;
    }
}

#custom-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 9998;
}

#custom-filter-overlay.is-active {
    opacity: 1;
    visibility: visible;
}





@media (min-width: 922px) {
    .ast-left-sidebar #secondary {
      border-right: 0px
    }
}





.woocommerce .woocommerce-result-count, .woocommerce-page .woocommerce-result-count {
    display: none;
}




.ast-left-sidebar #primary {
padding-left: 0px!important;
}

@media (min-width: 993px) {
    .ast-left-sidebar #primary {
        border-left: 0px
    }
}


#toggle-sidebar.wc-block-product-filters__open-overlay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#toggle-sidebar.wc-block-product-filters__open-overlay svg {
    display: block;
}










