body.single-product .summary-inner form.cart.ks-product-purchase-ready {
	display: block;
}

body.single-product .ks-product-purchase-source,
body.single-product .ks-product-purchase-ready :is(.wd-buy-now-btn, .woocommerce-variation-price),
body.single-product .ks-product-purchase-ready .ks-product-purchase-default-quantity:has(input.qty:is([min="1"], :not([min]))),
body.single-product:has(.ks-product-purchase-ready) .wd-sticky-btn-cart .wd-buy-now-btn {
	display: none !important;
}

.ks-product-purchase-size-row {
	display: block;
}

.ks-product-purchase-size-row th.label {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	text-align: start;
}

.ks-product-purchase-size-row td.value {
	display: block !important;
	width: 100%;
}

.ks-product-purchase-size-row th.label .ks-product-purchase-guide {
	margin: 0 !important;
	min-height: 0 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	white-space: normal;
}

.ks-product-purchase-size-row .ks-product-purchase-size-guide-button {
	margin: 0 !important;
}

.ks-product-purchase-size-guide-button .ks-product-purchase-guide {
	color: #203865;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ks-product-purchase-size-row .wd-swatches-product {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	margin: 0 !important;
}

body.single-product .summary-inner .ks-product-purchase-size-row .wd-swatch.wd-text {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	height: auto !important;
	min-height: 44px !important;
	margin: 0 !important;
	border: 1px solid #dedfe3 !important;
	border-radius: var(--ks-storefront-radius, 4px) !important;
	background: #fff !important;
	color: #232632;
}

body.single-product .summary-inner .ks-product-purchase-size-row .wd-swatch .wd-swatch-text {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
}

body.single-product .summary-inner .ks-product-purchase-size-row .wd-swatch.wd-text.wd-active {
	border-color: #203865 !important;
	background: #203865 !important;
	color: #fff !important;
}

body.single-product .summary-inner .ks-product-purchase-size-row .wd-swatch.wd-text.wd-disabled {
	background: #f1f2f4 !important;
	color: #656973 !important;
	text-decoration: line-through;
}

.ks-product-purchase-size-row .wd-swatch::after {
	display: none !important;
}

.ks-product-purchase-bar {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	width: 100%;
	padding-top: 12px;
	border-top: 1px solid #e9eaf0;
}

.ks-product-purchase-price {
	margin: 0;
	color: #203865;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
}

.ks-product-purchase-price .price {
	font-size: inherit;
}

body.single-product .summary-inner .ks-product-purchase-bar .single_add_to_cart_button {
	width: 100%;
	min-height: 44px;
	margin: 0 !important;
	border-radius: var(--ks-storefront-radius, 4px) !important;
}

body.single-product .summary-inner .ks-product-header-title {
	font-weight: 750 !important;
}

/* Compact WooCommerce excerpts on every product page while preserving their paragraphs and outer spacing. */
body.single-product .summary-inner .woocommerce-product-details__short-description > p {
	margin-block: 0;
}

body.single-product .summary-inner > :is(.product_meta, .product-share),
body.single-product .summary-inner .wd-product-brands {
	display: none !important;
}

.ks-product-header-price {
	margin: 14px 0 7px;
	color: #203865;
	font-size: clamp(26px, 3vw, 32px);
	font-weight: 750;
	line-height: 1.15;
}

body.single-product .summary-inner .ks-product-header-price :is(.price, ins, ins .amount, .amount) {
	color: inherit;
	font: inherit;
	text-decoration: none;
}

.ks-product-header-sale {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 8px;
}

.ks-product-header-sale > .price {
	display: contents;
}

.ks-product-header-sale ins {
	order: -1;
}

body.single-product .summary-inner .ks-product-header-sale del {
	color: #6c717c;
	font-size: .64em;
	font-weight: 500;
}

.ks-product-header-saving {
	padding: 3px 6px;
	border-radius: var(--ks-storefront-radius, 4px);
	background: #eef2f7;
	font-size: 13px;
}

.ks-product-header-rating {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 8px 0 14px;
	color: #4d5360;
	font-size: 14px;
}

.ks-product-header-star {
	color: #9c6411;
}

.ks-product-header-rating a {
	text-decoration: underline;
}

/* Secondary actions remain in a single row below the main purchase button. */
body.single-product .summary-inner .ks-product-purchase-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0 8px;
	margin: 6px 0 0 !important;
}

body.single-product .summary-inner .ks-product-purchase-actions > .wd-wishlist-btn {
	display: block !important;
	margin: 0 !important;
}

body.single-product .summary-inner .ks-product-purchase-actions a {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	width: auto !important;
	min-height: 44px !important;
	margin: 0 !important;
	color: #203865 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

body.single-product .summary-inner .ks-product-purchase-actions a :is(span, u),
body.single-product .summary-inner .ks-product-purchase-actions a::before {
	color: inherit !important;
}

body.single-product .summary-inner .ks-product-purchase-actions a::before {
	margin: 0 !important;
	font-size: 14px;
}

/* Underline the wishlist label only; the icon uses a separate font baseline. */
body.single-product .summary-inner .ks-product-purchase-actions .wd-wishlist-btn > a {
	text-decoration: none !important;
}

body.single-product .summary-inner .ks-product-purchase-actions .wd-wishlist-btn > a > span {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

body.single-product .summary-inner .ks-product-purchase-actions a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

body.single-product .summary-inner .ks-product-purchase-empty-help,
body.single-product .summary-inner .wd-after-add-to-cart:has(> .kingsence-size-guide-link.ks-product-purchase-empty-help:only-child),
body.single-product .summary-inner .wd-compare-btn,
body.single-product .wd-sticky-btn .wd-compare-btn {
	display: none !important;
}

@media (max-width: 350px) {
	body.single-product .summary-inner .ks-product-purchase-actions a::before {
		display: none;
	}
}

/* Keep customer reviews open and let readers expand long replies from the shop. */
#reviews .ks-review-reply:has(+ button[aria-expanded="false"]) {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#reviews .ks-review-reply:has(+ button[aria-expanded="false"]) p {
	margin-block: 0;
}

#reviews .ks-review-reply-toggle,
#reviews .ks-review-form > summary {
	color: #203865;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#reviews .ks-review-reply-toggle {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 13px;
	text-transform: none;
}

#reviews .ks-review-form {
	/* WoodMart offsets the review row by 30px and restores that inset on its own columns. */
	box-sizing: border-box;
	flex: 1 1 100%;
	min-width: 0;
	order: 2;
	margin-block-start: 12px;
	margin-block-end: 25px;
	padding-inline: 30px;
}

#reviews .ks-review-form > summary {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 650;
	cursor: pointer;
	list-style: none;
}

#reviews .ks-review-form > summary::-webkit-details-marker {
	display: none;
}

#reviews .ks-review-form[open] > summary {
	margin-block-end: 10px;
}

#reviews .ks-review-form #review_form_wrapper {
	max-width: 100%;
	margin-block-start: 0;
}

#reviews .ks-review-form textarea#comment {
	min-height: 100px;
	height: 100px;
}

#reviews.ks-reviews-empty > .wd-rating-summary-wrap,
#reviews.ks-reviews-empty #comments {
	display: none;
}

#reviews .ks-reviews-empty-message {
	margin-block-end: 0;
}
