/*
Theme Name: Storefront Child
Template: storefront
Version: 1.0.0
Text Domain: storefront-child
*/

body, button, input, textarea {
	font-family: "IBM Plex Sans Arabic", sans-serif !important;
}

.home .col-full {
	max-width: 100%;
	margin-right: 0;
	margin-left: 0;
	padding: 0;
}


/* =========================================================
WooCommerce Product Card
========================================================= */

/* ---------- 1) GRID ---------- */
.woocommerce ul.products{
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 18px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after{
	content: none !important;
}

.woocommerce ul.products li.product{
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	clear: none !important;
}

@media (max-width: 1024px){
	.woocommerce ul.products{
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 767px){
	.woocommerce ul.products{
		grid-template-columns: 1fr !important;
	}
}

/* ---------- 2) CARD ---------- */
.woocommerce ul.products li.product {
	position: relative;
	overflow: visible;
	background: #fff;
	border-radius: 26px;
	box-shadow: 0 10px 30px rgba(0,0,0,.08);
	padding: 16px 16px 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	transition: transform .2s ease, box-shadow .2s ease;
	margin-top: 50px !important;
}

.woocommerce ul.products li.product:hover{
	transform: translateY(-3px);
	box-shadow: 0 18px 36px rgba(0,0,0,.12);
}

/* ---------- 3) LINKS ---------- */
.woocommerce ul.products li.product a{
	text-decoration: none;
	color: inherit;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 60px;
}

/* ---------- 4) FLOATING IMAGE ---------- */
.woocommerce ul.products li.product a img{
	position: absolute;
	top: -65px;
	height: 190px;
	object-fit: contain;
	margin: 0;
	z-index: 2;
	max-width: 100%;
}

/* ---------- 5) SALE BADGE ---------- */
.woocommerce ul.products li.product .onsale{
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 8px 12px;
	background: #901615;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	border-radius: 999px;
	z-index: 3;
	border: 0;
}

/* ---------- 6) WISHLIST HEART (RTL SAFE) ---------- */
.woocommerce ul.products li.product 
.yith-wcwl-add-to-wishlist,
.woocommerce ul.products li.product 
.yith-wcwl-add-to-wishlist-button {
	position: absolute !important;
	top: 0;
	right: 0 !important;
	left: auto !important;
	/* inset-inline-end: 12px !important; */
	/* inset-inline-start: auto !important; */
	width: 38px;
	height: 38px;
	background: #F5F5F5 !important;
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
	display: flex !important;
	align-items: center;
	justify-content: center;
	z-index: 3;
	padding: 0 !important;
	border: 0;
	text-indent: -9999px;
	border-radius: 50% !important;
}

.woocommerce ul.products li.product 
.tinvwl_add_to_wishlist_button:before,
.woocommerce ul.products li.product 
.yith-wcwl-add-to-wishlist a:before,
.woocommerce ul.products li.product 
.woosw-btn:before{
	content: "♡";
	font-size: 18px;
	color: #9C9C9C !important;
	text-indent: 0;
	position: absolute;
}

.yith-wcwl-add-to-wishlist-button:not(.yith-wcwl-add-to-wishlist-button--themed-button).yith-wcwl-add-to-wishlist-button--added svg.yith-wcwl-add-to-wishlist-button-icon {
	color: #9C9C9C;
}

.yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button--icon-button:is(button) svg.yith-wcwl-add-to-wishlist-button-icon {
	width: 25px;
	height: 25px;
}

/* ---------- 7) TITLE ---------- */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 18px;
	font-weight: 900;
	margin: 80px 0 4px;
	color: #2B3746;
}

/* ---------- 8) SHORT DESC ---------- */
.woocommerce ul.products li.product .tl-short-desc{
	font-size: 13px;
	color: rgba(43,55,70,.75);
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- 9) RATING ---------- */
.woocommerce ul.products li.product .star-rating{
	margin: 6px auto 10px !important;
	float: none !important;
}

.woocommerce ul.products li.product .star-rating span:before{
	color: #E8C999;
}

/* ---------- 10) PRICE ---------- */
.woocommerce ul.products li.product .price{
	font-size: 18px;
	font-weight: 900;
	color: #2B3746;
}

.woocommerce ul.products li.product .price del{
	opacity: .45;
	margin-inline-end: 8px;
}

.woocommerce ul.products li.product .price ins{
	text-decoration: none;
}

/* ---------- 11) ADD TO CART ---------- */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button{
	margin-top: auto !important;
	width: calc(100% + 32px);
	margin-inline: -16px;
	height: 56px;
	background: #901615 !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 900;
	border-radius: 20px 0 20px 20px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	border: 0 !important;
}

.woocommerce ul.products li.product .button:hover{
	filter: brightness(.95);
}

/* ---------- 12) MOBILE ---------- */
@media (max-width: 767px){
	.woocommerce ul.products li.product{
		border-radius: 22px;
	}

	.woocommerce ul.products li.product a img{
		height: 160px;
		top: -55px;
	}
}



/* =========================================================
RESET CATEGORY CARD (Fix Conflict)
========================================================= */

/* إلغاء تصميم كرت المنتج عن التصنيفات */
.woocommerce ul.products li.product-category {
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin-top: 0 !important;
	background: transparent !important;
	display: block !important;
}

/* إلغاء الصورة العائمة */
.woocommerce ul.products li.product-category a img {
	position: relative !important;
	top: 0 !important;
	width: 100%;
	border-radius: 15px !important;
}

/* إلغاء padding الرابط */
.woocommerce ul.products li.product-category a.woocommerce-LoopProduct-link {
	padding-top: 0 !important;
}

/* إخفاء أي عناصر منتجات */
.woocommerce ul.products li.product-category .price,
.woocommerce ul.products li.product-category .button,
.woocommerce ul.products li.product-category .onsale,
.woocommerce ul.products li.product-category .star-rating {
	display: none !important;
}

/* اسم التصنيف */
.woocommerce ul.products li.product-category h2 {
	font-size: 16px;
	font-weight: 800;
	margin-top: 10px;
	text-align: center;
}

/* شبكة التصنيفات فقط */
.woocommerce ul.products:has(li.product-category) {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* =========================================================
EMPTY RATING – FINAL RELIABLE SOLUTION
========================================================= */

/* نجوم فارغة افتراضيًا قبل السعر */
.woocommerce ul.products li.product .price::before{
	content: "★★★★★";
	display: block;
	text-align: center;
	font-size: 16px;
	letter-spacing: 1px;
	color: #D6D6D6; /* لون النجوم الفارغة */
	margin: 6px auto 8px;
}

/* إذا كان المنتج لديه تقييم حقيقي → لا نعرض النجوم الوهمية */
.woocommerce ul.products li.product:has(.star-rating) .price::before{
	content: none;
}


/* تغيير لون الخلفية لزر المعاينة */
.button.yith-wcqv-button {
    position: absolute;
    bottom: 0;
    width: 25% !important;
    z-index: 999 !important;
    background-color: #F5F5F5 !important; /* تغيير اللون إلى الخلفية الفاتحة */
    color: #901615 !important; /* تغيير النص إلى اللون الأحمر */
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* إضافة رمز العين قبل النص باستخدام ::before */
.button.yith-wcqv-button::before {
    content: "👁";
    font-size: 36px;
    background-color: #e8c999;
    height: 56px;
    width: 100%;
    border-radius: 30px 0 15px;
    color: #393d36;
}

/* تغيير لون الخلفية عند المرور بالماوس (hover) */
.button.yith-wcqv-button:hover {
    background-color: #D5D5D5 !important; /* لون عند المرور بالماوس */
}


#yith-quick-view-content div.images img {
    height: auto !important;
}

#yith-quick-view-modal span.onsale {
    top: 50px;
    left: -10px;
    border: none;
}


/* إضافة الجملة "في حال نفاذ الكمية (اعطني خبر)" تحت السعر وفوق زر "اشتر" */
.woocommerce ul.products li.product .price {
    position: relative;
}

/* إضافة الجملة باستخدام ::after */
.woocommerce ul.products li.product .price::after {
    content: "في حال نفاذ الكمية (اعطني خبر)";
    display: block;
    margin-top: 10px;  /* المسافة بين السعر والجملة */
    font-size: 14px; /* حجم الخط */
    color: #901615; /* اللون الأحمر */
    font-weight: 600; /* جعل الخط عريض */
    text-align: center; /* محاذاة النص في المنتصف */
}
