/* Product detail. Figma section 1689:15112. All selectors are scoped with .pd-. */
.pd-page {
	--pd-ink: #32373c;
	--pd-text: #111827;
	--pd-body: #37474f;
	--pd-muted: #6b7280;
	--pd-line: #e5e7eb;
	--pd-soft: #f9fafb;
	--pd-gothic: "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
	--pd-gutter: clamp(64px, calc((100vw - 1320px) * .16 + 64px), 160px);
	color: var(--pd-text);
	font-family: var(--pd-gothic);
}

/* :where() keeps this at one class of specificity, so component rules below can override it. */
.pd-page :where(h1, h2, h3, h4, p, dl, dd, ul, figure) {
	margin: 0;
	padding: 0;
}

/* Hero */
.pd-hero {
	padding: 96px clamp(64px, calc((100vw - 1320px) * .0933 + 64px), 120px);
	background: linear-gradient(180deg, #fff, #f3f4f6);
}

.pd-hero__row {
	display: grid;
	/* The square gallery stops at 520px, so the details take the rest of the row. */
	grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
	gap: 64px;
	/* Content width at 1920px (1920 - 2 x 120px padding); wider screens center it
	   while the background stays full width. */
	max-width: 1680px;
	margin-inline: auto;
}

.pd-gallery {
	width: 100%;
	max-width: 520px;
}

.pd-gallery__stage {
	position: relative;
}

/* Product photos are shot square (700x700). Some are 1000x700, so contain shows them whole
   inside the square instead of cropping the sides. */
.pd-main-image {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 24px;
	background: #fff;
	object-fit: contain;
}

.pd-sold {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 8px 12px;
	border-radius: 999px;
	background: #f14747;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

.pd-thumbs {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: calc(100% - 32px);
	padding: 10px;
	overflow-y: auto;
	border-radius: 16px;
	background: #fff;
}

.pd-thumb {
	flex: none;
	width: 72px;
	height: 72px;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 12px;
	background: none;
	cursor: pointer;
}

.pd-thumb[aria-pressed="true"] {
	border-color: var(--pd-ink);
}

.pd-thumb img {
	height: 100%;
	object-fit: cover;
}

.pd-gallery__meta {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 16px;
}

.pd-gallery__count,
.pd-gallery__note {
	color: var(--pd-muted);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.pd-gallery__count {
	flex: none;
}

.pd-details {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.pd-title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.pd-title h1 {
	font: 800 clamp(26px, 2.1vw, 40px) / 1.1 "M PLUS 1p", sans-serif;
}

.pd-specs {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px 40px;
	border-radius: 24px;
	background: #fff;
}

.pd-specs div {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr);
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

.pd-specs dt {
	color: var(--pd-body);
}

.pd-specs dd::before {
	content: "：";
	margin-right: 8px;
}

.pd-buy {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Quantity, price, then button. The form's children join the .pd-buy flow. */
.pd-buy .yno-cart-form {
	display: contents;
}

.yno-cart-form__quantity {
	order: 1;
}

.pd-price {
	order: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
}

.pd-price__label {
	font-size: 13px;
	font-weight: 700;
}

.pd-cart,
.yno-cart-form__actions {
	order: 3;
}

.yno-cart-form__links {
	order: 4;
}

.pd-bank {
	order: 5;
}

.pd-price strong {
	font: 700 32px / 1.1 var(--pd-gothic);
}

.pd-price__tax,
.pd-bank {
	color: var(--pd-muted);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.pd-bank a {
	text-decoration: underline;
}

.pd-cart,
.pd-cart .ocnk_cart,
.pd-cart iframe {
	max-width: 100%;
}

/* Sections */
.pd-heading {
	margin-bottom: 8px !important;
	font: 800 32px / 1.5 "M PLUS 1p", sans-serif;
	text-align: center;
}

.pd-heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 12px auto 0;
	border-radius: 999px;
	background: var(--pd-ink);
}

/* Features */
.pd-features {
	display: flex;
	flex-direction: column;
	gap: 64px;
	padding: 80px var(--pd-gutter);
	background: var(--pd-soft);
}

.pd-feature {
	/* The cross-fade copy of the photo (assets/js/image-swap.js) is placed against this box. */
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 560fr) minmax(0, 920fr);
	gap: 40px;
	padding: 40px;
	border-radius: 24px;
	background: #fff;
}

.pd-feature--reverse {
	grid-template-columns: minmax(0, 920fr) minmax(0, 560fr);
}

.pd-feature--reverse .pd-feature__image {
	order: 2;
}

.pd-feature__image {
	height: 100%;
	min-height: 420px;
	max-height: 486px;
	border-radius: 20px;
	object-fit: cover;
}

.pd-feature__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 16px;
	min-width: 0;
}

.pd-feature__label {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--pd-ink);
	color: #fff;
	font: 800 12px / 1.5 "M PLUS 1p", sans-serif;
}

.pd-feature h3 {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.4;
}

.pd-feature__text {
	color: var(--pd-body);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.9;
}

.pd-feature__note {
	width: 100%;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f3f4f6;
	color: var(--pd-body);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}

.pd-cases {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 120px));
	gap: 10px;
	width: 100%;
}

.pd-case {
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 8px;
	background: none;
	cursor: pointer;
}

.pd-case[aria-pressed="true"] {
	border-color: var(--pd-ink);
}

.pd-case:focus-visible {
	outline: 2px solid var(--pd-ink);
	outline-offset: 2px;
}

.pd-cases img {
	aspect-ratio: 176 / 123;
	object-fit: cover;
}

/* Features bullet list and Y'no のこだわり intro */
.pd-points {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	width: fit-content;
	max-width: 1080px;
	margin: 0 auto;
	padding-left: 1.25em;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
	list-style: disc;
}

.pd-commitment {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
	text-align: center;
}

.pd-commitment__intro {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.8;
}

@media (max-width: 767px) {
	.pd-points {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Precautions */
.pd-precautions {
	padding: 96px clamp(64px, calc((100vw - 1320px) * .0933 + 64px), 120px);
	background: var(--pd-soft);
}

.pd-precautions .pd-heading {
	margin-bottom: 56px !important;
}

.pd-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
}

.pd-list li {
	position: relative;
	padding-left: 18px;
	color: var(--pd-body);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
}

.pd-list li::before {
	content: "•";
	position: absolute;
	left: 0;
}

.pd-precautions__title {
	margin: 56px 0 24px !important;
	font-size: 18px;
	font-weight: 700;
}

.pd-precautions h4 {
	margin: 24px 0 12px !important;
	font-size: 16px;
	font-weight: 700;
}

@media (max-width: 1320px) {
	.pd-hero {
		padding-block: 40px;
	}

	.pd-thumbs {
		position: static;
		flex-direction: row;
		max-height: none;
		margin-top: 12px;
		padding: 0;
		overflow-x: auto;
		background: none;
	}

	.pd-thumb {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		border-radius: 8px;
	}

	.pd-specs {
		padding: 24px;
	}

	.pd-features {
		gap: 40px;
		padding-block: 40px;
	}

	.pd-feature,
	.pd-feature--reverse {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		padding: 24px;
		border: 1px solid var(--pd-line);
	}

	.pd-feature--reverse .pd-feature__image {
		order: 0;
	}

	.pd-feature__image {
		height: 240px;
		min-height: 0;
		border-radius: 8px;
	}

	.pd-feature__label {
		padding: 0;
		background: none;
		color: var(--pd-text);
		font-weight: 400;
	}

	.pd-feature h3 {
		font-weight: 500;
	}

	.pd-feature__text {
		font-size: 16px;
		line-height: 1.8;
	}

	.pd-feature__note {
		padding: 12px;
	}

	.pd-precautions {
		padding-block: 56px;
	}

	.pd-precautions .pd-heading {
		margin-bottom: 32px !important;
	}
}

@media (max-width: 1024px) {
	.pd-hero__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.pd-gallery {
		margin-inline: auto;
	}
}

@media (max-width: 767px) {
	.pd-page {
		--pd-gutter: 16px;
	}

	.pd-hero,
	.pd-precautions {
		padding-inline: 16px;
	}

	.pd-main-image {
		border-radius: 16px;
	}

	.pd-thumb {
		height: 48px;
	}

	.pd-specs {
		padding: 16px;
	}

	.pd-specs div {
		font-size: 14px;
	}

	.pd-heading {
		font-size: 24px;
	}

	.pd-features {
		gap: 24px;
	}

	.pd-feature,
	.pd-feature--reverse {
		padding: 12px;
		border-radius: 16px;
	}

	.pd-feature h3 {
		font-size: 20px;
	}

	.pd-feature__text,
	.pd-list li {
		font-size: 15px;
	}
}

/*
 * Product blocks (inc/blocks.php). FEATURES and Y'no のこだわり are separate blocks, so
 * the two sections are joined to look like the one section of the classic template.
 * Commitment items are numbered and alternated by CSS, so reordering renumbers them.
 */
.pd-features--points:has(+ .pd-features--commitment) {
	padding-bottom: 0;
}

.pd-features--points + .pd-features--commitment {
	padding-top: 64px;
}

.pd-features--commitment {
	counter-reset: pd-feature;
}

.pd-features--commitment .pd-feature {
	counter-increment: pd-feature;
}

.pd-features--commitment .pd-feature__label::after {
	content: " " counter(pd-feature, decimal-leading-zero);
}

@media (width > 1320px) {
	.pd-features--commitment .pd-feature:nth-of-type(even) {
		grid-template-columns: minmax(0, 920fr) minmax(0, 560fr);
	}

	.pd-features--commitment .pd-feature:nth-of-type(even) .pd-feature__image {
		order: 2;
	}
}

@media (max-width: 1320px) {
	.pd-features--points + .pd-features--commitment {
		padding-top: 40px;
	}
}

@media (max-width: 767px) {
	.pd-features--points + .pd-features--commitment {
		padding-top: 24px;
	}
}

/* 取扱い上の注意 block: core headings, lists and paragraphs. */
.pd-precautions h3 {
	margin: 56px 0 24px;
	font-size: 18px;
	font-weight: 700;
}

.pd-precautions .wp-block-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	list-style: none;
}

.pd-precautions .wp-block-list li,
.pd-precautions p {
	position: relative;
	color: var(--pd-body);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
}

.pd-precautions .wp-block-list li {
	padding-left: 18px;
}

.pd-precautions .wp-block-list li::before {
	content: "•";
	position: absolute;
	left: 0;
}

@media (max-width: 767px) {
	.pd-precautions .wp-block-list li,
	.pd-precautions p {
		font-size: 15px;
	}
}
