/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* The SVG mask follows the same foreground/hover color as other follow icons. */
.follow-icons .icon-bale::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    background-color: currentColor;
    -webkit-mask: url('assets/img/bale.svg') center / contain no-repeat;
    mask: url('assets/img/bale.svg') center / contain no-repeat;
}

.bv-product-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 16px;
}

.bv-product-copy .bv-copy-link,
.bv-product-copy .bv-size-guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    min-width: 155px;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid #dedee5;
    border-radius: 10px;
    background: #f7f7fa;
    color: #383844;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0;
    box-shadow: 0 2px 6px rgb(0 0 0 / 4%);
    transition: background-color .2s, border-color .2s, color .2s;
}

.bv-product-copy .bv-copy-link:hover,
.bv-product-copy .bv-size-guide-button:hover {
    background: #ededf3;
    border-color: #bdbdc9;
}

.bv-product-copy .bv-copy-link:focus-visible,
.bv-product-copy .bv-size-guide-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.bv-size-guide-dialog {
    position: fixed;
    inset: 0;
    width: fit-content;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 48px 12px 12px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 48px rgb(0 0 0 / 25%);
    overflow: auto;
}

.bv-size-guide-dialog::backdrop {
    background: rgb(0 0 0 / 60%);
}

.bv-size-guide-dialog img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 84px);
    max-height: calc(100dvh - 84px);
    margin: auto;
    object-fit: contain;
}

.bv-size-guide-dialog .bv-size-guide-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    width: 40px;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #dedee5;
    border-radius: 10px;
    background: #ededf3;
    color: #383844;
    font-size: 40px;
    line-height: 1;
}

.bv-size-guide-dialog .bv-size-guide-close:hover {
    background: #dedee5;
}

.bv-size-guide-dialog .bv-size-guide-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

html.bv-size-guide-open {
    overflow: hidden;
}

.bv-product-copy .bv-copy-link.is-copied {
    background: #ecf8f1;
    border-color: #b3dec5;
    color: #216540;
}

.bv-product-copy .bv-copy-link svg,
.bv-product-copy .bv-size-guide-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('fonts/YekanBakhFaNum.woff2') format('woff2'),
         url('fonts/YekanBakhFaNum.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Override Flatsome typography settings while preserving icon fonts. */
body,
h1, h2, h3, h4, h5, h6,
.heading-font,
.alt-font,
.nav > li > a,
.mobile-sidebar-levels-2 .nav > li > ul > li > a,
.off-canvas-center .nav-sidebar.nav-vertical > li > a,
button,
input,
select,
textarea,
.button {
    font-family: 'YekanBakhFaNum', Tahoma, sans-serif !important;
}


/* Tooltipster renders tooltips outside the gallery markup. */
.tooltipster-content {
    font-family: 'YekanBakhFaNum', Tahoma, sans-serif !important;
}

/* Center the gallery zoom glyph without changing its icon font. */
.image-tools .zoom-button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    line-height: 1;
}

.image-tools .zoom-button.button > .icon-expand {
    top: 0;
    margin: 0;
    line-height: 1;
}

.image-tools .zoom-button.button > .icon-expand::before {
    display: block;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

.nav-dropdown .menu-item-has-children>a, .nav-dropdown .nav-dropdown-col>a, .nav-dropdown .title>a {
    font-size: 110%;
}

/* Storefront visibility changes, scoped to the requested areas. */
.ux-mini-cart-empty-icon .wc-backward,
.ux-mini-cart-empty-icon ~ .return-to-shop,
.woocommerce-account .woocommerce-notices-wrapper,
.single-product .product_meta .sku_wrapper,
.woocommerce-checkout #billing_country_field {
    display: none !important;
}

/* The counter uses text; the basket's ::before still uses the icon font. */
.cart-item .has-icon i[data-icon-label]::after,
.cart-item.has-icon i[data-icon-label]::after {
    font-family: 'YekanBakhFaNum', Tahoma, sans-serif !important;
}

.woocommerce-checkout #ship-to-different-address,
.woocommerce-checkout .shipping_address,
.woocommerce-order-received .woocommerce-column--shipping-address {
    display: none !important;
}

.woocommerce-order-received .woocommerce-column--billing-address {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
}

.woocommerce-checkout .checkout-sidebar .woocommerce-privacy-policy-text {
    background-color: #fff8d6;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.woocommerce-checkout .checkout-sidebar .woocommerce-privacy-policy-text p:last-child {
    margin-bottom: 0;
}

/* The account address list now contains only the billing address. */
.woocommerce-account.woocommerce-edit-address .woocommerce-Addresses > .woocommerce-Address {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
}

/* Reset the parent theme's scroll wrapper on the account orders page. */
@media only screen and (max-width: 849px) {
    .woocommerce-account.woocommerce-orders .touch-scroll-table {
        box-shadow: none;
        margin-left: 0;
        overflow-x: scroll;
        overflow-y: hidden;
        padding: 0;
        position: relative;
        width: 100%;
    }
}

/* Mobile order cards; desktop retains the original table layout. */
@media only screen and (max-width: 767px) {
    .woocommerce-account .woocommerce-orders-table,
    .woocommerce-account .woocommerce-orders-table tbody {
        display: block;
        width: 100%;
        border: 0;
    }

    .woocommerce-account .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-account .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 16px;
        padding: 6px 16px;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .woocommerce-account .woocommerce-orders-table tbody tr > th,
    .woocommerce-account .woocommerce-orders-table tbody tr > td {
        display: flow-root;
        width: 100%;
        padding: 12px 0;
        border: 0;
        border-bottom: 1px solid #eee;
        background: transparent;
        text-align: end !important;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .woocommerce-account .woocommerce-orders-table tbody tr > th::before,
    .woocommerce-account .woocommerce-orders-table tbody tr > td::before {
        content: attr(data-title);
        float: inline-start;
        margin-inline-end: 16px;
        font-weight: 600;
        text-align: start;
    }

    .woocommerce-account .woocommerce-orders-table tbody tr > :last-child {
        border-bottom: 0;
    }

    .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before {
        margin-inline-end: auto;
    }

    .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
        margin: 0;
        min-height: 44px;
        white-space: normal;
    }
}

/* Lift the search box's ancestor layers above subsequent category sections.
   A high z-index on the results alone cannot escape those stacking contexts. */
#main :is(.section, .section-content, .row, .col, .col-inner):has(.ux-search-box) {
    position: relative;
    z-index: 30;
}

#main .ux-search-box {
    position: relative;
    z-index: 30;
}

#search-lightbox {
    font-size: 1em;
    max-width: 600px;
    background: gray;
}
