/* Product page (woocommerce/content-single-product.php): the structure of the
 * earlier page, in the home page's look. Tokens, product rows
 * (.cat-row) and cards (.cat-card) come from css/catalog.css; the video cards
 * and their dialog from css/mr-landing.css and style.css (article.product-videos). */

.pv2 { padding: 28px 0 0; background: var(--c-soft); }
@media (min-width: 1200px) { .pv2 .cat-wrap { max-width: 1600px; } } /* wide, so the right column and the texts run shorter */

/* Desktop: the content 10 % smaller (the user found it best at 90 % browser zoom). On the
   boxes, not on the columns: the photo column follows the scroll, and a sticky `top` inside
   a zoom is counted differently by Firefox and by Chrome/Safari. */
@media (min-width: 992px) {
	.pv2 .pv2-card, .pv2 .pv2-row, .pv2-trending > .container { zoom: .9; }
}

.pv2-card {
	margin-bottom: 24px;
	padding: 28px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 30, 50, .06);
}
.pv2-card--dark { background: var(--c-navy); color: #fff; }
.pv2-top > div > .pv2-card:last-child, .pv2-left__inner > .pv2-card:last-child, .pv2-row .pv2-card { margin-bottom: 0; }
@media (min-width: 992px) {
	.pv2-left__inner { position: sticky; top: var(--pv2-left-top, calc(var(--c-bar-top) + 24px)); } /* the script in content-single-product.php sets the top */
}
.pv2-row { margin-top: 24px; }

.pv2-h2 { margin: 0 0 18px; padding: 0; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--c-text); }
.pv2-card--dark .pv2-h2 { color: #fff; }

/* ---------------------------------------------------------------- gallery */

.pv2 .phacon-product-gallery-slider { overflow: hidden; max-width: min(100%, calc((100vh - 300px) * 4 / 3)); margin-inline: auto; border-radius: 16px; background: #e9ebee; } /* never taller than the screen allows */
.pv2 .phacon-product-gallery-slider .slick-slide { padding: 0; } /* style.css pads the slides 4px */
.pv2 .phacon-product-gallery-slider .slick-slide img,
.pv2 .p3d-slide model-viewer,
.pv2 .pvideo-slide video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9ebee; }
.pv2 .p3d-slide model-viewer, .pv2 .pvideo-slide video { object-fit: contain; }

.pv2 .phacon-product-gallery-slider .slick-arrow {
	z-index: 2;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
	transition: background-color .2s;
}
.pv2 .phacon-product-gallery-slider .slick-arrow:hover,
.pv2 .phacon-product-gallery-slider .slick-arrow:focus { background: #fff; }
.pv2 .phacon-product-gallery-slider .slick-prev { left: 14px; }
.pv2 .phacon-product-gallery-slider .slick-next { right: 14px; }
.pv2 .phacon-product-gallery-slider .slick-arrow::before,
.pv2 .phacon-product-gallery-nav .slick-arrow::before,
.pv2 .patient-slider .slick-arrow::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin: auto;
	border: solid var(--c-navy);
	border-width: 0 2.5px 2.5px 0;
	opacity: 1;
	transform: translateX(-2px) rotate(-45deg);
}
.pv2 .phacon-product-gallery-slider .slick-prev::before,
.pv2 .phacon-product-gallery-nav .slick-prev::before,
.pv2 .patient-slider .slick-prev::before { transform: translateX(2px) rotate(135deg); }

/* thumbnails, centred under the photo */
.pv2 .phacon-product-gallery-nav { max-width: 520px; margin: 14px auto 0; padding: 0 38px; }
.pv2 .phacon-product-gallery-nav .slick-slide { padding: 0 5px; }
.pv2 .phacon-product-gallery-nav .slick-slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #e9ebee; }
.pv2 .phacon-product-gallery-nav .is-selected img { outline: 2px solid var(--c-navy); outline-offset: -2px; }
.pv2 .phacon-product-gallery-nav .slick-arrow { z-index: 2; width: 28px; height: 28px; border: 1px solid var(--c-line); border-radius: 50%; background: #fff; }
.pv2 .phacon-product-gallery-nav .slick-arrow::before { width: 7px; height: 7px; border-width: 0 2px 2px 0; }
.pv2 .phacon-product-gallery-nav .slick-prev { left: 0; }
.pv2 .phacon-product-gallery-nav .slick-next { right: 0; }

/* -------------------------------------------------------------- buy box */

.pv2-title { margin: 0 0 6px; padding: 0; font-size: clamp(1.3rem, 1.6vw, 1.6rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: var(--c-navy); }
.pv2-ref { margin: 0 0 18px; font-size: 13px; color: var(--c-muted); }

.pv2-price { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--c-text); }
.pv2-price del { display: block; font-size: 15px; font-weight: 500; color: var(--c-muted); }
.pv2-price ins { text-decoration: none; }
.pv2-price small, .pv2-price .woocommerce-price-suffix { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--c-muted); }
.pv2-price .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pv2-cart { margin: 18px 0 0; }
.pv2-cart__row { display: flex; gap: 10px; }
.pv2-cart .quantity { flex: none; margin: 0; }
.pv2 .pv2-cart .qty { width: 70px; height: 46px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 999px; font: inherit; font-size: 16px; text-align: center; }
.pv2 .pv2-cart .pv2-cart__row button.pv2-add { /* above WooCommerce's .woocommerce button.button.alt */
	flex: 1;
	height: 46px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px !important; /* a plugin prints .single_add_to_cart_button { border-radius: 3px !important } inline */
	background: var(--c-accent);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	transition: background-color .2s;
}
.pv2 .pv2-cart .pv2-cart__row button.pv2-add:hover { background: var(--c-accent-dark); color: #fff; }

.pv2-quote {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	margin-top: 10px;
	border: 1px solid var(--c-navy);
	border-radius: 999px;
	font-weight: 600;
	color: var(--c-navy);
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.pv2-quote:hover { background: var(--c-navy); color: #fff; }

/* -------------------------------------------------- videos, contents, text */

.pv2 article.product-videos .mr-play { border-radius: 16px; }

/* The contents (components, patient, model, structures): blocks with a title. */
.pv2-specs { font-size: 14.5px; line-height: 1.7; color: var(--c-text); }
.pv2-specs { columns: 2 260px; column-gap: 36px; } /* two columns once the box is wide enough */
.pv2-specs p { margin: 0 0 16px; break-inside: avoid; }
.pv2-specs p:last-child { margin-bottom: 0; }
.pv2-specs p:empty { display: none; }
.pv2-specs .pv2-spec-title { display: block; margin-bottom: 4px; font-size: 15px; color: var(--c-navy); }
.pv2-specs .pv2-spec-title + br { display: none; } /* the title is a block already: its line break would leave an empty line */
.pv2-specs a, .pv2-desc a { color: var(--c-navy); }

.pv2-desc { font-size: 15.5px; line-height: 1.7; color: var(--c-text); }
.pv2-desc p { margin: 0 0 1em; }
.pv2-desc p:last-child { margin-bottom: 0; }

/* Documents: the dark box, with a row per file. */
.pv2-docs { margin: 0; padding: 0; list-style: none; }
.pv2-docs li + li { border-top: 1px solid rgba(255, 255, 255, .15); }
.pv2-docs a { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 600; color: #fff; text-decoration: none; }
.pv2-docs a:hover { color: #fdba74; }
.pv2-docs svg { flex: none; opacity: .85; }

/* Product contents (systems): the components as small cards. */
.pv2-comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.pv2-comp { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--c-line); border-radius: 16px; background: #fff; text-decoration: none; transition: box-shadow .3s, transform .3s; }
.pv2-comp:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 30, 50, .12); }
.pv2-comp img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #e9ebee; }
.pv2-comp span { padding: 12px 14px 14px; font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--c-navy); }
.pv2-comp small { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-accent); }

/* Compatible accessories: the category page's product rows. */
.pv2-rows { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------- trending slider */

.pv2-trending { margin-top: clamp(40px, 5vw, 64px); padding: clamp(40px, 5vw, 64px) 0; background: #fff; }
.pv2 .patient-slider { margin: 0 -10px; }
.pv2 .patient-slider:not(.slick-initialized) { display: flex; overflow: hidden; } /* before Slick: one row, not a column */
.pv2 .patient-slider:not(.slick-initialized) > .pv2-slide { flex: 0 0 33.333%; }
.pv2 .patient-slider .slick-track { display: flex; }
.pv2 .patient-slider .slick-slide { height: auto; }
.pv2 .patient-slider .slick-slide > div { height: 100%; }
.pv2-slide { height: 100%; padding: 4px 10px 24px; }
.pv2 .patient-slider .slick-list { padding: 6px 0 18px; } /* room for the cards' shadow, which the list clips */
.pv2-slide .cat-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 16px rgba(0, 30, 50, .07); }
.pv2-slide .cat-card:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 22px rgba(0, 30, 50, .12); }
/* Arrows outside the cards, in the page margin. */
.pv2 .patient-slider .slick-arrow { z-index: 2; width: 40px; height: 40px; border: 1px solid var(--c-line); border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.pv2 .patient-slider .slick-prev { left: -48px; }
.pv2 .patient-slider .slick-next { right: -48px; }
@media (max-width: 767px) { .pv2 .patient-slider .slick-arrow { display: none !important; } } /* phones: swipe and the dots */
.pv2 .patient-slider .slick-dots li button::before { color: var(--c-navy); }

@media (max-width: 991px) {
	.pv2 { padding-top: 16px; }
	.pv2-card { padding: 20px; border-radius: 20px; }

	/* One column, in buying order: photo, buy box, videos, contents, description, documents. */
	.pv2-top { flex-direction: column; margin: 0; }
	.pv2-top > .pv2-left, .pv2-top > .pv2-col, .pv2-left__inner { display: contents; }
	.pv2-top .pv2-card { width: 100%; margin: 0 0 16px; }
	.pv2-top .pv2-gallery { order: 1; }
	.pv2-top .pv2-buy { order: 2; }
	.pv2-top .product-videos { order: 3; }
	.pv2-top .pv2-specs { order: 4; }
	.pv2-top .pv2-desc { order: 5; }
	.pv2-top .pv2-docs-card { order: 6; }
}

@media (prefers-reduced-motion: reduce) {
	.pv2-comp { transition: none; }
	.pv2-comp:hover { transform: none; }
}
