/* =========================================================
   صفحة المنتج المفرد
   ========================================================= */

.bq-product__top {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: clamp(24px, 4vw, 64px);
	align-items: start;
	padding-block: var(--bq-section) var(--bq-sp-7);
}

/* ---------- المعرض ---------- */
.bq-product__media { position: relative; }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { border-radius: var(--bq-r-lg); overflow: hidden; }
.woocommerce-product-gallery__image img { width: 100%; border-radius: var(--bq-r-lg); }
.woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: var(--bq-sp-3) 0 0;
	padding: 0;
	list-style: none;
}
.woocommerce-product-gallery .flex-control-thumbs li { width: 84px; }
.woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: var(--bq-r);
	border: 1px solid transparent;
	cursor: pointer;
	opacity: .65;
	aspect-ratio: 3/4;
	object-fit: cover;
	transition: opacity var(--bq-t-fast), border-color var(--bq-t-fast);
}
.woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--bq-primary); }
.woocommerce-product-gallery__trigger {
	position: absolute;
	inset-block-start: 14px;
	inset-inline-end: 14px;
	z-index: 4;
	width: 44px; height: 44px;
	display: grid;
	place-items: center;
	background: rgba(255,255,255,.92);
	border-radius: 50%;
	box-shadow: var(--bq-shadow-sm);
	font-size: 0;
}
.woocommerce-product-gallery__trigger::after {
	content: '⤢';
	font-size: 18px;
	color: var(--bq-text);
}

/* ---------- الملخّص ---------- */
.bq-product__summary { position: sticky; top: calc(var(--bq-header-h) + 20px); }
.bq-product__summary .product_title {
	font-size: var(--bq-fs-2xl);
	font-weight: 400;
	line-height: 1.25;
	margin-bottom: var(--bq-sp-2);
}
.bq-product__summary .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--bq-sp-3);
	font-size: var(--bq-fs-sm);
}
.bq-product__summary .woocommerce-review-link { color: var(--bq-muted); }

.bq-product__summary .price {
	display: flex;
	align-items: baseline;
	gap: 12px;
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-xl);
	color: var(--bq-text);
	margin: 0 0 var(--bq-sp-4);
	padding-bottom: var(--bq-sp-4);
	border-bottom: 1px solid var(--bq-line);
}
.bq-product__summary .price del { font-size: var(--bq-fs-md); color: var(--bq-muted); opacity: .75; font-weight: 300; }
.bq-product__summary .price ins { text-decoration: none; color: var(--bq-sale); }

.woocommerce-product-details__short-description {
	color: var(--bq-muted);
	font-size: var(--bq-fs-base);
	margin-bottom: var(--bq-sp-5);
}

/* ---------- خيارات المنتج المتغيّر ---------- */
.variations { width: 100%; border-collapse: collapse; margin-bottom: var(--bq-sp-4); }
.variations tr { display: block; margin-bottom: var(--bq-sp-4); }
.variations th, .variations td { display: block; text-align: start; padding: 0; }
.variations th.label {
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-sm);
	font-weight: 500;
	margin-bottom: 8px;
}
.variations select { min-height: 50px; }
.reset_variations {
	display: inline-block;
	margin-top: 10px;
	font-size: var(--bq-fs-xs);
	color: var(--bq-sale);
}

.bq-sizeguide-open {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: var(--bq-sp-3);
	padding: 0 0 3px;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--bq-primary-soft);
	font-size: var(--bq-fs-sm);
	color: var(--bq-primary-deep);
	cursor: pointer;
	transition: border-color var(--bq-t-fast);
}
.bq-sizeguide-open:hover { border-color: var(--bq-primary); }

.woocommerce-variation-price { margin-bottom: var(--bq-sp-3); font-family: var(--bq-font-head); font-size: var(--bq-fs-lg); }
.woocommerce-variation-availability { font-size: var(--bq-fs-sm); color: var(--bq-ok); margin-bottom: var(--bq-sp-2); }

/* ---------- الأزرار ---------- */
.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: var(--bq-sp-4);
}
.single_add_to_cart_button {
	flex: 1;
	min-width: 200px;
	min-height: 52px;
	padding: 14px 30px;
	background: var(--bq-wine);
	color: #fff;
	border: 1px solid var(--bq-wine);
	border-radius: var(--bq-r-pill);
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-base);
	font-weight: 500;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition: background 320ms var(--bq-ease), border-color var(--bq-t-fast), transform var(--bq-t-fast);
}
.single_add_to_cart_button:hover {
	background: linear-gradient(90deg, var(--bq-primary-deep), var(--bq-primary));
	border-color: var(--bq-primary);
}
.single_add_to_cart_button:active { transform: translateY(1px); }
.single_add_to_cart_button.disabled,
.single_add_to_cart_button[disabled] {
	background: var(--bq-line);
	border-color: var(--bq-line);
	color: var(--bq-muted);
	cursor: not-allowed;
}
.woocommerce-variation-add-to-cart-disabled .single_add_to_cart_button::after {
	content: '';
}
.bq-btn--wa { flex-basis: 100%; }

/* ---------- ملاحظات المنتج ---------- */
.bq-pnotes {
	display: grid;
	gap: 12px;
	margin: var(--bq-sp-5) 0;
	padding: var(--bq-sp-4);
	background: var(--bq-rose-soft);
	border-radius: var(--bq-r-lg);
}
.bq-pnotes li {
	display: flex;
	gap: 11px;
	align-items: flex-start;
	font-size: var(--bq-fs-sm);
	color: var(--bq-text);
	line-height: 1.65;
}
.bq-pnotes svg { flex: none; color: var(--bq-wine); margin-top: 2px; }

.product_meta {
	font-size: var(--bq-fs-sm);
	color: var(--bq-muted);
	padding-top: var(--bq-sp-4);
	border-top: 1px solid var(--bq-line);
}
.product_meta > span { display: block; margin-bottom: 5px; }
.product_meta a { color: var(--bq-primary-deep); }

/* ---------- التبويبات ---------- */
.woocommerce-tabs { padding-block: var(--bq-sp-7); border-top: 1px solid var(--bq-line); }
.wc-tabs {
	display: flex;
	gap: var(--bq-sp-5);
	flex-wrap: wrap;
	justify-content: center;
	border-bottom: 1px solid var(--bq-line);
	margin-bottom: var(--bq-sp-6);
}
.wc-tabs li a {
	display: block;
	padding: 14px 4px;
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-base);
	color: var(--bq-muted);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color var(--bq-t-fast), border-color var(--bq-t-fast);
}
.wc-tabs li.active a, .wc-tabs li a:hover { color: var(--bq-text); border-color: var(--bq-primary); }
.woocommerce-Tabs-panel { max-width: 82ch; margin-inline: auto; animation: bq-fade 380ms var(--bq-ease-out); }
@keyframes bq-fade { from { opacity: 0; } to { opacity: 1; } }
.woocommerce-Tabs-panel h2 { font-size: var(--bq-fs-lg); }
.shop_attributes { width: 100%; border-collapse: collapse; }
.shop_attributes th, .shop_attributes td { border: 1px solid var(--bq-line); padding: 10px 14px; text-align: start; font-size: var(--bq-fs-sm); }
.shop_attributes th { background: var(--bq-beige); font-weight: 500; width: 34%; }

/* المراجعات */
.woocommerce-Reviews .comment_container { display: flex; gap: 14px; padding: var(--bq-sp-4) 0; border-bottom: 1px solid var(--bq-line); }
.woocommerce-Reviews .avatar { border-radius: 50%; width: 48px; height: 48px; }
.woocommerce-Reviews .comment-text { flex: 1; }
.woocommerce-Reviews .meta { font-size: var(--bq-fs-sm); color: var(--bq-muted); }
.comment-form { display: grid; gap: var(--bq-sp-3); max-width: 640px; }
.comment-form .stars { display: flex; gap: 4px; }

/* منتجات ذات صلة */
.related > h2, .up-sells > h2 {
	font-size: var(--bq-fs-xl);
	text-align: center;
	margin-bottom: var(--bq-sp-6);
}
.related, .up-sells { padding-block: var(--bq-sp-7); border-top: 1px solid var(--bq-line); }
.related ul.products, .up-sells ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(14px, 2vw, 26px);
	list-style: none;
	padding: 0;
	margin: 0;
}

/* ---------- شريط الشراء الثابت ---------- */
.bq-stickybar {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 250;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bq-sp-3);
	padding: 10px var(--bq-gutter);
	background: rgba(255,255,255,.97);
	backdrop-filter: blur(10px);
	border-top: 1px solid var(--bq-line);
	box-shadow: 0 -6px 24px rgba(36,30,34,.09);
	transform: translateY(100%);
	transition: transform 360ms var(--bq-ease-out);
	padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.bq-stickybar[hidden] { display: flex; }
.bq-stickybar.is-visible { transform: translateY(0); }
.bq-stickybar__info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bq-stickybar__img { width: 46px; height: 58px; object-fit: cover; border-radius: var(--bq-r-sm); flex: none; }
.bq-stickybar__name {
	display: block;
	font-family: var(--bq-font-head);
	font-size: var(--bq-fs-sm);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 42vw;
}
.bq-stickybar__price { font-size: var(--bq-fs-sm); color: var(--bq-primary-deep); }
.bq-stickybar__price del { display: none; }
