/* =========================================================
   العناصر الأساسية: الحاويات، الأزرار، العناوين، الحقول
   ========================================================= */

.bq-container {
	width: 100%;
	max-width: var(--bq-container);
	margin-inline: auto;
	padding-inline: var(--bq-gutter);
}

.bq-section { padding-block: var(--bq-section); }
.bq-section--tight { padding-block: calc(var(--bq-section) * .6); }
.bq-section--soft { background: var(--bq-rose-soft); }
.bq-section--trust { background: var(--bq-beige); }

.bq-skip {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 999;
	background: var(--bq-wine);
	color: #fff;
	padding: 12px 20px;
}
.bq-skip:focus { inset-inline-start: 12px; top: 12px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- التوقيع البصري: الفاصل الذهبي بالتاج ---------- */
.bq-rule {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: var(--bq-sp-3) auto var(--bq-sp-4);
	max-width: 190px;
	color: var(--bq-primary);
}
.bq-rule__line {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--bq-primary-soft), var(--bq-primary));
}
.bq-rule__line:last-of-type { background: linear-gradient(270deg, transparent, var(--bq-primary-soft), var(--bq-primary)); }
.bq-rule__mark { opacity: .9; flex: none; }

/* ---------- العناوين اللاتينية الصغيرة ---------- */
.bq-eyebrow {
	display: inline-block;
	font-family: var(--bq-font-latin);
	font-style: italic;
	font-size: 1.05rem;
	letter-spacing: .16em;
	color: var(--bq-primary-deep);
	text-transform: lowercase;
	margin-bottom: var(--bq-sp-2);
	direction: ltr;
	unicode-bidi: isolate;
}

/* ---------- رأس القسم ---------- */
.bq-sechead { margin-bottom: var(--bq-sp-7); }
.bq-sechead--center { text-align: center; }
.bq-sechead--split {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--bq-sp-5);
	border-bottom: 1px solid var(--bq-line);
	padding-bottom: var(--bq-sp-4);
}
.bq-sechead__title { font-size: var(--bq-fs-2xl); margin: 0; }
.bq-sechead__sub { color: var(--bq-muted); margin: var(--bq-sp-2) 0 0; max-width: 56ch; }
.bq-sechead--center .bq-sechead__sub { margin-inline: auto; }
.bq-sechead__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--bq-fs-sm);
	color: var(--bq-primary-deep);
	white-space: nowrap;
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
	transition: border-color var(--bq-t-fast), gap var(--bq-t-fast);
}
.bq-sechead__link:hover { border-color: var(--bq-primary); gap: 12px; }

/* ---------- الأزرار ---------- */
.bq-btn {
	--btn-bg: var(--bq-wine);
	--btn-fg: #fff;
	--btn-bd: var(--bq-wine);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	background: var(--btn-bg);
	color: var(--btn-fg);
	border: 1px solid var(--btn-bd);
	border-radius: var(--bq-r-pill);
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-base);
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	overflow: hidden;
	transition: color var(--bq-t-fast), border-color var(--bq-t-fast), transform var(--bq-t-fast);
}
.bq-btn::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--bq-primary-deep), var(--bq-primary), var(--bq-primary-soft));
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 420ms var(--bq-ease-out);
	z-index: 0;
}
.bq-btn > * { position: relative; z-index: 1; }
.bq-btn:hover::after { transform: scaleX(1); }
.bq-btn:hover { color: #fff; border-color: var(--bq-primary); }
.bq-btn:active { transform: translateY(1px); }

.bq-btn--outline { --btn-bg: transparent; --btn-fg: var(--bq-text); --btn-bd: var(--bq-line); }
.bq-btn--outline:hover { color: #fff; }
.bq-btn--ghost { --btn-bg: rgba(255,255,255,.1); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.bq-btn--gold { --btn-bg: var(--bq-primary); --btn-fg: #2a2118; --btn-bd: var(--bq-primary); }
.bq-btn--wa { --btn-bg: #1f8f5f; --btn-fg: #fff; --btn-bd: #1f8f5f; }
.bq-btn--sm { min-height: 40px; padding: 9px 18px; font-size: var(--bq-fs-sm); }
.bq-btn--block { width: 100%; }
.bq-btn[disabled], .bq-btn.disabled { opacity: .45; pointer-events: none; }

.bq-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--bq-primary-deep);
	border-bottom: 1px solid var(--bq-primary-soft);
	padding-bottom: 2px;
	transition: gap var(--bq-t-fast), border-color var(--bq-t-fast);
}
.bq-link:hover { gap: 12px; border-color: var(--bq-primary); }

.bq-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: var(--bq-text);
	transition: background var(--bq-t-fast), color var(--bq-t-fast);
}
.bq-iconbtn:hover { background: var(--bq-primary-pale); color: var(--bq-primary-deep); }

.bq-rotate { transform: scaleX(-1); }

/* ---------- الشبكة ---------- */
.bq-grid { display: grid; gap: clamp(14px, 2vw, 28px); }
.bq-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bq-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bq-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- الحقول ---------- */
input[type=text], input[type=email], input[type=tel], input[type=search],
input[type=number], input[type=password], select, textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	background: var(--bq-surface);
	border: 1px solid var(--bq-line);
	border-radius: var(--bq-r);
	color: var(--bq-text);
	font-family: inherit;
	font-size: var(--bq-fs-base);
	transition: border-color var(--bq-t-fast), box-shadow var(--bq-t-fast);
}
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--bq-primary);
	box-shadow: 0 0 0 3px var(--bq-primary-pale);
}
textarea { min-height: 110px; resize: vertical; }
label { font-size: var(--bq-fs-sm); font-weight: 500; }

/* ---------- فتات الخبز ---------- */
.bq-crumbs {
	font-size: var(--bq-fs-sm);
	color: var(--bq-muted);
	padding-block: var(--bq-sp-3);
	border-bottom: 1px solid var(--bq-line);
}
.bq-crumbs a { transition: color var(--bq-t-fast); }
.bq-crumbs a:hover { color: var(--bq-primary-deep); }
.bq-crumb__sep { margin-inline: 8px; color: var(--bq-primary-soft); }

/* ---------- رأس الصفحة ---------- */
.bq-pagehead {
	text-align: center;
	padding-block: clamp(36px, 5vw, 68px) clamp(24px, 3vw, 40px);
	background: linear-gradient(180deg, var(--bq-primary-pale) 0%, transparent 100%);
}
.bq-pagehead__title { font-size: var(--bq-fs-2xl); margin: 0; }
.bq-pagehead__sub { color: var(--bq-muted); max-width: 62ch; margin-inline: auto; }

/* ---------- النصوص الطويلة ---------- */
.bq-prose { max-width: 78ch; margin-inline: auto; }
.bq-prose h2 { font-size: var(--bq-fs-xl); margin-top: var(--bq-sp-7); }
.bq-prose h3 { font-size: var(--bq-fs-lg); margin-top: var(--bq-sp-6); }
.bq-prose ul { list-style: none; margin: 0 0 var(--bq-sp-4); }
.bq-prose ul li { position: relative; padding-inline-start: 22px; margin-bottom: 8px; }
.bq-prose ul li::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	top: 12px;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--bq-primary);
}
.bq-prose table, .bq-table-wrap table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--bq-fs-sm);
}
.bq-prose th, .bq-prose td,
.bq-table-wrap th, .bq-table-wrap td {
	border: 1px solid var(--bq-line);
	padding: 10px 14px;
	text-align: start;
}
.bq-prose thead th, .bq-table-wrap thead th {
	background: var(--bq-primary-pale);
	font-family: var(--bq-font-head);
	font-weight: 500;
}
.bq-table-wrap { overflow-x: auto; }

/* ---------- النجوم ---------- */
.bq-stars { display: inline-flex; gap: 2px; color: var(--bq-line); }
.bq-star.is-on { color: var(--bq-primary); }
.bq-star svg { fill: currentColor; stroke-width: 0; }

/* ---------- حالات فارغة ---------- */
.bq-empty {
	text-align: center;
	max-width: 480px;
	margin-inline: auto;
	padding-block: var(--bq-sp-8);
	color: var(--bq-muted);
}
.bq-empty svg { margin-inline: auto; color: var(--bq-primary-soft); margin-bottom: var(--bq-sp-4); }
.bq-empty h1, .bq-empty h2 { color: var(--bq-text); font-size: var(--bq-fs-xl); }
.bq-empty .bq-btn { margin-top: var(--bq-sp-4); }

/* ---------- تنبيه المحتوى التجريبي ---------- */
.bq-demo-note {
	background: var(--bq-primary-pale);
	border: 1px dashed var(--bq-primary);
	color: var(--bq-primary-deep);
	font-size: var(--bq-fs-sm);
	padding: 10px 16px;
	border-radius: var(--bq-r);
	margin-bottom: var(--bq-sp-5);
	text-align: center;
}

/* ---------- الإشعار العائم ---------- */
.bq-toast {
	position: fixed;
	inset-block-end: 24px;
	inset-inline-start: 50%;
	transform: translateX(-50%) translateY(20px);
	z-index: var(--bq-z-toast);
	background: var(--bq-text);
	color: #fff;
	padding: 12px 24px;
	border-radius: var(--bq-r-pill);
	font-size: var(--bq-fs-sm);
	box-shadow: var(--bq-shadow-lg);
	opacity: 0;
	transition: opacity var(--bq-t), transform var(--bq-t);
	pointer-events: none;
	max-width: calc(100vw - 32px);
	text-align: center;
}
.bq-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
html[dir=rtl] .bq-toast { transform: translateX(50%) translateY(20px); }
html[dir=rtl] .bq-toast.is-visible { transform: translateX(50%) translateY(0); }

/* ---------- النوافذ المنبثقة ---------- */
.bq-modal { position: fixed; inset: 0; z-index: var(--bq-z-modal); display: flex; align-items: center; justify-content: center; padding: var(--bq-sp-4); }
.bq-modal[hidden] { display: none; }
.bq-modal__backdrop { position: absolute; inset: 0; background: rgba(36, 30, 34, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity var(--bq-t); }
.bq-modal.is-open .bq-modal__backdrop { opacity: 1; }
.bq-modal__box {
	position: relative;
	background: var(--bq-surface);
	border-radius: var(--bq-r-lg);
	max-width: 560px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	padding: var(--bq-sp-6);
	box-shadow: var(--bq-shadow-lg);
	transform: scale(.96);
	opacity: 0;
	transition: transform 300ms var(--bq-ease-out), opacity 240ms;
}
.bq-modal.is-open .bq-modal__box { transform: scale(1); opacity: 1; }
.bq-modal__box--wide { max-width: 900px; }
.bq-modal__close {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	width: 40px; height: 40px;
	display: grid; place-items: center;
	background: var(--bq-beige);
	border: 0; border-radius: 50%;
	cursor: pointer;
	transition: background var(--bq-t-fast);
}
.bq-modal__close:hover { background: var(--bq-primary-pale); }
.bq-modal__title { font-size: var(--bq-fs-lg); padding-inline-end: 48px; }

/* ---------- الأدراج الجانبية ---------- */
.bq-drawer { position: fixed; inset: 0; z-index: var(--bq-z-drawer); }
.bq-drawer[hidden] { display: none; }
.bq-drawer__backdrop { position: absolute; inset: 0; background: rgba(36, 30, 34, .5); opacity: 0; transition: opacity var(--bq-t); }
.bq-drawer.is-open .bq-drawer__backdrop { opacity: 1; }
.bq-drawer__panel {
	position: absolute;
	inset-block: 0;
	width: min(400px, 88vw);
	background: var(--bq-surface);
	display: flex;
	flex-direction: column;
	box-shadow: var(--bq-shadow-lg);
	transition: transform 380ms var(--bq-ease-out);
}
.bq-drawer--start .bq-drawer__panel { inset-inline-start: 0; transform: translateX(var(--bq-drawer-off, 100%)); }
.bq-drawer--end .bq-drawer__panel { inset-inline-end: 0; transform: translateX(var(--bq-drawer-off-e, -100%)); }
html[dir=rtl] .bq-drawer--start .bq-drawer__panel { transform: translateX(100%); }
html[dir=rtl] .bq-drawer--end .bq-drawer__panel { transform: translateX(-100%); }
html:not([dir=rtl]) .bq-drawer--start .bq-drawer__panel { transform: translateX(-100%); }
html:not([dir=rtl]) .bq-drawer--end .bq-drawer__panel { transform: translateX(100%); }
.bq-drawer.is-open .bq-drawer__panel { transform: translateX(0) !important; }

.bq-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bq-sp-3);
	padding: var(--bq-sp-4) var(--bq-sp-5);
	border-bottom: 1px solid var(--bq-line);
}
.bq-drawer__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-md);
	font-weight: 500;
}

/* ---------- ترقيم الصفحات ---------- */
.woocommerce-pagination ul, .bq-pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: var(--bq-sp-7);
	flex-wrap: wrap;
}
.woocommerce-pagination li { list-style: none; }
.woocommerce-pagination a, .woocommerce-pagination span,
.bq-pagination a, .bq-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding-inline: 10px;
	border: 1px solid var(--bq-line);
	border-radius: 50%;
	font-size: var(--bq-fs-sm);
	transition: all var(--bq-t-fast);
}
.woocommerce-pagination .current, .bq-pagination .current {
	background: var(--bq-wine);
	border-color: var(--bq-wine);
	color: #fff;
}
.woocommerce-pagination a:hover, .bq-pagination a:hover {
	border-color: var(--bq-primary);
	color: var(--bq-primary-deep);
}

/* ---------- البحث ---------- */
.bq-search { position: relative; display: flex; align-items: center; gap: 8px; }
.bq-search__icon {
	position: absolute;
	inset-inline-start: 14px;
	color: var(--bq-muted);
	pointer-events: none;
	display: flex;
}
.bq-search__input { padding-inline-start: 46px; }
.bq-search__submit {
	flex: none;
	min-height: 48px;
	padding-inline: 22px;
	background: var(--bq-wine);
	color: #fff;
	border: 0;
	border-radius: var(--bq-r);
	cursor: pointer;
	transition: background var(--bq-t-fast);
}
.bq-search__submit:hover { background: var(--bq-primary-deep); }
