/**
 * Single product page — layout & typography (zarnegar-style)
 */

/* Full-width product container — reset WooCommerce floats */
.single-product-page .woocommerce div.product.bg-single-product-wrap,
.single-product-page .bg-single-product-wrap {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	clear: both;
}

.single-product-page .woocommerce div.product div.summary {
	float: none !important;
	clear: none !important;
}

/* Typography */
.single-product-page .woocommerce-product-details__short-description,
.single-product-page .woocommerce-product-details__short-description p,
.single-product-page .bg-product-tab-content,
.single-product-page .bg-product-tab-content p,
.single-product-page .zarnegar-reviews-box,
.single-product-page .zarnegar-reviews-box p,
.single-product-page .comment-respond,
.single-product-page .comment-form,
.single-product-page .comment-form label,
.single-product-page .comment-form textarea,
.single-product-page .comment-form input,
.single-product-page .comment-reply-title,
.single-product-page #review_form {
	font-family: var(--bg-font);
}

.single-product-page .product_title,
.single-product-page .bg-reviews-title,
.single-product-page .bg-product-tab-content h2 {
	font-family: var(--bg-font-heading);
}

/* Summary box — two-column grid (gallery + details) */
.bg-single-product-wrap .zarnegar-product-summary-box {
	display: grid;
	grid-template-columns: minmax(0, 47fr) minmax(0, 52fr);
	grid-template-areas:
		"gallery summary"
		"attrs attrs";
	gap: 16px;
	width: 100%;
	background: #fff;
	padding: 20px;
	border-radius: 24px;
	margin-bottom: 40px;
	box-sizing: border-box;
}

.bg-single-product-wrap .zarnegar-product-summary-box .woocommerce-product-gallery {
	grid-area: gallery;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	background: #f7f7f5;
	padding: 20px;
	border-radius: 16px;
	box-sizing: border-box;
	opacity: 1 !important;
}

.bg-single-product-wrap .summary.entry-summary {
	grid-area: summary;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	background: #f7f7f5;
	padding: 20px;
	border-radius: 16px;
	box-sizing: border-box;
}

.bg-single-product-wrap .zarnegar-product-attributes {
	grid-area: attrs;
	width: 100%;
	margin-top: 4px;
}

/* Gallery — main image + thumbnails (no Flexslider) */
.bg-single-product-wrap .zarnegar-single-product-image {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:first-child {
	flex: 0 0 100%;
	width: 100% !important;
	text-align: center;
	margin-bottom: 24px;
	position: relative;
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:first-child a {
	display: inline-flex !important;
	justify-content: center;
	align-items: center;
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:first-child img {
	width: auto !important;
	height: auto !important;
	max-width: min(280px, 100%);
	max-height: 320px;
	object-fit: contain;
	display: inline-block;
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:first-child a::after {
	content: url("../images/shadow.png");
	width: 100%;
	position: absolute;
	left: 0;
	right: 0;
	bottom: -72px;
	pointer-events: none;
	filter: drop-shadow(0 10px 10px #ddd);
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:not(:first-child) {
	flex: 0 0 auto;
	background: #fff;
	width: 90px !important;
	height: 110px;
	display: inline-flex !important;
	justify-content: center;
	align-items: center;
	margin: 0;
	border-radius: 8px;
	padding: 8px;
	transition: box-shadow 0.3s;
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:not(:first-child):hover {
	box-shadow: 0 0 0 1px var(--bg-secondary);
}

.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:not(:first-child) img {
	width: auto !important;
	height: auto !important;
	max-width: 75px;
	max-height: 90px;
	object-fit: contain;
}

/* Hide Flexslider leftovers if any plugin re-enables slider */
.bg-single-product-wrap .flex-viewport,
.bg-single-product-wrap .flex-control-nav,
.bg-single-product-wrap .flex-direction-nav {
	display: none !important;
}

.bg-single-product-wrap .woocommerce-product-details__short-description {
	color: #506366;
	font-size: 16px;
	font-weight: 500;
	text-align: justify;
	margin-top: 10px !important;
	line-height: 1.9;
}

.bg-single-product-wrap .product_title {
	font-size: 24px;
	font-weight: 900;
	color: var(--bg-primary);
	margin: 0 0 12px;
}

@media (max-width: 992px) {
	.bg-product-spec-row {
		grid-template-columns: 1fr;
	}
}

.bg-single-product-wrap form.cart {
	display: block;
	margin-top: 20px;
}

.bg-single-product-wrap form.cart .zarnegar-variation-add-to-cart {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.bg-single-product-wrap .zarnegar-single-product-cart {
	width: 100%;
}

.bg-single-product-wrap .zarnegar-variation-add-to-cart {
	flex-wrap: wrap;
}

.bg-single-product-wrap .zarnegar-single-product-add-to-cart {
	flex: 1 1 180px;
	min-width: 0;
}

.bg-single-product-wrap .zarnegar-single-product-add-to-cart .single_add_to_cart_button,
.bg-single-product-wrap .zarnegar-single-product-add-to-cart > button,
.bg-single-product-wrap .zarnegar-single-product-add-to-cart button[type="submit"] {
	width: 100%;
	padding: 10px 16px;
	background-color: var(--mainColor, var(--bg-primary));
	color: #fff;
	border: none;
	border-radius: 10px;
	font-weight: 800;
	font-size: 16px;
	font-family: var(--bg-font);
	transition: opacity 0.2s ease;
	cursor: pointer;
}

.bg-single-product-wrap .zarnegar-single-product-add-to-cart button:hover {
	opacity: 0.95;
	color: #fff;
}

.bg-single-product-wrap .zarnegar-single-product-count {
	flex: 0 0 auto;
}

.bg-single-product-wrap .zarnegar-single-product-count .quantity-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #e9ebec;
	border-radius: 12px;
	padding: 6px 10px;
	min-width: 120px;
}

.bg-single-product-wrap .zarnegar-single-product-count .quantity {
	display: contents;
}

.bg-single-product-wrap .zarnegar-single-product-count .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.bg-single-product-wrap .zarnegar-single-product-count .qty-plus,
.bg-single-product-wrap .zarnegar-single-product-count .qty-minus {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 8px;
	background: #f7f7f5;
	color: var(--mainColor, var(--bg-primary));
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.bg-single-product-wrap .zarnegar-single-product-count .qty {
	width: 40px;
	border: none;
	background: transparent;
	text-align: center;
	padding: 0;
	font-weight: 700;
	font-family: var(--bg-font);
	-moz-appearance: textfield;
}

.bg-single-product-wrap .zarnegar-single-product-count .qty::-webkit-outer-spin-button,
.bg-single-product-wrap .zarnegar-single-product-count .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.bg-single-product-wrap .summary .price {
	font-size: 28px;
	font-weight: 800;
	color: var(--bg-primary);
	margin: 12px 0;
}

.bg-single-product-wrap .summary .price .woocommerce-Price-currencySymbol {
	color: #fff;
	font-size: 16px;
	background-color: var(--secondaryColor, var(--bg-secondary));
	border-radius: 8px;
	padding: 2px 6px;
	margin-right: 4px;
}

/* Product specifications box */
.bg-product-specs {
	background: #f7f7f5;
	border-radius: 20px;
	padding: 24px;
}

.bg-product-specs-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 24px;
}

.bg-product-specs-head-icon {
	flex-shrink: 0;
}

.bg-product-specs-head-text {
	flex: 1;
	min-width: 200px;
}

.bg-product-specs-title {
	margin: 0;
	font-size: 22px;
	font-weight: 900;
	color: var(--bg-primary);
}

.bg-product-specs-subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: rgba(36, 60, 64, 0.45);
}

.bg-product-specs-divider {
	flex: 1 1 100%;
}

.bg-product-specs-divider-icon {
	display: inline-block;
	line-height: 0;
}

.bg-product-specs-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bg-product-spec-row {
	display: grid;
	grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
}

.bg-product-spec-row-label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border-radius: 12px;
	padding: 12px 14px;
	min-height: 52px;
}

.bg-product-spec-num {
	font-size: 18px;
	font-weight: 900;
	color: var(--bg-primary);
	min-width: 20px;
}

.bg-product-spec-deco {
	position: absolute;
	top: 8px;
	left: 28px;
	width: 24px;
	height: 24px;
	opacity: 0.35;
	pointer-events: none;
}

.bg-product-spec-label {
	font-weight: 700;
	color: var(--bg-primary);
	font-size: 14px;
	padding-right: 28px;
}

.bg-product-spec-value {
	background: #fff;
	border-radius: 12px;
	padding: 12px 16px;
	color: rgba(36, 60, 64, 0.85);
	font-size: 14px;
	line-height: 1.8;
	display: flex;
	align-items: center;
}

.bg-single-product-wrap .product_title.zarnegar-dual-heading__title {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bg-single-product-wrap .zarnegar-dual-heading__title2 label {
	font-size: 14px;
	font-weight: 500;
	color: rgba(36, 60, 64, 0.55);
	margin: 0;
}

/* Tabs / intro */
.bg-product-tabs {
	margin-top: 24px;
	width: 100%;
}

.bg-product-tab-content {
	background: #fff;
	padding: 28px;
	border-radius: var(--bg-radius-lg);
	box-shadow: var(--bg-shadow);
	margin-bottom: 24px;
}

.bg-product-tab-content h2 {
	font-size: 22px;
	font-weight: 900;
	color: var(--bg-primary);
	margin: 0 0 16px;
}

.bg-product-tab-content p {
	color: #506366;
	text-align: justify;
	line-height: 1.9;
}

/* Reviews */
.bg-product-reviews.zarnegar-reviews-box {
	margin-top: 30px;
	width: 100%;
	max-width: none;
	padding: 0;
}

.bg-product-reviews .bg-reviews-title {
	font-size: 24px;
	font-weight: 900;
	color: var(--bg-primary);
	margin-bottom: 20px;
}

.bg-product-reviews .woocommerce-Reviews-title {
	display: none;
}

.bg-product-reviews #review_form {
	background: #fff;
	padding: 25px 20px 20px;
	border-radius: 16px;
}

.bg-product-reviews .comment-reply-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--bg-primary);
}

.bg-product-reviews .comment-form textarea,
.bg-product-reviews .comment-form input[type="text"],
.bg-product-reviews .comment-form input[type="email"] {
	width: 100%;
	border: 1px solid rgba(36, 60, 64, 0.15);
	border-radius: 10px;
	padding: 10px 14px;
	font-family: var(--bg-font);
}

.bg-product-reviews .comment-form .submit {
	background: var(--bg-primary);
	color: #fff;
	border: none;
	border-radius: var(--bg-radius);
	padding: 10px 24px;
	font-family: var(--bg-font);
	font-weight: 600;
	cursor: pointer;
}

/* Related products */
.bg-single-product-wrap .zarnegar-product-related {
	margin-top: 50px;
	width: 100%;
}

.bg-single-product-wrap .zarnegar-product-related ul.products {
	width: 100% !important;
	max-width: none !important;
}

.bg-single-product-wrap .zarnegar-product-related h2 {
	margin-bottom: 24px;
}

@media (max-width: 992px) {
	.bg-single-product-wrap .zarnegar-product-summary-box {
		grid-template-columns: 1fr;
		grid-template-areas:
			"gallery"
			"summary"
			"attrs";
	}

	.bg-single-product-wrap .zarnegar-single-product-image .woocommerce-product-gallery__image:first-child {
		margin-bottom: 80px;
	}
}
