/**
 * Single product page — Electro-style two-column layout.
 *
 * Loaded only on is_product(). Every selector is scoped under
 * .pkgc-product-page / .pkgc-product so nothing here can leak into the
 * shop archive (.pkgc-shop*), product card (.pkgc-electro-card*), or
 * homepage (.pkgc-home*) — those are locked and must not regress.
 *
 * @package PackagingCommerce
 */

/* ── Page shell ───────────────────────────────────────────────────── */

.pkgc-product-page {
	padding-block-start: var(--brand-space-4) !important;
}

.pkgc-product-page .woocommerce-breadcrumb {
	margin-block-end: var(--brand-space-5);
}

/* ── Top: gallery + summary ──────────────────────────────────────── */

.pkgc-product__top {
	display: flex;
	flex-direction: column;
	gap: var(--brand-space-6);
}

@media (min-width: 62rem) {
	.pkgc-product__top {
		flex-direction: row;
		align-items: flex-start;
		gap: 48px;
	}
}

.pkgc-product__gallery {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
}

@media (min-width: 62rem) {
	.pkgc-product__gallery {
		flex: 0 1 53%;
	}
}

.pkgc-product__summary {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--brand-space-3);
}

@media (min-width: 62rem) {
	.pkgc-product__summary {
		flex: 0 1 47%;
		padding-block-start: var(--brand-space-2);
	}
}

/* ── Gallery ──────────────────────────────────────────────────────── */

/*
 * WooCommerce core (woocommerce-layout-rtl.css) ships
 * `.woocommerce div.product div.images { float:right; width:48% }` at
 * specificity (0,0,3,3) — higher than a plain descendant selector here,
 * regardless of load order. wc_product_class() on the product wrapper
 * keeps WC's base `.product` class (by design, so other WC/extension CSS
 * still targets it), so that legacy two-column rule matches our markup
 * too. Match the same selector shape to neutralise it without touching
 * WooCommerce core or dropping the `.product` class.
 */
.woocommerce div.product div.images,
.pkgc-product__gallery .woocommerce-product-gallery {
	float: none;
	width: 100%;
	margin-block-end: 0;
	opacity: 1 !important; /* WC inlines opacity:0 pending its own JS fade-in */
}

.pkgc-product__gallery .woocommerce-product-gallery__wrapper {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
	overflow: hidden;
	background-color: var(--brand-color-surface-alt);
}

/*
 * WooCommerce renders one of two markup shapes here depending on whether
 * the product has a real image: `.woocommerce-product-gallery__image`
 * (has image) or `.woocommerce-product-gallery__image--placeholder`
 * (no image — see single-product/product-image.php). Both must be sized
 * the same way or the placeholder case collapses to the image's intrinsic
 * (tiny) size instead of filling the gallery column.
 */
.pkgc-product__gallery .woocommerce-product-gallery__image,
.pkgc-product__gallery .woocommerce-product-gallery__image--placeholder {
	width: 100%;
	aspect-ratio: 1;
	max-height: 560px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pkgc-product__gallery .woocommerce-product-gallery__image img,
.pkgc-product__gallery .woocommerce-product-gallery__image--placeholder img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: var(--brand-space-8);
	display: block;
}

@media (max-width: 61.98rem) {
	.pkgc-product__gallery .woocommerce-product-gallery__image,
	.pkgc-product__gallery .woocommerce-product-gallery__image--placeholder {
		aspect-ratio: auto;
		height: 340px;
	}
}

@media (max-width: 35.99rem) {
	.pkgc-product__gallery .woocommerce-product-gallery__image,
	.pkgc-product__gallery .woocommerce-product-gallery__image--placeholder {
		height: 320px;
	}

	.pkgc-product__gallery .woocommerce-product-gallery__image img,
	.pkgc-product__gallery .woocommerce-product-gallery__image--placeholder img {
		padding: var(--brand-space-5);
	}
}

/* Thumbnails — only render when WooCommerce outputs more than the main
   image (single-image products get no thumbnail row at all: see
   single-product/product-image.php, only `$columns` > 1 with real
   gallery attachments triggers wc_get_gallery_image_html's thumb list). */
.pkgc-product__gallery .flex-control-thumbs {
	display: flex;
	gap: var(--brand-space-2);
	list-style: none;
	margin: var(--brand-space-3) 0 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: thin;
}

.pkgc-product__gallery .flex-control-thumbs li {
	flex: 0 0 auto;
}

.pkgc-product__gallery .flex-control-thumbs img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: contain;
	padding: var(--brand-space-1);
	border: 2px solid var(--brand-color-border);
	border-radius: var(--brand-radius-sm);
	background-color: var(--brand-color-surface-alt);
	cursor: pointer;
	transition: border-color var(--brand-transition-fast);
}

.pkgc-product__gallery .flex-control-thumbs img:hover,
.pkgc-product__gallery .flex-control-thumbs img:focus-visible {
	border-color: var(--brand-color-primary);
}

.pkgc-product__gallery .flex-control-thumbs img.flex-active {
	border-color: var(--brand-color-primary);
}

/* Sale/out-of-stock flash — reuse the Electro circular badge language
   from the product card (assets/css/components/product-card.css) so the
   two pages read as one system, without importing that file's selectors. */
.pkgc-product__gallery .onsale {
	position: absolute;
	z-index: 2;
	inset-block-start: var(--brand-space-3);
	inset-inline-end: var(--brand-space-3);
	width: 44px;
	height: 44px;
	border-radius: var(--brand-radius-full);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: var(--brand-weight-bold);
	color: #fff;
	background-color: var(--brand-color-accent);
	text-align: center;
	line-height: 1.1;
}

.pkgc-product__out-of-stock-flag {
	position: absolute;
	z-index: 2;
	inset-block-start: var(--brand-space-3);
	inset-inline-end: var(--brand-space-3);
	padding-inline: var(--brand-space-3);
	min-height: 32px;
	display: inline-flex;
	align-items: center;
	border-radius: var(--brand-radius-full);
	background-color: var(--brand-color-muted);
	color: #fff;
	font-size: 12px;
	font-weight: var(--brand-weight-bold);
}

/* ── Summary: category, title, rating, price ─────────────────────── */

.pkgc-product__cat {
	display: inline-block;
	width: fit-content;
	font-size: 13px;
	font-weight: var(--brand-weight-semibold);
	color: var(--brand-color-primary);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pkgc-product__cat:hover {
	text-decoration: underline;
}

.pkgc-product__summary .product_title {
	font-size: 32px;
	font-weight: var(--brand-weight-bold);
	color: var(--brand-color-ink);
	line-height: var(--brand-leading-tight);
	margin: 0;
}

@media (min-width: 90rem) {
	.pkgc-product__summary .product_title {
		font-size: 34px;
	}
}

@media (max-width: 35.99rem) {
	.pkgc-product__summary .product_title {
		font-size: 24px;
	}
}

.pkgc-product__summary .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: var(--brand-space-2);
	margin: 0;
}

.pkgc-product__summary .star-rating {
	color: var(--brand-color-primary);
	font-size: var(--brand-text-base);
}

.pkgc-product__summary .woocommerce-review-link {
	font-size: var(--brand-text-sm);
	color: var(--brand-color-muted);
	text-decoration: none;
}

.pkgc-product__summary .woocommerce-review-link:hover {
	color: var(--brand-color-primary);
	text-decoration: underline;
}

.pkgc-product__summary p.price {
	font-size: 24px;
	font-weight: var(--brand-weight-bold);
	color: var(--brand-color-ink);
	margin: 0;
}

@media (max-width: 35.99rem) {
	.pkgc-product__summary p.price {
		font-size: 20px;
	}
}

.pkgc-product__summary p.price del {
	font-size: 0.6em;
	color: var(--brand-color-muted);
	font-weight: var(--brand-weight-regular);
	margin-inline-end: var(--brand-space-2);
}

.pkgc-product__summary p.price ins {
	text-decoration: none;
	color: var(--brand-color-accent);
}

/* ── Short description ───────────────────────────────────────────── */

.pkgc-product__summary .woocommerce-product-details__short-description {
	max-width: 62ch;
	color: var(--brand-color-muted);
	font-size: var(--brand-text-base);
	line-height: 1.65;
}

.pkgc-product__summary .woocommerce-product-details__short-description p {
	margin: 0 0 var(--brand-space-2);
}

.pkgc-product__summary .woocommerce-product-details__short-description > *:last-child {
	margin-block-end: 0;
}

/* Collapse entirely when WooCommerce prints nothing (empty <div class="woocommerce-product-details__short-description"></div>
   still takes a DOM node even with no content — :empty guards the gap). */
.pkgc-product__summary .woocommerce-product-details__short-description:empty {
	display: none;
}

/* ── Stock badge ──────────────────────────────────────────────────── */

.pkgc-product__summary p.stock {
	display: inline-flex;
	align-items: center;
	gap: var(--brand-space-2);
	width: fit-content;
	padding-inline: var(--brand-space-3);
	padding-block: 6px;
	border-radius: var(--brand-radius-full);
	font-size: var(--brand-text-sm);
	font-weight: var(--brand-weight-semibold);
	margin: 0;
}

.pkgc-product__summary p.stock::before {
	content: "";
	inline-size: 8px;
	block-size: 8px;
	border-radius: 50%;
	background-color: currentColor;
	flex-shrink: 0;
}

.pkgc-product__summary p.stock.in-stock {
	background-color: var(--brand-color-success-bg);
	color: var(--brand-color-success);
}

.pkgc-product__summary p.stock.out-of-stock {
	background-color: var(--brand-color-danger-bg);
	color: var(--brand-color-danger);
}

/* ── Purchase panel ───────────────────────────────────────────────── */

.pkgc-product__summary form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--brand-space-3);
	margin: 0;
	padding: 24px;
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-lg);
	background-color: var(--brand-color-surface-alt);
}

@media (max-width: 35.99rem) {
	.pkgc-product__summary form.cart {
		padding: 16px;
	}
}

/* ── Quantity stepper: [-] [n] [+] ───────────────────────────────── */

.pkgc-product__summary .pkgc-qty {
	display: flex;
	align-items: stretch;
	flex: 0 0 auto;
	width: 120px;
	min-height: 44px;
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
	background-color: var(--brand-color-surface);
	overflow: hidden;
}

.pkgc-product__summary .pkgc-qty .quantity {
	display: contents;
	margin: 0;
}

.pkgc-product__summary .pkgc-qty__btn {
	flex: 0 0 auto;
	width: 36px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border: none;
	color: var(--brand-color-ink);
	cursor: pointer;
	transition: background-color var(--brand-transition-fast);
}

.pkgc-product__summary .pkgc-qty__btn:hover {
	background-color: var(--brand-color-surface-alt);
}

.pkgc-product__summary .pkgc-qty__btn:focus-visible {
	outline: 3px solid var(--brand-color-primary);
	outline-offset: -3px;
}

.pkgc-product__summary .pkgc-qty .qty {
	flex: 1 1 auto;
	width: 0;
	min-width: 0;
	min-height: 44px;
	padding-inline: 0;
	border: none;
	border-inline: 1px solid var(--brand-color-border);
	background-color: var(--brand-color-surface);
	font-size: var(--brand-text-base);
	font-weight: var(--brand-weight-semibold);
	text-align: center;
	color: var(--brand-color-ink);

	/* Hide native number spinner — the pkgc-qty buttons replace it. */
	-moz-appearance: textfield;
	appearance: textfield;
}

.pkgc-product__summary .pkgc-qty .qty::-webkit-inner-spin-button,
.pkgc-product__summary .pkgc-qty .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pkgc-product__summary .pkgc-qty .qty:focus-visible {
	outline: 3px solid var(--brand-color-primary);
	outline-offset: -3px;
}

.pkgc-product__summary .single_add_to_cart_button {
	flex: 1 1 12rem;
	min-height: 44px;
	padding-inline: var(--brand-space-6);
	border-radius: var(--brand-radius-md);
	background-color: var(--brand-color-primary);
	border: 1px solid var(--brand-color-primary);
	color: #fff;
	font-family: var(--brand-font-body);
	font-size: var(--brand-text-base);
	font-weight: var(--brand-weight-bold);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color var(--brand-transition-fast);
}

.pkgc-product__summary .single_add_to_cart_button:hover,
.pkgc-product__summary .single_add_to_cart_button:focus-visible {
	background-color: var(--brand-color-primary-dark);
	border-color: var(--brand-color-primary-dark);
	color: #fff;
}

.pkgc-product__summary .single_add_to_cart_button.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 35.99rem) {
	.pkgc-product__summary form.cart {
		flex-direction: column;
		align-items: stretch;
	}

	.pkgc-product__summary .pkgc-qty {
		width: 100%;
	}

	.pkgc-product__summary .single_add_to_cart_button {
		width: 100%;
	}
}

/* Out-of-stock / unpurchasable: WooCommerce's own stock.php prints the
   status and simple.php returns early without a form — no button markup
   to hide, but keep the stock badge visually consistent with the panel. */
.pkgc-product__summary p.stock.out-of-stock + form.cart,
.pkgc-product__summary p.stock.out-of-stock ~ form.cart {
	display: none;
}

/* Variable/grouped product tables — WC core markup, brand-normalised only */
.pkgc-product__summary table.variations {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 var(--brand-space-3);
}

.pkgc-product__summary table.variations td {
	padding-block: var(--brand-space-2);
	vertical-align: middle;
}

.pkgc-product__summary table.variations select {
	width: 100%;
	min-height: 44px;
	padding-inline: var(--brand-space-3);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
}

.pkgc-product__summary .woocommerce-variation-price .price {
	font-size: 22px;
}

.pkgc-product__summary .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--brand-space-3);
	padding: 24px;
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-lg);
	background-color: var(--brand-color-surface-alt);
}

@media (max-width: 35.99rem) {
	.pkgc-product__summary .woocommerce-variation-add-to-cart {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}
}

/* ── WhatsApp inline CTA ──────────────────────────────────────────── */

.pkgc-product__whatsapp {
	width: fit-content;
}

@media (max-width: 35.99rem) {
	.pkgc-product__whatsapp {
		width: 100%;
		justify-content: center;
	}
}

/* ── Meta (SKU, categories, tags) ─────────────────────────────────── */

.pkgc-product__summary .product_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--brand-space-1) var(--brand-space-3);
	padding-block-start: var(--brand-space-3);
	border-block-start: 1px solid var(--brand-color-border);
	font-size: var(--brand-text-sm);
	color: var(--brand-color-muted);
}

.pkgc-product__summary .product_meta > span {
	display: inline-flex;
	align-items: center;
	gap: var(--brand-space-1);
}

.pkgc-product__summary .product_meta > span:not(:last-child)::after {
	content: "";
	inline-size: 3px;
	block-size: 3px;
	border-radius: 50%;
	background-color: var(--brand-color-border);
	margin-inline-start: var(--brand-space-3);
}

.pkgc-product__summary .product_meta a {
	color: var(--brand-color-primary);
	text-decoration: none;
}

.pkgc-product__summary .product_meta a:hover {
	text-decoration: underline;
}

/* ── Reassurance strip ────────────────────────────────────────────── */

.pkgc-reassurance {
	margin-block-start: 40px;
	background-color: #3a3a3a;
	border-radius: var(--brand-radius-lg);
}

.pkgc-reassurance__inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 61.98rem) {
	.pkgc-reassurance__inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 35.99rem) {
	.pkgc-reassurance__inner {
		grid-template-columns: 1fr;
	}
}

.pkgc-reassurance__item {
	display: flex;
	align-items: center;
	gap: var(--brand-space-3);
	padding: var(--brand-space-4) var(--brand-space-5);
	border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
}

.pkgc-reassurance__inner > .pkgc-reassurance__item:last-child {
	border-inline-end: none;
}

@media (max-width: 61.98rem) {
	.pkgc-reassurance__inner > .pkgc-reassurance__item:nth-child(2n) {
		border-inline-end: none;
	}

	.pkgc-reassurance__item {
		border-block-end: 1px solid rgba(255, 255, 255, 0.1);
	}

	.pkgc-reassurance__inner > .pkgc-reassurance__item:nth-last-child(-n+2) {
		border-block-end: none;
	}
}

@media (max-width: 35.99rem) {
	.pkgc-reassurance__item {
		border-inline-end: none;
	}

	.pkgc-reassurance__inner > .pkgc-reassurance__item:last-child {
		border-block-end: none;
	}
}

.pkgc-reassurance__icon {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: var(--brand-radius-full);
	background-color: var(--brand-color-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pkgc-reassurance__text {
	font-size: 13px;
	font-weight: var(--brand-weight-semibold);
	color: #fff;
}

/* ── Below: tabs + related products ──────────────────────────────── */

.pkgc-product__below {
	margin-block-start: 48px;
}

/* ── Tabs ─────────────────────────────────────────────────────────── */

.pkgc-product__below .woocommerce-tabs {
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-lg);
	overflow: hidden;
}

.pkgc-product__below ul.tabs {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	list-style: none;
	margin: 0;
	padding: 0;
	background-color: var(--brand-color-surface-alt);
	border-block-end: 1px solid var(--brand-color-border);
}

.pkgc-product__below ul.tabs li {
	margin: 0;
	flex: 0 0 auto;
}

.pkgc-product__below ul.tabs li a {
	display: block;
	padding: 14px 20px;
	min-height: 44px;
	font-size: var(--brand-text-sm);
	font-weight: var(--brand-weight-semibold);
	color: var(--brand-color-muted);
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--brand-transition-fast), box-shadow var(--brand-transition-fast);
}

.pkgc-product__below ul.tabs li a:hover {
	color: var(--brand-color-primary);
}

.pkgc-product__below ul.tabs li.active a {
	color: var(--brand-color-primary);
	background-color: var(--brand-color-surface);
	box-shadow: inset 0 -3px 0 var(--brand-color-primary);
}

.pkgc-product__below .woocommerce-Tabs-panel {
	padding: 28px;
	font-size: var(--brand-text-base);
	line-height: 1.7;
	color: var(--brand-color-ink);
}

@media (max-width: 35.99rem) {
	.pkgc-product__below ul.tabs li a {
		padding: 12px 16px;
	}

	.pkgc-product__below .woocommerce-Tabs-panel {
		padding: 18px;
	}
}

.pkgc-product__below .woocommerce-Tabs-panel > h2:first-child {
	font-size: var(--brand-text-lg);
	margin-block-end: var(--brand-space-4);
}

.pkgc-product__below .woocommerce-Tabs-panel table.shop_attributes {
	width: 100%;
	border-collapse: collapse;
}

.pkgc-product__below .woocommerce-Tabs-panel table.shop_attributes th,
.pkgc-product__below .woocommerce-Tabs-panel table.shop_attributes td {
	padding: var(--brand-space-3);
	border: 1px solid var(--brand-color-border);
	font-size: var(--brand-text-sm);
}

.pkgc-product__below .woocommerce-Tabs-panel table.shop_attributes th {
	width: 30%;
	background-color: var(--brand-color-surface-alt);
	font-weight: var(--brand-weight-semibold);
	text-align: start;
}

/* ── Reviews ──────────────────────────────────────────────────────── */

.woocommerce-Reviews-title {
	font-size: var(--brand-text-lg);
	margin-block-end: var(--brand-space-4);
}

.commentlist {
	list-style: none;
	margin: 0 0 var(--brand-space-6);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--brand-space-4);
}

.commentlist .comment_container {
	display: flex;
	gap: var(--brand-space-3);
	padding: var(--brand-space-4);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
}

.commentlist img.avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.commentlist .comment-text {
	min-width: 0;
	flex: 1 1 auto;
}

.commentlist .star-rating {
	margin-block-end: var(--brand-space-1);
}

.commentlist .description p {
	margin: var(--brand-space-1) 0 0;
	color: var(--brand-color-muted);
}

.commentlist .meta {
	font-size: var(--brand-text-xs);
	color: var(--brand-color-muted);
}

/* Empty state — WooCommerce prints a single <p class="woocommerce-noreviews">;
   this file cannot add markup around it (comments_template() renders the
   whole reviews block), so it is styled as a self-contained designed card
   instead of a bare line of text. */
.woocommerce-noreviews {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--brand-space-2);
	margin: 0 0 var(--brand-space-6);
	padding: 40px var(--brand-space-5);
	border: 1px dashed var(--brand-color-border);
	border-radius: var(--brand-radius-lg);
	background-color: var(--brand-color-surface-alt);
	text-align: center;
	font-size: var(--brand-text-base);
	color: var(--brand-color-muted);
}

.woocommerce-noreviews::before {
	content: "";
	display: block;
	width: 40px;
	height: 40px;
	margin-block-end: var(--brand-space-1);
	background-color: var(--brand-color-surface);
	border: 1px solid var(--brand-color-border);
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23F28C00' width='20' height='20'%3E%3Cpath d='M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* ── Review form ──────────────────────────────────────────────────── */

#review_form_wrapper {
	padding: 24px;
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-lg);
	background-color: var(--brand-color-surface-alt);
}

@media (max-width: 35.99rem) {
	#review_form_wrapper {
		padding: 16px;
	}
}

#review_form_wrapper #reply-title {
	display: block;
	font-size: var(--brand-text-lg);
	font-weight: var(--brand-weight-bold);
	margin-block-end: var(--brand-space-4);
}

#review_form_wrapper .comment-notes {
	color: var(--brand-color-muted);
	font-size: var(--brand-text-sm);
	margin-block-end: var(--brand-space-4);
}

#review_form_wrapper .comment-form-rating {
	margin-block-end: var(--brand-space-4);
}

#review_form_wrapper .comment-form-rating label {
	display: block;
	margin-block-end: var(--brand-space-2);
	font-weight: var(--brand-weight-medium);
}

/*
 * WooCommerce's own frontend/single-product.js (jQuery, core plugin,
 * already loaded on is_product() — not enqueued by this theme) replaces
 * the native <select id="rating"> with a clickable
 * `<p class="stars"><a class="star-1">…</a>…</p>` widget the moment it
 * runs, and wires click/keyboard selection + syncs the hidden select's
 * value. This theme does not reimplement that widget — only styles it.
 * The <select> stays in the DOM as a no-JS fallback (core's own
 * behaviour), so it is left visible and normally styled rather than
 * hidden, in case JS fails to load.
 */
#review_form_wrapper #rating {
	width: auto;
	min-width: 10rem;
	min-height: 44px;
	padding-inline: var(--brand-space-3);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
	background-color: var(--brand-color-surface);
}

#review_form_wrapper p.stars {
	margin: 0;
}

#review_form_wrapper p.stars a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-inline-end: 2px;
	color: var(--brand-color-border);
	text-decoration: none;
	border-radius: var(--brand-radius-sm);
}

#review_form_wrapper p.stars a::before {
	font-size: 22px;
}

#review_form_wrapper p.stars a:hover,
#review_form_wrapper p.stars.selected a.active,
#review_form_wrapper p.stars.selected a:not(.active) {
	color: var(--brand-color-primary);
}

#review_form_wrapper p.stars a:focus-visible {
	outline: 3px solid var(--brand-color-primary);
	outline-offset: 2px;
}

#review_form_wrapper .comment-form-comment label {
	display: block;
	margin-block-end: var(--brand-space-2);
	font-weight: var(--brand-weight-medium);
}

#review_form_wrapper .comment-form-comment textarea,
#review_form_wrapper textarea#comment {
	width: 100%;
	min-height: 150px;
	padding: var(--brand-space-3);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
	font-family: inherit;
	font-size: var(--brand-text-base);
	line-height: 1.6;
	resize: vertical;
	transition: border-color var(--brand-transition-fast), box-shadow var(--brand-transition-fast);
}

@media (max-width: 35.99rem) {
	#review_form_wrapper .comment-form-comment textarea,
	#review_form_wrapper textarea#comment {
		min-height: 120px;
	}
}

#review_form_wrapper textarea:focus-visible,
#review_form_wrapper input:focus-visible,
#review_form_wrapper select:focus-visible {
	border-color: var(--brand-color-primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--brand-color-primary-soft);
}

#review_form_wrapper .comment-form-author,
#review_form_wrapper .comment-form-email {
	margin-block-end: var(--brand-space-4);
}

#review_form_wrapper .comment-form-author label,
#review_form_wrapper .comment-form-email label {
	display: block;
	margin-block-end: var(--brand-space-2);
	font-weight: var(--brand-weight-medium);
}

#review_form_wrapper .comment-form-author input,
#review_form_wrapper .comment-form-email input {
	width: 100%;
	min-height: 44px;
	padding-inline: var(--brand-space-3);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
}

#review_form_wrapper .required {
	color: var(--brand-color-danger);
	text-decoration: none;
}

#review_form_wrapper .form-submit {
	margin: var(--brand-space-4) 0 0;
}

#review_form_wrapper #submit {
	min-height: 44px;
	padding-inline: var(--brand-space-6);
	border: none;
	border-radius: var(--brand-radius-md);
	background-color: var(--brand-color-primary);
	color: #fff;
	font-family: var(--brand-font-body);
	font-size: var(--brand-text-base);
	font-weight: var(--brand-weight-bold);
	cursor: pointer;
	transition: background-color var(--brand-transition-fast);
}

#review_form_wrapper #submit:hover,
#review_form_wrapper #submit:focus-visible {
	background-color: var(--brand-color-primary-dark);
}

@media (max-width: 35.99rem) {
	#review_form_wrapper #submit {
		width: 100%;
	}
}

.woocommerce-verification-required,
.must-log-in {
	padding: var(--brand-space-4);
	border: 1px solid var(--brand-color-border);
	border-radius: var(--brand-radius-md);
	background-color: var(--brand-color-surface-alt);
	color: var(--brand-color-muted);
	font-size: var(--brand-text-sm);
}

/* ── Related / upsell products ───────────────────────────────────── */

/* The grid itself is the same .woocommerce ul.products the shop archive
   uses and is intentionally left untouched here (owned by
   product-card.css / woocommerce-base.css) — heading and section spacing
   only. */
.pkgc-product__below section.related,
.pkgc-product__below section.upsells {
	margin-block-start: 56px;
}

.pkgc-product__below section.related > h2,
.pkgc-product__below section.upsells > h2 {
	font-size: var(--brand-text-xl);
	font-weight: var(--brand-weight-bold);
	color: var(--brand-color-ink);
	margin: 0 0 var(--brand-space-5);
}

@media (max-width: 35.99rem) {
	.pkgc-product__below section.related,
	.pkgc-product__below section.upsells {
		margin-block-start: 40px;
	}
}

/* ── Reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.pkgc-product__summary .single_add_to_cart_button,
	.pkgc-product__summary .pkgc-qty__btn,
	.pkgc-product__below ul.tabs li a {
		transition: none;
	}
}
