/* BELARA — Bags & Wallets V4.6
   Arabic naming pattern matching the rest of BELARA.
*/

/* Hide all older / duplicated title systems. */
body.tax-product_cat.term-bags .products .product h3.wd-entities-title,
body.tax-product_cat.term-bags .products .product .wd-entities-title,
body.tax-product_cat.term-bags .products .product .product-title,
body.tax-product_cat.term-bags .products .product .belara-bw-v44-title,
body.tax-product_cat.term-bags .products .product .woocommerce-loop-product__title:not(.belara-bw-v46-title) {
    display: none !important;
}

/* Make V4.6 the single visible title block. */
body.tax-product_cat.term-bags .products .product .belara-bw-v46-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    min-height: 68px !important;
    margin: 15px 12px 10px !important;
    padding: 0 !important;
    text-align: center !important;
    font-family: Almarai, sans-serif !important;
}

body.tax-product_cat.term-bags .belara-bw-v46-ar {
    display: -webkit-box;
    direction: rtl;
    unicode-bidi: isolate;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 25px;
    max-width: 100%;
    font-family: Almarai, sans-serif !important;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
    color: #32100d;
}

body.tax-product_cat.term-bags .belara-bw-v46-brand {
    display: block;
    direction: ltr;
    unicode-bidi: isolate;
    max-width: 100%;
    font-family: Almarai, sans-serif !important;
    font-size: 10.5px;
    line-height: 1.45;
    font-weight: 500;
    letter-spacing: .15px;
    color: #8a5f54;
    text-transform: uppercase;
}

/* Keep card layout consistent. */
body.tax-product_cat.term-bags .products .product .product-element-bottom {
    display: flex !important;
    flex-direction: column !important;
}

body.tax-product_cat.term-bags .products .product .belara-bw-v46-title {
    order: 1;
}

body.tax-product_cat.term-bags .products .product .wrap-price,
body.tax-product_cat.term-bags .products .product .price {
    order: 2;
}

body.tax-product_cat.term-bags .products .product .wd-add-btn,
body.tax-product_cat.term-bags .products .product .add-to-cart-loop,
body.tax-product_cat.term-bags .products .product .product-footer {
    order: 3;
    margin-top: auto !important;
}

/* Single product title uses same store identity. */
body.single-product .summary .product_title:not(.belara-bw-v46-single-title),
body.single-product .summary-inner .product_title:not(.belara-bw-v46-single-title),
body.single-product .belara-bw-v44-single-title {
    display: none !important;
}

body.single-product .belara-bw-v46-single-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    font-family: Almarai, sans-serif !important;
    line-height: 1.4 !important;
}

body.single-product .belara-bw-v46-single-ar {
    display: block;
    direction: rtl;
    unicode-bidi: isolate;
    font-family: Almarai, sans-serif !important;
    font-weight: 700;
    color: #32100d;
}

body.single-product .belara-bw-v46-single-brand {
    display: block;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: Almarai, sans-serif !important;
    font-size: .52em;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: .2px;
    color: #8a5f54;
    text-transform: uppercase;
}

/* Preserve V4.4 image normalization. */
body.tax-product_cat.term-bags .products .product .product-image-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    aspect-ratio: 1 / 1 !important;
    background: #fffaf6;
    overflow: hidden;
}

body.tax-product_cat.term-bags .products .product .product-image-link img,
body.tax-product_cat.term-bags .products .product .product-element-top img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
}

@media (min-width: 769px) {
    body.tax-product_cat.term-bags .products .product .product-element-bottom {
        min-height: 210px;
    }
}

@media (max-width: 768px) {
    body.tax-product_cat.term-bags .products .product .belara-bw-v46-title {
        min-height: 66px !important;
        margin: 12px 8px 8px !important;
    }

    body.tax-product_cat.term-bags .belara-bw-v46-ar {
        font-size: 12.5px;
    }

    body.tax-product_cat.term-bags .belara-bw-v46-brand {
        font-size: 9.5px;
    }

    body.tax-product_cat.term-bags .products .product .product-element-bottom {
        min-height: 195px;
    }
}
