/* Banana Layout Guard v1: طبقة أمان للتنسيق وتباعد موحّد */

/* لا تمرير أفقي بسبب أي عنصر شارد (clip لا يكسر الهيدر المثبّت) */
html, body { overflow-x: clip; }
:where(img, video, iframe) { max-width: 100%; }
:where(img) { height: auto; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .bp-answer, .bp-faq) { overflow-wrap: anywhere; }

/* إيقاع موحّد للنصوص في المقالات والصفحات ووصف المنتج (الأبناء المباشرون فقط حتى لا تتأثر المكونات) */
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > h2 { margin: 2.2rem 0 .8rem; line-height: 1.5; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > h3 { margin: 1.6rem 0 .6rem; line-height: 1.55; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > p { margin: 0 0 1rem; line-height: 1.95; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > :is(ul, ol) { margin: 0 0 1.25rem; padding-inline-start: 1.4rem; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > :is(ul, ol) > li { margin: .35rem 0; line-height: 1.9; }
:where(.bp-content, .bp-doc, .woocommerce-Tabs-panel--description) > :first-child { margin-top: 0; }

/* بطاقات التصنيفات: الأسماء الطويلة تلتف بدل الخروج من البطاقة */
.bp-cat-n, .bp-cat-c { white-space: normal; overflow-wrap: anywhere; }
.bp-cat > :not(.bp-cat-i) { min-width: 0; }

/* شريط الفلاتر في الجوال يلتصق أسفل الهيدر لا تحته */
@media (max-width: 1024px) { .bpf-bar { top: var(--blg-head, 64px); } }

/* خيارات المدة: النص الطويل يلتف داخل الزر */
.bvp-pill b { min-width: 0; overflow-wrap: anywhere; }

/* جداول الأسعار والمقارنة تتحول لبطاقات واضحة على الجوال (بدون تمرير جانبي) */
@media (max-width: 600px) {
	.bp-plans-wrap:has(table.blg-stack) { overflow: visible; margin-inline: 0; }
	table.blg-stack { min-width: 0 !important; width: 100%; box-shadow: none !important; background: transparent !important; border: 0 !important; }
	table.blg-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table.blg-stack, table.blg-stack tbody, table.blg-stack tr, table.blg-stack th, table.blg-stack td { display: block; }
	table.blg-stack tr { background: #fff; border: 2px solid var(--bp-ink, #0B0B0B); border-radius: 14px; box-shadow: 0 3px 0 var(--bp-ink, #0B0B0B); padding: 4px 14px; margin: 0 0 14px; }
	table.blg-stack tbody th { border: 0 !important; padding: 10px 0 6px !important; font-size: 16px; font-weight: 900; white-space: normal !important; text-align: start !important; background: transparent !important; }
	table.blg-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0 !important; border: 0 !important; border-top: 1px dashed var(--bp-line, #E0DBC4) !important; white-space: normal !important; text-align: end !important; background: transparent !important; }
	table.blg-stack td::before { content: attr(data-label); flex: 0 1 50%; font-weight: 700; color: var(--bp-tx2, #4A4534); text-align: start; }
	table.blg-stack td:empty { display: none; }
}
