/* Detail výrobku v2 — galerie, varianty, typografie, štítek, mobilní lišta. v=20261122-c1 */

.product-detail-v2 {
	--pd-navy: #0c1148;
	--pd-gold: #daa520;
	--pd-muted: #555b73;
	--pd-line: #d9dce6;
	--pd-cta: #1d883c;
	--pd-cta-hover: #176b32;
	--pd-ink: #141833;
	--pd-soft: #f3f4f8;
	--pd-radius: 14px;
	--pd-touch: 44px;
}

html.product-detail-v2-page {
	--pd-sticky-space: 140px;
}

/* ——— Typografie cen 32 / 24 a 15 / 13 ——— */
.product-detail.product-detail-v2 .price-area .new-price,
.product-detail.product-detail-v2 .price-area .h2 {
	font-size: 32px;
	font-weight: 800;
	color: var(--pd-navy);
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.product-detail.product-detail-v2 .price-area .new-price .product-detail__price-note,
.product-detail.product-detail-v2 .price-area .h2 .product-detail__price-note {
	display: block;
	margin: 4px 0 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--pd-muted);
	letter-spacing: 0;
}

.product-detail.product-detail-v2 .price-area .product-detail__price-vat,
.product-detail.product-detail-v2 .price-area.is-vat-first .product-detail__price-vat {
	font-size: 15px;
	font-weight: 600;
	color: var(--pd-muted);
	line-height: 1.3;
}

.product-detail.product-detail-v2 .price-area .product-detail__price-vat-note,
.product-detail.product-detail-v2 .price-area.is-vat-first .product-detail__price-vat-note {
	font-size: 15px;
	font-weight: 600;
	color: var(--pd-muted);
}

.product-detail.product-detail-v2 .price-area .product-detail__price-piece {
	font-size: 15px;
	font-weight: 700;
	color: var(--pd-navy);
}

/* ——— Galerie ——— */
.product-detail-v2__gallery {
	background: #fff;
	border: 1px solid var(--pd-line);
	border-radius: var(--pd-radius);
	padding: 20px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	position: relative;
	z-index: 1;
}

.product-detail-v2__gallery-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.product-detail-v2__gallery-stage {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	min-height: 0;
}

.product-detail-v2__gallery-slide {
	display: none;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}

.product-detail-v2__gallery-radio:checked + .product-detail-v2__gallery-slide {
	display: flex;
}

.product-detail-v2__gallery-radio:focus-visible + .product-detail-v2__gallery-slide {
	outline: 3px solid var(--pd-gold);
	outline-offset: 2px;
}

.product-detail-v2__gallery-slide img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

.product-detail-v2__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.product-detail-v2__thumb {
	width: 72px;
	height: 72px;
	padding: 6px;
	border: 1px solid var(--pd-line);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	box-sizing: border-box;
}

.product-detail-v2__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.product-detail-v2__thumb:focus-visible {
	outline: 3px solid var(--pd-gold);
	outline-offset: 2px;
}

.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(1):checked) .product-detail-v2__thumb:nth-child(1),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(2):checked) .product-detail-v2__thumb:nth-child(2),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(3):checked) .product-detail-v2__thumb:nth-child(3),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(4):checked) .product-detail-v2__thumb:nth-child(4),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(5):checked) .product-detail-v2__thumb:nth-child(5),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(6):checked) .product-detail-v2__thumb:nth-child(6),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(7):checked) .product-detail-v2__thumb:nth-child(7),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(8):checked) .product-detail-v2__thumb:nth-child(8),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(9):checked) .product-detail-v2__thumb:nth-child(9),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(10):checked) .product-detail-v2__thumb:nth-child(10),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(11):checked) .product-detail-v2__thumb:nth-child(11),
.product-detail-v2__gallery:has(.product-detail-v2__gallery-radio:nth-of-type(12):checked) .product-detail-v2__thumb:nth-child(12) {
	border-color: var(--pd-navy);
	box-shadow: 0 0 0 2px var(--pd-gold);
}

/* ——— Štítek u kódu ——— */
.product-detail-v2__sku-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}

.product-detail-v2__sku-row .product-detail__sku {
	margin: 0;
}

.product-detail-v2__stock {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.product-detail-v2__stock--in_stock {
	background: var(--pd-cta);
	color: #fff;
}

.product-detail-v2__stock--on_order {
	background: var(--pd-gold);
	color: var(--pd-navy);
}

/* ——— Varianty / barvy ——— */
.product-detail-v2__variant-block {
	margin: 0 0 16px;
}

.product-detail-v2__variant-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pd-muted);
	margin: 0 0 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
}

.product-detail-v2__variant-current {
	text-transform: none;
	letter-spacing: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--pd-navy);
}

.product-detail-v2__opts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.product-detail-v2__opt {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--pd-touch);
	padding: 6px 14px 6px 10px;
	border: 1px solid var(--pd-line);
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--pd-ink);
	text-decoration: none;
	cursor: pointer;
}

.product-detail-v2__opt.is-selected {
	border-color: var(--pd-navy);
	box-shadow: 0 0 0 2px var(--pd-gold);
}

.product-detail-v2__opt:hover {
	border-color: var(--pd-navy);
	color: var(--pd-ink);
}

.product-detail-v2__opt:focus-visible {
	outline: 3px solid var(--pd-gold);
	outline-offset: 2px;
}

.product-detail-v2__swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(12, 17, 72, 0.2);
	display: block;
	flex-shrink: 0;
}

.product-detail-v2__swatch.is-light {
	border: 1px solid rgba(12, 17, 72, 0.45);
	box-shadow: inset 0 0 0 1px #fff;
}

.product-detail-v2__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.35em;
	max-width: 100%;
	min-width: 0;
	line-height: 1.35;
	white-space: normal;
	overflow: visible;
}

.product-detail-v2__crumbs-link {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.product-detail-v2__crumbs-sep {
	flex: 0 0 auto;
	color: var(--pd-muted);
}

.rf-piece {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.rf-piece__chip {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.rf-piece__img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border: 1px solid var(--pd-line);
	border-radius: 8px;
	background: #fff;
	flex-shrink: 0;
}

.rf-piece__chip-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--pd-muted);
}

.product-detail-v2 .pd-variants__field {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.rf-piece .product-detail-v2__variant-block {
	display: none;
}

.rf-piece .pd-variants__field {
	position: relative;
	width: auto;
	height: auto;
	margin: 0 0 8px;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

/* ——— Tlačítko poptávky v detailu ——— */
.product-detail-v2 .add-to-cart-control--detail .add-to-cart-control__submit,
.product-detail-v2__sticky-btn {
	background: var(--pd-cta);
	color: #fff;
	min-height: var(--pd-touch);
	height: var(--pd-touch);
	padding: 0 24px;
	border: 0;
	border-radius: 10px;
	font-weight: 700;
}

.product-detail-v2 .add-to-cart-control--detail .add-to-cart-control__submit:hover,
.product-detail-v2__sticky-btn:hover {
	background: var(--pd-cta-hover);
	color: #fff;
}

.product-detail-v2 .add-to-cart-control--detail .add-to-cart-control__submit:focus-visible,
.product-detail-v2__sticky-btn:focus-visible {
	outline: 3px solid var(--pd-gold);
	outline-offset: 2px;
}

/* Lišta je jen na mobilu */
.product-detail-v2__sticky {
	display: none;
}

/* ——— Mobil < 768 px ——— */
@media (max-width: 767.98px) {
	.product-detail-v2__top {
		display: flex;
		flex-direction: column;
	}

	.product-detail-v2__gallery-col {
		order: 1;
	}

	.product-detail-v2__buy-col {
		order: 2;
	}

	.product-detail-v2__gallery {
		padding: 8px;
	}

	.product-detail-v2__gallery-stage {
		aspect-ratio: auto;
		width: 100%;
		height: 96px;
		overflow: hidden;
		flex-shrink: 0;
	}

	.product-detail-v2__thumbs {
		margin-top: 8px;
		gap: 6px;
	}

	.product-detail-v2__thumb {
		width: 44px;
		height: 44px;
		padding: 4px;
	}

	.product-detail-v2__buy {
		display: flex;
		flex-direction: column;
		position: relative;
		z-index: 2;
	}

	.product-detail-v2__crumbs {
		order: 0;
		max-height: none;
		overflow: visible;
		margin: 0 0 8px;
	}

	.product-detail-v2__cart {
		order: 6;
		margin: 0 0 10px;
	}

	.product-detail-v2__title {
		order: 1;
		margin: 0 0 6px !important;
	}

	.product-detail-v2__title h1 {
		font-size: 22px;
		margin: 0 0 4px;
	}

	.product-detail-v2__sku-row {
		order: 3;
		margin: 0 0 8px;
	}

	.product-detail-v2__price {
		order: 4;
		padding: 10px 12px;
		margin: 0 0 10px !important;
	}

	.product-detail.product-detail-v2 .price-area .new-price,
	.product-detail.product-detail-v2 .price-area .h2 {
		font-size: 24px;
	}

	.product-detail.product-detail-v2 .price-area .product-detail__price-vat,
	.product-detail.product-detail-v2 .price-area.is-vat-first .product-detail__price-vat,
	.product-detail.product-detail-v2 .price-area .product-detail__price-vat-note,
	.product-detail.product-detail-v2 .price-area.is-vat-first .product-detail__price-vat-note {
		font-size: 13px;
	}

	.product-detail-v2__variants-wrap {
		order: 5;
		margin: 0;
	}

	.product-detail-v2__opt {
		min-height: 44px;
	}

	.product-detail-v2__opt:has(.product-detail-v2__swatch) {
		width: 44px;
		height: 44px;
		min-height: 44px;
		padding: 0;
		justify-content: center;
		font-size: 0;
		gap: 0;
	}

	.product-detail-v2__swatch {
		width: 28px;
		height: 28px;
	}

	.product-detail-v2__opt:has(.product-detail-v2__swatch) .product-detail-v2__opt-label {
		display: none;
	}

	.product-detail-v2__opt:has(.product-detail-v2__swatch.is-unknown) {
		width: auto;
		min-width: 44px;
		height: auto;
		min-height: 44px;
		padding: 6px 10px;
		font-size: 13px;
		gap: 6px;
	}

	.product-detail-v2__opt:has(.product-detail-v2__swatch.is-unknown) .product-detail-v2__opt-label {
		display: inline;
		font-size: 13px;
	}

	.product-detail-v2,
	.product-detail-v2__top,
	.product-detail-v2__buy,
	.product-detail-v2__buy-col,
	.product-detail-v2__cart,
	.product-detail-v2__cart .block,
	.product-detail-v2 .add-to-cart-control--detail,
	.product-detail-v2 .add-to-cart-control__qty,
	.product-detail-v2 .add-to-cart-control__qty .input-group,
	.product-detail-v2 .add-to-cart-control__m2 {
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.product-detail-v2 .add-to-cart-control--detail {
		width: 100%;
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
	}

	.product-detail-v2 .add-to-cart-control__qty {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		width: 100%;
		max-width: 100%;
		margin: 0 0 10px;
	}

	.product-detail-v2 .add-to-cart-control__qty .input-group {
		flex: 1 1 auto;
		width: auto;
		max-width: 11rem;
	}

	.product-detail-v2 .add-to-cart-control__qty .form-control,
	.product-detail-v2 .add-to-cart-control__qty .counter-input-number {
		min-width: 0;
		width: 4.5rem;
		max-width: 100%;
		flex: 1 1 4.5rem;
	}

	.product-detail-v2__short {
		order: 20;
		margin: 12px 0;
		max-width: 100%;
		overflow-wrap: anywhere;
	}

	/* Původní tlačítko ve formuláři je na mobilu skryté, ale zůstává v DOM pro programové kliknutí z lišty. */
	.product-detail-v2 .add-to-cart-control--detail .add-to-cart-control__submit {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	/* body je flex column + height:100%; margin na patičce scrollHeight nezvětší.
	   padding-bottom + flex-shrink:0 ano (ověřeno: +140 px k scrollHeight). */
	html.product-detail-v2-page .site-footer {
		flex-shrink: 0;
		padding-bottom: calc(var(--pd-sticky-space, 140px) + env(safe-area-inset-bottom, 0px));
	}

	html.product-detail-v2-page.is-cart-open .site-footer {
		padding-bottom: 0;
	}

	.product-detail-v2__sticky {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 15;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 0;
		padding: 10px 16px;
		padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid var(--pd-line);
		box-shadow: 0 -6px 16px rgba(12, 17, 72, 0.08);
	}

	.product-detail-v2__sticky-main {
		display: block;
		font-size: 18px;
		font-weight: 800;
		color: var(--pd-navy);
		line-height: 1.15;
	}

	.product-detail-v2__sticky-sub {
		display: block;
		font-size: 13px;
		font-weight: 700;
		color: var(--pd-ink);
	}

	.product-detail-v2__sticky-btn {
		width: auto;
		flex: 1;
		max-width: 200px;
	}

	html.product-detail-v2-page.is-cart-open .product-detail-v2__sticky,
	body:has(.cart-dropdown.show) .product-detail-v2__sticky,
	html:has(.cart-dropdown.show) .product-detail-v2__sticky {
		display: none !important;
	}

	html.product-detail-v2-page.is-cart-open,
	body:has(.product-detail-v2__sticky):has(.cart-dropdown.show) {
		padding-bottom: 0;
	}
}

@media (min-width: 768px) {
	.product-detail-v2__sticky {
		display: none !important;
	}
}
