/* Vesta single product summary */

.vesta-dorsa-product .product-image-summary-wrap {
	align-items: flex-start;
}

.vesta-dorsa-product .summary-inner {
	position: sticky;
	top: 100px;
	padding-inline: 8px;
}

.vesta-dorsa-product .product_title,
.vesta-dorsa-product .summary-inner > .product_title,
.vesta-dorsa-product h1.product_title,
.vesta-dorsa-product .wd-single-title .product_title {
	font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.7rem);
	font-weight: 700;
	line-height: 1.45;
	color: #111;
	margin: 0 0 12px;
	letter-spacing: 0;
}

.vesta-product-hr {
	border: 0;
	border-top: 1px solid #e6e6e6;
	margin: 12px 0;
}

.vesta-product-sku {
	font-size: 10px;
	line-height: 1.6;
	color: #777;
	margin: -3px 2px 1px 4px;
	border-bottom: 1px solid #e1e1e1;
}

.vesta-product-sku__label {
	margin-inline-end: 4px;
}

.vesta-product-sku__value {
	color: #555;
}

/* SKU already has bottom border — avoid double line */
.vesta-product-hr--after-title {
	display: none;
}

/* Price right + wishlist left (RTL) */
.vesta-price-fav {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 4px 0 0;
}

.vesta-price-fav .price,
.vesta-price-fav .wd-single-price,
.vesta-price-fav .elementor-widget-container,
.vesta-price-fav .wd-single-price .price {
	margin: 0;
	flex: 1 1 auto;
	text-align: start;
}

.vesta-price-fav .woocommerce-Price-amount,
.vesta-price-fav .price .amount {
	font-size: 17px;
	font-weight: 700;
	color: #111;
	letter-spacing: 0;
}

.vesta-price-fav .woocommerce-Price-currencySymbol {
	font-size: 0.75em;
	font-weight: 500;
	margin-inline: 0.25em;
	color: #111;
}

/* Range: "8.000.000  9.500.000 تومان" — no dash, one currency */
.vesta-price-fav .vesta-price-range {
	display: inline;
	white-space: nowrap;
}

.vesta-price-fav .vesta-price-range__sep {
	display: inline-block;
	width: 0.55em;
}

.vesta-price-fav .price > span[aria-hidden="true"]:not(.woocommerce-Price-amount):not(.wd-price-unit) {
	display: none;
}

.vesta-price-fav .wd-price-unit {
	display: inline-block;
	margin-inline-start: 4px;
	color: var(--color-gray-300, #bbb);
	font-weight: 400;
	font-size: 10px;
}

.vesta-price-fav .price del {
	opacity: 0.5;
	font-size: 0.8em;
	margin-inline-end: 8px;
}

.vesta-price-fav .price del .woocommerce-Price-amount {
	font-size: 1em;
	font-weight: 500;
}

/* Variation price (selected attribute) under attributes */
.vesta-dorsa-product .woocommerce-variation {
	animation: wd-fadeInBottomShort 0.3s ease;
	text-align: center;
	border-top: 1px solid #dadada;
	padding: 6px 0 0;
	margin: 8px 0 0;
}

.vesta-dorsa-product .woocommerce-variation:not(:has(.price)) {
	border-top: 0;
	padding: 0;
	margin: 0;
	animation: none;
}

.vesta-dorsa-product .woocommerce-variation .price {
	color: #c6a062;
	font-weight: 600;
	margin: 0;
}

.vesta-dorsa-product .woocommerce-variation .woocommerce-Price-amount,
.vesta-dorsa-product .woocommerce-variation .price .amount {
	color: #c6a062;
	font-weight: 600;
}

.vesta-dorsa-product .woocommerce-variation .wd-price-unit {
	display: inline-block;
	margin-inline-start: 4px;
	color: var(--color-gray-300, #bbb);
	font-weight: 400;
	font-size: 10px;
}

.vesta-dorsa-product .woocommerce-variation > div {
	margin-bottom: 3px;
}

.vesta-dorsa-product .woocommerce-variation .woocommerce-Price-amount bdi,
.vesta-dorsa-product .woocommerce-variation bdi {
	direction: inherit;
}

.vesta-dorsa-product .wd-reset-var {
	--wd-reset-btn-space: 10px;
	display: block ruby;
	border: 1px solid darkgray;
	background-color: antiquewhite;
	padding: 0;
}

.vesta-dorsa-product p.stock.wd-style-default:is(.available-on-backorder, .in-stock),
.vesta-dorsa-product .woocommerce-variation p.stock.wd-style-default:is(.available-on-backorder, .in-stock) {
	color: #615c5c;
	border-right: 1px solid #939393;
	padding-right: 10px;
}

.vesta-price-fav .wd-wishlist-btn,
.vesta-price-fav .wd-action-btn,
.vesta-price-fav .wd-wishlist-btn > a {
	flex: 0 0 auto;
	margin: 0 !important;
	width: auto !important;
}

.vesta-price-fav .wd-wishlist-btn .wd-action-btn span,
.vesta-price-fav .wd-tooltip-label,
.vesta-price-fav .wd-action-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Hide default summary noise */
.vesta-dorsa-product .woocommerce-product-rating,
.vesta-dorsa-product .wd-product-brands,
.vesta-dorsa-product .woodmart-products-nav,
.vesta-dorsa-product .product_meta,
.vesta-dorsa-product .woocommerce-product-details__short-description,
.vesta-dorsa-product .wd-single-short-desc,
.vesta-dorsa-product .elementor-widget-wd_single_product_short_description,
.vesta-dorsa-product .elementor-widget-wd_single_product_meta,
.vesta-dorsa-product .elementor-widget-wd_single_product_wishlist_button,
.vesta-dorsa-product .elementor-widget-wd_single_product_size_guide_button,
.vesta-dorsa-product .elementor-widget-woocommerce-product-content,
.vesta-dorsa-product .elementor-widget-woocommerce-product-short-description,
.vesta-dorsa-product .elementor-widget-woocommerce-product-meta,
.vesta-dorsa-product .elementor-widget-woocommerce-product-additional-information,
.vesta-dorsa-product .elementor-widget-woocommerce-product-data-tabs {
	display: none !important;
}

/* Keep size-guide widget visible only inside our wrapper */
.vesta-size-guide-wrap .elementor-widget-wd_single_product_size_guide_button {
	display: block !important;
}

/* Color | Size — one row */
.vesta-dorsa-product .variations_form .variations,
.vesta-dorsa-product table.variations {
	display: block !important;
	width: 100%;
	margin: 0 0 16px;
	border: 0;
}

.vesta-dorsa-product table.variations tbody {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start;
	gap: 0;
	width: 100%;
}

.vesta-dorsa-product table.variations tr {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* RTL: رنگ سمت راست، سایز سمت چپ */
.vesta-dorsa-product table.variations tr:has(#pa_color),
.vesta-dorsa-product table.variations tr:has([name="attribute_pa_color"]) {
	order: 1;
}

.vesta-dorsa-product table.variations tr:has(#pa_size),
.vesta-dorsa-product table.variations tr:has([name="attribute_pa_size"]) {
	order: 2;
}

.vesta-dorsa-product table.variations tr:has(#pa_pattern),
.vesta-dorsa-product table.variations tr:has([name="attribute_pa_pattern"]),
.vesta-dorsa-product table.variations tr.vesta-attr-hidden {
	display: none !important;
}

.vesta-dorsa-product table.variations tr + tr {
	border-inline-start: 1px solid #e0e0e0;
	padding-inline-start: 14px;
	margin-inline-start: 14px;
}

.vesta-dorsa-product table.variations th.label,
.vesta-dorsa-product table.variations .label {
	display: block;
	width: 100%;
	padding: 0 0 8px;
	text-align: start;
}

.vesta-dorsa-product table.variations th.label label,
.vesta-dorsa-product table.variations .label label {
	font-size: 12px;
	font-weight: 600;
	color: #222;
	margin: 0;
}

.vesta-dorsa-product table.variations td.value {
	display: block;
	width: 100%;
	padding: 0;
}

/* Hide native select only when swatches (theme or our generated) exist */
.vesta-dorsa-product table.variations td.value.with-swatches > select,
.vesta-dorsa-product table.variations td.value:has(.wd-swatches-product) > select,
.vesta-dorsa-product table.variations td.value:has(.vesta-swatches-from-select) > select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.vesta-dorsa-product .wd-swatches-product,
.vesta-dorsa-product .swatches-select,
.vesta-dorsa-product .wd-swatches,
.vesta-dorsa-product .vesta-swatches-from-select {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Light gray selectable squares */
.vesta-dorsa-product .wd-swatch,
.vesta-dorsa-product .swatch-on-single,
.vesta-dorsa-product .wd-swatches-product .wd-swatch,
.vesta-dorsa-product .vesta-swatches-from-select .wd-swatch {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	padding: 5px !important;
	margin: 0 !important;
	border: 1px solid #e5e5e5 !important;
	border-radius: 2px !important;
	background: #f5f5f5 !important;
	box-shadow: none !important;
	cursor: pointer;
	visibility: visible !important;
	opacity: 1 !important;
	transition: border-color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

/* Keep real color on swatch background (do NOT force transparent) */
.vesta-dorsa-product .wd-swatch .wd-swatch-bg {
	display: block !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 22px;
	min-height: 22px;
	border-radius: 2px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

.vesta-dorsa-product .wd-swatch.wd-bg .wd-swatch-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.vesta-dorsa-product .wd-swatch-text,
.vesta-dorsa-product .wd-swatch .wd-swatch-text,
.vesta-dorsa-product .vesta-swatches-from-select .wd-swatch-text {
	font-size: 12px;
	font-weight: 600;
	color: #222;
	line-height: 1;
}

.vesta-dorsa-product .wd-swatch.wd-active,
.vesta-dorsa-product .wd-swatch.active-swatch,
.vesta-dorsa-product .wd-swatch:hover,
.vesta-dorsa-product .vesta-swatches-from-select .wd-swatch.wd-active,
.vesta-dorsa-product .vesta-swatches-from-select .wd-swatch:hover {
	border-color: #111 !important;
	background: #efefef !important;
}

/* Unavailable / out of stock options */
.vesta-dorsa-product .wd-swatch.wd-disabled,
.vesta-dorsa-product .wd-swatch.disabled-swatch,
.vesta-dorsa-product .wd-swatch.wd-oos,
.vesta-dorsa-product .wd-swatch[class*="disabled"] {
	opacity: 0.32 !important;
	cursor: not-allowed !important;
	pointer-events: none;
	filter: grayscale(0.35);
}

.vesta-dorsa-product .wd-swatch.wd-bg img,
.vesta-dorsa-product .wd-swatch img {
	width: 22px;
	height: 22px;
	object-fit: cover;
	border-radius: 1px;
}

/* Stock above cart */
.vesta-product-stock {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	order: -1;
	margin: 0 0 10px;
	font-size: 12px;
	color: #555;
}

.vesta-product-stock .stock {
	margin: 0;
}

.vesta-product-stock .in-stock {
	color: #2f6b3a;
}

.vesta-product-stock .out-of-stock {
	color: #a33a3a;
}

/* Short description: full-width block ABOVE buy/qty row (never beside) */
.vesta-before-cart {
	display: block !important;
	flex: 0 0 100% !important;
	flex-basis: 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 8px 0 14px;
	order: -2;
	clear: both;
}

.vesta-before-cart .vesta-accordion {
	border-top: 1px solid #e6e6e6;
	border-bottom: 1px solid #e6e6e6;
}

/* Dedicated buy row wrapper (created by JS when needed) */
.vesta-buy-row {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
	width: 100%;
	margin: 0;
}

/* Cart containers may wrap accordion + buy row */
.vesta-dorsa-product .vesta-cart-block .variations_button,
.vesta-dorsa-product .vesta-cart-block form.cart:not(.variations_form),
.vesta-dorsa-product form.cart .variations_button,
.vesta-dorsa-product form.cart.variations_form .single_variation_wrap .woocommerce-variation-add-to-cart,
.vesta-dorsa-product .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-direction: row;
	flex-wrap: wrap !important;
	align-items: stretch;
	gap: 10px;
	width: 100%;
	margin: 0;
}

.vesta-dorsa-product .quantity,
.vesta-buy-row .quantity {
	display: flex !important;
	flex: 0 0 calc(30% - 5px);
	max-width: calc(30% - 5px);
	width: calc(30% - 5px) !important;
	margin: 0 !important;
	order: 2;
}

.vesta-dorsa-product .quantity .qty,
.vesta-dorsa-product .quantity input.qty {
	width: 100% !important;
	min-height: 48px;
	height: 48px;
	margin: 0;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 0;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
}

.vesta-dorsa-product .single_add_to_cart_button,
.vesta-dorsa-product .cart .single_add_to_cart_button.button,
.vesta-buy-row .single_add_to_cart_button {
	flex: 0 0 calc(70% - 5px);
	width: calc(70% - 5px) !important;
	max-width: calc(70% - 5px);
	order: 1;
	min-height: 48px;
	border-radius: 0 !important;
	background: #36454f !important;
	border-color: #36454f !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	margin: 0 !important;
	box-shadow: none !important;
}

.vesta-dorsa-product .single_add_to_cart_button:hover {
	background: #2a363e !important;
	border-color: #2a363e !important;
}

.vesta-dorsa-product .cart {
	margin-bottom: 0;
}

/* After cart: size guide */
.vesta-after-cart {
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.vesta-accordion--full {
	display: none !important;
}

.vesta-accordion {
	border-top: 1px solid #e6e6e6;
}

.vesta-accordion:last-child {
	border-bottom: 1px solid #e6e6e6;
}

.vesta-accordion__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #111;
	font-family: inherit;
	text-align: start;
}

.vesta-accordion__arrow {
	width: 14px;
	height: 9px;
	flex: 0 0 auto;
	transition: transform 0.25s ease;
	color: #333;
}

.vesta-accordion__toggle.is-open .vesta-accordion__arrow {
	transform: rotate(180deg);
}

.vesta-accordion__body {
	display: none;
	padding: 0 0 14px;
}

.vesta-accordion__body.is-open,
.vesta-accordion__toggle.is-open + .vesta-accordion__body {
	display: block;
}

.vesta-accordion__content {
	font-size: 13px;
	line-height: 1.9;
	color: #444;
}

.vesta-accordion__content > *:last-child {
	margin-bottom: 0;
}

/* Size guide button */
.vesta-size-guide-wrap {
	margin: 18px 0 8px;
}

.vesta-size-guide-wrap .wd-sizeguide-btn,
.vesta-size-guide-wrap .vesta-size-guide-btn {
	display: flex;
	width: 100%;
	margin: 0;
}

.vesta-size-guide-wrap .wd-sizeguide-btn > a,
.vesta-size-guide-wrap .wd-action-btn > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid #111;
	background: #fff;
	color: #111 !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	gap: 8px;
	transition: background 0.2s ease, color 0.2s ease;
}

.vesta-size-guide-wrap .wd-sizeguide-btn > a:hover {
	background: #111;
	color: #fff !important;
}

.vesta-size-guide-wrap .wd-action-icon {
	display: none;
}

/* Gallery: main image + thumbnails below */
.vesta-product-gallery {
	width: 100%;
	max-width: 520px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-inline: auto;
}

.vesta-product-gallery__main {
	position: relative;
	margin: 0;
	width: 100%;
	aspect-ratio: 3 / 4;
	max-height: min(68vh, 640px);
	background: #f5f5f5;
	overflow: hidden;
	border-radius: 4px;
}

.vesta-product-gallery__link {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vesta-product-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center center;
	transition: opacity 0.2s ease;
}

.vesta-product-gallery__thumbs {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 2px 2px 6px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.vesta-product-gallery__thumbs::-webkit-scrollbar {
	height: 4px;
}

.vesta-product-gallery__thumbs::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

.vesta-product-gallery__thumb {
	flex: 0 0 auto;
	width: 72px;
	height: 86px;
	padding: 0;
	margin: 0;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #f7f7f7;
	overflow: hidden;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vesta-product-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vesta-product-gallery__thumb:hover {
	border-color: #bbb;
}

.vesta-product-gallery__thumb.is-active {
	border-color: #111;
	box-shadow: 0 0 0 1px #111;
}

.vesta-product-gallery__thumb:focus-visible {
	outline: 2px solid #c6a062;
	outline-offset: 2px;
}

@media (max-width: 1024px) {
	.vesta-dorsa-product .summary-inner {
		position: static;
		top: auto;
		margin-top: 24px;
		padding-inline: 0;
	}
}

@media (max-width: 767px) {
	.vesta-product-gallery {
		max-width: 100%;
		gap: 10px;
	}

	.vesta-product-gallery__main {
		max-height: min(62vh, 520px);
	}

	.vesta-product-gallery__thumb {
		width: 58px;
		height: 70px;
		border-radius: 5px;
	}

	.vesta-dorsa-product .product_title {
		font-size: 1.2rem;
	}

	/* Keep color | size on one row even on mobile */
	.vesta-dorsa-product table.variations tbody {
		flex-direction: row !important;
		flex-wrap: nowrap !important;
	}

	.vesta-dorsa-product table.variations tr + tr {
		border-inline-start: 1px solid #e0e0e0;
		border-top: 0;
		padding-inline-start: 10px;
		margin-inline-start: 10px;
		padding-top: 0;
	}

	.vesta-dorsa-product .wd-swatch,
	.vesta-dorsa-product .vesta-swatches-from-select .wd-swatch {
		min-width: 32px;
		min-height: 32px;
	}

	.vesta-dorsa-product .quantity,
	.vesta-dorsa-product .single_add_to_cart_button {
		flex-basis: auto;
		max-width: none;
		width: auto;
	}

	.vesta-dorsa-product .quantity {
		flex: 0 0 30%;
		max-width: 30%;
		width: 30% !important;
	}

	.vesta-dorsa-product .single_add_to_cart_button {
		flex: 0 0 calc(70% - 10px);
		width: calc(70% - 10px) !important;
		max-width: calc(70% - 10px);
	}
}

