/*
 * Product page.
 */

.pk-product {
	display: grid;
	grid-template-areas: "gallery" "trail" "summary";
	padding-top: 12px;
}
.pk-gallery { grid-area: gallery; }
.pk-trail { grid-area: trail; }
.pk-product__summary { grid-area: summary; min-width: 0; }

/* Trail */
.pk-trail {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
	padding-top: 20px;
	color: var(--pk-ink-2);
	font-size: 13px;
}
.pk-trail a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	text-decoration: underline;
	text-decoration-color: #C9C7C0;
	text-underline-offset: 3px;
}
.pk-trail span { color: #9A9DAA; }

/* Gallery */
.pk-gallery { display: flex; gap: 14px; margin-inline: calc(var(--pk-gutter) * -1 + 16px); }
.pk-gallery__stage {
	position: relative;
	flex: 1;
	min-width: 0;
	border-radius: var(--pk-r-lg);
	background: var(--pk-white);
	overflow: hidden;
}
.pk-gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.pk-gallery__track::-webkit-scrollbar { display: none; }
.pk-gallery__slide {
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	height: 380px;
	margin: 0;
	padding: 64px 24px 40px;
	scroll-snap-align: start;
}
.pk-gallery__slide img { width: 250px; max-width: 100%; height: 250px; object-fit: contain; }
.pk-gallery__top {
	position: absolute;
	top: 14px;
	inset-inline: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.pk-gallery__actions { display: flex; gap: 8px; margin-inline-start: auto; }
.pk-backbtn {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 44px;
	padding-inline: 12px 14px;
	border-radius: 22px;
	background: var(--pk-cream);
	font-size: 14px;
	font-weight: 500;
}
.pk-gallery__tag { position: static; height: 30px; padding: 0 12px; font-size: 13px; }
.pk-fav--big { position: static; width: 44px; height: 44px; border-radius: 22px; }
.pk-gallery__dots { position: absolute; bottom: 16px; inset-inline: 0; padding: 0; }
.pk-product.is-out .pk-gallery__slide img { opacity: .55; }

.pk-gallery__thumbs { flex-direction: column; gap: 12px; }
.pk-gallery__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	padding: 0;
	border: 1px solid #E8E6DF;
	border-radius: 18px;
	background: var(--pk-white);
}
.pk-gallery__thumb img { width: 56px; height: 56px; object-fit: contain; opacity: .6; }
.pk-gallery__thumb[aria-current="true"] { border: 2px solid var(--pk-navy); }
.pk-gallery__thumb[aria-current="true"] img { opacity: 1; }

/* Summary */
.pk-product__title {
	margin: 6px 0 0;
	font-family: var(--pk-font-display);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
}
.pk-product__pricerow { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.pk-product__price { font-size: 28px; font-weight: 600; }
.pk-product__price del { color: var(--pk-muted); font-size: .65em; font-weight: 400; }
.pk-product__price ins { text-decoration: none; }
.pk-product.is-out .pk-product__price { color: #6A6E7E; }
.pk-pill-status {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 12px;
	border-radius: 15px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.pk-pill-status--stock { background: var(--pk-tag-stock-bg); color: var(--pk-tag-stock-ink); }
.pk-pill-status--stock::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #2F8A5B; }
.pk-pill-status--out { background: var(--pk-tag-out-bg); color: var(--pk-tag-out-ink); }
.pk-product__lead { margin-top: 14px; color: #3A3A44; font-size: var(--pk-fs-base); line-height: 1.6; }
.pk-product__lead p { margin: 0 0 .6em; }

/* Options */
.pk-options { margin-top: 20px; padding: 16px; border-radius: var(--pk-r-md); background: var(--pk-white); }
.pk-options__group { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.pk-options__group legend { margin-bottom: 12px; padding: 0; font-size: var(--pk-fs-base); font-weight: 600; }
.pk-options__group legend span { color: var(--pk-ink-2); font-weight: 400; }
.pk-optradio { position: relative; }
.pk-optradio input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pk-optradio span {
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--pk-line-2);
	border-radius: 22px;
	background: var(--pk-white);
	font-size: 14.5px;
}
.pk-optradio input:checked + span { border: 2px solid var(--pk-navy); font-weight: 600; }
.pk-optradio input:focus-visible + span { outline: 2.5px solid var(--pk-navy); outline-offset: 2px; }
.pk-optradio.is-out span { color: #9A9DA8; text-decoration: line-through; }
.pk-options__note { margin: 0; color: var(--pk-muted); font-size: 13px; }
.pk-options__note:empty { display: none; }

/* Buy bar: fixed to the bottom on phones */
.pk-buybar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 15;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid #EEECE6;
	background: var(--pk-white);
	box-shadow: var(--pk-shadow-sheet);
}
.pk-buybar .pk-stepper { background: var(--pk-white); }
.pk-buybar .pk-addbtn { min-width: 0; padding-inline: 18px; border-radius: 18px; }
.pk-buybar .pk-addbtn:disabled { justify-content: center; padding-inline: 10px; font-size: 15px; text-align: center; }
.pk-buybar .pk-addbtn:disabled .pk-addbtn__total { display: none; }
.pk-stepper input.pk-stepper__n {
	width: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 19px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
}
.pk-stepper input.pk-stepper__n::-webkit-inner-spin-button,
.pk-stepper input.pk-stepper__n::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.pk-has-buybar { padding-bottom: 92px; }

/* Promises */
.pk-promises { margin: 22px 0 0; padding: 6px 16px; border-radius: var(--pk-r-md); background: var(--pk-white); list-style: none; }
.pk-promises li { display: flex; align-items: center; gap: 12px; min-height: 50px; font-size: 14.5px; }
.pk-promises li + li { border-top: 1px solid #E6E4DD; }
.pk-promises .pk-icon { flex: 0 0 auto; }

/* Collapsible sections */
.pk-acc { margin-top: 18px; border-bottom: 1px solid #EEECE6; }
.pk-acc__item { border-top: 1px solid #EEECE6; }
.pk-acc__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	font-size: var(--pk-fs-md);
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}
.pk-acc__item summary::-webkit-details-marker { display: none; }
.pk-acc__item summary .pk-icon { transition: transform .2s var(--pk-ease); }
.pk-acc__item[open] summary .pk-icon { transform: rotate(180deg); }
.pk-acc__item summary:focus-visible { outline: 2.5px solid var(--pk-navy); outline-offset: 2px; border-radius: 8px; }
.pk-acc__body { padding-bottom: 18px; color: #3A3A44; font-size: 14.5px; line-height: 1.7; }
.pk-acc__body h2, .pk-acc__body h3, .pk-acc__body h4 { margin: 14px 0 4px; color: var(--pk-ink); font-size: 14.5px; font-weight: 600; }
.pk-acc__body p { margin: 0 0 8px; }
.pk-acc__body ul { margin: 0; padding-inline-start: 18px; }
.pk-specs { margin: 0; padding: 10px 14px; border-radius: var(--pk-r-sm); background: var(--pk-cream); }
.pk-specs div { display: flex; justify-content: space-between; gap: 16px; }
.pk-specs dt { color: #5B5B66; }
.pk-specs dd { margin: 0; text-align: end; }

/* Back in stock */
.pk-notify { margin-top: 22px; padding: 20px 18px; border-radius: 24px; background: var(--pk-lavender); }
.pk-notify__row { display: flex; align-items: flex-start; gap: 12px; }
.pk-notify__icon {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	height: 40px;
	border-radius: 20px;
	background: var(--pk-white);
}
.pk-notify__icon--done { background: var(--pk-navy); color: var(--pk-white); }
.pk-notify__title { margin: 0; font-size: 17px; font-weight: 600; }
.pk-notify p { margin: 4px 0 0; color: var(--pk-tag-season-ink); font-size: 14px; line-height: 1.5; }
.pk-notify .pk-btn--block { margin-top: 16px; border-radius: 18px; }
.pk-notify__hint { font-size: 12.5px !important; }
.pk-notify__error { color: var(--pk-danger) !important; }
/* Steps (JavaScript on): show one at a time. Without JavaScript the form is simply visible. */
.pk-js .pk-notify .pk-notify__step { display: none; }
.pk-js .pk-notify[data-state="idle"] [data-step="idle"],
.pk-js .pk-notify[data-state="form"] [data-step="form"],
.pk-js .pk-notify[data-state="done"] [data-step="done"] { display: block; }
html:not(.pk-js) .pk-notify__open,
html:not(.pk-js) .pk-notify [data-step="done"] { display: none; }
html:not(.pk-js) .pk-notify__form { margin-top: 18px; }

/* Related */
.pk-related { margin-top: 26px; }
.pk-related .pk-card--row { width: 150px; }

/* Share sheet */
.pk-share__head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pk-share__title { margin: 0; font-family: var(--pk-font-display); font-size: 26px; font-weight: 600; }
.pk-share__note { margin: 6px 0 0; color: var(--pk-muted); font-size: 13px; }
.pk-share__preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border-radius: 18px; background: var(--pk-cream); }
.pk-share__img { display: flex; flex: 0 0 72px; align-items: center; justify-content: center; height: 72px; border-radius: 14px; background: var(--pk-white); }
.pk-share__img img { width: 56px; height: 56px; object-fit: contain; }
.pk-share__text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pk-share__name { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.pk-share__meta { color: var(--pk-muted); font-size: 12.5px; }
.pk-share__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 14px; }
.pk-share__opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 92px;
	border: 0;
	border-radius: 20px;
	background: var(--pk-chip);
	color: var(--pk-ink);
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
}
.pk-share__opt--wa { background: var(--pk-whatsapp-soft); color: var(--pk-success-ink); }
.pk-share__opt.is-done { background: var(--pk-navy); color: var(--pk-white); }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
	.pk-product {
		grid-template-areas: "trail trail" "gallery summary";
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: 20px 56px;
		align-items: start;
		padding-top: 0;
	}
	.pk-trail { padding-top: 28px; color: var(--pk-muted); font-size: var(--pk-fs-sm); }
	.pk-trail a { text-decoration: none; }
	.pk-trail a.is-last { color: var(--pk-ink); text-decoration: underline; }
	.pk-gallery { position: sticky; top: calc(var(--pk-header-h) + 20px); margin-inline: 0; }
	.pk-gallery__stage { border-radius: 36px; }
	.pk-gallery__slide { height: 600px; padding: 80px 40px; }
	.pk-gallery__slide img { width: 360px; height: 360px; }
	.pk-gallery__top { inset-inline: 18px; top: 18px; }
	.pk-gallery__actions .pk-iconbtn, .pk-fav--big { width: 46px; height: 46px; border-radius: 23px; }

	.pk-product__summary { padding-top: 8px; }
	.pk-product__title { margin: 0; font-size: 38px; line-height: 1.15; }
	.pk-product__pricerow { justify-content: flex-start; margin-top: 16px; }
	.pk-product__price { font-size: 34px; }
	.pk-product__lead { margin-top: 18px; font-size: 17px; }

	.pk-buybar {
		position: static;
		margin-top: 26px;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
	}
	.pk-buybar .pk-stepper { height: 58px; border: 1px solid var(--pk-line-2); border-radius: 20px; }
	.pk-buybar .pk-addbtn { justify-content: center; gap: 12px; height: 58px; border-radius: 20px; font-size: 16.5px; }
	.pk-buybar .pk-addbtn__total::before { content: "·"; margin-inline-end: 12px; opacity: .7; font-weight: 400; }
	.pk-buybar .pk-addbtn__total:empty::before { content: none; }
	body.pk-has-buybar { padding-bottom: 0; }

	.pk-promises { padding: 6px 20px; border-radius: 24px; }
	.pk-promises li { min-height: 52px; font-size: var(--pk-fs-base); }
	.pk-acc { margin-top: 26px; }
	.pk-acc__item summary { min-height: 58px; font-size: 16.5px; }
	.pk-acc__body { font-size: var(--pk-fs-base); line-height: 1.75; }

	.pk-related { margin-top: 64px; }
	.pk-related .pk-h2 { font-size: 28px; }
	.pk-related__list {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 28px 20px;
		overflow: visible;
	}
	.pk-related .pk-card--row { width: auto; }
	.pk-related__list > :nth-child(n+6) { display: none; }
}
