/* BELARA — Bags & Wallets V4.4
   Isolated presentation correction for the combined bags category
   and the 18 managed product pages.
*/

body.tax-product_cat.term-bags,
body.single-product {
    --belara-bw-card-radius: 16px;
}

/* Product-card imagery: same visual frame, no distortion. */
body.tax-product_cat.term-bags .products .product .product-element-top,
body.tax-product_cat.term-bags .products .product .product-image-link,
body.tax-product_cat.term-bags .products .product .product-image-link > picture,
body.tax-product_cat.term-bags .products .product .product-image-link > picture > img {
    overflow: hidden;
}

body.tax-product_cat.term-bags .products .product .product-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fffaf6;
}

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;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
}

/* Card title: Arabic type + isolated LTR brand/model.
   Prevents MATELASSÉ and em-dash characters from jumping to the Arabic line. */
body.tax-product_cat.term-bags .belara-bw-v44-title {
    min-height: 68px;
    margin: 14px 12px 8px !important;
    padding: 0 !important;
    text-align: center !important;
    font-family: Almarai, sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
}

body.tax-product_cat.term-bags .belara-bw-v44-type {
    display: block;
    direction: rtl;
    unicode-bidi: isolate;
    font-family: Almarai, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    color: #32100d;
}

body.tax-product_cat.term-bags .belara-bw-v44-name {
    display: -webkit-box;
    direction: ltr;
    unicode-bidi: isolate;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
    min-height: 38px;
    font-family: Almarai, sans-serif;
    font-size: 12.5px;
    line-height: 1.55;
    font-weight: 500;
    color: #4b3733;
    text-align: center;
}

/* Keep price and CTA aligned despite different title lengths. */
body.tax-product_cat.term-bags .products .product .product-wrapper,
body.tax-product_cat.term-bags .products .product .product-grid-item {
    height: 100%;
}

body.tax-product_cat.term-bags .products .product .price {
    direction: rtl;
    unicode-bidi: isolate;
    min-height: 28px;
    font-family: Almarai, sans-serif !important;
    font-weight: 700;
}

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 {
    margin-top: auto;
}

/* Single-product title: same clean two-line system. */
body.single-product .belara-bw-v44-single-title {
    font-family: Almarai, sans-serif !important;
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: 1.35 !important;
}

body.single-product .belara-bw-v44-single-type {
    display: block;
    direction: rtl;
    unicode-bidi: isolate;
    font-family: Almarai, sans-serif;
    font-size: .58em;
    font-weight: 700;
    color: #7a4e44;
}

body.single-product .belara-bw-v44-single-name {
    display: block;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: Almarai, sans-serif;
    text-align: inherit;
}

/* Desktop card consistency. */
@media (min-width: 769px) {
    body.tax-product_cat.term-bags .products .product .product-wrapper {
        min-height: 100%;
        border-radius: var(--belara-bw-card-radius);
    }

    body.tax-product_cat.term-bags .products .product .product-image-link {
        min-height: 260px;
    }
}

/* Mobile: keep titles readable without oversized cards. */
@media (max-width: 768px) {
    body.tax-product_cat.term-bags .belara-bw-v44-title {
        min-height: 64px;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }

    body.tax-product_cat.term-bags .belara-bw-v44-type {
        font-size: 13px;
    }

    body.tax-product_cat.term-bags .belara-bw-v44-name {
        font-size: 11.5px;
        line-height: 1.5;
    }

    body.single-product .belara-bw-v44-single-name {
        font-size: .84em;
    }
}
