/* ═══════════════════════════════════════════════
   SINGLE PRODUCT — يطابق ProductPage من ملفات التصميم
═══════════════════════════════════════════════ */

.abaya-sp-page {
	padding-bottom: 8rem; /* مساحة لشريط الإضافة الثابت */
}

/* ═══════════════════════════════════════════════
   معرض الصور
═══════════════════════════════════════════════ */
.abaya-sp-gallery__main {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #F5EFE6;
}
.abaya-sp-gallery__active-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.3s ease;
}

/* نقاط الصور */
.abaya-sp-gallery__dots {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.375rem;
}
.abaya-sp-gallery__dot {
	border-radius: 9999px;
	background: rgba(255,255,255,0.55);
	height: 0.5rem;
	width: 0.5rem;
	transition: width 0.3s, background 0.3s;
}
.abaya-sp-gallery__dot.is-active {
	width: 1.5rem;
	background: #fff;
}

/* أيقونات الأكشن */
.abaya-sp-gallery__actions {
	position: absolute;
	top: 1rem;
	left: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	z-index: 5;
}
.abaya-sp-action-btn {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: rgba(255,255,255,0.82);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 6px rgba(0,0,0,0.1);
	transition: background 0.2s, transform 0.2s;
}
.abaya-sp-action-btn:hover { transform: scale(1.08); background: #fff; }

/* شارة الخصم */
.abaya-sp-gallery__badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

/* المصغرات */
.abaya-sp-gallery__thumbs {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.abaya-sp-gallery__thumbs::-webkit-scrollbar { display: none; }

.abaya-sp-thumb {
	width: 4rem;
	height: 5rem;
	border-radius: 0.75rem;
	overflow: hidden;
	border: 2px solid transparent;
	flex-shrink: 0;
	cursor: pointer;
	transition: border-color 0.2s;
}
.abaya-sp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.abaya-sp-thumb.is-active { border-color: #C4A882; }
.abaya-sp-thumb:hover { border-color: rgba(196,168,130,0.5); }

/* ═══════════════════════════════════════════════
   معلومات المنتج
═══════════════════════════════════════════════ */
.abaya-sp-info {
	padding: 1.5rem 1rem 1rem;
}
@media (min-width: 768px) {
	.abaya-sp-page {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
		padding-bottom: 3rem;
	}
	.abaya-sp-gallery {
		position: sticky;
		top: 5rem;
		align-self: start;
	}
	.abaya-sp-info { padding: 0 0 2rem; }
}

/* التصنيف */
.abaya-sp-cat {
	font-size: 0.72rem;
	color: #C4A882;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
	text-transform: uppercase;
}

/* الاسم */
.abaya-sp-title {
	font-family: var(--abaya-font-display, 'Amiri', serif);
	font-size: 1.4rem;
	color: #1A1714;
	margin-bottom: 0.5rem;
	line-height: 1.35;
}

/* التقييم */
.abaya-sp-rating {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	margin-bottom: 1rem;
}
.abaya-sp-rating__stars { display: flex; gap: 0.1rem; }
.abaya-sp-rating__score {
	font-size: 0.75rem;
	color: #1A1714;
}
.abaya-sp-rating__cnt {
	font-size: 0.72rem;
	color: #9B9189;
}

/* السعر */
.abaya-sp-price {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}
.abaya-sp-price__current {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1A1714;
}
.abaya-sp-price__current .woocommerce-Price-currencySymbol,
.abaya-sp-price__current bdi { color: inherit; }
.abaya-sp-price__old {
	font-size: 0.9rem;
	color: #9B9189;
	text-decoration: line-through;
}
.abaya-sp-price__old bdi { color: inherit; }

/* الوصف */
.abaya-sp-desc {
	font-size: 0.82rem;
	line-height: 1.9;
	color: #1A1714;
	margin-bottom: 1.5rem;
}

/* القماش */
.abaya-sp-fabric {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background: #F5EFE6;
	border-radius: 1rem;
	padding: 1rem;
	margin-bottom: 1.5rem;
}
.abaya-sp-fabric__icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: rgba(196,168,130,0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	color: #C4A882;
	flex-shrink: 0;
}
.abaya-sp-fabric__label {
	font-size: 0.65rem;
	color: #9B9189;
}
.abaya-sp-fabric__value {
	font-size: 0.85rem;
	color: #1A1714;
}

/* الخصائص (مقاسات + ألوان) */
.abaya-sp-attr { margin-bottom: 1.5rem; }
.abaya-sp-attr__label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #1A1714;
	margin-bottom: 0.75rem;
}
.abaya-sp-attr__selected {
	font-weight: 400;
	color: #9B9189;
}
.abaya-sp-attr__selected.has-value { color: #1A1714; }

/* حالة الخطأ عند عدم الاختيار */
.abaya-sp-sizes--error ~ .abaya-sp-attr__label .abaya-sp-attr__selected,
.abaya-sp-colors--error ~ .abaya-sp-attr__label .abaya-sp-attr__selected { color: #B76E79; }

.abaya-sp-attr:has(.abaya-sp-sizes--error) .abaya-sp-attr__label { color: #B76E79; }
.abaya-sp-attr:has(.abaya-sp-colors--error) .abaya-sp-attr__label { color: #B76E79; }

/* المقاسات */
.abaya-sp-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.abaya-sp-size {
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
	background: #F5EFE6;
	color: #1A1714;
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
}
.abaya-sp-size:hover { background: #F0E8DF; }
.abaya-sp-size.is-active { background: #1A1714; color: #fff; }
.abaya-sp-size.has-error { background: #F5EFE6; border: 1px solid rgba(183,110,121,0.4); }
.abaya-sp-sizes--error .abaya-sp-size:not(.is-active) {
	border: 1px solid rgba(183,110,121,0.4);
	animation: abaya-shake 0.4s ease;
}
@keyframes abaya-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* الألوان */
.abaya-sp-colors {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	border-radius: 0.75rem;
	transition: outline 0.2s;
}
.abaya-sp-colors--error {
	outline: 2px solid rgba(183,110,121,0.6);
	outline-offset: 6px;
	animation: abaya-shake 0.4s ease;
}
.abaya-sp-color-swatch {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	border: 3px solid transparent;
	outline: 2px solid rgba(216,211,204,0.5);
	outline-offset: 1px;
	cursor: pointer;
	transition: outline-color 0.2s, transform 0.2s;
	background: #9B9189;
	padding: 0;
	overflow: hidden;
}
.abaya-sp-color-swatch:hover {
	outline-color: #C4A882;
	transform: scale(1.08);
}
.abaya-sp-color-swatch.is-active {
	outline-color: #C4A882;
	outline-width: 3px;
	transform: scale(1.12);
}

/* الكمية */
.abaya-sp-qty-row { margin-bottom: 1.5rem; }
.abaya-sp-qty {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	background: #F5EFE6;
	border-radius: 0.75rem;
	padding: 0.25rem 0.5rem;
}
.abaya-sp-qty__btn {
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1A1714;
	border-radius: 0.5rem;
	transition: background 0.2s;
}
.abaya-sp-qty__btn:hover { background: rgba(26,23,20,0.08); }
.abaya-sp-qty__input {
	width: 2.5rem;
	text-align: center;
	font-size: 0.95rem;
	color: #1A1714;
	background: transparent;
	border: none;
	outline: none;
	-moz-appearance: textfield;
	appearance: textfield;
}
.abaya-sp-qty__input::-webkit-outer-spin-button,
.abaya-sp-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* زر الإضافة إلى السلة */
.abaya-sp-atc {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 1rem;
	border-radius: 9999px;
	background: #1A1714;
	color: #fff;
	font-size: 0.88rem;
	margin-bottom: 1.5rem;
	transition: background 0.2s, transform 0.2s;
}
.abaya-sp-atc:hover { background: #2d2926; transform: scale(1.01); }
.abaya-sp-atc:active { transform: scale(0.98); }

/* Accordions */
.abaya-sp-accordion {
	border-top: 1px solid rgba(216,211,204,0.35);
}
.abaya-sp-accordion__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 1rem;
	font-size: 0.88rem;
	font-weight: 500;
	color: #1A1714;
}
.abaya-sp-accordion__icon {
	transition: transform 0.3s;
	flex-shrink: 0;
}
.abaya-sp-accordion__trigger[aria-expanded="true"] .abaya-sp-accordion__icon {
	transform: rotate(180deg);
}
.abaya-sp-accordion__body {
	overflow: hidden;
}
.abaya-sp-accordion__body[hidden] { display: none; }
.abaya-sp-accordion__content {
	padding-bottom: 1rem;
	font-size: 0.8rem;
	line-height: 1.8;
	color: #1A1714;
}
/* إخفاء القسم الافتراضي لـ WooCommerce داخل الـ accordion */
.abaya-sp-accordion__content #reviews { margin: 0; }
.abaya-sp-accordion__content .woocommerce-Reviews-title { font-size: 0.9rem; }
.abaya-sp-accordion__content .comment-form { display: none; }

/* منتجات ذات صلة */
.abaya-sp-related {
	padding-block: 2rem 3rem;
}

/* زر المشاركة */
.abaya-sp-share-btn { cursor: pointer; }

/* ═══════════════════════════════════════════════
   شريط ATC الثابت — يطابق Sticky Add to Cart في التصميم
═══════════════════════════════════════════════ */
.abaya-sp-sticky-atc {
	position: fixed;
	bottom: 68px; /* فوق شريط التنقل السفلي */
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 480px;
	background: rgba(250,247,244,0.98);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-top: 1px solid rgba(196,168,130,0.18);
	padding: 0.75rem 1.25rem;
	z-index: 40;
}
.abaya-sp-sticky-atc__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.abaya-sp-sticky-atc__price-wrap {
	flex: 1;
}
.abaya-sp-sticky-atc__label {
	font-size: 0.65rem;
	color: #9B9189;
	margin: 0 0 0.1rem;
}
.abaya-sp-sticky-atc__total {
	font-size: 1.15rem;
	font-weight: 600;
	color: #1A1714;
	margin: 0;
}
.abaya-sp-sticky-atc__total .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }
.abaya-sp-sticky-atc__total .woocommerce-Price-currencySymbol { display: none; } /* نعرض ر.س يدوياً */
.abaya-sp-sticky-atc__btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1rem;
	border-radius: 9999px;
	background: #1A1714;
	color: #fff;
	font-size: 0.88rem;
	transition: background 0.35s ease, transform 0.15s;
}
.abaya-sp-sticky-atc__btn:hover:not(.abaya-sp-sticky-atc__btn--added) { background: #2d2926; }
.abaya-sp-sticky-atc__btn:active { transform: scale(0.97); }

/* حالة النجاح — أخضر التصميم */
.abaya-sp-sticky-atc__btn--added {
	background: #5A8A6A;
	pointer-events: none;
}
/* حالة الخطأ */
.abaya-sp-sticky-atc__btn--error {
	background: #B76E79;
	pointer-events: none;
}
@keyframes abaya-btn-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.06); }
	100% { transform: scale(1); }
}
.abaya-sp-sticky-atc__btn--added {
	animation: abaya-btn-pop 0.3s ease forwards;
}

/* إخفاء الزر المضمّن والاعتماد على الشريط الثابت */
.abaya-sp-atc--inline {
	display: none;
}

/* تعديل الحاوية للجوال — الصورة تمتد للعرض الكامل */
@media (max-width: 767px) {
	.abaya-sp-page.abaya-container {
		padding-inline: 0;
	}
	.abaya-sp-gallery__main { border-radius: 0; }
	.abaya-sp-info { padding-inline: 1rem; }
}

/* على الشاشات الكبيرة: إظهار الزر المضمّن وإخفاء الشريط الثابت */
@media (min-width: 768px) {
	.abaya-sp-sticky-atc { display: none; }
	.abaya-sp-atc--inline { display: flex; }
}
