/* Figma fidelity refinements for the Plasko single-product foundation. */

.plasko-purchase-card img,
.plasko-purchase__offer img,
.plasko-purchase__trust img,
.plasko-product-trust__icon {
	display: block;
	max-width: none;
}

.plasko-purchase__offer strong {
	display: inline-flex;
	align-items: center;
	flex-direction: row-reverse;
	gap: 8px;
}

.plasko-purchase__offer strong img {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.plasko-purchase-card__policy-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.plasko-purchase-card__policies > div > span:nth-child(2) {
	min-width: 0;
	flex: 1;
}

.plasko-purchase-card__price .woocommerce-Price-currencySymbol,
.plasko-purchase-card__installment-row .woocommerce-Price-currencySymbol {
	display: none;
}

.plasko-purchase-card__price .woocommerce-Price-amount,
.plasko-purchase-card__installment-row .woocommerce-Price-amount {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-direction: row-reverse;
}

.plasko-purchase-card__price .woocommerce-Price-amount::before,
.plasko-purchase-card__installment-row .woocommerce-Price-amount::before {
	display: block;
	width: 17px;
	height: 14px;
	flex: 0 0 17px;
	background: url("../../icons/product/purchase/toman.svg") center / contain no-repeat;
	content: "";
}

.plasko-purchase-card__price del .woocommerce-Price-amount::before,
.plasko-purchase-card__regular-price .woocommerce-Price-amount::before {
	display: none;
}

.plasko-purchase-card__discount {
	display: inline-flex;
	align-items: center;
	flex-direction: row-reverse;
	gap: 0;
}

.plasko-purchase-card__discount img {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
}

.plasko-purchase-card__low-stock img {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.plasko-purchase-card__low-stock [data-plasko-low-stock-text] {
	direction: rtl;
	text-align: right;
}

.plasko-purchase-card__native-cart .single_add_to_cart_button {
	direction: ltr;
}

.plasko-purchase-card__native-cart .single_add_to_cart_button::before {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	background: url("../../icons/product/purchase/plus.svg") center / contain no-repeat;
	content: "";
}

.plasko-purchase-card__installment-heading img:first-child {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.plasko-purchase-card__installment-heading img:last-child {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
}

.plasko-purchase-card__installment-heading strong {
	min-width: 0;
	flex: 1;
}

.plasko-purchase-card__notify-button {
	flex-direction: row-reverse;
	gap: 8px;
}

.plasko-purchase-card__notify-button img {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.plasko-purchase__trust img {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

/* Product gallery: deterministic order with drag/swipe and five aligned thumbnails. */
.plasko-product-gallery__stage {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 16px;
	background: var(--plasko-color-surface);
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.plasko-product-gallery__stage.is-dragging {
	cursor: grabbing;
}

.plasko-product-gallery__track,
.plasko-product-gallery-modal__track {
	display: flex;
	width: 100%;
	height: 100%;
	direction: ltr;
	transform: translate3d(0, 0, 0);
	transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.plasko-product-gallery__track.is-dragging,
.plasko-product-gallery__track.is-no-transition,
.plasko-product-gallery-modal__track.is-dragging,
.plasko-product-gallery-modal__track.is-no-transition {
	transition: none;
}

.plasko-product-gallery__slide,
.plasko-product-gallery-modal__slide {
	display: flex;
	width: 100%;
	height: 100%;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.plasko-product-gallery__main-image,
.plasko-product-gallery__variation-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
}

.plasko-product-gallery__variation-image {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: inherit;
	background: var(--plasko-color-surface);
	opacity: 0;
	transition: opacity 180ms ease;
}

.plasko-product-gallery__variation-image[hidden] {
	display: none;
}

.plasko-product-gallery__variation-image.is-visible {
	opacity: 1;
}

.plasko-product-gallery__thumbs {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	gap: 0;
	overflow: visible;
	direction: rtl;
}

.plasko-product-gallery__thumb {
	position: relative;
	display: flex;
	width: 76px;
	height: 76px;
	flex: 0 0 76px;
	align-items: center;
	justify-content: center;
	padding: 6px;
	overflow: hidden;
	border: 1px solid var(--plasko-color-surface);
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
	appearance: none;
}

.plasko-product-gallery__thumb.is-active {
	border-color: var(--plasko-color-primary);
	box-shadow: inset 0 0 0 1px var(--plasko-color-primary);
}

.plasko-product-gallery__thumb > img:not(.plasko-product-gallery__more-image) {
	display: block;
	width: 56px;
	height: 56px;
	max-width: none;
	border-radius: 12px;
	object-fit: contain;
	pointer-events: none;
}

.plasko-product-gallery__thumb--more {
	border-color: transparent;
	background: var(--plasko-color-primary-soft, #e6eaef);
}

.plasko-product-gallery__thumb--more.is-active {
	border-color: var(--plasko-color-primary);
}

.plasko-product-gallery__more-image {
	display: block;
	width: 56px;
	height: 56px;
	max-width: none;
	border-radius: 12px;
	filter: blur(4px);
	opacity: 0.6;
	object-fit: contain;
	pointer-events: none;
}

.plasko-product-gallery__more-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	width: 24px;
	height: 24px;
	align-items: center;
	justify-content: center;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.plasko-product-gallery__more-icon img {
	display: block;
	width: 22px;
	height: 22px;
	max-width: none;
}

/* Fullscreen official-image gallery — Figma node 9937:24099 / 9937:25916. */
body.plasko-gallery-modal-open {
	overflow: hidden;
}

.plasko-product-gallery-modal {
	position: fixed;
	z-index: 100000;
	inset: 0;
	overflow: auto;
	background: #fff;
	direction: rtl;
	opacity: 0;
	transition: opacity 180ms ease;
}

.plasko-product-gallery-modal[hidden] {
	display: none !important;
}

.plasko-product-gallery-modal.is-open {
	opacity: 1;
}

.plasko-product-gallery-modal__close {
	position: fixed;
	z-index: 3;
	top: 24px;
	right: max(24px, calc((100vw - 1608px) / 2));
	display: flex;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--plasko-color-primary-soft, #e6eaef);
	border-radius: 9999px;
	background: #fff;
	cursor: pointer;
	appearance: none;
}

.plasko-product-gallery-modal__close img {
	display: block;
	width: 14px;
	height: 14px;
	max-width: none;
}

.plasko-product-gallery-modal__inner {
	display: flex;
	width: min(1030px, calc(100% - 48px));
	min-height: 100vh;
	margin: 0 auto;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	padding: 64px 0 40px;
}

.plasko-product-gallery-modal__filter {
	display: flex;
	min-height: 60px;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 1px solid var(--plasko-color-border, #ededed);
	border-radius: 9999px;
	background: #fff;
}

.plasko-product-gallery-modal__filter-active {
	display: flex;
	width: 80px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background: var(--plasko-color-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 900;
	line-height: 20px;
}

.plasko-product-gallery-modal__viewer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	direction: ltr;
}

.plasko-product-gallery-modal__arrow {
	display: flex;
	width: 48px;
	height: 72px;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--plasko-color-surface, #f6f6f6);
	border-radius: 9999px;
	background: #fff;
	cursor: pointer;
	transition: opacity 160ms ease, border-color 160ms ease;
	appearance: none;
}

.plasko-product-gallery-modal__arrow:disabled {
	opacity: 0.32;
	cursor: default;
}

.plasko-product-gallery-modal__arrow img {
	display: block;
	width: 8px;
	height: 14px;
	max-width: none;
}

.plasko-product-gallery-modal__stage {
	width: 640px;
	height: 640px;
	max-width: calc(100vw - 200px);
	max-height: calc(100vh - 320px);
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 16px;
	background: var(--plasko-color-surface, #f6f6f6);
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.plasko-product-gallery-modal__stage.is-dragging {
	cursor: grabbing;
}

.plasko-product-gallery-modal__slide img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	padding: 6.36%;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
}

.plasko-product-gallery-modal__footer {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 12px;
	direction: rtl;
}

.plasko-product-gallery-modal__official-label {
	display: flex;
	width: 103px;
	height: 76px;
	flex: 0 0 103px;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 6px 16px;
	border-radius: 16px;
	background: var(--plasko-color-surface, #f6f6f6);
	color: var(--plasko-color-primary);
	font-size: 12px;
	font-weight: 900;
	line-height: 16px;
	text-align: right;
}

.plasko-product-gallery-modal__official-label img {
	display: block;
	width: 21px;
	height: 21px;
	max-width: none;
}

.plasko-product-gallery-modal__thumbs {
	display: flex;
	min-width: 0;
	flex: 1;
	align-items: center;
	gap: 12px;
	overflow-x: auto;
	padding: 1px;
	direction: rtl;
	scrollbar-width: none;
}

.plasko-product-gallery-modal__thumbs::-webkit-scrollbar {
	display: none;
}

.plasko-product-gallery-modal__thumb {
	display: flex;
	width: 76px;
	height: 76px;
	flex: 0 0 76px;
	align-items: center;
	justify-content: center;
	padding: 6px;
	overflow: hidden;
	border: 1px solid var(--plasko-color-surface, #f6f6f6);
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	appearance: none;
}

.plasko-product-gallery-modal__thumb.is-active {
	border-color: var(--plasko-color-primary);
	box-shadow: inset 0 0 0 1px var(--plasko-color-primary);
}

.plasko-product-gallery-modal__thumb img {
	display: block;
	width: 56px;
	height: 56px;
	max-width: none;
	border-radius: 12px;
	object-fit: contain;
	pointer-events: none;
}

/* Figma node 9837:24532 — four 384px trust cards inside the 1608px container. */
.plasko-product-trust {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin-top: 40px;
	direction: ltr;
}

.plasko-product-trust__item {
	min-height: 104px;
	gap: 20px;
	align-items: center;
	padding: 24px 20px;
	overflow: hidden;
	border: 1px solid var(--plasko-color-border);
	border-radius: 24px;
	background: #fff;
	direction: rtl;
}

.plasko-product-trust__icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	object-fit: contain;
	background: transparent;
}

.plasko-product-trust__copy,
.plasko-product-trust__item > div {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
	text-align: right;
}

.plasko-product-trust__item strong {
	width: 100%;
	color: var(--plasko-color-primary);
	font-size: 16px;
	font-weight: 800;
	line-height: 24px;
}

.plasko-product-trust__item span:not(.plasko-product-trust__icon) {
	width: 100%;
	color: #5d5d5d;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

@media (max-width: 1199px) {
	.plasko-product-gallery-modal__stage {
		width: min(640px, calc(100vw - 190px));
		height: auto;
		max-height: none;
	}

	.plasko-product-trust {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.plasko-product-gallery__thumb {
		width: 64px;
		height: 64px;
		flex-basis: 64px;
		padding: 4px;
		border-radius: 12px;
	}

	.plasko-product-gallery__thumb > img:not(.plasko-product-gallery__more-image),
	.plasko-product-gallery__more-image {
		width: 52px;
		height: 52px;
		border-radius: 10px;
	}

	.plasko-product-gallery-modal__close {
		top: 16px;
		right: 16px;
	}

	.plasko-product-gallery-modal__inner {
		width: 100%;
		gap: 20px;
		padding: 72px 12px 24px;
	}

	.plasko-product-gallery-modal__viewer {
		position: relative;
		width: 100%;
		gap: 0;
	}

	.plasko-product-gallery-modal__stage {
		width: 100%;
		height: auto;
		max-width: 640px;
		max-height: none;
	}

	.plasko-product-gallery-modal__arrow {
		position: absolute;
		z-index: 2;
		top: 50%;
		width: 40px;
		height: 56px;
		transform: translateY(-50%);
	}

	.plasko-product-gallery-modal__arrow--prev {
		left: 8px;
	}

	.plasko-product-gallery-modal__arrow--next {
		right: 8px;
	}

	.plasko-product-gallery-modal__footer {
		gap: 8px;
	}

	.plasko-product-gallery-modal__official-label {
		width: 88px;
		height: 64px;
		flex-basis: 88px;
		gap: 8px;
		padding-inline: 10px;
	}

	.plasko-product-gallery-modal__thumb {
		width: 64px;
		height: 64px;
		flex-basis: 64px;
		padding: 4px;
		border-radius: 12px;
	}

	.plasko-product-gallery-modal__thumb img {
		width: 52px;
		height: 52px;
		border-radius: 10px;
	}

	.plasko-product-trust {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		margin-top: 24px;
	}

	.plasko-product-trust__item {
		min-height: 96px;
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.plasko-product-gallery__track,
	.plasko-product-gallery-modal__track,
	.plasko-product-gallery__variation-image,
	.plasko-product-gallery-modal {
		transition: none;
	}
}
