/* AWENS Layer 3 product gallery and purchase-information foundation. */
#itempage {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(19rem, .92fr);
	column-gap: clamp(2rem, 5vw, 5.5rem);
	row-gap: 1.5rem;
	align-items: start;
}

#itempage #img-box {
	grid-row: span 2;
	min-width: 0;
	margin: 0;
	background: #f4efe8;
}

#itempage .itemimg,
#itempage .itemimg > a {
	display: block;
}

#itempage .itemimg img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: contain;
}

#itempage .detail-box,
#itempage .item-info {
	min-width: 0;
}

#itempage .item-name {
	margin: 0;
	font: 400 clamp(1.5rem, 2.4vw, 2.45rem)/1.25 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

#itempage .itemcode {
	margin-top: .7rem;
	color: #776652;
	font-size: .78rem;
	letter-spacing: .06em;
}

#itempage .item-description {
	margin-top: 1.5rem;
	line-height: 1.8;
}

#itempage .item-info {
	padding-top: 1.5rem;
	border-top: 1px solid rgba(27, 19, 12, .16);
}

#itempage .field_price {
	margin: 1.25rem 0;
	font: 400 clamp(1.35rem, 2.2vw, 2rem)/1.25 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

#itempage .field_cprice {
	display: none;
}

#itempage .c-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .85rem 1.25rem;
}

#itempage .quantity {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-size: .88rem;
}

#itempage .skuquantity {
	width: 4.25rem;
	min-height: 2.8rem;
	padding: .5rem .65rem;
	border: 1px solid rgba(27, 19, 12, .28);
	border-radius: 0;
	background: transparent;
}

#itempage .skubutton {
	min-height: 3rem;
	padding: .7rem 1.25rem;
	border: 1px solid #1b130c;
	border-radius: 0;
	background: #1b130c;
	color: #fbf6ed;
	font: 600 .85rem/1 "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
	letter-spacing: .08em;
	cursor: pointer;
}

#itempage .skubutton:hover,
#itempage .skubutton:focus-visible {
	background: #70421f;
	border-color: #70421f;
}

/* AWENS Layer 3 product discovery. Scoped to plugin-owned output only. */
.awens-product-commerce {
	margin-top: clamp(3.5rem, 8vw, 7rem);
	border-top: 1px solid rgba(27, 19, 12, .16);
}

.awens-product-rail,
.awens-product-support {
	position: relative;
	padding: clamp(2.25rem, 5vw, 4.5rem) 0;
	border-bottom: 1px solid rgba(27, 19, 12, .16);
}

.awens-product-rail__heading h2,
.awens-product-support h2 {
	margin: .2rem 0 1.6rem;
	color: inherit;
	font: 400 clamp(1.5rem, 2.2vw, 2.15rem)/1.25 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

.awens-product-rail__eyebrow,
.awens-product-support__eyebrow {
	margin: 0;
	color: #776652;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .14em;
}

.awens-product-rail__controls {
	position: absolute;
	top: clamp(2.25rem, 5vw, 4.5rem);
	right: 0;
	display: flex;
	gap: .45rem;
}

.awens-product-rail__control {
	width: 2.6rem;
	height: 2.6rem;
	border: 1px solid rgba(27, 19, 12, .22);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1rem;
	cursor: pointer;
}

.awens-product-rail__control:hover,
.awens-product-rail__control:focus-visible {
	border-color: #1b130c;
	background: #1b130c;
	color: #fbf6ed;
}

.awens-product-rail__viewport {
	display: grid;
	grid-auto-columns: minmax(190px, 23%);
	grid-auto-flow: column;
	gap: clamp(.85rem, 2vw, 1.5rem);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: inline mandatory;
	scrollbar-width: thin;
	padding: 0 0 .75rem;
}

.awens-product-card {
	min-width: 0;
	scroll-snap-align: start;
}

.awens-product-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.awens-product-card__image {
	display: grid;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	place-items: center;
	background: #f1ebe1;
}

.awens-product-card__image img,
.awens-product-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.awens-product-card__placeholder {
	background: linear-gradient(145deg, #e9e1d6, #f7f2eb);
}


.awens-product-card__name {
	display: block;
	margin: .85rem 0 .25rem;
	font: 400 1rem/1.5 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

.awens-product-card__price {
	display: block;
	font: 400 1rem/1.4 "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

.awens-product-card__link:hover .awens-product-card__name,
.awens-product-card__link:focus-visible .awens-product-card__name {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.awens-product-card__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: .35rem;
}

.awens-product-support__links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-top: 1px solid rgba(27, 19, 12, .16);
}

.awens-product-support__links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid rgba(27, 19, 12, .16);
	color: inherit;
	font-size: .9rem;
	text-decoration: none;
}

.awens-product-support__links a:nth-child(odd) {
	padding-right: 1.5rem;
}

.awens-product-support__links a:nth-child(even) {
	padding-left: 1.5rem;
}

.awens-product-support__links a:hover,
.awens-product-support__links a:focus-visible {
	color: #70421f;
}

@media (max-width: 900px) {
	#itempage {
	grid-template-columns: minmax(0, 1fr);
	row-gap: 1.5rem;
	}

	#itempage #img-box {
		grid-row: auto;
	}

	.awens-product-rail__viewport {
		grid-auto-columns: minmax(190px, 68vw);
		margin-right: calc(50% - 50vw + 1.25rem);
		padding-right: 2rem;
	}
}

@media (max-width: 560px) {
	#itempage {
		row-gap: 1.15rem;
	}

	#itempage .item-info {
		padding-top: 1.15rem;
	}

	#itempage .c-box {
		align-items: stretch;
	}

	#itempage .cart-button,
	#itempage .skubutton {
		width: 100%;
	}

	.awens-product-commerce {
		margin-top: 3.25rem;
	}

	.awens-product-rail__controls {
		display: none;
	}

	.awens-product-rail__viewport {
		grid-auto-columns: minmax(178px, 72vw);
	}

	.awens-product-support__links {
		grid-template-columns: 1fr;
	}

	.awens-product-support__links a:nth-child(odd),
	.awens-product-support__links a:nth-child(even) {
		padding-left: 0;
		padding-right: 0;
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 — desktop commerce layout v1
 * Kept in one desktop-only override so it can be rolled back independently.
 * The native Welcart form remains unchanged; this only places its existing
 * content and plugin-owned discovery sections on the shared product grid.
 * -------------------------------------------------------------------------- */
@media (min-width: 901px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) #itempage {
			grid-template-areas:
				"gallery detail"
				"gallery purchase"
				"specifications specifications"
				"commerce commerce";
			grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
			column-gap: clamp(3rem, 5vw, 4.5rem);
			row-gap: 0;
			max-width: 1200px;
			margin-inline: auto;
		}

		html body.single-post:has(#itempage) #itempage #img-box {
			grid-area: gallery;
			min-width: 0;
			align-self: start;
		}

		html body.single-post:has(#itempage) #itempage #img-box .itemimg,
		html body.single-post:has(#itempage) #itempage #img-box .itemimg a {
			display: grid;
			place-items: center;
		}

		html body.single-post:has(#itempage) #itempage #img-box .itemimg img {
			width: 100%;
			height: 100%;
			object-fit: contain;
		}

		html body.single-post:has(#itempage) #itempage .detail-box {
			grid-area: detail;
			min-width: 0;
		}

		/*
		 * Welcart places the form and plugin sections in .item-info. Flattening
		 * this neutral wrapper at desktop lets existing children occupy the
		 * intended grid rows without changing any markup, hooks, or form logic.
		 */
		html body.single-post:has(#itempage) #itempage .item-info {
			display: contents;
		}

		html body.single-post:has(#itempage) #itempage .item-info > form {
			grid-area: purchase;
			min-width: 0;
			margin: 0;
			padding-top: 2rem;
			border-top: 1px solid rgba(27, 19, 12, .16);
		}

		html body.single-post:has(#itempage) #itempage .item-info > .awens-specifications {
			grid-area: specifications;
			width: 100%;
			min-width: 0;
			margin-top: clamp(4rem, 8vw, 7rem);
		}

		html body.single-post:has(#itempage) #itempage .item-info > .awens-product-commerce {
			grid-area: commerce;
			width: 100%;
			min-width: 0;
		}

		html body.single-post:has(#itempage) .awens-product-rail__viewport {
			grid-auto-columns: minmax(0, 22%);
		}

		html body.single-post:has(#itempage) .awens-product-support__links {
			grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
			column-gap: 2rem;
		}

		html body.single-post:has(#itempage) .awens-product-support__links a:nth-child(odd),
		html body.single-post:has(#itempage) .awens-product-support__links a:nth-child(even) {
			padding-inline: 0;
		}
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 — Premium Polish v1
 * This namespace is limited to native Welcart item pages. It deliberately
 * leaves catalog, cart, checkout, presentation pages, and theme UI alone.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) {
		--awens-l3-surface: #ffffff;
		--awens-l3-surface-muted: #f6f6f4;
		--awens-l3-ink: #171717;
		--awens-l3-muted: #6a6a66;
		--awens-l3-line: #deded9;
		--awens-l3-accent: #393730;
		--awens-l3-focus: #58544c;
	}

	html body.single-post:has(#itempage) #itempage {
		color: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) #itempage .detail-box {
		border-color: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) #itempage .item-name {
		max-width: 14ch;
		color: var(--awens-l3-ink);
		font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
		font-size: clamp(2rem, 3vw, 3.4rem);
		letter-spacing: 0;
		line-height: 1.18;
	}

	html body.single-post:has(#itempage) #itempage .itemcode,
	html body.single-post:has(#itempage) #itempage .item-description,
	html body.single-post:has(#itempage) #itempage .zaikostatus,
	html body.single-post:has(#itempage) #itempage .field_price .tax,
	html body.single-post:has(#itempage) #itempage .quantity {
		color: var(--awens-l3-muted);
		font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
	}

	html body.single-post:has(#itempage) #itempage .item-description {
		font-size: .94rem;
		line-height: 1.9;
	}

	html body.single-post:has(#itempage) #itempage .field_price {
		color: var(--awens-l3-ink);
		font-size: clamp(1.75rem, 2.35vw, 2.45rem);
	}

	html body.single-post:has(#itempage) #itempage .skuquantity {
		border-color: var(--awens-l3-line);
		background: var(--awens-l3-surface);
		color: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) #itempage .skubutton {
		border-color: var(--awens-l3-ink);
		background: var(--awens-l3-ink);
		color: var(--awens-l3-surface);
	}

	html body.single-post:has(#itempage) #itempage .skubutton:hover,
	html body.single-post:has(#itempage) #itempage .skubutton:focus-visible {
		border-color: var(--awens-l3-accent);
		background: var(--awens-l3-accent);
	}

	/* The native image output remains visible without JavaScript. */
	html body.single-post:has(#itempage) #img-box[data-awens-gallery-ready] {
		background: transparent;
	}

	html body.single-post:has(#itempage) #img-box[data-awens-gallery-ready] .itemimg {
		display: block;
		aspect-ratio: auto;
		overflow: visible;
		background: transparent;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage {
		display: grid;
		min-width: 0;
		height: clamp(26rem, 44vw, 39rem);
		place-items: center;
		overflow: hidden;
		background: var(--awens-l3-surface-muted);
		touch-action: pan-y;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
		opacity: 1;
		transition: opacity 140ms ease;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img.is-changing {
		opacity: .78;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
		display: grid;
		grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
		gap: .75rem;
		align-items: center;
		margin-top: 1rem;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail {
		display: grid;
		grid-auto-columns: minmax(4.25rem, 18%);
		grid-auto-flow: column;
		gap: .7rem;
		overflow-x: auto;
		scroll-behavior: smooth;
		scroll-snap-type: inline mandatory;
		scrollbar-width: none;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail::-webkit-scrollbar {
		display: none;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail {
		display: grid;
		aspect-ratio: 1;
		min-width: 0;
		padding: 0;
		place-items: center;
		overflow: hidden;
		border: 1px solid transparent;
		background: var(--awens-l3-surface-muted);
		cursor: pointer;
		scroll-snap-align: start;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail.is-selected,
	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail[aria-current="true"] {
		border-color: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail:focus-visible,
	html body.single-post:has(#itempage) .awens-product-gallery__control:focus-visible,
	html body.single-post:has(#itempage) .awens-product-rail__control:focus-visible {
		outline: 2px solid var(--awens-l3-focus);
		outline-offset: 3px;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control,
	html body.single-post:has(#itempage) .awens-product-rail__control {
		display: grid;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0;
		place-items: center;
		border: 1px solid var(--awens-l3-line);
		border-radius: 50%;
		background: var(--awens-l3-surface);
		color: var(--awens-l3-ink);
		font-size: .95rem;
		line-height: 1;
		cursor: pointer;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control:hover,
	html body.single-post:has(#itempage) .awens-product-rail__control:hover {
		border-color: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control[hidden],
	html body.single-post:has(#itempage) .awens-product-rail__control[hidden] {
		display: none;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control:disabled,
	html body.single-post:has(#itempage) .awens-product-rail__control:disabled {
		opacity: .35;
		cursor: default;
	}

	html body.single-post:has(#itempage) .awens-product-commerce {
		border-color: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-rail,
	html body.single-post:has(#itempage) .awens-product-support {
		border-color: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-rail__heading h2,
	html body.single-post:has(#itempage) .awens-product-support h2 {
		color: var(--awens-l3-ink);
		font-size: clamp(1.45rem, 1.9vw, 2rem);
	}

	html body.single-post:has(#itempage) .awens-product-rail__eyebrow,
	html body.single-post:has(#itempage) .awens-product-support__eyebrow {
		color: var(--awens-l3-muted);
	}

	html body.single-post:has(#itempage) .awens-product-card__image {
		background: var(--awens-l3-surface-muted);
	}

	html body.single-post:has(#itempage) .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__price {
		color: var(--awens-l3-ink);
		font-size: .9rem;
		line-height: 1.5;
	}

	html body.single-post:has(#itempage) .awens-product-card__name {
		min-height: 2.9em;
		margin-top: .7rem;
	}

	html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__name {
		text-decoration: none;
	}

	html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__image {
		background: #f0f0ed;
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress {
		height: 2px;
		margin-top: 1.35rem;
		overflow: hidden;
		background: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress span {
		display: block;
		width: 100%;
		height: 100%;
		transform: scaleX(.18);
		transform-origin: left center;
		background: var(--awens-l3-ink);
		transition: transform 160ms ease;
	}

	html body.single-post:has(#itempage) .awens-product-support__links,
	html body.single-post:has(#itempage) .awens-product-support__links a {
		border-color: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-support__links a {
		color: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) .awens-product-support__links a:hover,
	html body.single-post:has(#itempage) .awens-product-support__links a:focus-visible {
		color: var(--awens-l3-accent);
	}
}

@media (max-width: 900px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .awens-product-gallery__stage {
			height: min(112vw, 31rem);
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
			position: relative;
			display: block;
			margin-right: calc(50% - 50vw + 1.25rem);
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control {
			position: absolute;
			top: 50%;
			z-index: 1;
			display: grid;
			width: 2.25rem;
			height: 2.25rem;
			transform: translateY(-50%);
			background: color-mix(in srgb, var(--awens-l3-surface) 94%, transparent);
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control--prev {
			left: .35rem;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control--next {
			right: .35rem;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control[hidden] {
			display: none;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail {
			grid-auto-columns: minmax(4.3rem, 23vw);
			padding-inline: 2.85rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__progress {
			margin-right: calc(50% - 50vw + 1.25rem);
		}
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 — carousel/UI regression fix v0.1.14
 * Retains native touch scrolling while keeping the existing controls
 * discoverable. This block deliberately affects only plugin-owned Layer 3 UI.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) .awens-product-rail[hidden],
	html body.single-post:has(#itempage) .awens-product-rail__progress[hidden] {
		display: none;
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress {
		height: 1px;
		margin-top: 1.25rem;
		overflow: hidden;
		border: 0;
		box-shadow: none;
		background: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress span {
		height: 1px;
		border: 0;
		box-shadow: none;
		background: var(--awens-l3-ink);
	}

	html body.single-post:has(#itempage) #toTop {
		display: none;
	}
}

@media (max-width: 900px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .awens-product-rail__controls {
			position: absolute;
			top: clamp(8.25rem, 23vw, 10.5rem);
			left: -.35rem;
			right: -.35rem;
			z-index: 1;
			display: flex;
			justify-content: space-between;
			pointer-events: none;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control {
			width: 2.3rem;
			height: 2.3rem;
			pointer-events: auto;
			background: color-mix(in srgb, var(--awens-l3-surface) 94%, transparent);
		}

		html body.single-post:has(#itempage) .awens-product-rail__control[hidden] {
			display: none;
		}
	}
}


/* --------------------------------------------------------------------------
 * AWENS Layer 3 — visual/UX stabilization v0.1.15
 * Restores the proven centered desktop canvas and fixes mobile gallery/rail
 * discoverability without touching Welcart data, forms, or parent templates.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) {
		--awens-l3-surface: #ffffff;
		--awens-l3-surface-muted: #f7f7f5;
		--awens-l3-ink: #161616;
		--awens-l3-muted: #666662;
		--awens-l3-line: #deded9;
		--awens-l3-accent: #34322e;
		background: var(--awens-l3-surface);
	}

	html body.single-post:has(#itempage) #main,
	html body.single-post:has(#itempage) #content,
	html body.single-post:has(#itempage) #itempage {
		background-color: var(--awens-l3-surface);
	}

	/* Main gallery stage: stable enough for mixed media, without giant letterbox voids. */
	html body.single-post:has(#itempage) .awens-product-gallery__stage {
		height: auto;
		aspect-ratio: 4 / 3;
		min-height: 0;
		background: var(--awens-l3-surface-muted);
	}

	/* Gallery navigation sits beside thumbnails, never on top of photography. */
	html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
		display: grid;
		grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
		gap: .55rem;
		align-items: stretch;
		margin-top: .85rem;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control.is-edge-hidden {
		visibility: hidden;
		pointer-events: none;
	}

	/* Hide browser-native rail scrollbars; the custom progress track is the only cue. */
	html body.single-post:has(#itempage) .awens-product-rail__viewport {
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	html body.single-post:has(#itempage) .awens-product-rail__viewport::-webkit-scrollbar {
		display: none;
	}

	/* One clean custom scrollbar: pale track + one dark moving thumb. */
	html body.single-post:has(#itempage) .awens-product-rail__progress {
		height: 2px;
		margin-top: 1.2rem;
		overflow: hidden;
		border: 0;
		box-shadow: none;
		background: var(--awens-l3-line);
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress span {
		display: block;
		width: 18%;
		height: 2px;
		margin-left: 0;
		transform: none;
		border: 0;
		box-shadow: none;
		background: var(--awens-l3-ink);
		transition: width 160ms ease, margin-left 160ms ease;
	}

	/* Avoid "two mysterious rules": rails use whitespace, Support owns the separator. */
	html body.single-post:has(#itempage) .awens-product-rail {
		border-bottom: 0;
	}

	html body.single-post:has(#itempage) .awens-product-support {
		border-top: 1px solid var(--awens-l3-line);
		border-bottom: 0;
	}

	html body.single-post:has(#itempage) .awens-product-commerce {
		margin-top: clamp(3rem, 5vw, 4.5rem);
		border-top: 0;
	}

	html body.single-post:has(#itempage) .awens-product-rail,
	html body.single-post:has(#itempage) .awens-product-support {
		padding-block: clamp(2.75rem, 5vw, 4rem);
	}

	/* Product-card copy remains tidy while the image stays the hero. */
	html body.single-post:has(#itempage) .awens-product-card__name {
		display: -webkit-box;
		min-height: 3em;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		text-decoration: none;
	}

	/* Welcart Basic toTop button is theme chrome, not part of this premium Layer 3. */
	html body.single-post:has(#itempage) #toTop,
	html body.single-post:has(#itempage) #page-top,
	html body.single-post:has(#itempage) #page_top,
	html body.single-post:has(#itempage) .page-top,
	html body.single-post:has(#itempage) .pagetop,
	html body.single-post:has(#itempage) .back-to-top,
	html body.single-post:has(#itempage) .scroll-to-top {
		display: none !important;
	}
}

@media (min-width: 901px) {
	@supports selector(body:has(#itempage)) {
		/* Restore v0.1.12 desktop-v2: release Welcart Basic's sidebar-width cage. */
		html body.single-post:has(#itempage) .two-column.right-set #content,
		html body.single-post:has(#itempage) .two-column.left-set #content,
		html body.single-post:has(#itempage) .two-column #content {
			float: none;
			width: 100%;
			max-width: none;
		}

		html body.single-post:has(#itempage) .two-column #sidebar {
			display: none;
		}

		html body.single-post:has(#itempage) #itempage {
			width: min(1240px, calc(100vw - 80px));
			max-width: 1240px;
			margin-inline: auto;
			grid-template-columns: minmax(0, 1.16fr) minmax(0, .94fr);
			column-gap: clamp(3rem, 5vw, 5rem);
		}

		html body.single-post:has(#itempage) #itempage .item-name {
			max-width: 18ch;
			font-size: clamp(2rem, 2.65vw, 3rem);
		}

		html body.single-post:has(#itempage) #itempage .item-info > .awens-specifications {
			margin-top: clamp(3.5rem, 6vw, 5rem);
		}

		html body.single-post:has(#itempage) #itempage .item-info > .awens-product-commerce {
			margin-top: clamp(3rem, 5vw, 4.5rem);
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail {
			grid-auto-columns: minmax(4.25rem, 17%);
		}
	}
}

@media (max-width: 900px) {
	@supports selector(body:has(#itempage)) {
		/* Mobile gallery: no overlaid circles. Controls occupy slim edge gutters. */
		html body.single-post:has(#itempage) .awens-product-gallery__stage {
			height: auto;
			aspect-ratio: 4 / 3;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
			position: static;
			display: grid;
			grid-template-columns: 1.6rem minmax(0, 1fr) 1.6rem;
			gap: .35rem;
			margin: .75rem 0 0;
			align-items: stretch;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control {
			position: static;
			display: grid;
			width: 1.6rem;
			height: auto;
			min-height: 4rem;
			transform: none;
			border: 0;
			border-radius: 0;
			background: transparent;
			font-family: Georgia, "Times New Roman", serif;
			font-size: 1.55rem;
			font-weight: 400;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control--prev {
			left: auto;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control--next {
			right: auto;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail {
			grid-auto-columns: 4.15rem;
			gap: .55rem;
			padding: 0;
			scroll-padding-inline: .25rem;
		}

		/* Keep carousel arrows by the heading, not pasted onto product images. */
		html body.single-post:has(#itempage) .awens-product-rail__heading {
			padding-right: 5.75rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__controls {
			position: absolute;
			top: 2.9rem;
			right: 0;
			left: auto;
			z-index: 2;
			display: flex;
			justify-content: flex-end;
			gap: .45rem;
			pointer-events: auto;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control {
			width: 2.35rem;
			height: 2.35rem;
			pointer-events: auto;
			background: var(--awens-l3-surface);
		}

		html body.single-post:has(#itempage) .awens-product-rail__viewport {
			margin-right: calc(50% - 50vw + 1.25rem);
			padding-right: 12vw;
			scroll-padding-left: 0;
		}

		html body.single-post:has(#itempage) .awens-product-rail__progress {
			margin-right: 0;
		}

		html body.single-post:has(#itempage) .awens-product-commerce {
			margin-top: 3rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail,
		html body.single-post:has(#itempage) .awens-product-support {
			padding-block: 3rem;
		}
	}
}

@media (max-width: 640px) {
	@supports selector(body:has(#itempage)) {
		/* Premium Polish had re-overridden the original mobile stack; restore it. */
		html body.single-post:has(#itempage) .awens-specifications__row {
			grid-template-columns: minmax(0, 1fr);
			gap: .3rem;
			padding-block: .95rem;
		}

		html body.single-post:has(#itempage) .awens-specifications__row dt,
		html body.single-post:has(#itempage) .awens-specifications__row dd {
			width: 100%;
		}

		html body.single-post:has(#itempage) .awens-product-card__name {
			min-height: 3.1em;
			font-size: .92rem;
		}
	}
}

/* Use quiet chevrons for product-rail navigation without changing PHP markup. */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) .awens-product-rail__control {
		font-size: 0;
	}
	html body.single-post:has(#itempage) .awens-product-rail__control::before {
		font-family: Georgia, "Times New Roman", serif;
		font-size: 1.3rem;
		line-height: 1;
	}
	html body.single-post:has(#itempage) .awens-product-rail__control[data-awens-rail-prev]::before {
		content: "‹";
	}
	html body.single-post:has(#itempage) .awens-product-rail__control[data-awens-rail-next]::before {
		content: "›";
	}
}


/* --------------------------------------------------------------------------
 * AWENS Layer 3 — Visual System v2 / v0.1.16
 * Final override for the public product page. This consolidates the visual
 * rules that had accumulated across v0.1.12–0.1.15 without touching Welcart
 * data, forms, cart logic, presentation pages, or parent-theme templates.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) {
		--awens-l3-surface: #ffffff;
		--awens-l3-surface-muted: #f7f7f5;
		--awens-l3-ink: #151515;
		--awens-l3-muted: #666666;
		--awens-l3-line: #ddddda;
		--awens-l3-line-soft: #ececea;
		--awens-l3-accent: #2f2d29;
		--awens-l3-section-space: 4.5rem;
		background: var(--awens-l3-surface) !important;
		color: var(--awens-l3-ink);
	}

	/* Keep the whole Layer 3 canvas visually continuous. Footer areas with an
	 * explicit dark theme background remain dark because their own rule wins. */
	html body.single-post:has(#itempage) #wrapper,
	html body.single-post:has(#itempage) #header,
	html body.single-post:has(#itempage) #masthead,
	html body.single-post:has(#itempage) .site-header,
	html body.single-post:has(#itempage) #main,
	html body.single-post:has(#itempage) #content,
	html body.single-post:has(#itempage) #itempage {
		background-color: var(--awens-l3-surface) !important;
	}

	/* Main product / gallery: fixed stage geometry. Only the image changes. */
	html body.single-post:has(#itempage) #itempage #img-box,
	html body.single-post:has(#itempage) #itempage #img-box .itemimg,
	html body.single-post:has(#itempage) .awens-product-gallery__stage {
		width: 100%;
		min-width: 0;
	}

	html body.single-post:has(#itempage) #itempage #img-box {
		background: transparent;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage {
		height: auto !important;
		aspect-ratio: 4 / 3;
		place-items: center;
		background: var(--awens-l3-surface-muted);
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img {
		width: 100%;
		height: 100%;
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
		object-position: center;
	}

	/* Gallery thumbnail navigation lives in its own gutters, never on photos. */
	html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
		grid-template-columns: 1.75rem minmax(0, 1fr) 1.75rem;
		gap: .55rem;
		align-items: stretch;
		margin-top: .9rem;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control {
		position: static !important;
		display: grid !important;
		width: 1.75rem !important;
		height: auto !important;
		min-height: 4.25rem;
		padding: 0;
		place-items: center;
		transform: none !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		color: var(--awens-l3-ink);
		font-family: Georgia, "Times New Roman", serif;
		font-size: 1.45rem;
		font-weight: 400;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control.is-edge-hidden {
		visibility: visible;
		opacity: .16;
		pointer-events: none;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__control:disabled {
		opacity: .16;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail {
		background: var(--awens-l3-surface-muted);
		border-color: transparent;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail.is-selected,
	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail[aria-current="true"] {
		border-color: var(--awens-l3-ink);
	}

	/* Major commerce sections use whitespace as hierarchy. Avoid stacked rules. */
	html body.single-post:has(#itempage) .awens-product-commerce {
		margin-top: 1.5rem;
		border: 0 !important;
	}

	html body.single-post:has(#itempage) .awens-product-rail,
	html body.single-post:has(#itempage) .awens-product-support {
		border: 0 !important;
	}

	html body.single-post:has(#itempage) .awens-product-rail {
		padding: 2.75rem 0;
	}

	html body.single-post:has(#itempage) .awens-product-support {
		padding: 3rem 0 3.75rem;
	}

	/* Support starts cleanly. The links themselves provide the single divider. */
	html body.single-post:has(#itempage) .awens-product-support__links {
		border-top: 1px solid var(--awens-l3-line) !important;
	}

	/* Product discovery navigation always keeps a stable pair while scrollable.
	 * The unavailable direction is quiet instead of disappearing. */
	html body.single-post:has(#itempage) .awens-product-rail__controls {
		display: flex;
		gap: .5rem;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control {
		width: 2.3rem;
		height: 2.3rem;
		border: 1px solid var(--awens-l3-line);
		border-radius: 50%;
		background: var(--awens-l3-surface);
		color: var(--awens-l3-ink);
		transition: border-color 140ms ease, opacity 140ms ease, background-color 140ms ease, color 140ms ease;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control:disabled {
		display: grid;
		opacity: .22;
		border-color: var(--awens-l3-line);
		background: transparent;
		color: var(--awens-l3-muted);
	}

	html body.single-post:has(#itempage) .awens-product-rail__control:not(:disabled):hover,
	html body.single-post:has(#itempage) .awens-product-rail__control:not(:disabled):focus-visible {
		border-color: var(--awens-l3-ink);
		background: var(--awens-l3-ink);
		color: var(--awens-l3-surface);
	}

	/* One progress cue only: a neutral track and a single dark moving thumb. */
	html body.single-post:has(#itempage) .awens-product-rail__progress {
		height: 2px;
		margin-top: 1.35rem;
		overflow: hidden;
		border: 0 !important;
		box-shadow: none !important;
		background: #e2e2df;
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress span {
		display: block;
		height: 2px;
		border: 0 !important;
		box-shadow: none !important;
		background: var(--awens-l3-ink);
	}

	/* Product-card hierarchy: photography first, copy restrained. */
	html body.single-post:has(#itempage) .awens-product-card__image {
		background: var(--awens-l3-surface-muted);
	}

	html body.single-post:has(#itempage) .awens-product-card__name {
		margin-top: .8rem;
		font-size: .94rem;
		line-height: 1.55;
		text-decoration: none !important;
	}

	html body.single-post:has(#itempage) .awens-product-card__price {
		font-size: .94rem;
		line-height: 1.45;
	}

	html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__name {
		text-decoration: none !important;
	}

	/* Theme chrome that conflicts with the premium product page. */
	html body.single-post:has(#itempage) #toTop,
	html body.single-post:has(#itempage) #page-top,
	html body.single-post:has(#itempage) #page_top,
	html body.single-post:has(#itempage) .page-top,
	html body.single-post:has(#itempage) .pagetop,
	html body.single-post:has(#itempage) .back-to-top,
	html body.single-post:has(#itempage) .scroll-to-top {
		display: none !important;
	}
}

@media (min-width: 901px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .two-column.right-set #content,
		html body.single-post:has(#itempage) .two-column.left-set #content,
		html body.single-post:has(#itempage) .two-column #content {
			float: none !important;
			width: 100% !important;
			max-width: none !important;
			margin-inline: auto !important;
		}

		html body.single-post:has(#itempage) .two-column #sidebar {
			display: none !important;
		}

		html body.single-post:has(#itempage) #itempage {
			width: min(1280px, calc(100vw - 96px));
			max-width: 1280px;
			margin-inline: auto;
			grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
			column-gap: clamp(3.5rem, 5vw, 5.5rem);
		}

		html body.single-post:has(#itempage) #itempage #img-box {
			width: 100%;
		}

		html body.single-post:has(#itempage) #itempage .item-name {
			max-width: 22ch;
			font-size: clamp(2.05rem, 2.45vw, 2.75rem);
			line-height: 1.2;
		}

		html body.single-post:has(#itempage) #itempage .item-description {
			max-width: 38rem;
			font-size: .92rem;
			line-height: 1.85;
		}

		html body.single-post:has(#itempage) #itempage .item-info > form {
			padding-top: 1.75rem;
			border-color: var(--awens-l3-line);
		}

		html body.single-post:has(#itempage) .awens-specifications {
			width: min(100%, 62.5rem);
			max-width: 62.5rem;
			margin-inline: auto;
			margin-top: 4rem;
			padding-top: 2.25rem;
		}

		html body.single-post:has(#itempage) .awens-specifications h2 {
			text-align: center;
			font-size: clamp(1.85rem, 2.1vw, 2.2rem);
			letter-spacing: .02em;
		}

		html body.single-post:has(#itempage) .awens-product-rail__heading,
		html body.single-post:has(#itempage) .awens-product-support__eyebrow,
		html body.single-post:has(#itempage) .awens-product-support h2 {
			text-align: center;
		}

		html body.single-post:has(#itempage) .awens-product-rail__heading h2,
		html body.single-post:has(#itempage) .awens-product-support h2 {
			margin-top: .35rem;
			font-size: clamp(1.8rem, 2vw, 2.15rem);
			letter-spacing: .015em;
		}

		html body.single-post:has(#itempage) .awens-product-rail__controls {
			top: 3.15rem;
			right: 0;
		}

		html body.single-post:has(#itempage) .awens-product-rail__viewport {
			grid-auto-columns: minmax(0, 22.4%);
			gap: clamp(1.25rem, 2vw, 1.75rem);
			padding-bottom: .25rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail:not(.is-overflowing) .awens-product-rail__viewport {
			display: flex;
			justify-content: center;
			overflow: visible;
		}

		html body.single-post:has(#itempage) .awens-product-rail:not(.is-overflowing) .awens-product-card {
			flex: 0 0 22.4%;
		}

		html body.single-post:has(#itempage) .awens-product-support__links {
			grid-template-columns: repeat(2, minmax(0, 1fr));
			column-gap: 3rem;
		}
	}
}

@media (max-width: 900px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) {
			--awens-l3-section-space: 3.5rem;
		}

		html body.single-post:has(#itempage) #itempage {
			width: 100%;
			max-width: none;
		}

		/* Mobile gallery geometry in v0.1.15 was already sound. Keep that compact
		 * 4:3 stage, but make its width explicit so all selected images share it. */
		html body.single-post:has(#itempage) .awens-product-gallery__stage {
			width: 100%;
			aspect-ratio: 4 / 3;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumbs {
			grid-template-columns: 1.45rem minmax(0, 1fr) 1.45rem;
			gap: .4rem;
			margin-top: .8rem;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__control {
			width: 1.45rem !important;
			min-height: 4rem;
			font-size: 1.35rem;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__thumb-rail {
			grid-auto-columns: 4.2rem;
			gap: .55rem;
			padding: 0;
		}

		/* Mobile keeps titles readable and controls in a fixed, non-overlapping
		 * header zone. Both controls remain visible while overflow exists. */
		html body.single-post:has(#itempage) .awens-product-rail__heading {
			padding-right: 5.25rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__controls {
			position: absolute;
			top: 2.45rem;
			right: 0;
			left: auto;
			z-index: 2;
			gap: .4rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control {
			width: 2.1rem;
			height: 2.1rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__viewport {
			margin-right: calc(50% - 50vw + 1.25rem);
			padding-right: 10vw;
			scroll-padding-inline: 0;
		}

		html body.single-post:has(#itempage) .awens-product-rail,
		html body.single-post:has(#itempage) .awens-product-support {
			padding-block: 2.6rem;
		}

		html body.single-post:has(#itempage) .awens-product-commerce {
			margin-top: 1.25rem;
		}

		html body.single-post:has(#itempage) .awens-product-support {
			padding-top: 2rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__progress {
			margin-top: 1.2rem;
		}

		html body.single-post:has(#itempage) .awens-product-card__name {
			min-height: 3em;
			font-size: .92rem;
			line-height: 1.5;
		}
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 — micro polish / v0.1.17
 * Canonical neutral canvas for the AWENS storefront product page.
 * Keep this exact white as the baseline when the same design system is later
 * extended to Layer 1 / Layer 2 / shared site chrome through the child theme.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	:root {
		--awens-page-bg: #ffffff;
		--awens-page-surface-muted: #f7f7f5;
		--awens-page-ink: #151515;
		--awens-page-muted: #666666;
		--awens-page-line: #ddddda;
	}

	/* Force one identical neutral canvas on desktop and mobile. Older Welcart
	 * Basic wrappers carried a warm cream background at some breakpoints. */
	html:has(body.single-post #itempage),
	html body.single-post:has(#itempage),
	html body.single-post:has(#itempage) #wrapper,
	html body.single-post:has(#itempage) #main,
	html body.single-post:has(#itempage) #content,
	html body.single-post:has(#itempage) #itempage,
	html body.single-post:has(#itempage) .awens-specifications,
	html body.single-post:has(#itempage) .awens-product-commerce,
	html body.single-post:has(#itempage) .awens-product-rail,
	html body.single-post:has(#itempage) .awens-product-support {
		background-color: var(--awens-page-bg) !important;
	}

	html body.single-post:has(#itempage) {
		--awens-l3-surface: var(--awens-page-bg);
		--awens-l3-surface-muted: var(--awens-page-surface-muted);
		--awens-l3-ink: var(--awens-page-ink);
		--awens-l3-muted: var(--awens-page-muted);
		--awens-l3-line: var(--awens-page-line);
	}

	/* Recommended now follows the same bilingual hierarchy as Recently Viewed
	 * and Support: English eyebrow above the Japanese section title. */
	html body.single-post:has(#itempage) .awens-product-rail--recommended .awens-product-rail__eyebrow {
		text-transform: uppercase;
	}
}


/* --------------------------------------------------------------------------
 * AWENS Layer 3 — product rail navigation polish / v0.1.18
 * Match the successful gallery-thumbnail navigation language: arrows live in
 * dedicated side gutters, never on product imagery. A disabled direction
 * remains visible but quiet so the layout never jumps or looks unfinished.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) .awens-product-rail {
		display: grid;
		grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
		column-gap: .75rem;
	}

	html body.single-post:has(#itempage) .awens-product-rail__heading {
		grid-column: 1 / -1;
		grid-row: 1;
		padding-right: 0 !important;
	}

	/* Let the two existing buttons become the left/right grid items. */
	html body.single-post:has(#itempage) .awens-product-rail__controls {
		display: contents !important;
		position: static !important;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control {
		position: static !important;
		align-self: start;
		width: 2.25rem !important;
		height: 4.5rem !important;
		min-width: 0;
		margin-top: clamp(8.5rem, 10vw, 10rem);
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		color: var(--awens-l3-ink) !important;
		opacity: 1;
		box-shadow: none !important;
		place-items: center;
		transition: opacity 140ms ease, color 140ms ease;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control[data-awens-rail-prev] {
		grid-column: 1;
		grid-row: 2;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control[data-awens-rail-next] {
		grid-column: 3;
		grid-row: 2;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control::before {
		font-size: 1.55rem;
		font-weight: 400;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control:disabled {
		display: grid !important;
		color: #bdbdb9 !important;
		opacity: .5 !important;
		cursor: default;
	}

	html body.single-post:has(#itempage) .awens-product-rail__control:not(:disabled):hover,
	html body.single-post:has(#itempage) .awens-product-rail__control:not(:disabled):focus-visible {
		background: transparent !important;
		color: var(--awens-l3-ink) !important;
		opacity: .58;
		outline-offset: .15rem;
	}

	html body.single-post:has(#itempage) .awens-product-rail__viewport {
		grid-column: 2;
		grid-row: 2;
		min-width: 0;
		margin-inline: 0 !important;
	}

	html body.single-post:has(#itempage) .awens-product-rail__progress {
		grid-column: 2;
		grid-row: 3;
		width: 100%;
	}
}

@media (max-width: 900px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .awens-product-rail {
			grid-template-columns: 1.45rem minmax(0, 1fr) 1.45rem;
			column-gap: .4rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control {
			width: 1.45rem !important;
			height: 4.25rem !important;
			margin-top: 9rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control::before {
			font-size: 1.4rem;
		}

		/* The viewport now owns only the center column, so there is no need for
		 * the earlier full-bleed negative margin that made cards feel clipped. */
		html body.single-post:has(#itempage) .awens-product-rail__viewport {
			margin-right: 0 !important;
			padding-right: 8vw;
		}
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 — product card interaction polish / v0.1.19
 * Remove theme/link underlines from every card state. Keep the interaction
 * discoverable with a restrained image fade on real pointer hover instead.
 * Touch swiping must never leave title/price text decorations behind.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) .awens-product-card__link,
	html body.single-post:has(#itempage) .awens-product-card__link:link,
	html body.single-post:has(#itempage) .awens-product-card__link:visited,
	html body.single-post:has(#itempage) .awens-product-card__link:hover,
	html body.single-post:has(#itempage) .awens-product-card__link:focus,
	html body.single-post:has(#itempage) .awens-product-card__link:focus-visible,
	html body.single-post:has(#itempage) .awens-product-card__link:active,
	html body.single-post:has(#itempage) .awens-product-card__link .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link .awens-product-card__price,
	html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__price,
	html body.single-post:has(#itempage) .awens-product-card__link:focus .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:focus .awens-product-card__price,
	html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__price,
	html body.single-post:has(#itempage) .awens-product-card__link:active .awens-product-card__name,
	html body.single-post:has(#itempage) .awens-product-card__link:active .awens-product-card__price {
		text-decoration: none !important;
		text-decoration-line: none !important;
		border-bottom: 0 !important;
		box-shadow: none;
		background-image: none !important;
	}

	html body.single-post:has(#itempage) .awens-product-card__image img,
	html body.single-post:has(#itempage) .awens-product-card__placeholder {
		transition: opacity 180ms ease;
	}
}

@media (hover: hover) and (pointer: fine) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__image img,
		html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__image img,
		html body.single-post:has(#itempage) .awens-product-card__link:hover .awens-product-card__placeholder,
		html body.single-post:has(#itempage) .awens-product-card__link:focus-visible .awens-product-card__placeholder {
			opacity: .84;
		}
	}
}

/* --------------------------------------------------------------------------
 * AWENS Layer 3 + native Welcart cart — quantity / cart polish / v0.1.21
 * Keep the successful v0.1.16+ visual system intact. This final scoped layer
 * only adds premium quantity steppers and brings the native cart canvas onto
 * the same AWENS white design tokens. Welcart's original inputs and update
 * submit remain in the DOM as progressive-enhancement fallbacks.
 * -------------------------------------------------------------------------- */
:root {
	--awens-page-bg: #ffffff;
	--awens-page-surface: #f7f7f5;
	--awens-page-ink: #151515;
	--awens-page-muted: #666666;
	--awens-page-line: #ddddda;
}

.awens-quantity-stepper {
	display: inline-grid;
	grid-template-columns: 2.85rem minmax(3.7rem, auto) 2.85rem;
	min-height: 3.2rem;
	border: 1px solid var(--awens-page-line);
	background: var(--awens-page-bg);
	vertical-align: middle;
}

.awens-quantity-stepper__button,
.awens-quantity-stepper__input {
	min-width: 0;
	min-height: 3.2rem;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--awens-page-ink) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

.awens-quantity-stepper__button {
	display: grid;
	place-items: center;
	padding: 0 !important;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.awens-quantity-stepper__button--decrease {
	border-right: 1px solid var(--awens-page-line) !important;
}

.awens-quantity-stepper__button--increase {
	border-left: 1px solid var(--awens-page-line) !important;
}

.awens-quantity-stepper__button:not(:disabled):hover,
.awens-quantity-stepper__button:not(:disabled):focus-visible {
	background: var(--awens-page-surface) !important;
}

.awens-quantity-stepper__button:disabled {
	color: #c7c7c3 !important;
	cursor: default;
	opacity: .7;
}

.awens-quantity-stepper__input {
	width: 100% !important;
	padding: .55rem .4rem !important;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-align: center;
	cursor: default;
	caret-color: transparent;
	-webkit-appearance: none;
	appearance: none;
}

.awens-quantity-stepper__input::-webkit-outer-spin-button,
.awens-quantity-stepper__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) #itempage .quantity {
		align-items: flex-end;
		gap: .7rem;
	}

	html body.single-post:has(#itempage) #itempage .skuquantity.awens-quantity-stepper__input {
		width: 100% !important;
		min-height: 3.2rem;
		padding: .55rem .4rem !important;
		border: 0 !important;
		background: transparent !important;
	}
}

/* Native Welcart cart page: white canvas using the same tokens as Layer 3. */
body.awens-cart-page {
	background: var(--awens-page-bg) !important;
	color: var(--awens-page-ink);
}

body.awens-cart-page #content,
body.awens-cart-page #main,
body.awens-cart-page #primary,
body.awens-cart-page .site-content,
body.awens-cart-page .entry-content,
body.awens-cart-page article,
body.awens-cart-page #cart,
body.awens-cart-page #cart form,
body.awens-cart-page #cart_table,
body.awens-cart-page #cart_table thead,
body.awens-cart-page #cart_table tbody,
body.awens-cart-page #cart_table tr,
body.awens-cart-page #cart_table th,
body.awens-cart-page #cart_table td {
	background-color: var(--awens-page-bg) !important;
}

body.awens-cart-page #cart,
body.awens-cart-page #cart_table {
	color: var(--awens-page-ink);
}

body.awens-cart-page #cart_table,
body.awens-cart-page #cart_table th,
body.awens-cart-page #cart_table td {
	border-color: var(--awens-page-line) !important;
}

body.awens-cart-page #cart_table input.quantity.awens-quantity-stepper__input,
body.awens-cart-page #cart_table input[name^="quant["].awens-quantity-stepper__input {
	width: 100% !important;
	min-height: 3.2rem !important;
	padding: .55rem .4rem !important;
	border: 0 !important;
	background: transparent !important;
	text-align: center;
}

body.awens-cart-page #cart_table td.quantity .awens-quantity-stepper {
	margin-inline: auto;
}

/* Hide the old "quantity update" instruction/button only after JS has built
 * the stepper + automatic native Welcart submit path. It remains a fallback
 * when JavaScript is unavailable. */
body.awens-cart-page.awens-cart-enhanced .upbutton {
	display: none !important;
}

body.awens-cart-page.is-awens-cart-updating .awens-quantity-stepper {
	opacity: .62;
	pointer-events: none;
}

@media (max-width: 900px) {
	.awens-quantity-stepper {
		grid-template-columns: 2.65rem minmax(3.45rem, auto) 2.65rem;
		min-height: 3.05rem;
	}

	.awens-quantity-stepper__button,
	.awens-quantity-stepper__input {
		min-height: 3.05rem;
	}

	body.awens-cart-page #cart_table td.quantity .awens-quantity-stepper {
		margin-inline: 0;
	}
}


/* --------------------------------------------------------------------------
 * AWENS v0.1.21 — cart interaction + final UI regression fixes
 * Builds only on the accepted v0.1.16+ visual system. This layer fixes:
 * 1) cart quantity changes without page jumps, 2) full white cart canvas,
 * 3) product quantity overlap, 4) larger desktop rail chevrons,
 * 5) support-link underlines, 6) mobile double-tap zoom on steppers.
 * -------------------------------------------------------------------------- */

/* Touch controls: keep tap responsive without disabling normal pinch zoom. */
.awens-quantity-stepper,
.awens-quantity-stepper__button,
.awens-quantity-stepper__input {
	touch-action: manipulation;
}

.awens-quantity-stepper__button {
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

/* Product page: give the quantity control real layout width so it can never
 * visually overflow into the native Welcart cart button. */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) {
		display: grid;
		grid-template-columns: minmax(10.75rem, 11.5rem) minmax(0, 1fr);
		gap: 1rem;
		align-items: end;
		width: 100%;
	}

	html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) .quantity {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: .55rem;
		width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
	}

	html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) .awens-quantity-stepper {
		width: 100%;
		grid-template-columns: 2.9rem minmax(4rem, 1fr) 2.9rem;
	}

	html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) .skubutton,
	html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) .cart-button {
		width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
	}

	/* Larger, clearer desktop arrows while keeping them outside product cards. */
	@media (min-width: 901px) {
		html body.single-post:has(#itempage) .awens-product-rail {
			grid-template-columns: 2.8rem minmax(0, 1fr) 2.8rem;
			column-gap: .9rem;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control {
			width: 2.8rem !important;
		}

		html body.single-post:has(#itempage) .awens-product-rail__control::before {
			font-size: 1.95rem !important;
		}
	}

	/* Support rows keep their structural divider, but never underline their
	 * text or arrow on hover/tap/focus. Interaction is a quiet opacity shift. */
	html body.single-post:has(#itempage) .awens-product-support__links a,
	html body.single-post:has(#itempage) .awens-product-support__links a:link,
	html body.single-post:has(#itempage) .awens-product-support__links a:visited,
	html body.single-post:has(#itempage) .awens-product-support__links a:hover,
	html body.single-post:has(#itempage) .awens-product-support__links a:focus,
	html body.single-post:has(#itempage) .awens-product-support__links a:focus-visible,
	html body.single-post:has(#itempage) .awens-product-support__links a:active,
	html body.single-post:has(#itempage) .awens-product-support__links a span {
		text-decoration: none !important;
		text-decoration-line: none !important;
		box-shadow: none !important;
		background-image: none !important;
	}

	html body.single-post:has(#itempage) .awens-product-support__links a {
		transition: opacity 150ms ease;
	}

	html body.single-post:has(#itempage) .awens-product-support__links a:hover,
	html body.single-post:has(#itempage) .awens-product-support__links a:focus-visible {
		color: var(--awens-l3-ink) !important;
		opacity: .66;
	}
}

@media (max-width: 560px) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) {
			grid-template-columns: minmax(0, 1fr);
			gap: .85rem;
		}

		html body.single-post:has(#itempage) #itempage .c-box:has(.awens-quantity-stepper) .awens-quantity-stepper {
			width: min(100%, 11.5rem);
		}
	}
}

/* Cart: force every page-level Welcart wrapper onto the accepted #FFFFFF
 * canvas. The active cart step uses typography/border, not a cream fill. */
html body.awens-cart-page,
body.awens-cart-page #wrapper,
body.awens-cart-page #content,
body.awens-cart-page #primary,
body.awens-cart-page #main,
body.awens-cart-page .site-content,
body.awens-cart-page .page,
body.awens-cart-page .post,
body.awens-cart-page article,
body.awens-cart-page .entry,
body.awens-cart-page .entry-content,
body.awens-cart-page .cart_page,
body.awens-cart-page #cart,
body.awens-cart-page #inside-cart,
body.awens-cart-page .header_explanation,
body.awens-cart-page .footer_explanation,
body.awens-cart-page .usccart_navi,
body.awens-cart-page .usccart_navi ol.ucart {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

body.awens-cart-page .usccart_navi ol.ucart li {
	background: #ffffff !important;
	color: var(--awens-page-muted) !important;
	border-color: var(--awens-page-line) !important;
}

body.awens-cart-page .usccart_navi ol.ucart li.current,
body.awens-cart-page .usccart_navi ol.ucart li.usccart_cart {
	background: #ffffff !important;
	color: var(--awens-page-ink) !important;
	border-bottom-color: var(--awens-page-ink) !important;
}

body.awens-cart-page .cart_page_title {
	color: var(--awens-page-ink) !important;
}

/* Async cart updates are deliberately subtle: no page jump, no overlay. */
body.awens-cart-page.is-awens-cart-updating #inside-cart {
	cursor: progress;
}

body.awens-cart-page.is-awens-cart-updating .awens-quantity-stepper {
	opacity: .5;
}

@media (max-width: 900px) {
	body.awens-cart-page .awens-quantity-stepper__button {
		min-width: 2.75rem;
		min-height: 3.1rem;
		font-size: 1.25rem;
	}
}

/* --------------------------------------------------------------------------
 * AWENS v0.1.22 — checkout visual consistency / customer-form rhythm
 * Builds only on the accepted v0.1.16+ visual system. This layer is scoped to
 * Welcart's native cart / customer / delivery / confirmation flow and does not
 * alter form markup or checkout logic.
 * -------------------------------------------------------------------------- */

/* Cart/checkout header + footer must sit on the same pure-white canvas as the
 * Layer 3 product page. Keep this scoped to Welcart checkout pages so the
 * plugin does not become a global theme controller. */
body.awens-cart-page #header,
body.awens-cart-page #header-in,
body.awens-cart-page .header,
body.awens-cart-page .header-in,
body.awens-cart-page header.site-header,
body.awens-cart-page .site-header,
body.awens-cart-page #masthead,
body.awens-cart-page #footer,
body.awens-cart-page #footer-in,
body.awens-cart-page .footer,
body.awens-cart-page .footer-in,
body.awens-cart-page footer.site-footer,
body.awens-cart-page .site-footer,
body.awens-cart-page #colophon {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

body.awens-cart-page #header,
body.awens-cart-page .site-header,
body.awens-cart-page #masthead,
body.awens-cart-page #footer,
body.awens-cart-page .site-footer,
body.awens-cart-page #colophon {
	border-color: var(--awens-page-line) !important;
}

/* The cart / customer / delivery / confirm canvas should read as one continuous
 * white page rather than cream theme chrome stitched onto a white body. */
body.awens-cart-page .cart_page,
body.awens-cart-page #wc_cart,
body.awens-cart-page #wc_customer,
body.awens-cart-page #wc_delivery,
body.awens-cart-page #wc_confirm,
body.awens-cart-page #customer-info,
body.awens-cart-page #delivery-info,
body.awens-cart-page #confirm-info,
body.awens-cart-page .customer-info,
body.awens-cart-page .delivery-info,
body.awens-cart-page .confirm-info,
body.awens-cart-page .customer_form,
body.awens-cart-page .delivery_form {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

/* Customer-step accordion headings were visually cramped in Welcart Basic.
 * Give them deliberate breathing room while keeping the native open/close
 * behaviour and wording intact. */
body.awens-cart-page #wc_customer h5,
body.awens-cart-page #customer-info h5,
body.awens-cart-page #customer-info #mem h5,
body.awens-cart-page #customer-info #nonmember h5,
body.awens-cart-page .customer-info h5 {
	margin: 1.7rem 0 1.05rem !important;
	padding: .35rem 0 .8rem !important;
	font-size: clamp(1.12rem, 1.7vw, 1.35rem) !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: .015em !important;
	color: var(--awens-page-ink) !important;
	border-bottom: 1px solid var(--awens-page-line) !important;
	background: transparent !important;
}

/* Native customer/delivery labels and cells: more rhythm, less visual crowding. */
body.awens-cart-page table.customer_form,
body.awens-cart-page table.delivery_form {
	border-collapse: separate !important;
	border-spacing: 0 !important;
}

body.awens-cart-page table.customer_form th,
body.awens-cart-page table.customer_form td,
body.awens-cart-page table.delivery_form th,
body.awens-cart-page table.delivery_form td {
	padding-top: .8rem !important;
	padding-bottom: .8rem !important;
	line-height: 1.55 !important;
	vertical-align: middle !important;
}

body.awens-cart-page table.customer_form th,
body.awens-cart-page table.delivery_form th {
	font-weight: 600 !important;
	letter-spacing: .01em !important;
	color: #4f4f4f !important;
}

body.awens-cart-page table.customer_form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.awens-cart-page table.customer_form select,
body.awens-cart-page table.customer_form textarea,
body.awens-cart-page table.delivery_form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.awens-cart-page table.delivery_form select,
body.awens-cart-page table.delivery_form textarea {
	min-height: 3rem;
	line-height: 1.45;
}

/* Cart item total: on mobile Welcart Basic's table transformation leaves a
 * large vertical void around the tfoot row. Rebuild only that footer row into
 * a compact two-column summary while preserving the native values. */
@media (max-width: 900px) {
	body.awens-cart-page #cart_table tfoot {
		display: block !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	body.awens-cart-page #cart_table tfoot tr {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto !important;
		align-items: center !important;
		gap: 1rem !important;
		width: 100% !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: 1rem 0 !important;
		border-top: 1px solid var(--awens-page-line) !important;
		border-bottom: 0 !important;
		background: #ffffff !important;
	}

	body.awens-cart-page #cart_table tfoot th,
	body.awens-cart-page #cart_table tfoot td {
		display: block !important;
		width: auto !important;
		min-width: 0 !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: .2rem 0 !important;
		border: 0 !important;
		background: #ffffff !important;
		line-height: 1.35 !important;
	}

	body.awens-cart-page #cart_table tfoot tr > :first-child {
		grid-column: 1 !important;
		text-align: left !important;
		font-size: 1rem !important;
		font-weight: 600 !important;
	}

	body.awens-cart-page #cart_table tfoot tr > :nth-child(2) {
		grid-column: 2 !important;
		text-align: right !important;
		font-size: clamp(1.45rem, 7vw, 1.95rem) !important;
		font-weight: 500 !important;
		white-space: nowrap;
	}

	/* Welcart's final blank colspan cell is structural only. Hiding it removes
	 * the extra mobile row-space without affecting totals or checkout logic. */
	body.awens-cart-page #cart_table tfoot tr > :last-child:not(:first-child):not(:nth-child(2)) {
		display: none !important;
	}

	body.awens-cart-page #wc_customer h5,
	body.awens-cart-page #customer-info h5,
	body.awens-cart-page #customer-info #mem h5,
	body.awens-cart-page #customer-info #nonmember h5,
	body.awens-cart-page .customer-info h5 {
		margin-top: 1.3rem !important;
		margin-bottom: .8rem !important;
		padding-bottom: .65rem !important;
		font-size: 1.08rem !important;
		line-height: 1.55 !important;
	}

	body.awens-cart-page table.customer_form th,
	body.awens-cart-page table.customer_form td,
	body.awens-cart-page table.delivery_form th,
	body.awens-cart-page table.delivery_form td {
		padding-top: .55rem !important;
		padding-bottom: .55rem !important;
		line-height: 1.5 !important;
	}
}


/* --------------------------------------------------------------------------
 * AWENS v0.1.23 — fixed-stage gallery / full-image viewer / mobile cart total
 * Continues the accepted v0.1.16+ strategy: latest-version scoped overrides,
 * no Welcart Core, parent-theme or template changes.
 * -------------------------------------------------------------------------- */
@supports selector(body:has(#itempage)) {
	/* The fixed 4:3 gallery stage stays geometrically stable. The artwork itself
	 * chooses cover only when cropping is modest; extreme portrait/landscape art
	 * remains fully visible. Any unused stage area is pure white, never grey. */
	html body.single-post:has(#itempage) .awens-product-gallery__stage {
		background: #ffffff !important;
		cursor: zoom-in;
		outline: none;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage:focus-visible {
		outline: 2px solid var(--awens-l3-focus);
		outline-offset: 3px;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img.is-smart-cover {
		object-fit: cover !important;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img.is-smart-contain {
		object-fit: contain !important;
	}

	/* Thumbnail gutters also stay neutral-white so a narrow source image never
	 * creates a conspicuous grey tile around itself. */
	html body.single-post:has(#itempage) .awens-product-gallery__thumbnail {
		background: #ffffff !important;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img.is-entering-from-right {
		animation: awens-gallery-enter-from-right 220ms ease-out both;
	}

	html body.single-post:has(#itempage) .awens-product-gallery__stage img.is-entering-from-left {
		animation: awens-gallery-enter-from-left 220ms ease-out both;
	}
}

@keyframes awens-gallery-enter-from-right {
	from { opacity: .58; transform: translateX(2.75%); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes awens-gallery-enter-from-left {
	from { opacity: .58; transform: translateX(-2.75%); }
	to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
	.awens-product-gallery__stage img.is-entering-from-right,
	.awens-product-gallery__stage img.is-entering-from-left {
		animation: none !important;
	}
}

/* Full-image viewer: clicking/tapping the fixed main stage opens the original
 * image on an unobtrusive overlay. No third-party carousel/lightbox library. */
body.awens-gallery-viewer-open {
	overflow: hidden;
}

.awens-product-gallery__viewer[hidden] {
	display: none !important;
}

.awens-product-gallery__viewer {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	padding: clamp(1rem, 3vw, 2rem);
	place-items: center;
	background: rgba(14, 14, 14, .94);
}

.awens-product-gallery__viewer-panel {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
}

.awens-product-gallery__viewer-image {
	display: block;
	width: auto;
	height: auto;
	max-width: min(94vw, 1500px);
	max-height: 90dvh;
	object-fit: contain;
	background: transparent;
}

.awens-product-gallery__viewer-close {
	position: fixed;
	top: max(1rem, env(safe-area-inset-top));
	right: max(1rem, env(safe-area-inset-right));
	display: grid;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .48);
	border-radius: 50%;
	background: rgba(0, 0, 0, .26);
	color: #ffffff;
	font: 300 1.75rem/1 -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
	cursor: pointer;
}

.awens-product-gallery__viewer-close:hover,
.awens-product-gallery__viewer-close:focus-visible {
	border-color: #ffffff;
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* Welcart's native cart footer has structural empty cells before/after the
 * actual label/amount. Target the real classes instead of child positions so
 * the mobile total cannot expand into a giant vertical void. */
@media (max-width: 900px) {
	body.awens-cart-page #cart_table tfoot,
	body.awens-cart-page #cart_table tfoot tr {
		width: 100% !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		background: #ffffff !important;
	}

	body.awens-cart-page #cart_table tfoot {
		display: block !important;
	}

	body.awens-cart-page #cart_table tfoot tr {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto !important;
		align-items: center !important;
		gap: 1rem !important;
		padding: 1rem 0 !important;
		border-top: 1px solid var(--awens-page-line) !important;
		border-bottom: 0 !important;
	}

	body.awens-cart-page #cart_table tfoot tr > .num,
	body.awens-cart-page #cart_table tfoot tr > .thumbnail,
	body.awens-cart-page #cart_table tfoot tr > .stock,
	body.awens-cart-page #cart_table tfoot tr > .action {
		display: none !important;
	}

	body.awens-cart-page #cart_table tfoot tr > .aright:not(.subtotal) {
		display: block !important;
		grid-column: 1 !important;
		width: auto !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: .2rem 0 !important;
		border: 0 !important;
		text-align: left !important;
		font-size: 1rem !important;
		font-weight: 600 !important;
		line-height: 1.35 !important;
	}

	body.awens-cart-page #cart_table tfoot tr > .subtotal {
		display: block !important;
		grid-column: 2 !important;
		width: auto !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: .2rem 0 !important;
		border: 0 !important;
		text-align: right !important;
		font-size: clamp(1.45rem, 7vw, 1.95rem) !important;
		font-weight: 500 !important;
		line-height: 1.2 !important;
		white-space: nowrap;
	}

	body.awens-cart-page #cart .currency_code {
		margin: 1rem 0 1.5rem !important;
		padding: 0 !important;
		min-height: 0 !important;
	}
}


/* --------------------------------------------------------------------------
 * AWENS v0.1.24 — checkout chrome cleanup / gallery click affordance
 * Continues the accepted v0.1.16+ strategy: latest-version scoped overrides.
 * Shared header/footer components are normalized without changing Welcart
 * checkout markup or business logic.
 * -------------------------------------------------------------------------- */

/* Checkout footer: v0.1.22 made the footer canvas white, which caused the
 * parent theme's light footer copy to look "reversed out" / nearly invisible.
 * Restore one consistent dark storefront footer on every checkout step. */
body.awens-cart-page #footer,
body.awens-cart-page #footer-in,
body.awens-cart-page .footer,
body.awens-cart-page .footer-in,
body.awens-cart-page footer.site-footer,
body.awens-cart-page .site-footer,
body.awens-cart-page #colophon {
	background: #0b0907 !important;
	background-color: #0b0907 !important;
	color: #f5f2ed !important;
	border-color: #0b0907 !important;
}

body.awens-cart-page #footer a,
body.awens-cart-page #footer-in a,
body.awens-cart-page .footer a,
body.awens-cart-page .footer-in a,
body.awens-cart-page footer.site-footer a,
body.awens-cart-page .site-footer a,
body.awens-cart-page #colophon a {
	color: #f5f2ed !important;
	text-decoration: none !important;
}

body.awens-cart-page #footer a:hover,
body.awens-cart-page #footer a:focus-visible,
body.awens-cart-page #footer-in a:hover,
body.awens-cart-page #footer-in a:focus-visible,
body.awens-cart-page footer.site-footer a:hover,
body.awens-cart-page footer.site-footer a:focus-visible,
body.awens-cart-page .site-footer a:hover,
body.awens-cart-page .site-footer a:focus-visible,
body.awens-cart-page #colophon a:hover,
body.awens-cart-page #colophon a:focus-visible {
	color: #ffffff !important;
	opacity: .72;
	text-decoration: none !important;
}

/* The member / non-member disclosure already has a native separator directly
 * below it. Remove our extra h5 border so the mobile view shows one deliberate
 * rule instead of a doubled pair. */
body.awens-cart-page #wc_customer h5,
body.awens-cart-page #customer-info h5,
body.awens-cart-page #customer-info #mem h5,
body.awens-cart-page #customer-info #nonmember h5,
body.awens-cart-page .customer-info h5 {
	border-bottom: 0 !important;
	box-shadow: none !important;
	padding-bottom: .35rem !important;
	margin-bottom: .85rem !important;
}

/* Current-cart highlighting in Welcart Basic can draw a square around the
 * header cart icon on checkout steps. Header chrome must look identical to the
 * rest of the storefront, so neutralize only the cart link/current wrapper. */
body.awens-cart-page #header a[href*="usces-cart"],
body.awens-cart-page #header-in a[href*="usces-cart"],
body.awens-cart-page header.site-header a[href*="usces-cart"],
body.awens-cart-page .site-header a[href*="usces-cart"],
body.awens-cart-page #masthead a[href*="usces-cart"] {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	text-decoration: none !important;
}

@supports selector(li:has(> a)) {
	body.awens-cart-page #header li:has(> a[href*="usces-cart"]),
	body.awens-cart-page #header-in li:has(> a[href*="usces-cart"]),
	body.awens-cart-page header.site-header li:has(> a[href*="usces-cart"]),
	body.awens-cart-page .site-header li:has(> a[href*="usces-cart"]),
	body.awens-cart-page #masthead li:has(> a[href*="usces-cart"]) {
		border: 0 !important;
		outline: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
	}
}

/* Main product photography is an explicit full-image viewer trigger. On
 * desktop, make that discoverable with the native zoom cursor plus a restrained
 * hover response. Touch layouts keep normal tap behaviour. */
@supports selector(body:has(#itempage)) {
	html body.single-post:has(#itempage) .awens-product-gallery__stage,
	html body.single-post:has(#itempage) .awens-product-gallery__stage img,
	html body.single-post:has(#itempage) .awens-product-gallery__stage a {
		cursor: zoom-in !important;
	}
}

@media (hover: hover) and (pointer: fine) {
	@supports selector(body:has(#itempage)) {
		html body.single-post:has(#itempage) .awens-product-gallery__stage img {
			transition: opacity 160ms ease;
		}

		html body.single-post:has(#itempage) .awens-product-gallery__stage:hover img {
			opacity: .92;
		}
	}
}

@media (max-width: 900px) {
	/* Slightly tighten the disclosure rhythm after removing the duplicate line. */
	body.awens-cart-page #wc_customer h5,
	body.awens-cart-page #customer-info h5,
	body.awens-cart-page #customer-info #mem h5,
	body.awens-cart-page #customer-info #nonmember h5,
	body.awens-cart-page .customer-info h5 {
		margin-top: 1.15rem !important;
		margin-bottom: .7rem !important;
		padding-bottom: .25rem !important;
	}
}

/* --------------------------------------------------------------------------
 * AWENS v0.1.25 — mobile cart hierarchy / customer-step separation
 * Continues the accepted v0.1.16+ strategy: final, checkout-scoped visual
 * overrides only. No Welcart Core, parent-theme or template changes.
 * -------------------------------------------------------------------------- */

/* Member login and guest checkout are two different paths. Give them a clear
 * visual break without adding another boxed component or duplicate rule. */
body.awens-cart-page #customer-info form[name="customer_loginform"] .send {
	display: flex !important;
	justify-content: flex-end !important;
	align-items: center !important;
	min-height: 0 !important;
	margin: 1.2rem 0 0 !important;
	padding: 0 !important;
}

body.awens-cart-page #customer-info form[name="customer_loginform"] .send input[type="submit"] {
	min-width: min(15rem, 100%) !important;
	margin: 0 !important;
}

/* The non-member heading follows the login form in Welcart Basic. This single
 * separator replaces the previous ambiguous empty space and makes the two
 * checkout routes read as intentional sections. */
body.awens-cart-page #customer-info form[name="customer_loginform"] ~ h5 {
	margin-top: 3rem !important;
	padding-top: 1.8rem !important;
	border-top: 1px solid var(--awens-page-line) !important;
	border-bottom: 0 !important;
}

/* Guest checkout actions: keep both real choices, but establish hierarchy.
 * "Next" is primary, "register while continuing" is secondary, and the native
 * Back action stays available as a quiet tertiary control instead of a third
 * oversized black block. */
body.awens-cart-page #customer-info form[name="customer_form"] > .send {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem !important;
	align-items: center;
	margin: 2rem 0 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
}

body.awens-cart-page #customer-info form[name="customer_form"] > .send input[type="submit"] {
	width: 100% !important;
	min-height: 3.35rem !important;
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-weight: 600 !important;
	letter-spacing: .04em !important;
}

body.awens-cart-page #customer-info form[name="customer_form"] > .send input.to_deliveryinfo_button,
body.awens-cart-page #customer-info form[name="customer_form"] > .send input[name="deliveryinfo"] {
	order: 1;
	border: 1px solid var(--awens-page-ink) !important;
	background: var(--awens-page-ink) !important;
	color: #ffffff !important;
}

body.awens-cart-page #customer-info form[name="customer_form"] > .send input.to_reganddeliveryinfo_button,
body.awens-cart-page #customer-info form[name="customer_form"] > .send input[name="reganddeliveryinfo"] {
	order: 2;
	border: 1px solid var(--awens-page-ink) !important;
	background: #ffffff !important;
	color: var(--awens-page-ink) !important;
}

/* Any remaining submit here is Welcart's native Back control. Keep the function
 * but visually demote it so the customer is not presented with three competing
 * primary buttons. */
body.awens-cart-page #customer-info form[name="customer_form"] > .send input[type="submit"]:not(.to_deliveryinfo_button):not(.to_reganddeliveryinfo_button):not([name="deliveryinfo"]):not([name="reganddeliveryinfo"]) {
	order: 3;
	grid-column: 1 / -1;
	justify-self: center;
	width: auto !important;
	min-width: 7rem !important;
	min-height: 2.6rem !important;
	padding: .55rem 1.25rem !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--awens-page-muted) !important;
	font-weight: 500 !important;
}

body.awens-cart-page #customer-info form[name="customer_form"] > .send input[type="submit"]:not(.to_deliveryinfo_button):not(.to_reganddeliveryinfo_button):not([name="deliveryinfo"]):not([name="reganddeliveryinfo"]):hover,
body.awens-cart-page #customer-info form[name="customer_form"] > .send input[type="submit"]:not(.to_deliveryinfo_button):not(.to_reganddeliveryinfo_button):not([name="deliveryinfo"]):not([name="reganddeliveryinfo"]):focus-visible {
	color: var(--awens-page-ink) !important;
	background: var(--awens-page-surface) !important;
}

/* Mobile cart: showing unit price and line subtotal as two unlabelled yen values
 * makes a single-item row look duplicated. Keep only the line subtotal on
 * narrow screens; quantity already communicates how many units are being bought. */
@media (max-width: 900px) {
	body.awens-cart-page #cart_table tbody tr > .unitprice,
	body.awens-cart-page #cart_table tbody tr > td.unitprice {
		display: none !important;
	}

	body.awens-cart-page #cart_table tbody tr > .quantity,
	body.awens-cart-page #cart_table tbody tr > td.quantity {
		margin: 0 !important;
		padding-top: .8rem !important;
		padding-bottom: .8rem !important;
		border-top: 1px solid var(--awens-page-line) !important;
		border-bottom: 0 !important;
	}

	body.awens-cart-page #cart_table tbody tr > .subtotal,
	body.awens-cart-page #cart_table tbody tr > td.subtotal {
		display: block !important;
		margin: 0 !important;
		padding: .75rem 0 .95rem !important;
		border-top: 1px solid var(--awens-page-line) !important;
		border-bottom: 0 !important;
		text-align: right !important;
		font-size: clamp(1.3rem, 6vw, 1.65rem) !important;
		font-weight: 500 !important;
		line-height: 1.2 !important;
		white-space: nowrap;
	}

	/* Tighten the completed item row before the cart total summary. */
	body.awens-cart-page #cart_table tbody tr {
		padding-bottom: .35rem !important;
	}

	/* On phones the member login button and guest heading need breathing room,
	 * but not the large desktop void. */
	body.awens-cart-page #customer-info form[name="customer_loginform"] .send {
		justify-content: stretch !important;
		margin-top: 1rem !important;
	}

	body.awens-cart-page #customer-info form[name="customer_loginform"] .send input[type="submit"] {
		width: 100% !important;
		min-width: 0 !important;
	}

	body.awens-cart-page #customer-info form[name="customer_loginform"] ~ h5 {
		margin-top: 2.15rem !important;
		padding-top: 1.45rem !important;
	}

	body.awens-cart-page #customer-info form[name="customer_form"] > .send {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: .85rem !important;
		margin-top: 1.6rem !important;
	}

	body.awens-cart-page #customer-info form[name="customer_form"] > .send input.to_deliveryinfo_button,
	body.awens-cart-page #customer-info form[name="customer_form"] > .send input[name="deliveryinfo"] {
		order: 1;
	}

	body.awens-cart-page #customer-info form[name="customer_form"] > .send input.to_reganddeliveryinfo_button,
	body.awens-cart-page #customer-info form[name="customer_form"] > .send input[name="reganddeliveryinfo"] {
		order: 2;
	}

	body.awens-cart-page #customer-info form[name="customer_form"] > .send input[type="submit"]:not(.to_deliveryinfo_button):not(.to_reganddeliveryinfo_button):not([name="deliveryinfo"]):not([name="reganddeliveryinfo"]) {
		order: 3;
		grid-column: auto;
		margin-top: .15rem !important;
	}
}


/* --------------------------------------------------------------------------
 * 0.1.26 — Boutique product-card hierarchy
 * Collection/type -> model -> price + Welcart tax guide -> optional note.
 * -------------------------------------------------------------------------- */
.awens-product-rail__eyebrow,
.awens-product-support__eyebrow {
	color: var(--awens-gold, #b88a48) !important;
	font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Sans", "Yu Gothic", sans-serif !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: .22em !important;
}

.awens-product-rail__heading h2,
.awens-product-support h2 {
	font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", "Times New Roman", serif !important;
	font-weight: 400 !important;
	letter-spacing: .025em !important;
}

.awens-product-card__image {
	background: #f7f7f7 !important;
}

.awens-product-card__label {
	display: block;
	margin: 16px 0 5px;
	color: #2f2f2f;
	font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: .015em;
}

.awens-product-card__name {
	margin: 0 0 12px !important;
	color: #111 !important;
	font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", "Times New Roman", serif !important;
	font-size: clamp(20px, 1.55vw, 28px) !important;
	font-weight: 400 !important;
	line-height: 1.22 !important;
	letter-spacing: .006em !important;
}

.awens-product-card__price {
	display: flex !important;
	align-items: baseline !important;
	gap: 5px !important;
	margin: 0 !important;
	color: #111 !important;
	font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", "Times New Roman", serif !important;
	font-size: clamp(18px, 1.2vw, 23px) !important;
	font-weight: 400 !important;
	font-variant-numeric: lining-nums tabular-nums !important;
	line-height: 1.35 !important;
	letter-spacing: .005em !important;
}

.awens-product-card__tax {
	color: #4f4f4f;
	font-size: .56em;
	font-weight: 400;
	letter-spacing: 0;
}

.awens-product-card__note {
	display: block;
	margin-top: 7px;
	color: #292929;
	font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: .01em;
}

.awens-product-rail,
.awens-product-support,
.awens-product-commerce {
	border-color: #e8e8e8 !important;
}

.awens-product-rail__control {
	border-color: #d6d6d6 !important;
}

.awens-product-rail__control:hover,
.awens-product-rail__control:focus-visible {
	border-color: #05064f !important;
	background: #05064f !important;
	color: #fff !important;
}

@media (max-width: 560px) {
	.awens-product-card__label { margin-top: 12px; font-size: 11px; }
	.awens-product-card__name { font-size: 18px !important; }
	.awens-product-card__price { font-size: 16px !important; }
	.awens-product-card__note { font-size: 11px; }
}


/* --------------------------------------------------------------------------
 * 0.1.27 — Unified boutique commerce-card price line
 * Same hierarchy for Recommended / Recently Viewed as archive/home cards.
 * -------------------------------------------------------------------------- */
.awens-product-card__price {
	display: inline-flex !important;
	align-items: baseline !important;
	gap: 6px !important;
	white-space: nowrap !important;
	margin-top: 2px !important;
	font-size: clamp(19px, 1.28vw, 24px) !important;
	line-height: 1.2 !important;
}

.awens-product-card__tax {
	margin-left: 0 !important;
	color: #4c4c4c !important;
	font-size: 11px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	letter-spacing: .01em !important;
	white-space: nowrap !important;
}

.awens-product-card__note {
	margin-top: 8px !important;
	font-size: 13px !important;
	line-height: 1.55 !important;
}

@media (max-width: 560px) {
	.awens-product-card__price { font-size: 17px !important; }
	.awens-product-card__tax { font-size: 10px !important; }
	.awens-product-card__note { font-size: 11px !important; }
}

/* --------------------------------------------------------------------------
 * 0.1.28 — swipeable full-image product viewer
 * The existing original-image lightbox now behaves as one gallery: touch swipe
 * on mobile, quiet previous/next controls on desktop, keyboard arrows and a
 * compact image counter. No third-party lightbox/carousel dependency.
 * -------------------------------------------------------------------------- */
.awens-product-gallery__viewer {
	isolation: isolate;
	overscroll-behavior: contain;
}

.awens-product-gallery__viewer-panel {
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.awens-product-gallery__viewer-image {
	-webkit-user-drag: none;
	user-select: none;
	-webkit-user-select: none;
	transition: opacity 180ms ease, transform 180ms ease;
}

.awens-product-gallery__viewer-image.is-entering-from-right {
	animation: awens-viewer-enter-right 180ms ease both;
}

.awens-product-gallery__viewer-image.is-entering-from-left {
	animation: awens-viewer-enter-left 180ms ease both;
}

@keyframes awens-viewer-enter-right {
	from { opacity: .58; transform: translateX(14px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes awens-viewer-enter-left {
	from { opacity: .58; transform: translateX(-14px); }
	to { opacity: 1; transform: translateX(0); }
}

.awens-product-gallery__viewer-control {
	position: fixed;
	top: 50%;
	z-index: 3;
	display: grid;
	width: 3.25rem;
	height: 4.5rem;
	margin: 0;
	padding: 0;
	place-items: center;
	transform: translateY(-50%);
	border: 0;
	border-radius: 0;
	outline-offset: 3px;
	background: rgba(0, 0, 0, .12);
	box-shadow: none;
	color: rgba(255, 255, 255, .9);
	font: 300 2.8rem/1 Georgia, "Times New Roman", serif;
	cursor: pointer;
	transition: opacity 160ms ease, background-color 160ms ease;
}

.awens-product-gallery__viewer-control--prev {
	left: max(.65rem, env(safe-area-inset-left));
}

.awens-product-gallery__viewer-control--next {
	right: max(.65rem, env(safe-area-inset-right));
}

.awens-product-gallery__viewer-control:hover,
.awens-product-gallery__viewer-control:focus-visible {
	background: rgba(0, 0, 0, .34);
	color: #fff;
}

.awens-product-gallery__viewer-control:disabled {
	opacity: .16;
	pointer-events: none;
}

.awens-product-gallery__viewer-counter {
	position: fixed;
	bottom: max(1rem, env(safe-area-inset-bottom));
	left: 50%;
	z-index: 3;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .82);
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Noto Sans JP", sans-serif;
	font-size: .72rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .14em;
	white-space: nowrap;
}

@media (max-width: 900px) {
	.awens-product-gallery__viewer {
		padding:
			max(4.25rem, calc(env(safe-area-inset-top) + 3.25rem))
			max(.75rem, env(safe-area-inset-right))
			max(3.5rem, calc(env(safe-area-inset-bottom) + 2.5rem))
			max(.75rem, env(safe-area-inset-left));
	}

	.awens-product-gallery__viewer-image {
		max-width: 96vw;
		max-height: calc(100dvh - 8rem);
	}

	.awens-product-gallery__viewer-control {
		width: 2.65rem;
		height: 3.6rem;
		background: rgba(0, 0, 0, .08);
		font-size: 2.35rem;
	}

	.awens-product-gallery__viewer-control--prev {
		left: max(.25rem, env(safe-area-inset-left));
	}

	.awens-product-gallery__viewer-control--next {
		right: max(.25rem, env(safe-area-inset-right));
	}

	.awens-product-gallery__viewer-counter {
		bottom: max(.9rem, calc(env(safe-area-inset-bottom) + .35rem));
	}
}

@media (prefers-reduced-motion: reduce) {
	.awens-product-gallery__viewer-image,
	.awens-product-gallery__viewer-image.is-entering-from-right,
	.awens-product-gallery__viewer-image.is-entering-from-left {
		animation: none !important;
		transition: none !important;
	}
}
