/* Product page (class-retorto-product-page.php), on top of the colour header in shop.css. */

/* Photo: whole bottle, no rounded corners, no zoom. */
.woocommerce div.product .retorto-hero div.images {
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(72vh, 680px); /* the 75 cl height: switching to the smaller 33 cl photo doesn't move the layout */
}

.woocommerce div.product .retorto-hero div.images .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.woocommerce div.product .retorto-hero div.images img {
	width: auto;
	max-width: 100%;
	max-height: min(72vh, 680px);
	margin: 0 auto;
	object-fit: contain;
	border-radius: 0;
}

/* 33 cl next to 75 cl: about three quarters of the height, like the real bottles (product.js sets the class). */
.woocommerce div.product .retorto-hero div.images.rt-formato-33 img {
	max-height: calc(min(72vh, 680px) * .74);
}

.woocommerce div.product .retorto-hero .woocommerce-product-gallery__trigger {
	display: none;
}

/* Summary column. */
.woocommerce div.product .retorto-hero div.summary {
	display: flex;
	flex-direction: column;
	max-width: 34rem;
}

.rt-prodotto__stile {
	order: -1;
	margin: 0 0 .75rem;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--retorto-testo);
	opacity: .8;
}

.woocommerce div.product .retorto-hero .product_title {
	margin: 0 0 .75rem;
}

.woocommerce div.product .retorto-hero p.price {
	margin: 0 0 1.25rem;
}

.retorto-hero .woocommerce-product-details__short-description {
	margin-bottom: 1.75rem;
}

.retorto-hero .woocommerce-product-details__short-description p {
	margin: 0;
	font-size: 1.125rem;
}

/* Format: pill buttons instead of the select. */
.retorto-hero table.variations {
	margin: 0 0 1.25rem;
}

.retorto-hero table.variations tr {
	display: flex;
	flex-direction: column;
	gap: .6rem;
}

.retorto-hero table.variations th.label,
.retorto-hero table.variations td.value {
	display: block;
	padding: 0;
	text-align: left;
	line-height: 1.3;
}

.retorto-hero table.variations th.label label {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.retorto-hero td.value {
	position: relative;
}

.retorto-hero select.rt-nascosto {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	clip: rect(0 0 0 0);
	opacity: 0;
}

.rt-formati {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.retorto-hero .rt-formati button {
	min-width: 5.5rem;
	padding: .75em 1.4em;
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1;
	color: var(--retorto-testo);
	background: transparent;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.retorto-hero .rt-formati button.is-attivo {
	color: var(--rt-testo);
	background: #fff;
	border-color: #fff;
}

.retorto-hero .rt-formati button:disabled {
	opacity: .35;
	cursor: not-allowed;
}

/* Chosen format's price, above the buttons. */
.retorto-hero .single_variation_wrap .woocommerce-variation {
	margin-bottom: 1rem;
}

.woocommerce div.product .retorto-hero .woocommerce-variation-price .price {
	font-size: 1.5rem;
	font-weight: 700;
}

.retorto-hero .woocommerce-variation-availability p.stock {
	margin: .25rem 0 0;
	font-size: .9375rem;
}

/* Quantity − / + and the add to cart button on one line. */
.woocommerce div.product .retorto-hero form.cart:not(.retorto-crate),
.woocommerce div.product .retorto-hero form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem;
	margin-bottom: 0;
}

.woocommerce div.product .retorto-hero form.variations_form {
	display: block;
}

.woocommerce div.product .retorto-hero form.cart div.quantity.rt-quantita {
	display: inline-flex;
	align-items: center;
	float: none;
	margin: 0;
	height: 3.25rem;
	padding: 0 .35rem;
	background: #fff;
	border-radius: 999px;
}

.retorto-hero .rt-quantita button {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--rt-testo);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.retorto-hero .rt-quantita button:hover {
	background: var(--rt-superficie);
}

.woocommerce div.product .retorto-hero .rt-quantita input.qty {
	width: 2.25rem;
	min-height: 0;
	padding: 0;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	background: transparent;
	border: 0;
	box-shadow: none;
	-moz-appearance: textfield;
}

.retorto-hero .rt-quantita input.qty::-webkit-outer-spin-button,
.retorto-hero .rt-quantita input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.woocommerce div.product .retorto-hero .single_add_to_cart_button {
	height: 3.25rem;
	float: none;
}

/* Crate and shipping notes. */
.rt-prodotto__vantaggi {
	display: flex;
	flex-direction: column;
	gap: .4rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
	font-size: .9375rem;
	line-height: 1.5;
	color: var(--retorto-testo);
}

.rt-prodotto__vantaggi a {
	font-weight: 700;
	white-space: nowrap; /* "Componi la cassa →" never splits */
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .2em;
}

/* "La birra" + "Scheda". */
.rt-prodotto__dettagli {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: clamp(2rem, 6vw, 6rem);
	margin: clamp(1rem, 3vw, 2rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.rt-prodotto__dettagli h2 {
	margin: 0 0 1.25rem;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	letter-spacing: -.02em;
}

.rt-prodotto__testo {
	font-size: 1.125rem;
	line-height: 1.75;
	color: var(--rt-testo-2);
}

.rt-prodotto__testo p {
	margin: 0 0 1rem;
}

.rt-prodotto__testo h3 {
	margin: 1.75rem 0 .5rem;
	font-size: 1.25rem;
	color: var(--rt-testo);
}

.rt-prodotto__scheda dl {
	margin: 0;
}

.rt-prodotto__scheda dl > div {
	display: grid;
	grid-template-columns: 11rem minmax(0, 1fr);
	gap: 1rem;
	padding: .8rem 0;
	border-bottom: 1px solid var(--rt-linea);
}

.rt-prodotto__scheda dl > div:first-child {
	border-top: 1px solid var(--rt-linea);
}

.rt-prodotto__scheda dt {
	font-weight: 600;
	color: var(--rt-testo);
}

.rt-prodotto__scheda dd {
	margin: 0;
	color: var(--rt-testo-2);
}

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

@media (max-width: 767px) {
	.woocommerce div.product .retorto-hero div.images {
		min-height: 60vh;
	}

	.woocommerce div.product .retorto-hero div.images img {
		max-height: 60vh;
	}

	.woocommerce div.product .retorto-hero div.images.rt-formato-33 img {
		max-height: calc(60vh * .74);
	}

	.rt-prodotto__scheda dl > div {
		grid-template-columns: 8.5rem minmax(0, 1fr);
	}
}

/* "Ti potrebbero piacere anche", then the crate band and highlights (as on the shop) before the footer. */
.woocommerce div.product .related.products {
	margin: 0;
	padding-top: clamp(1rem, 3vw, 2rem);
}

.woocommerce div.product .related.products > h2 {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.woocommerce div.product .related.products ul.products {
	margin-bottom: 0;
}

.woocommerce div.product .retorto-cta-cassa {
	margin-top: clamp(4rem, 8vw, 7rem);
}

.woocommerce div.product .retorto-punti {
	padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

/* Crate pages: the photo stays in view beside the long list; "La cassa" next to "Come funziona". */
.woocommerce div.product.product-type-retorto_crate .retorto-hero__inner {
	align-items: start;
}

.woocommerce div.product.product-type-retorto_crate .retorto-hero div.images {
	position: sticky;
	top: 2rem;
	align-self: start;
	min-height: 0;
}

.woocommerce div.product.product-type-retorto_crate .retorto-hero div.summary {
	padding-top: clamp(1rem, 3vw, 2.5rem);
}

.woocommerce div.product.product-type-retorto_crate .retorto-hero .rt-prodotto__vantaggi {
	margin-top: .5rem;
}

.rt-prodotto__passi h3 {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	letter-spacing: -.02em;
}

.rt-prodotto__passi h3 ~ h3 {
	margin-top: 2.5rem;
	font-size: 1.25rem;
}

.rt-prodotto__passi ul {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: passo;
}

.rt-prodotto__passi li {
	position: relative;
	padding: 0 0 1rem 3rem;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--rt-testo-2);
	counter-increment: passo;
}

.rt-prodotto__passi li::before {
	content: counter(passo);
	position: absolute;
	top: -.1rem;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	font-size: .875rem;
	font-weight: 700;
	color: #fff;
	background: var(--rt-testo);
	border-radius: 50%;
}

.rt-prodotto__passi p {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--rt-testo-2);
}

.rt-prodotto__passi a {
	font-weight: 600;
	color: var(--rt-testo);
}

@media (max-width: 767px) {
	.woocommerce div.product.product-type-retorto_crate .retorto-hero div.images {
		position: static;
	}
}

/* Crate pages have no crate band: the highlights follow the related products directly. */
.woocommerce div.product.product-type-retorto_crate .retorto-punti {
	margin-top: clamp(3rem, 6vw, 5rem);
}

/* Notices on product pages (errors, e.g. a crate not full) float over the page instead of pushing it down. */
.single-product .woocommerce-notices-wrapper {
	position: fixed;
	top: 6.5rem;
	right: clamp(1rem, 3vw, 2rem);
	z-index: 60;
	width: min(26rem, calc(100vw - 2rem));
}

.single-product .woocommerce-notices-wrapper:empty {
	display: none;
}

.single-product .woocommerce-notices-wrapper .woocommerce-error,
.single-product .woocommerce-notices-wrapper .woocommerce-message,
.single-product .woocommerce-notices-wrapper .woocommerce-info {
	margin: 0 0 .5rem;
	padding: 1rem 1.25rem 1rem 3rem;
	font-size: .9375rem;
	line-height: 1.5;
	background: #fff;
	border: 0;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(29, 29, 27, .16);
	outline: 0;
}

.single-product .woocommerce-notices-wrapper .woocommerce-error {
	list-style: none;
}

.rt-prodotto__nota {
	display: block;
	margin-top: .25em;
	font-size: .8125rem;
	opacity: .7;
}
