/*
Theme Name: Booklovers Child Theme
Theme URI: https://booklovers.ancorathemes.com/
Description: Booklovers is a Premium WordPress theme that has built-in support for popular Page Builders, slider with swipe gestures, and is SEO- and Retina-ready. The unique system of inheritance and override options allows setting up individual parameters for different sections of your site and supported plugins.
Author: AncoraThemes
Author URI: https://ancorathemes.com/
Version: 2.27.0
Tested up to: 6.7
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, e-commerce, portfolio, grid-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
Text Domain: booklovers
Template: booklovers
*/


/* =Child-Theme customization starts here
------------------------------------------------------------ */

/* Product-grid layout lives in fb49-grid.css, which functions.php enqueues
   last so it is not overridden by the parent theme's responsive stylesheets. */


/* ==============================================================
   2. MIXED-SCRIPT TYPOGRAPHY
   ==============================================================
   The catalogue mixes Arabic-script and Latin titles. Grid titles are centred
   either way (see above); what changes per book is the internal direction, so
   that punctuation sits at the end of the sentence rather than jumping to the
   start of the line.

   `FB49_RTL` adds `.fb49-rtl-book` to <body> on single products and to each
   `li.product` in a loop, decided from the book's language — Sorani, Hawrami,
   Kalhuri, Persian and Arabic are right-to-left; Kurmanji is written in Latin
   script and stays left-to-right.
   -------------------------------------------------------------- */

/* Grid tiles: centred, but each with its own direction. */
li.product.fb49-rtl-book .woocommerce-loop-product__title,
li.product.fb49-rtl-book .post_header h2,
li.product.fb49-rtl-book .post_header h3 {
	direction: rtl;
	unicode-bidi: isolate;
	text-align: center;
}

li.product:not(.fb49-rtl-book) .woocommerce-loop-product__title,
li.product:not(.fb49-rtl-book) .post_header h2,
li.product:not(.fb49-rtl-book) .post_header h3 {
	direction: ltr;
	unicode-bidi: isolate;
	text-align: center;
}

/* Single product: description, reviews, short description and the title.
   The Additional information panel is deliberately absent — see section 3. */
body.fb49-rtl-book #tab-description,
body.fb49-rtl-book .woocommerce-tabs .panel#tab-description,
body.fb49-rtl-book #tab-reviews .comment-text,
body.fb49-rtl-book div.product .woocommerce-product-details__short-description,
body.fb49-rtl-book div.product .product_title,
body.fb49-rtl-book div.product h1.entry-title {
	direction: rtl;
	text-align: right;
	unicode-bidi: isolate;
}

body.fb49-rtl-book #tab-description :is(p, h1, h2, h3, h4, h5, h6, li, blockquote),
body.fb49-rtl-book .woocommerce-product-details__short-description :is(p, li) {
	direction: rtl;
	text-align: right;
	unicode-bidi: isolate;
}

body.fb49-rtl-book #tab-description :is(ul, ol) {
	padding-right: 1.4em;
	padding-left: 0;
}

/* Arabic script has taller diacritics and descenders than the theme's Latin
   line-height allows, so titles get more room. */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .post_header h2,
.woocommerce ul.products li.product .post_header h3,
.woocommerce div.product .product_title,
.woocommerce div.product h1.entry-title {
	line-height: 1.55em;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .post_header h2,
.woocommerce ul.products li.product .post_header h3 {
	font-size: 20px;
}

/* Cart, checkout and order tables show product names in either script. */
.woocommerce td.product-name,
.woocommerce-checkout-review-order-table .product-name,
.woocommerce table.shop_table td.product-name,
.widget_product_search .product_list_widget .product-title,
ul.product_list_widget li a {
	unicode-bidi: plaintext;
	text-align: start;
	overflow-wrap: break-word;
}


/* ==============================================================
   3. ADDITIONAL INFORMATION TABLE — stays LTR
   ==============================================================
   Flipping this table was a mistake: its labels are English, so "Weight:"
   rendered as ":Weight" (the colon is a neutral character and follows the
   paragraph direction), and Latin values were reordered — "12.00 * 16.00"
   became "16.00 * 12.00", because the two digit runs are separated by a
   neutral "*".

   The table therefore stays left-to-right, and direction is decided per value
   by `FB49_Attributes`, which wraps each one in an explicit `<span dir="ltr">`
   or `<span dir="rtl">`. That is authoritative, unlike `unicode-bidi:
   plaintext`, which needs a strong first character and so cannot help a value
   that begins with a digit.
   -------------------------------------------------------------- */

.woocommerce-product-attributes,
.woocommerce table.shop_attributes,
body.fb49-rtl-book .woocommerce-product-attributes,
body.fb49-rtl-book table.shop_attributes,
body.fb49-rtl-book #tab-additional_information {
	direction: ltr;
}

.woocommerce-product-attributes-item__label,
.woocommerce table.shop_attributes th,
body.fb49-rtl-book .woocommerce-product-attributes-item__label,
body.fb49-rtl-book table.shop_attributes th {
	direction: ltr;
	text-align: left;
	unicode-bidi: isolate;
}

.fb49-bidi {
	unicode-bidi: isolate;
}

.fb49-bidi--ltr {
	direction: ltr;
	text-align: left;
}

.fb49-bidi--rtl {
	direction: rtl;
	text-align: right;
	display: block;
}


/* ==============================================================
   4. FONTS — moved to mu-plugins/49books-fonts.php (2026-09-21)
   ==============================================================
   All text now uses one self-hosted stack, "FB49 Text": Farhang 2 for
   Arabic-script characters, DM Sans for Latin. Playfair Display and
   futura-pt are no longer loaded. The old Farhang2 @font-face rules and
   the body-level font variables that used to live here were removed so
   there is a single source for fonts.
   -------------------------------------------------------------- */
