/* ===========================================================
   استایل‌های بهینه‌شده - رفع تداخل گرید استایل اصلی قالب
   =========================================================== */

.single-product #bazar-single-product.product {
	display: block !important; 
}

#bazar-single-product {
	--sp-accent: var(--carton-orange);
	--sp-accent-dark: var(--carton-orange-hover);
	--sp-ink: #1e2430;
	--sp-muted: #6b7280;
	--sp-border: #e7e9ee;
	--sp-bg-soft: #f7f8fa;
	--sp-success: #1a9d5c;
	--sp-danger: #e2493a;
	--sp-radius: 16px;
	
	direction: rtl !important;
	width: 100% !important;
	max-width: 1280px !important;
	margin: 0 auto 40px !important;
	padding: 20px 15px 40px !important;
	color: var(--sp-ink) !important;
	font-family: inherit;
	box-sizing: border-box !important;
	overflow: hidden !important; 
}

#bazar-single-product * { 
	box-sizing: border-box !important; 
	max-width: 100%; 
}

/* ---- چیدمان اصلی ---- */
#bazar-single-product .bk-layout {
	display: flex !important;
	flex-direction: row !important;
	gap: 40px !important;
	align-items: flex-start !important;
	width: 100% !important;
}

#bazar-single-product .bk-gallery-col {
	width: 45% !important;
	position: sticky !important;
	top: 25px !important;
}

#bazar-single-product .bk-summary-col {
	width: 55% !important;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (max-width: 991px) {
	#bazar-single-product { padding: 10px 10px 30px !important; }
	#bazar-single-product .bk-layout {
		flex-direction: column !important;
		gap: 25px !important;
	}
	#bazar-single-product .bk-gallery-col,
	#bazar-single-product .bk-summary-col {
		width: 100% !important;
		position: relative !important;
		top: 0 !important;
	}
	
	#bazar-single-product form.cart {
		flex-direction: column !important;
		gap: 15px !important;
	}
	#bazar-single-product form.cart .quantity,
	#bazar-single-product form.cart .qty-stepper,
	#bazar-single-product form.cart button.single_add_to_cart_button {
		width: 100% !important;
		flex: none !important;
	}
}

/* ---- گالری عکس ---- */
.bk-custom-gallery {
	background: #fff; border: 1px solid var(--sp-border); border-radius: var(--sp-radius);
	position: relative; overflow: hidden; width: 100% !important;
}
.bk-sale-badge {
	position: absolute; top: 15px; right: 15px; z-index: 10;
	background: var(--sp-danger); color: #fff; font-size: 13px; font-weight: 700;
	padding: 5px 14px; border-radius: 99px; box-shadow: 0 4px 10px rgba(226,73,58,0.25);
}
.bk-main-img-wrap {
	width: 100% !important; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--sp-border);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bk-main-img-wrap img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
.bk-thumbs-wrap {
	display: flex !important; flex-direction: row !important; gap: 12px !important;
	padding: 15px !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch;
	scrollbar-width: none; background: #fff; width: 100% !important;
}
.bk-thumbs-wrap::-webkit-scrollbar { display: none; }
.bk-thumbs-wrap img {
	width: 70px !important; height: 70px !important; flex-shrink: 0 !important;
	object-fit: cover !important; border-radius: 10px !important; cursor: pointer;
	opacity: 0.5; border: 2px solid transparent; transition: all 0.3s ease;
}
.bk-thumbs-wrap img.bk-active-thumb, .bk-thumbs-wrap img:hover { opacity: 1; border-color: var(--sp-accent); }
.bk-thumbs-wrap img:focus-visible { opacity: 1; outline: 2px solid var(--sp-accent); outline-offset: 2px; }
.bk-thumbs-wrap[hidden] { display: none !important; }
#bk-main-view { transition: opacity .2s ease; }
#bk-main-view.bk-swapping { opacity: .35; }

/* ---- ستون اطلاعات محصول ---- */
#bazar-single-product .sp-title { font-size: 24px; font-weight: 800; line-height: 1.6; margin: 0; overflow-wrap: break-word; word-break: break-word; }
#bazar-single-product .sp-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#bazar-single-product .sp-price { font-size: 26px; font-weight: 800; color: var(--sp-accent-dark); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
#bazar-single-product .sp-price del { font-size: 16px; font-weight: 500; color: var(--sp-muted); opacity: 0.7; }
#bazar-single-product .sp-price ins { text-decoration: none; }

/* توضیحات کوتاه محصول - طراحی پاکت نامه */
#bazar-single-product .sp-short-description {
	font-size: 14.5px; color: #000000 !important; background-color: #ffffff !important;
	line-height: 1.8; margin-bottom: 20px; padding: 24px 20px 20px 20px; text-align: justify;
	border: 1px solid var(--sp-border); border-radius: 12px; position: relative;
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04); overflow: hidden;
}
#bazar-single-product .sp-short-description p { margin: 0 0 10px; }
#bazar-single-product .sp-short-description p:last-child { margin-bottom: 0; }
#bazar-single-product .sp-short-description::before {
	content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
	background: repeating-linear-gradient( -45deg, var(--sp-accent) 0, var(--sp-accent) 15px, #ffffff 15px, #ffffff 30px, var(--sp-ink) 30px, var(--sp-ink) 45px, #ffffff 45px, #ffffff 60px );
}

/* =========================================================
   دکمه افزودن به سبد و تعداد - وسط‌چین و تپنده
   ========================================================= */
#bazar-single-product form.cart { 
	display: flex !important; justify-content: center !important; align-items: stretch !important; gap: 15px !important; margin-top: 15px; 
}
#bazar-single-product form.cart .qty-stepper {
	height: 54px !important; border: 2px solid var(--sp-border) !important; border-radius: 12px !important;
	background: #fff !important; flex-shrink: 0 !important;
}
#bazar-single-product form.cart .qty-stepper .qty-btn { width: 40px !important; height: 100% !important; color: var(--sp-ink) !important; }
#bazar-single-product form.cart .qty-stepper .qty-btn:hover { background: var(--sp-accent) !important; color: #fff !important; }
#bazar-single-product form.cart .quantity input.qty {
	width: 50px !important; height: 100% !important; text-align: center;
	border: none !important; font-size: 16px !important; font-weight: 700 !important; background: transparent !important;
}
#bazar-single-product form.cart button.single_add_to_cart_button {
	flex: 1 !important; display: flex !important; justify-content: center !important; align-items: center !important;
	background: var(--sp-accent) !important; color: #fff !important; border: none !important;
	border-radius: 12px !important; font-size: 16px !important; font-weight: 800 !important;
	height: 54px !important; cursor: pointer; transition: background-color 0.3s ease;
	animation: sp-pulse 2s infinite; 
}
#bazar-single-product form.cart button.single_add_to_cart_button:hover { 
	background: var(--sp-accent-dark) !important; animation: none; 
}

/* انیمیشن‌ها */
@keyframes sp-pulse {
	0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242, 121, 15, 0.7); }
	50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(242, 121, 15, 0); }
	100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242, 121, 15, 0); }
}
@keyframes sp-spin { 100% { transform: rotate(360deg); } }

/* آیکون‌های اعتمادسازی */
#bazar-single-product .sp-trust-row { 
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; 
	background: var(--sp-bg-soft); border-radius: 14px; padding: 20px 10px; 
}
#bazar-single-product .sp-trust-item { 
	display: flex; flex-direction: column; align-items: center; gap: 8px; 
	text-align: center; font-size: 12px; font-weight: 600; color: var(--sp-ink); 
}
#bazar-single-product .sp-trust-item svg { color: var(--sp-accent); width: 26px; height: 26px; }

/* تب‌ها */
#bazar-single-product .sp-tabs-wrap { 
	margin-top: 50px; background: #fff; border: 1px solid var(--sp-border); 
	border-radius: var(--sp-radius); padding: 25px; width: 100% !important; overflow-x: auto; 
}
#bazar-single-product .sp-tabs-wrap img { max-width: 100% !important; height: auto !important; }
