/* =========================================================
   Kidosho Product UI — single product hero section
   ========================================================= */

:root {
	--kpu-green: #223c22;
	--kpu-green-dark: #16281a;
	--kpu-tan: #e7dcc6;
	--kpu-tan-dark: #d8c9a8;
	--kpu-bg-gallery: #efe6d6;
	--kpu-ink: #1c1c1c;
	--kpu-muted: #6b6b63;
	--kpu-star: #e0a838;
	--kpu-border: #e3ddd0;
	--kpu-radius: 6px;
	--kpu-font-serif: 'Playfair Display', Georgia, serif;
	--kpu-font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

.kpu-product-hero {
	font-family: var(--kpu-font-sans);
	color: var(--kpu-ink);
}

.kpu-clear {
	clear: both;
}

/* ---------- Side-by-side layout (shortcode) ---------- */

.kpu-shortcode-view {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.kpu-shortcode-view > .kpu-clear {
	display: none;
}

/* ---------- Gallery ---------- */

.woocommerce div.product div.images {
	background: var(--kpu-bg-gallery);
	border-radius: 12px;
	padding: 24px;
	position: relative;
}

.woocommerce div.product div.images .flex-viewport {
	border-radius: 8px;
	overflow: hidden;
	background: transparent;
}

.woocommerce div.product div.images img {
	border-radius: 8px;
}

/* thumbnails as a vertical rail on the left, main image fills the rest */
.woocommerce div.product div.images {
	display: flex;
	flex-direction: row;
	gap: 20px;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
	flex: 1 1 auto;
	order: 2;
}

.woocommerce div.product div.images .flex-control-thumbs {
	flex: 0 0 76px;
	order: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 380px;
	overflow-y: auto;
	scrollbar-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

.woocommerce div.product div.images .flex-control-thumbs li {
	list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: 6px;
	border: 1.5px solid transparent;
	background: #fff;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

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

/* up/down scroll chevrons above and below the thumbnail rail */
.kpu-thumb-rail-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.kpu-thumb-nav-btn {
	width: 28px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--kpu-border);
	border-radius: 4px;
	cursor: pointer;
	color: var(--kpu-ink);
}

.kpu-thumb-nav-btn:hover {
	background: var(--kpu-tan);
}

/* zoom hint icon, bottom-right of main image */
.kpu-zoom-hint {
	position: absolute;
	right: 40px;
	bottom: 32px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	pointer-events: none;
	color: var(--kpu-ink);
	font-size: 15px;
	z-index: 5;
}

/* ---------- Summary column ---------- */

.woocommerce div.product .summary {
	font-family: var(--kpu-font-sans);
}

.woocommerce div.product .summary .product_title,
.kpu-product-hero .product_title {
	font-family: var(--kpu-font-serif);
	font-weight: 700;
	font-size: 30px;
	line-height: 1.25;
	color: var(--kpu-ink);
	margin: 0 0 14px;
}

.woocommerce div.product .summary .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
}

.woocommerce div.product .summary .star-rating {
	color: var(--kpu-star);
	font-size: 15px;
}

.woocommerce div.product .summary .woocommerce-review-link {
	font-size: 13px;
	color: var(--kpu-muted);
	text-decoration: none;
}

.woocommerce div.product p.price,
.woocommerce div.product .summary .price {
	font-family: var(--kpu-font-sans);
	font-weight: 600;
	font-size: 22px;
	color: var(--kpu-ink);
	margin: 0 0 18px;
}

.woocommerce div.product .summary .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.7;
	color: #3b3b36;
	margin: 0 0 26px;
	max-width: 46ch;
}

/* ---------- Star rating + review count ---------- */

.kpu-stars-reviews {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
}

.kpu-rating-number {
	font-weight: 600;
	font-size: 15px;
	color: var(--kpu-ink);
}

.kpu-stars {
	display: flex;
	gap: 2px;
}

.kpu-stars .star {
	display: inline-block;
	width: 16px;
	height: 16px;
	background: var(--kpu-star);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center/contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.kpu-review-count {
	font-size: 13px;
	color: var(--kpu-muted);
}

/* ---------- Quantity + Add to cart ---------- */

.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.woocommerce div.product form.cart .quantity {
	display: flex;
	align-items: center;
	border: 1px solid var(--kpu-border);
	border-radius: var(--kpu-radius);
	overflow: hidden;
}

.woocommerce div.product form.cart .quantity .qty {
	width: 46px;
	text-align: center;
	border: none;
	padding: 10px 0;
	font-size: 15px;
	background: transparent;
	-moz-appearance: textfield;
}

.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.kpu-qty-btn {
	width: 34px;
	height: 42px;
	border: none;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	color: var(--kpu-ink);
}

.kpu-qty-btn:hover {
	background: var(--kpu-tan);
}

.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart button.single_add_to_cart_button,
.kpu-buy-now-btn {
	flex: 1 1 100%;
	display: block;
	width: 100%;
	text-align: center;
	padding: 15px 24px;
	border-radius: var(--kpu-radius);
	font-family: var(--kpu-font-sans);
	font-weight: 500;
	font-size: 15px;
	letter-spacing: 0.02em;
	border: none;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.woocommerce div.product form.cart button.single_add_to_cart_button {
	background: var(--kpu-green);
	color: #fff;
}

.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
	background: var(--kpu-green-dark);
}

.kpu-buy-now-btn {
	background: var(--kpu-tan);
	color: var(--kpu-ink);
	margin-bottom: 22px;
}

.kpu-buy-now-btn:hover {
	background: var(--kpu-tan-dark);
}

.kpu-buy-now-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------- Payment confidence banner ---------- */

.kpu-payment-confidence {
	margin-top: 4px;
}

.kpu-payment-confidence img {
	display: block;
	width: 100%;
	height: 80px;
	object-fit: cover;
	object-position: center;
	border-radius: var(--kpu-radius);
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
	.kpu-shortcode-view {
		display: flex;
		flex-direction: column;
		gap: 24px;
	}

	.kpu-shortcode-view .kpu-product-hero {
		width: 100%;
	}

	.kpu-shortcode-view .summary {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.woocommerce div.product div.images {
		flex-direction: column-reverse;
	}
	.woocommerce div.product div.images .flex-control-thumbs {
		flex-direction: row;
		max-height: none;
		max-width: 100%;
		overflow-x: auto;
	}
	.kpu-zoom-hint {
		right: 20px;
		bottom: 20px;
	}
}
