/* Banana Pixels: بطاقات الباقات الجاهزة وصندوق «اطلبه ضمن باقة» (bp-bundles.php). v1 */

.bpbn-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 18px 0 26px;
}
.bpbn-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: #fff;
	color: var(--bp-ink, #0B0B0B);
	border: 2px solid var(--bp-ink, #0B0B0B);
	border-radius: 16px;
	box-shadow: 0 4px 0 0 var(--bp-ink, #0B0B0B);
}
.bpbn-top { display: flex; align-items: flex-start; gap: 12px; }
.bpbn-emoji {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	font-size: 24px;
	line-height: 1;
	background: #FFF4CC;
	border: 2px solid var(--bp-ink, #0B0B0B);
	border-radius: 12px;
}
.bpbn-name { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.4; color: var(--bp-ink, #0B0B0B); }
.bpbn-desc { margin: 2px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.75; color: var(--bp-tx2, #3D3826); }
.bpbn-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bpbn-items li { display: flex; align-items: center; gap: 10px; padding: 7px 0; margin: 0; }
.bpbn-items li + li { border-top: 1px dashed #E0DBC4; }
.bpbn-items img, .bpbn-items .ph { flex: 0 0 36px; width: 36px; height: 36px; object-fit: cover; border-radius: 8px; background: #FFF4CC; display: grid; place-items: center; margin: 0; }
.bpbn-items a { flex: 1 1 auto; min-width: 0; color: var(--bp-ink, #0B0B0B); font-weight: 800; font-size: 14.5px; text-decoration: none; }
.bpbn-items a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bpbn-items span { flex: 0 0 auto; font-weight: 800; font-size: 14px; white-space: nowrap; }
.bpbn-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 2px solid var(--bp-ink, #0B0B0B); }
.bpbn-total { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.bpbn-total small { font-size: 12px; font-weight: 700; color: var(--bp-tx2, #3D3826); }
.bpbn-total b { font-size: 20px; font-weight: 900; white-space: nowrap; }
.bpbn-btn,
.bpbn-btn:visited {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	background: var(--bp-ink, #0B0B0B);
	color: var(--bp-banana, #F5D74E);
	border: 2px solid var(--bp-ink, #0B0B0B);
	border-radius: 12px;
	font-weight: 900;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 3px 0 0 rgba(11, 11, 11, .35);
	transition: transform .1s, box-shadow .1s;
}
.bpbn-btn:hover { color: var(--bp-banana, #F5D74E); text-decoration: none; }
.bpbn-btn:active { transform: translateY(2px); box-shadow: none; }
.bpbn-btn:focus-visible, .bpbn-fbt-row:focus-visible { outline: 3px solid var(--bp-banana, #F5D74E); outline-offset: 2px; }
.bpbn-diy { background: #FFF4CC; border-style: dashed; box-shadow: none; }
.bpbn-diy .bpbn-emoji { background: #fff; }

/* صندوق صفحة المنتج */
.bpbn-fbt {
	margin: 16px 0 6px;
	padding: 12px;
	background: #FFFDF5;
	border: 2px dashed var(--bp-ink, #0B0B0B);
	border-radius: 14px;
	clear: both;
}
.bpbn-fbt-h { font-size: 14.5px; font-weight: 900; line-height: 1.6; color: var(--bp-ink, #0B0B0B); }
.bpbn-fbt-row,
.bpbn-fbt-row:visited {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 10px;
	background: #fff;
	color: var(--bp-ink, #0B0B0B);
	border: 2px solid var(--bp-ink, #0B0B0B);
	border-radius: 12px;
	box-shadow: 0 2px 0 0 var(--bp-ink, #0B0B0B);
	text-decoration: none;
	cursor: pointer;
	transition: transform .1s, box-shadow .1s;
}
.bpbn-fbt-row:hover { color: var(--bp-ink, #0B0B0B); text-decoration: none; background: #FFF4CC; }
.bpbn-fbt-row:active { transform: translateY(2px); box-shadow: none; }
.bpbn-fbt-row .bpbn-emoji { flex-basis: 40px; width: 40px; height: 40px; font-size: 20px; border-width: 0; }
.bpbn-fbt-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.bpbn-fbt-t b { font-size: 14px; font-weight: 900; }
.bpbn-fbt-t small { font-size: 12px; font-weight: 700; color: var(--bp-tx2, #3D3826); }
.bpbn-fbt-p { flex: 0 0 auto; font-size: 15px; font-weight: 900; white-space: nowrap; }
.bpbn-fbt-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; }
.bpbn-fbt-more button,
.bpbn-fbt-more a {
	padding: 4px 0;
	background: none;
	border: 0;
	color: var(--bp-ink, #0B0B0B);
	font: inherit;
	font-size: 13.5px;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.bpbn-btn, .bpbn-fbt-row { transition: none; }
}

/* v1.0.1: تغلب على تنسيقات محتوى القالب (.bp-entry-content و.bp-hub): هامش القوائم ولون الروابط وخطها */
.bpbn-grid .bpbn-card ul.bpbn-items { margin: 0; padding: 0; list-style: none; }
.bpbn-grid .bpbn-card ul.bpbn-items li { margin: 0; padding-right: 0; padding-left: 0; }
.bpbn-grid .bpbn-card ul.bpbn-items li::before { content: none; }
.bpbn-grid .bpbn-card .bpbn-items a { color: var(--bp-ink, #0B0B0B); text-decoration: none; }
.bpbn-grid .bpbn-card .bpbn-items a:hover { text-decoration: underline; }
.bpbn-grid .bpbn-card a.bpbn-btn,
.bpbn-grid .bpbn-card a.bpbn-btn:hover { color: var(--bp-banana, #F5D74E); text-decoration: none; }
.bpbn-grid .bpbn-card .bpbn-name { margin: 0; }
.bpbn-grid .bpbn-card .bpbn-desc { margin: 2px 0 0; }
.bpbn-fbt a.bpbn-fbt-row,
.bpbn-fbt a.bpbn-fbt-row:hover { color: var(--bp-ink, #0B0B0B); text-decoration: none; }
.bpbn-fbt .bpbn-fbt-more a,
.bpbn-fbt .bpbn-fbt-more button { color: var(--bp-ink, #0B0B0B); }

/* v1.0.3: صف الباقات في الرئيسية ([bp_bundles_home]) */
/* الجوال: تمرير أفقي بالسحب مع هامش جانبي وطرف البطاقة التالية ظاهر */
@media (max-width: 759px) {
	.bpbn-home .bpbn-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 1.5rem; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; margin: 8px -1.5rem 18px; padding: 2px 1.5rem 12px; scrollbar-width: none; }
	.bpbn-home .bpbn-grid::-webkit-scrollbar { display: none; }
	.bpbn-home .bpbn-card { flex: 0 0 min(82vw, 320px); scroll-snap-align: start; }
}
/* التابلت واللابتوب الصغير: شبكة 2×2 */
@media (min-width: 760px) and (max-width: 1199px) {
	.bpbn-home .bpbn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* الكمبيوتر: الأربع في صف واحد، والسعر فوق زر بعرض البطاقة */
@media (min-width: 1200px) {
	.bpbn-home .bpbn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.bpbn-home .bpbn-foot { flex-direction: column; align-items: stretch; gap: 10px; }
	.bpbn-home .bpbn-total { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
	.bpbn-home .bpbn-card .bpbn-btn { width: 100%; }
}
