/**
 * Theme Name: Moshina Child
 * Description: This is a child theme of Moshina.
 * Author: <a href="http://steelthemes.com/steelthemes">Steelthemes</a>
 * Template: moshina
 * Version: 1.8.6
 */

/* ================================================================
   Moshina — Mobile Hero Header
   Overrides mobile-header.php styles on screens <= 991px
   ================================================================ */

@media (max-width: 991px) {

    /* ---- Wrapper ---- */
    .moshina-mobile-header.has-hero {
        border-bottom: none;
        box-shadow: none;
    }

    /* Hero container */
    .moshina-hero-wrapper {
        position: relative;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        min-height: 240px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }

    /* Dark gradient overlay – bottom heavy */
    .moshina-hero-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(175deg,
                rgba(0, 0, 0, 0.55) 0%,
                rgba(0, 0, 0, 0.18) 45%,
                rgba(0, 0, 0, 0.60) 100%);
        z-index: 1;
    }

    /* ---- Top bar inside hero (logo + actions) ---- */
    .moshina-hero-topbar {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px 10px;
    }

    .moshina-hero-logo a {
        text-decoration: none;
    }

    /* Logo image — make it white/bright on dark bg */
    .moshina-hero-logo-img {
        max-height: 40px !important;
        width: auto !important;
        filter: brightness(0) invert(1) !important;
        /* Smooth brightness boost */
        transition: opacity 0.2s;
    }

    /* Text logo (when no image) */
    .moshina-hero-logo-text {
        color: #ffffff !important;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: -0.3px;
        text-decoration: none;
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
    }

    /* Actions row: cart + burger */
    .moshina-hero-actions {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    /* Cart icon inside hero */
    .moshina-hero-cart .mini-cart-icon {
        display: flex;
        align-items: center;
        position: relative;
    }

    .moshina-hero-cart .mini-cart-icon img {
        width: 26px;
        height: 26px;
        filter: brightness(0) invert(1) !important;
    }

    .moshina-hero-cart .pro-count {
        position: absolute;
        top: -6px;
        right: -8px;
        background: #361601;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        border-radius: 50%;
        text-align: center;
        padding: 0 2px;
    }

    /* Burger inside hero — white bars */
    .moshina-hero-burger .burger-icon span,
    .moshina-hero-burger .burger-icon-white span {
        background-color: #ffffff !important;
        display: block;
        width: 22px;
        height: 2px;
        margin-bottom: 5px;
        border-radius: 2px;
        transition: background-color 0.2s;
    }

    .moshina-hero-burger .burger-icon span:last-child,
    .moshina-hero-burger .burger-icon-white span:last-child {
        margin-bottom: 0;
    }

    /* ---- Hero text content ---- */
    .moshina-hero-content {
        position: relative;
        z-index: 2;
        padding: 0 20px 26px;
        direction: rtl;
        text-align: right;
    }

    .moshina-hero-greeting {
        color: rgba(255, 255, 255, 0.88);
        font-size: 13px;
        font-weight: 400;
        margin: 0 0 5px;
        letter-spacing: 0.4px;
        opacity: 0;
        transform: translateY(8px);
        animation: moshina-fade-up 0.5s 0.1s ease forwards;
    }

    .moshina-hero-heading {
        color: #ffffff;
        font-size: 21px;
        font-weight: 700;
        line-height: 1.35;
        margin: 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        opacity: 0;
        transform: translateY(10px);
        animation: moshina-fade-up 0.55s 0.22s ease forwards;
    }

    /* Fade-up keyframe */
    @keyframes moshina-fade-up {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ---- Search bar inside hero section (styled like the screenshot) ---- */
    .moshina-hero-content .hero-search-bar {
        background: transparent !important;
        box-shadow: none !important;
        padding: 15px 0 0 0 !important;
        /* space below the heading */
        width: 100%;
        border: none !important;
    }

    /* Target FiboSearch wrapper and form */
    .moshina-hero-content .hero-search-bar .dgwt-wcas-search-wrapp {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .moshina-hero-content .hero-search-bar .dgwt-wcas-search-form {
        background: #ffffff !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        height: 50px !important;
    }


    .search-style-2 form {
        /* border: 2px solid var(--border-color-2); */
        border-radius: 4px;
        background-color: #fff;
    }

    .moshina-hero-content .hero-search-bar .dgwt-wcas-search-form .dgwt-wcas-search-input {
        background: transparent !important;
        border: none !important;
        height: 50px !important;
        line-height: 50px !important;
        padding: 0 15px 0 45px !important;
        color: #253D4E !important;
        font-size: 14px !important;
        width: 100% !important;
        border-radius: 8px !important;
    }

    body.rtl .moshina-hero-content .hero-search-bar .dgwt-wcas-search-form .dgwt-wcas-search-input {
        padding: 0 45px 0 15px !important;
        text-align: right !important;
    }

    .moshina-hero-content .hero-search-bar .dgwt-wcas-search-form .dgwt-wcas-search-submit {
        background: transparent !important;
        border: none !important;
        color: #7E7E7E !important;
        height: 50px !important;
        width: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
    }

    body.rtl .moshina-hero-content .hero-search-bar .dgwt-wcas-search-form .dgwt-wcas-search-submit {
        left: auto !important;
        right: 0 !important;
    }

    /* Target Default Search (box-header-search) */
    .moshina-hero-content .hero-search-bar .box-header-search {
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 25px rgba(53, 22, 1, 0.15) !important;
        padding: 0 !important;
        height: 50px !important;
        display: flex;
        align-items: center;
        overflow: hidden;
    }

    .moshina-hero-content .hero-search-bar .box-header-search .form-search {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    /* Hide category select for clean, premium mobile hero style */
    .moshina-hero-content .hero-search-bar .box-header-search select.category,
    .moshina-hero-content .hero-search-bar .box-header-search .select2-container {
        display: none !important;
    }

    .moshina-hero-content .hero-search-bar .box-header-search .search-wrapper {
        width: 100% !important;
        min-width: 100% !important;
        height: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .moshina-mobile-header.has-hero .mobile_search_bar {
        border-top: none;
        padding: 10px 14px 8px;
        background: #ffffff00 !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
        /* BORDER-COLOR: #df7a03; */
    }

    .moshina-hero-content .hero-search-bar .box-header-search input.search {
        background: transparent !important;
        border: none !important;
        height: 100% !important;
        width: 100% !important;
        padding: 0 15px 0 45px !important;
        font-size: 14px !important;
        color: #253D4E !important;
        border-radius: 8px !important;
    }

    body.rtl .moshina-hero-content .hero-search-bar .box-header-search input.search {
        padding: 0 45px 0 15px !important;
        text-align: right !important;
    }

    .moshina-hero-content .hero-search-bar .box-header-search .csearchbtn {
        background: transparent !important;
        border: none !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        height: 100% !important;
        width: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #7E7E7E !important;
        font-size: 18px !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer;
    }

    body.rtl .moshina-hero-content .hero-search-bar .box-header-search .csearchbtn {
        left: auto !important;
        right: 0 !important;
    }

    .moshina-hero-content .hero-search-bar .box-header-search svg {
        display: none !important;
    }

}

/* End @media (max-width: 991px) */

/* Neutralize .product-info container box */
.default_single_product .product-info,
.product_single_style_two .product-info,
.product_single_style_three .product-info,
.product-info {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 30px !important;
}

/* ── Hide size attribute section from product details ── */
.attr-detail.attr-size.mb-20 {
    display: none !important;
}

/* ============================================================
   Woo Variation Swatches — High Specificity Grid & Card Fix
   ============================================================ */

/* Hide Select2 dropdown when Woo Variation Swatches is active */
table.variations .select2-container,
table.variations select.woo-variation-raw-select,
.woo-variation-items-wrapper .select2-container,
.woo-variation-items-wrapper .select2 {
    display: none !important;
}

/* 1. Variations Table & Rows Reset to Full Width Block */
html body .single-product div.product form.cart .variations,
html body table.variations,
html body table.variations tbody,
html body table.variations tr,
html body table.variations th,
html body table.variations td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

html body table.variations tr {
    margin-bottom: 16px !important;
}

html body table.variations th.label,
html body table.variations label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #253D4E !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-align: right !important;
}

html body table.variations a.reset_variations {
    font-size: 12px !important;
    color: #7E7E7E !important;
    text-decoration: underline !important;
    margin-inline-start: 10px !important;
    display: inline-block !important;
}

/* 2. Swatches Wrapper Grid (مطابق لـ .freshen-options-grid) */
html body .woo-variation-swatches,
html body .woo-variation-items-wrapper,
html body .wvs-loaded {
    width: 100% !important;
    display: block !important;
}

html body .woo-variation-swatches .variable-items-wrapper,
html body ul.variable-items-wrapper,
html body .wvs-loaded ul.variable-items-wrapper,
html body ul.wvs-style-squared,
html body ul.wvs-style-rounded,
html body ul[class*="variable-items-wrapper"],
html body td.value.woo-variation-items-wrapper ul.variable-items-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 12px !important;
    padding: 6px 0 !important;
    margin: 6px 0 16px 0 !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* 3. Individual Swatch Card (.variable-item) */
html body .woo-variation-swatches .variable-items-wrapper .variable-item,
html body ul.variable-items-wrapper li.variable-item,
html body .wvs-loaded .variable-items-wrapper .variable-item,
html body .variable-items-wrapper li.variable-item[style],
html body .variable-items-wrapper li.variable-item[data-value],
html body td.value ul.variable-items-wrapper li.variable-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 64px !important;
    max-height: none !important;
    line-height: 1.4 !important;
    background: #ffffff !important;
    border: 1.5px solid #e8e8e8 !important;
    border-radius: 12px !important;
    padding: 10px 8px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    margin: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    float: none !important;
}

/* Target .variable-item-contents inner div */
html body .variable-items-wrapper li.variable-item .variable-item-contents,
html body table.variations ul.variable-items-wrapper li.variable-item .variable-item-contents {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Item Text (.variable-item-span) */
html body .woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-span,
html body .woo-variation-swatches .variable-items-wrapper .variable-item span,
html body .variable-items-wrapper li.variable-item .variable-item-span-button,
html body .variable-items-wrapper li.variable-item .variable-item-span-color,
html body .variable-items-wrapper li.variable-item .variable-item-span-image {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #253D4E !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* 4. Hover State */
html body .woo-variation-swatches .variable-items-wrapper .variable-item:hover:not(.disabled):not(.out-of-stock) {
    border-color: #bababa !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    background: #ffffff !important;
}

/* 5. Selected / Active State */
html body .woo-variation-swatches .variable-items-wrapper .variable-item.selected,
html body .woo-variation-swatches .variable-items-wrapper .variable-item.active,
html body .variable-items-wrapper li.variable-item.selected,
html body .variable-items-wrapper li.variable-item.active {
    border-color: #361601 !important;
    background: #f4fbf7 !important;
    box-shadow: 0 4px 12px rgba(59, 183, 126, 0.12) !important;
}

html body .woo-variation-swatches .variable-items-wrapper .variable-item.selected .variable-item-span,
html body .woo-variation-swatches .variable-items-wrapper .variable-item.active .variable-item-span,
html body .variable-items-wrapper li.variable-item.selected span,
html body .variable-items-wrapper li.variable-item.active span {
    color: #361601 !important;
    font-weight: 700 !important;
}

/* Green Checkmark Badge on Selected Card */
html body .woo-variation-swatches .variable-items-wrapper .variable-item.selected::after,
html body .woo-variation-swatches .variable-items-wrapper .variable-item.active::after,
html body .variable-items-wrapper li.variable-item.selected::after {
    content: '\2714' !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: #361601 !important;
    color: #ffffff !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    z-index: 10 !important;
}

body.rtl html body .variable-items-wrapper li.variable-item.selected::after,
body.rtl html body .variable-items-wrapper li.variable-item.active::after {
    right: auto !important;
    left: 6px !important;
}

/* 6. Image Swatches (.image-variable-item) */
html body .woo-variation-swatches .variable-items-wrapper .variable-item.image-variable-item {
    padding: 6px !important;
    min-height: 100px !important;
}

html body .woo-variation-swatches .variable-items-wrapper .variable-item.image-variable-item img {
    border-radius: 8px !important;
    max-height: 70px !important;
    object-fit: contain !important;
    margin: 0 auto 4px !important;
}

/* 7. Color Swatches (.color-variable-item) */
html body .woo-variation-swatches .variable-items-wrapper .variable-item.color-variable-item {
    min-height: 64px !important;
    padding: 6px !important;
}

/* 8. Disabled / Out of stock Swatches */
html body .woo-variation-swatches .variable-items-wrapper .variable-item.disabled,
html body .woo-variation-swatches .variable-items-wrapper .variable-item.out-of-stock {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html body .woo-variation-swatches .variable-items-wrapper .variable-item.disabled::before,
html body .woo-variation-swatches .variable-items-wrapper .variable-item.out-of-stock::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 10% !important;
    width: 80% !important;
    height: 1.5px !important;
    background: #FF5A5F !important;
    transform: rotate(-15deg) !important;
    z-index: 2 !important;
}

/* 9. Hide duplicate variation price since we sync it to the main price at the top */
html body div.product div.single_variation_wrap div.single_variation div.woocommerce-variation-price,
html body div.product div.single_variation_wrap div.single_variation span.price,
html body div.product .woocommerce-variation-price,
html body div.product .single_variation .price,
html body div.product div.single_variation_wrap .woocommerce-variation-price,
.single-product .woocommerce-variation-price,
.single-product .single_variation .woocommerce-variation-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Styling for 'Starting from' price label on variable products */
.from-price-label {
    font-size: 0.85em !important;
    font-weight: normal !important;
    color: #7e7e7e !important;
    margin-inline-end: 4px !important;
}