/**
 * WooCommerce single product styles.
 */

.affiliateprovn-woo-product .site-main,
.affiliateprovn-woo-product .woocommerce-notices-wrapper,
.affiliateprovn-woo-product .woocommerce-breadcrumb,
.affiliateprovn-woo-product .woocommerce-products-header,
.affiliateprovn-woo-product main.site-main {
	width: min(100% - 48px, 1200px);
	margin-right: auto;
	margin-left: auto;
}

.affiliateprovn-woo-product .woocommerce-breadcrumb {
	margin-top: 24px;
	color: #64748b;
	font-size: 14px;
}

.affiliateprovn-product-detail {
	padding: 20px 0 44px;
}

.affiliateprovn-product-main {
	display: grid;
	grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
	gap: clamp(24px, 3vw, 40px);
	align-items: start;
	padding: clamp(16px, 2vw, 24px);
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 18px;
	box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.affiliateprovn-product-gallery,
.affiliateprovn-product-summary {
	min-width: 0;
}

.affiliateprovn-product-gallery {
	width: 100%;
	max-width: 500px;
}

/* Same line and same visual height as the product title. */
.affiliateprovn-product-summary .product_title .affiliateprovn-shopee-mall-title-logo {
	display: inline-block;
	width: auto;
	height: 1em;
	margin-right: 0.28em;
	vertical-align: -0.12em;
}

.woocommerce .affiliateprovn-product-detail .affiliateprovn-product-gallery div.images.woocommerce-product-gallery,
.woocommerce-page .affiliateprovn-product-detail .affiliateprovn-product-gallery div.images.woocommerce-product-gallery {
	float: none;
	clear: both;
	width: 100%;
	max-width: none;
	margin: 0;
	opacity: 1 !important;
}

/* Keep every WooCommerce gallery slide available; FlexSlider controls visibility. */
.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__wrapper {
	width: 100%;
	min-width: 0;
}

.woocommerce .affiliateprovn-product-gallery .flex-viewport {
	width: 100%;
	background: #f8fafc;
	border-radius: 14px;
}

.affiliateprovn-product-gallery .woocommerce-product-gallery__wrapper {
	overflow: hidden;
	background: #f8fafc;
	border-radius: 14px;
}

.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image,
.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image a {
	width: 100%;
	height: clamp(280px, 34vw, 460px);
}

.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image a {
	display: flex;
	align-items: center;
	justify-content: center;
}

.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: contain;
	transition: transform 0.35s ease;
}

.affiliateprovn-product-gallery .woocommerce-product-gallery__image:hover img {
	transform: scale(1.025);
}

.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	overflow: visible;
}

.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs li {
	float: none;
	width: auto;
	margin: 0;
	clear: none;
}

.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	opacity: 0.7;
	border: 2px solid transparent;
	border-radius: 9px;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs img:hover,
.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs img.flex-active {
	border-color: #f97316;
	opacity: 1;
	transform: translateY(-2px);
}

.woocommerce .affiliateprovn-product-detail div.summary.affiliateprovn-product-summary,
.woocommerce-page .affiliateprovn-product-detail div.summary.affiliateprovn-product-summary {
	float: none;
	clear: none;
	width: 100%;
	max-width: none;
	margin: 0;
}

.affiliateprovn-product-summary .product_title {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 0 14px;
	color: #000;
	font-size: 20px;
	font-weight: 400;
	line-height: 28px;
	word-break: normal;
	overflow-wrap: break-word;
	writing-mode: horizontal-tb;
}

.affiliateprovn-product-summary .woocommerce-product-rating {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 16px;
}

.affiliateprovn-product-summary .price {
	display: flex;
	gap: 12px;
	align-items: baseline;
	margin: 0 0 18px;
	padding: 16px 18px;
	background: #fff7ed;
	color: #dc2626;
	border-radius: 10px;
	font-size: clamp(34px, 4vw, 48px);
	font-weight: 800;
}

/* Keep a regular (non-sale) WooCommerce price in the same red as sale prices. */
.affiliateprovn-product-summary .price > .woocommerce-Price-amount,
.affiliateprovn-product-summary .price > .woocommerce-Price-amount bdi {
	color: #dc2626;
}

.affiliateprovn-product-summary .price del {
	order: 2;
	color: #94a3b8;
	font-size: 14px;
	font-weight: 500;
}

.affiliateprovn-product-summary .price ins {
	order: 1;
	color: #dc2626;
	text-decoration: none;
}

.affiliateprovn-product-summary .price ins .woocommerce-Price-amount {
	color: inherit;
}

.affiliateprovn-product-summary .stock {
	display: inline-flex;
	margin: 0 0 16px;
	padding: 6px 10px;
	background: #ecfdf5;
	color: #047857;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
}

.affiliateprovn-product-summary .stock.out-of-stock {
	background: #fef2f2;
	color: #dc2626;
}

.affiliateprovn-product-summary .woocommerce-product-details__short-description {
	margin-bottom: 22px;
	color: #475569;
	line-height: 1.75;
}

.affiliateprovn-description-toggle {
	display: none;
	margin: -12px 0 22px;
	padding: 0;
	background: transparent;
	color: #0759b8;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.affiliateprovn-description-toggle:hover,
.affiliateprovn-description-toggle:focus-visible {
	color: #f97316;
	text-decoration: underline;
}

.affiliateprovn-summary-attributes {
	margin: 0 0 22px;
	padding: 14px 16px;
	background: #f8fafc;
	border-radius: 10px;
}

.affiliateprovn-summary-attributes > div {
	display: grid;
	grid-template-columns: minmax(100px, 0.35fr) 1fr;
	gap: 14px;
	padding: 7px 0;
}

.affiliateprovn-summary-attributes dt {
	color: #475569;
	font-weight: 700;
}

.affiliateprovn-summary-attributes dd {
	margin: 0;
	color: #1f2937;
}

.affiliateprovn-product-summary form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 24px 0;
}

.affiliateprovn-product-summary form.variations_form,
.affiliateprovn-product-summary form.grouped_form {
	display: block;
}

.affiliateprovn-product-summary .variations {
	width: 100%;
	margin-bottom: 18px;
	border-collapse: separate;
	border-spacing: 0 10px;
}

.affiliateprovn-product-summary .variations th,
.affiliateprovn-product-summary .variations td {
	padding: 0 0 8px;
	text-align: left;
	vertical-align: middle;
}

.affiliateprovn-product-summary .variations th {
	width: 120px;
	color: #1f2937;
}

.affiliateprovn-product-summary .variations select {
	width: 100%;
	min-height: 46px;
	padding: 8px 38px 8px 12px;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
}

.affiliateprovn-product-summary .single_variation_wrap,
.affiliateprovn-product-summary .woocommerce-variation-add-to-cart {
	width: 100%;
}

.affiliateprovn-product-summary .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.affiliateprovn-product-summary .quantity {
	display: inline-flex;
	float: none;
	align-items: stretch;
	height: 48px;
	margin: 0;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	overflow: hidden;
}

.affiliateprovn-product-summary .quantity .qty {
	width: 56px;
	padding: 0 4px;
	border: 0;
	border-right: 1px solid #e2e8f0;
	border-left: 1px solid #e2e8f0;
	text-align: center;
	-moz-appearance: textfield;
}

.affiliateprovn-product-summary .quantity .qty::-webkit-inner-spin-button,
.affiliateprovn-product-summary .quantity .qty::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.affiliateprovn-quantity-button {
	width: 40px;
	padding: 0;
	background: #f8fafc;
	color: #1f2937;
	border: 0;
	cursor: pointer;
	font-size: 21px;
	transition: background 0.2s ease;
}

.affiliateprovn-quantity-button:hover {
	background: #e2e8f0;
}

.affiliateprovn-product-summary form.cart .button {
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 9px;
	box-shadow: none;
	font-weight: 750;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.affiliateprovn-product-summary form.cart .single_add_to_cart_button:not(.affiliateprovn-buy-now) {
	background: #0759b8;
	color: #fff;
}

.affiliateprovn-product-summary form.cart .single_add_to_cart_button:not(.affiliateprovn-buy-now):hover {
	background: #064a98;
	box-shadow: 0 8px 18px rgba(7, 89, 184, 0.22);
	transform: translateY(-1px);
}

.affiliateprovn-product-summary form.cart .affiliateprovn-buy-now {
	order: 10;
	background: #f97316;
	color: #fff;
}

.affiliateprovn-product-summary form.cart .affiliateprovn-buy-now:hover:not(:disabled) {
	background: #ea580c;
	box-shadow: 0 8px 18px rgba(249, 115, 22, 0.25);
	transform: translateY(-1px);
}

.affiliateprovn-product-summary form.cart .button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.affiliateprovn-product-summary .product_meta,
.affiliateprovn-product-brand {
	padding-top: 14px;
	color: #64748b;
	border-top: 1px solid #e5e7eb;
	font-size: 14px;
}

.affiliateprovn-product-summary .product_meta > span {
	display: block;
	margin-top: 7px;
}

.affiliateprovn-product-summary .product_meta a,
.affiliateprovn-product-brand a {
	color: #0759b8;
}

.affiliateprovn-product-tabs {
	margin-top: 24px;
	padding: clamp(18px, 2.5vw, 28px);
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 6px;
	margin: 0 0 26px;
	padding: 0;
	border-bottom: 1px solid #e2e8f0;
	list-style: none;
}

.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs::before,
.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs li::before,
.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 13px 17px;
	color: #64748b;
	border-bottom: 3px solid transparent;
}

.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs li.active a {
	color: #0759b8;
	border-color: #0759b8;
}

.affiliateprovn-product-tabs .woocommerce-Tabs-panel {
	color: #334155;
	line-height: 1.75;
	font-size: 15px;
}

.affiliateprovn-product-tabs .woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
}

.affiliateprovn-product-tabs .woocommerce-product-attributes th,
.affiliateprovn-product-tabs .woocommerce-product-attributes td {
	padding: 13px 15px;
	border: 1px solid #e2e8f0;
	text-align: left;
}

.affiliateprovn-product-tabs .related.products,
.affiliateprovn-product-tabs .up-sells {
	margin-top: 42px;
}

/* Keep WooCommerce's related-product cards consistent with theme product cards. */
.affiliateprovn-product-tabs .related.products ul.products li.product {
	overflow: hidden;
	background: #fff;
	border-radius: 10px;
}

.affiliateprovn-product-tabs .related.products ul.products li.product img {
	border-radius: 10px 10px 0 0;
}

.affiliateprovn-product-tabs .related.products .woocommerce-loop-product__title {
	display: -webkit-box;
	overflow: hidden;
	min-height: calc(1.35em * 2);
	margin-bottom: 10px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	line-height: 1.35;
}

.affiliateprovn-product-tabs .related.products .price {
	display: flex;
	width: 100%;
	align-items: baseline;
	justify-content: space-between;
	color: #dc2626;
}

.affiliateprovn-product-tabs .related.products .price ins {
	order: 1;
	color: #dc2626;
	text-decoration: none;
}

.affiliateprovn-product-tabs .related.products .price ins .woocommerce-Price-amount,
.affiliateprovn-product-tabs .related.products .price ins .woocommerce-Price-amount bdi {
	color: #dc2626;
}

.affiliateprovn-product-tabs .related.products .price del {
	order: 2;
	margin-left: auto;
	color: #94a3b8;
	text-decoration-color: #94a3b8;
	font-size: 0.85em;
}

.affiliateprovn-product-tabs .related.products .price del .woocommerce-Price-amount,
.affiliateprovn-product-tabs .related.products .price del .woocommerce-Price-amount bdi,
.affiliateprovn-product-tabs .related.products .price del .woocommerce-Price-currencySymbol {
	color: #94a3b8 !important;
}

@media (max-width: 1024px) {
	.affiliateprovn-product-main {
		grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
		gap: 24px;
		padding: 22px;
	}

	.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image,
	.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image a {
		height: clamp(280px, 42vw, 400px);
	}

	.affiliateprovn-product-summary form.cart .button {
		padding-right: 16px;
		padding-left: 16px;
	}

	.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.affiliateprovn-product-gallery {
		position: relative;
	}

	.woocommerce .affiliateprovn-product-gallery span.onsale {
		top: 10px;
		left: 10px;
		z-index: 3;
	}

	.affiliateprovn-woo-product .woocommerce-breadcrumb {
		display: none;
	}

	.affiliateprovn-woo-product .site-main,
	.affiliateprovn-woo-product .woocommerce-notices-wrapper,
	.affiliateprovn-woo-product .woocommerce-breadcrumb,
	.affiliateprovn-woo-product main.site-main {
		width: min(100% - 28px, 1280px);
	}

	.affiliateprovn-product-detail {
		padding: 14px 0 32px;
	}

	.affiliateprovn-product-main {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
		padding: 15px;
		border-radius: 13px;
	}

	.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image,
	.woocommerce .affiliateprovn-product-gallery .woocommerce-product-gallery__image a {
		height: clamp(260px, 78vw, 360px);
	}

	.affiliateprovn-product-summary .product_title {
		font-size: 16px;
		line-height: 23px;
		cursor: pointer;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		display: -webkit-box;
		overflow: hidden;
	}

	/* Keep the price prominent without the desktop price-panel background. */
	.affiliateprovn-product-summary .price {
		margin-bottom: 10px;
		padding: 0;
		background: transparent;
		border-radius: 0;
	}

	.affiliateprovn-product-summary .price del {
		font-size: 12px;
	}

	/* On mobile, display price before title while preserving desktop order. */
	.affiliateprovn-product-summary {
		display: flex;
		flex-direction: column;
	}

	.affiliateprovn-product-summary > * {
		order: 3;
	}

	.affiliateprovn-product-summary > .price {
		order: 1;
	}

	.affiliateprovn-product-summary > .product_title {
		order: 2;
	}

	.affiliateprovn-product-summary .product_title.is-expanded {
		display: block;
		line-clamp: unset;
		-webkit-line-clamp: unset;
		overflow: visible;
	}

	.affiliateprovn-product-summary .product_title:focus-visible {
		outline: 2px solid #0759b8;
		outline-offset: 4px;
	}

	.affiliateprovn-product-tabs .woocommerce-Tabs-panel--description {
		font-size: 14px;
		max-height: 17.5em;
		overflow: hidden;
	}

	.affiliateprovn-product-tabs .woocommerce-Tabs-panel--description.is-expanded {
		max-height: none;
		overflow: visible;
	}

	.affiliateprovn-description-toggle {
		display: inline-flex;
		align-items: center;
	}

	.woocommerce .affiliateprovn-product-gallery div.images .flex-control-thumbs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.affiliateprovn-product-summary form.cart .button,
	.affiliateprovn-product-summary .woocommerce-variation-add-to-cart .button {
		flex: 1 1 calc(50% - 6px);
	}

	.affiliateprovn-product-summary .quantity {
		flex: 1 0 100%;
		justify-content: center;
	}

	.affiliateprovn-product-summary .quantity .qty {
		flex: 1;
	}

	.affiliateprovn-product-tabs {
		margin-top: 16px;
		padding: 16px;
		border-radius: 12px;
	}

	.affiliateprovn-product-tabs .woocommerce-tabs ul.tabs {
		overflow-x: auto;
		white-space: nowrap;
	}
}
