/* PelakMarket Single Product - matched to the tracked ShahrePelak reference. */
.single-product .wd-content-layout {
	width: calc(100% - 48px);
	max-width: 1370px;
	margin-inline: auto;
}

.single-product .wd-content-area.site-content {
	width: 100%;
	min-width: 0;
}

.pm-single-product {
	--pm-ink: #242424;
	--pm-muted: #777777;
	--pm-surface: #f7f7f7;
	--pm-feature: #e2e2e2;
	--pm-border: #cacaca;
	--pm-price: #ffee84;
	--pm-discount: #c99a00;
	direction: rtl;
	color: var(--pm-ink);
	font-family: Dana, sans-serif;
}

.pm-single-product,
.pm-single-product * {
	box-sizing: border-box;
}

/* Breadcrumb */
.pm-single-breadcrumb {
	margin: 0 0 18px;
	font-size: 12px;
	line-height: 1.7;
}

.pm-single-breadcrumb .woocommerce-breadcrumb {
	font-size: inherit;
}

/* Main desktop layout: gallery ~1/3, information ~2/3. */
.pm-single-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 30px;
	align-items: start;
	margin-bottom: 30px;
}

.pm-single-gallery,
.pm-single-summary {
	min-width: 0;
}

.pm-single-gallery {
	position: sticky;
	top: calc(var(--wd-header-h, 0px) + 18px);
	align-self: start;
}

.pm-single-gallery .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0;
}

.pm-single-gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

/* ShahrePelak reference: 95px gallery thumbnails. */
.pm-single-gallery .wd-gallery-thumb {
	margin-top: 10px;
}

.pm-single-gallery .wd-gallery-thumb .wd-carousel-item {
	flex: 0 0 95px !important;
	width: 95px !important;
	max-width: 95px !important;
}

.pm-single-gallery .wd-gallery-thumb .wd-carousel-item img {
	display: block;
	width: 95px;
	height: 95px;
	object-fit: cover;
	border-radius: 8px;
}

.pm-single-gallery .wd-nav-arrows {
	z-index: 5;
}

.pm-no-image {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: #f2f0ec;
	border-radius: 10px;
	color: #9b968e;
	font-size: 12px;
}

/* Summary */
.pm-single-summary {
	text-align: right;
}

.pm-single-summary .product_title {
	margin: 0 0 10px;
	color: var(--pm-ink);
	font-size: 23px;
	font-weight: 700;
	line-height: 1.45;
}

.pm-single-summary .price {
	margin: 0 0 12px;
	color: var(--pm-ink);
	line-height: 1.8;
}

.pm-single-summary .pelak-start-price {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	font-size: 14px;
	font-weight: 500;
}

.pm-single-summary .pelak-start-price .amount {
	font-size: 17px;
	font-weight: 700;
}

/* Six tracked product properties. */
.pm-feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
	gap: 9px;
	margin: 20px 0;
}

.pm-feature {
	min-width: 0;
	padding: 5px;
	border: 1px solid var(--pm-border);
	border-radius: 3px;
	background: var(--pm-feature);
	text-align: center;
}

.pm-feature h4 {
	margin: 0 0 2px;
	color: rgb(0 0 0 / 67%);
	font-size: 10px;
	font-weight: 500;
	line-height: 1.5;
}

.pm-feature p {
	margin: 0;
	color: #333333;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.pm-short-description {
	margin: 0 0 16px;
	color: #454545;
	font-size: 13px;
	line-height: 1.9;
}

.pm-short-description > :last-child {
	margin-bottom: 0;
}

/* Configurator: preserve Product System logic, visually mimic variation controls. */
.pm-single-summary .cart {
	margin-top: 10px;
	align-items: center;
}

.pm-single-summary .pelak-configurator {
	display: grid;
	gap: 12px;
	margin: 16px 0 10px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.pm-single-summary .pelak-material-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #e1e1e1;
	border-radius: 10px;
	background: var(--pm-surface);
	font-size: 12px;
}

.pm-single-summary .pelak-material-line span {
	width: auto;
	margin-inline-start: auto;
	color: #7b7b7b;
	font-size: 10px;
}

.pm-single-summary .pelak-size-mode {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0;
}

.pm-single-summary .pelak-size-mode label,
.pm-single-summary .pelak-fonts label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 7px 10px;
	border: 1px solid #dddddd;
	border-radius: 10px;
	background: var(--pm-surface);
	font-size: 12px;
	line-height: 1.4;
	cursor: pointer;
}

.pm-single-summary .pelak-field {
	margin: 0;
}

.pm-single-summary .pelak-field > label,
.pm-single-summary .pelak-field > legend {
	display: block;
	margin-bottom: 6px;
	color: #555555;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
}

.pm-single-summary .pelak-field select,
.pm-single-summary .pelak-field input[type="text"],
.pm-single-summary .pelak-field input[type="number"],
.pm-single-summary .pelak-field textarea {
	width: 100%;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 10px;
	background: #ffffff;
	font-family: inherit;
	font-size: 13px;
}

.pm-single-summary .pelak-field textarea {
	min-height: 92px;
	resize: vertical;
}

.pm-single-summary .pelak-custom-size {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.pm-single-summary .pelak-custom-size[hidden],
.pm-single-summary .pelak-preset-wrap[hidden] {
	display: none;
}

.pm-single-summary .pelak-fonts {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0;
	border: 0;
}

.pm-single-summary .pelak-fonts legend {
	width: 100%;
}

.pm-single-summary .pelak-live-price {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin: 2px 0 4px;
	padding: 13px 10px 9px;
	border: 0;
	border-radius: 9px;
	background: var(--pm-price);
	font-size: 13px;
}

.pm-single-summary .pelak-live-price strong {
	font-size: 17px;
}

/* Standard Woo controls: keep theme button colors, only match shape/size. */
.pm-single-summary .quantity {
	margin-inline-end: 0;
	margin-inline-start: 8px;
}

.pm-single-summary .quantity input,
.pm-single-summary .quantity button,
.pm-single-summary .single_add_to_cart_button {
	border-radius: 10px;
}

.pm-single-summary .single_add_to_cart_button {
	min-height: 42px;
	font-weight: 700;
}

/* Quantity discount reference box. */
.pm-offer-box {
	clear: both;
	width: 100%;
	margin: 20px 0 0;
	padding: 5px 10px;
	border: 1px solid var(--pm-border);
	border-radius: 7px;
	background: var(--pm-feature);
	color: #494949;
	font-size: 12px;
	line-height: 1.8;
}

.pm-offer-box > p:first-child {
	margin: 7px 0 3px;
	font-weight: 700;
}

.pm-offer-table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 7px;
	table-layout: fixed;
	text-align: center;
}

.pm-offer-table td {
	padding: 10px 7px;
	border: 1px solid #cccccc;
	border-radius: 6px;
	background: rgb(255 253 245 / 40%);
	font-weight: 500;
	text-align: center;
	vertical-align: middle;
}

.pm-offer-count {
	display: block;
	margin-bottom: 8px;
	color: #555555;
	font-size: 11px;
}

.pm-offer-discount {
	display: block;
	color: var(--pm-discount);
	font-size: 11px;
	font-weight: 700;
}

.pm-offer-note {
	margin: 0 5px 8px;
	color: #8f8f8f;
	font-size: 11px;
	font-weight: 500;
}

.pm-shipping-box {
	width: 100%;
	margin-top: 12px;
	padding: 12px 12px 1px;
	border: 1px solid var(--pm-border);
	border-radius: 7px;
	background: var(--pm-feature);
	color: #494949;
	font-size: 12px;
	line-height: 1.8;
}

.pm-shipping-box p {
	margin-bottom: 10px;
}

/* Product meta: small text and category chips. */
.pm-single-summary .product_meta {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: -18px;
	font-size: .68em;
}

.pm-single-summary .product_meta > span {
	border: 0;
}

.pm-single-summary .posted_in a {
	display: inline-block;
	margin: 3px 5px;
	padding: 3px 12px;
	border-radius: 4px;
	background: var(--pm-surface);
	font-size: 10px;
}

/* Tabs and attribute panels. */
.pm-single-tabs {
	margin-top: 18px;
}

.pm-single-tabs .woocommerce-tabs {
	border-radius: 10px;
	background: #ffffff;
}

.pm-single-tabs .wd-nav-tabs .wd-nav-link,
.pm-single-tabs .wd-accordion-title {
	font-size: 14px;
}

.pm-single-tabs .woocommerce-Tabs-panel .wc-tab-inner {
	padding: 11px;
	border-radius: 10px;
	background: #ffffff;
}

.pm-single-tabs .shop_attributes {
	font-size: 13px;
}

.pm-single-tabs .shop_attributes tr {
	gap: 10px 20px;
}

/* Related products. */
.pm-single-related {
	margin-top: 30px;
}

.pm-single-related > h2,
.pm-single-related .product-section-title {
	font-size: 18px;
}

.pm-single-product .related.products ul.products {
	margin-top: 15px;
}

.pm-single-product .product-small.box,
.pm-single-product li.product {
	border-radius: 14px;
}

.pm-single-product .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}

/* Tablet reference breakpoint: <= 849px. */
@media (max-width: 849px) {
	.single-product .wd-content-layout {
		width: 100%;
	}

	.pm-single-product {
		padding-top: 0;
	}

	.pm-single-top {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.pm-single-gallery {
		position: static;
		width: 100%;
		max-width: 620px;
		margin: 0 auto;
	}

	.pm-single-summary .product_title {
		font-size: 23px;
	}

	.pm-offer-table,
	.pm-offer-table tbody {
		display: block;
	}

	.pm-offer-table tr {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 7px;
	}

	.pm-offer-table td {
		display: block;
		min-width: 0;
	}
}

/* Mobile reference breakpoint: <= 549px. */
@media (max-width: 549px) {
	.pm-single-product {
		padding-top: 18px;
		padding-inline: 14px;
	}

	.pm-single-breadcrumb {
		margin-bottom: 12px;
	}

	.pm-single-top {
		gap: 16px;
		margin-bottom: 22px;
	}

	.pm-single-gallery .wd-gallery-thumb .wd-carousel-item {
		flex-basis: 82px !important;
		width: 82px !important;
		max-width: 82px !important;
	}

	.pm-single-gallery .wd-gallery-thumb .wd-carousel-item img {
		width: 82px;
		height: 82px;
	}

	.pm-single-summary .product_title {
		padding-top: 6px;
		font-size: 20px;
	}

	.pm-single-summary .pelak-start-price {
		font-size: 10px;
	}

	.pm-single-summary .pelak-start-price .amount {
		font-size: 16px;
	}

	.pm-feature-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 7px;
	}

	.pm-single-summary .pelak-custom-size {
		grid-template-columns: 1fr;
	}

	.pm-single-summary .pelak-live-price {
		align-items: flex-start;
		flex-direction: column;
	}

	.pm-single-summary .pelak-material-line {
		flex-wrap: wrap;
	}

	.pm-single-summary .pelak-material-line span {
		width: 100%;
		margin-inline-start: 0;
	}

	.pm-offer-table tr {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pm-offer-table td {
		padding: 8px 5px;
	}

	.pm-single-summary .cart .quantity {
		width: 100%;
		margin: 0 0 8px;
	}

	.pm-single-summary .single_add_to_cart_button {
		width: 100%;
	}

	.pm-single-summary .product_meta {
		margin-top: -8px;
	}

	.pm-single-tabs .wd-nav-tabs .wd-nav-link,
	.pm-single-tabs .wd-accordion-title {
		font-size: 14px;
	}
}

/* Native WoodMart sticky add-to-cart, adapted for the PelakMarket Product System. */
.single-product .wd-sticky-btn {
	--wd-sticky-btn-height: 72px;
	border-top: 1px solid #E1E1E1;
	background: #FFFFFF;
	box-shadow: none;
	font-family: Dana, sans-serif;
}

.single-product .wd-sticky-btn .wd-sticky-btn-container {
	width: min(calc(100% - 30px), 1199px);
	max-width: 1199px;
	margin-inline: auto;
	padding-inline: 0;
}

.single-product .wd-sticky-btn-thumbnail img {
	min-width: 52px;
	width: 52px;
	max-width: 52px;
	height: 52px;
	max-height: 52px;
	border-radius: 7px;
	object-fit: cover;
}

.single-product .wd-sticky-btn .wd-entities-title {
	color: #242424;
	font-size: 14px;
	font-weight: 600;
}

.single-product .wd-sticky-btn .price {
	margin-inline-end: 18px;
	color: #242424;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.single-product .wd-sticky-btn .price .amount {
	font-size: 15px;
	font-weight: 700;
}

/* The sticky clone must never duplicate the full Product System configurator. */
.single-product .wd-sticky-btn form.cart > :not(.single_add_to_cart_button) {
	display: none !important;
}

.single-product .wd-sticky-btn form.cart {
	display: block;
	margin: 0 !important;
}

.single-product .wd-sticky-btn .single_add_to_cart_button {
	min-width: 172px;
	height: 44px;
	padding-inline: 22px;
	border-radius: 7px;
	background: #D60644;
	color: #FFFFFF;
	font-family: Dana, sans-serif;
	font-size: 13px;
	font-weight: 700;
}

.single-product .wd-sticky-btn .single_add_to_cart_button:hover,
.single-product .wd-sticky-btn .single_add_to_cart_button:focus {
	background: #D60644;
	color: #FFFFFF;
}

.single-product .wd-sticky-btn .single_add_to_cart_button.disabled,
.single-product .wd-sticky-btn .single_add_to_cart_button:disabled {
	opacity: .55;
	cursor: not-allowed;
}

@media (max-width: 768px) {
	.single-product .wd-sticky-btn {
		--wd-sticky-btn-height: 58px;
		background: #FFFFFF;
	}

	.single-product .wd-sticky-btn .wd-sticky-btn-container {
		width: 100%;
		max-width: none;
		padding-inline: 0;
	}

	.single-product .wd-sticky-btn .wd-sticky-btn-cart {
		margin-inline: 0;
	}

	.single-product .wd-sticky-btn form.cart {
		width: 100%;
	}

	.single-product .wd-sticky-btn .single_add_to_cart_button {
		width: 100%;
		min-width: 0;
		height: 58px;
		border-radius: 0;
		font-size: 14px;
	}
}
