/*
 * Single product presentation. Loaded after woocommerce.css on product
 * pages only.
 */

.woocommerce div.product .product_title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	line-height: 1.25;
}

.woocommerce div.product div.images img {
	border-radius: var(--wp--preset--border-radius--md);
}

/* Hover zoom: WooCommerce overlays a full-size clone of the photo
   (.zoomImg) over the rounded image. The container clips the clone and
   the clone carries the same radius, so the frame holds while zoomed. */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
	border-radius: var(--wp--preset--border-radius--md);
	overflow: hidden;
}

.woocommerce div.product div.images .zoomImg {
	border-radius: var(--wp--preset--border-radius--md);
}

/* The sliding frame: while the carousel animates between photos, the
   moving strip overflows the rounded slides, so the viewport itself gets
   the radius and clips the whole strip into one rounded frame. */
.woocommerce div.product div.images .flex-viewport {
	border-radius: var(--wp--preset--border-radius--md);
	overflow: hidden;
}

/* Gallery thumbnails: a breathing row under the main photo. WooCommerce
   floats its 25%-wide thumbs flush together; flex + gap re-spaces them,
   and the width trims the per-item share of the 0.5rem gaps so four
   still fit one row. */
.woocommerce div.product div.images .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.woocommerce div.product div.images .flex-control-thumbs li {
	float: none;
	width: calc(25% - 0.375rem);
	list-style: none;
}

/* Gallery thumbnails: quiet until active. */
.woocommerce div.product div.images .flex-control-thumbs li img {
	border-radius: var(--wp--preset--border-radius--sm);
	opacity: 0.6;
	border: 2px solid transparent;
}

.woocommerce div.product div.images .flex-control-thumbs li img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs li img:hover {
	opacity: 1;
	border-color: var(--wp--preset--color--primary);
}

/* Inquiry panel: stands in for the add-to-cart form on products that
   are asked about rather than bought online. */
.kkh-product-inquiry {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--md);
	padding: var(--wp--preset--spacing--30);
	margin: 1.5rem 0;
}

.kkh-product-inquiry .kkh-inquiry-note {
	margin: 0 0 0.875rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1.125rem;
}

.kkh-product-inquiry .wp-block-button__link {
	width: 100%;
}

.kkh-product-inquiry .kkh-inquiry-hint {
	margin: 0.875rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* GST notice under the add-to-cart form: a quiet one-line note with an
   info icon, matching the meta styling so it informs without competing
   with the price and button above it. */
.kkh-product-gst {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.875rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.kkh-product-gst .kkh-gst-icon {
	flex: 0 0 auto;
	margin-top: 0.15em;
}

/* Product Details facts table: filled metabox fields only, one row per
   fact. Same top rule as .product_meta so the summary column reads as one
   quiet stack of information. */
.kkh-product-facts {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.kkh-product-facts .kkh-facts-title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1.125rem;
	margin: 0 0 0.875rem;
}

.kkh-product-facts .kkh-facts-list {
	display: grid;
	grid-template-columns: minmax(7.5em, auto) 1fr;
	column-gap: 1rem;
	row-gap: 0.5rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

.kkh-product-facts dt {
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

.kkh-product-facts dd {
	margin: 0;
}

.kkh-product-facts dd ul {
	margin: 0;
	padding-left: 1.1em;
	list-style: disc;
}

@media (max-width: 480px) {
	/* One column per row when the label and value won't share a line. */
	.kkh-product-facts .kkh-facts-list {
		grid-template-columns: 1fr;
		row-gap: 0.25rem;
	}

	.kkh-product-facts dd {
		margin-bottom: 0.5rem;
	}
}

/* Single product price: the number customers came for gets its own
   weight, well above body size. */
.woocommerce div.product p.price {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

/* SKU and category meta under the summary. */
.woocommerce div.product .product_meta {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: 1rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Small stroke icons before the SKU and category facts. The SVG rides in
   a mask over currentColor, so the icon follows the text color and its
   hover state for free. */
.woocommerce div.product .product_meta .sku_wrapper::before,
.woocommerce div.product .product_meta .posted_in::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 0.4em;
	vertical-align: -0.08em;
	background-color: currentColor;
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
}

.woocommerce div.product .product_meta .sku_wrapper::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='.5' fill='%23000'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='.5' fill='%23000'/%3E%3C/svg%3E");
}

.woocommerce div.product .product_meta .posted_in::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
}

.woocommerce div.product .product_meta a {
	color: var(--wp--preset--color--muted);
}

.woocommerce div.product .product_meta a:hover,
.woocommerce div.product .product_meta a:focus-visible {
	color: var(--wp--preset--color--primary);
}

