/**
 * Theme Name: Ariano Festa della Pizza - Shop
 * Description: Ariano Festa della - Shop
 * Author: Magenta
 * Template: blocksy
 * Text Domain: blocksy
 */

:root {
	--fdp-ink: #192a3d;
	--fdp-ink-soft: #4a5a6c;
	--fdp-paper: #f3f4f6;
	--fdp-line: rgba(25, 42, 61, 0.14);
	--fdp-ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
	--fdp-radius: 8px;
	--fdp-shadow: 0 1px 2px rgba(25, 42, 61, 0.06);
}

body.fdp-shop-home,
body.tax-product_cat,
body.single-product,
body.woocommerce-cart,
body.woocommerce-checkout {
	background-color: var(--fdp-paper);
	font-family: var(--fdp-ui);
}

body.fdp-shop-home .hero-section[data-type="type-1"] .page-title,
body.fdp-shop-home .ct-container > h1.page-title,
body.fdp-shop-home .entry-header .page-title,
body.tax-product_cat .hero-section .page-title,
body.tax-product_cat .entry-header .page-title,
body.single-product .fdp-product-cat-hero .page-title,
body.single-product .entry-summary .product_title {
	font-family: var(--fdp-ui);
	font-weight: 700;
	letter-spacing: 0;
	color: var(--fdp-ink);
}

body.fdp-shop-home .hero-section[data-type="type-1"] .page-title,
body.fdp-shop-home .ct-container > h1.page-title,
body.fdp-shop-home .entry-header .page-title,
body.tax-product_cat .hero-section .page-title,
body.tax-product_cat .entry-header .page-title,
body.single-product .fdp-product-cat-hero .page-title {
	font-size: clamp(1.55rem, 4.5vw, 1.95rem);
	text-transform: none;
}

/* Header */
.ct-header [data-row*="middle"] {
	--height: 64px !important;
	background-color: #fff !important;
	border-bottom: 1px solid var(--fdp-line) !important;
	box-shadow: none !important;
}

@media (max-width: 999.98px) {
	.ct-header [data-row*="middle"] {
		--height: 58px !important;
	}

	.ct-header [data-id="logo"] {
		justify-self: start !important;
		margin-inline: 0 !important;
	}

	.ct-header [data-id="logo"] .site-logo-container {
		--logo-max-height: 38px !important;
	}

	.ct-header [data-id="trigger"] {
		justify-self: end !important;
	}

	.ct-header [data-id="trigger"] button,
	.ct-header [data-id="trigger"] .ct-header-trigger,
	.ct-header [data-id="trigger"] .ct-toggle-button {
		width: 40px !important;
		height: 40px !important;
		border-radius: var(--fdp-radius) !important;
		border: 1px solid var(--fdp-line) !important;
		background: #fff !important;
	}
}

/* Categorie */
ul.products li.product-category {
	position: relative;
	list-style: none;
}

ul.products li.product-category .woocommerce-loop-product__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

body.fdp-shop-home ul.products[data-products],
body.woocommerce ul.products:has(> li.product-category) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin: 0;
	padding: 4px 0 24px;
}

@media (min-width: 690px) {
	body.fdp-shop-home ul.products[data-products],
	body.woocommerce ul.products:has(> li.product-category) {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
}

body.fdp-shop-home [data-products] > .product-category,
body.woocommerce [data-products] > .product-category {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 12px;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 10px 40px 10px 10px !important;
	min-height: 0 !important;
	height: auto !important;
	border: 1px solid var(--fdp-line) !important;
	border-radius: var(--fdp-radius) !important;
	background: #fff !important;
	box-shadow: var(--fdp-shadow) !important;
	overflow: hidden;
	text-align: left !important;
	--horizontal-alignment: center;
	--text-horizontal-alignment: left;
}

@media (hover: hover) {
	body.fdp-shop-home [data-products] > .product-category:hover,
	body.woocommerce [data-products] > .product-category:hover,
	body.tax-product_cat [data-products] > .product:hover {
		border-color: rgba(25, 42, 61, 0.28) !important;
	}
}

.fdp-cat-thumb {
	display: block;
	flex: 0 0 60px;
	align-self: center;
	width: 60px;
	height: 60px;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 6px;
	overflow: hidden;
	line-height: 0;
	font-size: 0;
	background: #e8edf3;
	border: 1px solid var(--fdp-line);
}

.fdp-cat-thumb__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover;
}

body.fdp-shop-home [data-products] > .product-category .woocommerce-loop-category__title,
body.woocommerce [data-products] > .product-category .woocommerce-loop-category__title {
	flex: 1 1 auto !important;
	align-self: center !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--fdp-ui) !important;
	font-size: clamp(1.2rem, 4.5vw, 1.45rem) !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 0;
	color: var(--fdp-ink) !important;
	text-align: left !important;
}

body.fdp-shop-home [data-products] > .product-category .woocommerce-loop-product__link,
body.woocommerce [data-products] > .product-category .woocommerce-loop-product__link {
	color: inherit !important;
	text-decoration: none !important;
}

body.fdp-shop-home [data-products] > .product-category .woocommerce-loop-category__title::after,
body.woocommerce [data-products] > .product-category .woocommerce-loop-category__title::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--fdp-ink);
	border-bottom: 2px solid var(--fdp-ink);
	transform: translateY(-50%) rotate(-45deg);
	pointer-events: none;
}

body.fdp-shop-home [data-products] > .product-category > figure,
body.woocommerce [data-products] > .product-category > figure {
	display: none !important;
}

/* Prodotti in categoria */
body.tax-product_cat [data-products] {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 8px !important;
	padding-bottom: 18px;
}

@media (min-width: 690px) {
	body.tax-product_cat [data-products] {
		grid-template-columns: 1fr 1fr !important;
		gap: 10px !important;
	}
}

body.tax-product_cat [data-products] > .product {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 4px;
	width: 100% !important;
	margin: 0 !important;
	padding: 14px !important;
	border: 1px solid var(--fdp-line) !important;
	border-radius: var(--fdp-radius) !important;
	background: #fff !important;
	box-shadow: var(--fdp-shadow) !important;
	text-align: left !important;
	overflow: hidden;
	box-sizing: border-box !important;
	cursor: pointer;
	--horizontal-alignment: flex-start;
	--text-horizontal-alignment: left;
}

body.tax-product_cat [data-products] > .product:not(.product-category) .woocommerce-loop-product__title .woocommerce-loop-product__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

body.tax-product_cat [data-products] > .product .woocommerce-loop-product__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--fdp-ui) !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0;
	color: var(--fdp-ink) !important;
	text-align: left !important;
}

body.tax-product_cat [data-products] > .product .woocommerce-loop-product__title a {
	color: inherit !important;
	text-decoration: none !important;
}

body.tax-product_cat [data-products] > .product .entry-excerpt {
	margin: 0 !important;
	font-family: var(--fdp-ui);
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--fdp-ink-soft);
	text-align: left !important;
}

body.tax-product_cat [data-products] > .product .entry-excerpt p {
	margin: 0;
}

body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px;
	margin: 10px 0 0 !important;
	border: none !important;
	border-top: 1px solid var(--fdp-line) !important;
	padding: 12px 0 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .price {
	flex: 1 1 auto !important;
	justify-content: flex-start !important;
	align-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	font-family: var(--fdp-ui);
	font-size: 1.12rem !important;
	font-weight: 700;
	color: var(--fdp-ink);
}

body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .price:not(:only-child):after {
	display: none !important;
}

body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .button,
body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .fdp-open-button {
	display: inline-flex !important;
	flex: 0 1 auto !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative;
	z-index: 2;
	min-width: 8.5rem;
	min-height: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 20px !important;
	border: none !important;
	border-radius: var(--fdp-radius) !important;
	background: var(--fdp-ink) !important;
	color: #fff !important;
	font-family: var(--fdp-ui) !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	white-space: nowrap;
}

body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .button:hover,
body.tax-product_cat [data-products="type-2"] > .product .ct-woo-card-actions .fdp-open-button:hover {
	background: var(--fdp-ink-soft) !important;
	color: #fff !important;
}

body.tax-product_cat .woo-listing-top {
	margin-bottom: 10px;
}

/* Scheda prodotto */
body.single-product .product {
	--product-gallery-width: 0% !important;
}

body.single-product .woocommerce-product-gallery {
	display: none !important;
}

body.single-product .product-entry-wrapper {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
}

body.single-product div.product .summary.entry-summary {
	width: 100% !important;
	max-width: 540px;
	margin: 0 auto !important;
	padding: 16px !important;
	background: #fff;
	border: 1px solid var(--fdp-line);
	border-radius: var(--fdp-radius);
	box-shadow: var(--fdp-shadow);
	box-sizing: border-box;
}

body.single-product .ct-breadcrumbs {
	display: none !important;
}

body.single-product .fdp-product-cat-hero {
	margin: 0 0 40px !important;
	padding: 0 !important;
	text-align: center;
}

body.single-product .fdp-product-cat-hero .entry-header {
	margin: 0;
	padding: 0;
	text-align: center;
}

body.single-product .fdp-product-cat-hero .page-title {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.3 !important;
}

body.single-product .fdp-product-cat-hero .page-title a {
	color: inherit !important;
	text-decoration: none !important;
}

body.single-product .fdp-product-cat-hero .page-title a:hover {
	text-decoration: underline !important;
}

/* Back desktop (mobile: barra fissa). */
body.single-product .fdp-product-back {
	display: none;
	margin: 8px 0 0 !important;
	font-family: var(--fdp-ui);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.3;
}

body.single-product .fdp-product-back a {
	color: var(--fdp-ink-soft) !important;
	text-decoration: none !important;
}

body.single-product .fdp-product-back a:hover {
	color: var(--fdp-ink) !important;
	text-decoration: underline !important;
}

/* Allinea al container archive (layout wide). */
body.single-product .ct-container-full > article {
	width: var(--theme-container-width, min(100%, 90vw));
	max-width: var(--theme-normal-container-max-width, 1290px);
	margin-inline: auto !important;
	box-sizing: border-box;
}

@media (min-width: 690px) {
	body.single-product .fdp-product-cat-hero {
		max-width: none !important;
		width: 100% !important;
		margin: 0 0 28px !important;
		text-align: left;
	}

	body.single-product .fdp-product-cat-hero .entry-header {
		text-align: left;
	}

	body.single-product .fdp-product-back {
		display: block;
	}

	body.single-product .product-entry-wrapper {
		max-width: none !important;
		width: 100% !important;
	}

	body.single-product div.product .summary.entry-summary {
		max-width: 571px;
		margin: 0 !important;
		padding: 20px 22px !important;
	}

	body.single-product .entry-summary .product_title {
		font-size: 1.55rem !important;
	}

	body.single-product .ct-cart-actions .single_add_to_cart_button {
		min-height: 46px;
	}
}

body.single-product .entry-summary .product_title {
	margin: 0 0 6px !important;
	font-family: var(--fdp-ui) !important;
	font-size: clamp(1.4rem, 4.5vw, 1.75rem) !important;
	font-weight: 700 !important;
	letter-spacing: 0;
	line-height: 1.2 !important;
	color: var(--fdp-ink) !important;
}

body.single-product .entry-summary .price {
	margin: 0 0 6px !important;
	font-family: var(--fdp-ui) !important;
	font-size: 1.3rem !important;
	font-weight: 700 !important;
	color: var(--fdp-ink) !important;
}

body.single-product .entry-summary .woocommerce-product-details__short-description {
	margin: 0 0 2px !important;
	font-family: var(--fdp-ui);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--fdp-ink-soft);
}

body.single-product .entry-summary .woocommerce-product-details__short-description p {
	margin: 0;
}

body.single-product .ct-product-divider {
	display: block;
	width: 100%;
	height: 1px !important;
	margin: 14px 0 !important;
	background: var(--fdp-line) !important;
	border: 0 !important;
	opacity: 1 !important;
}

/* Nasconde divider_2 Blocksy sotto Aggiungi. */
body.single-product .ct-product-divider[data-id="divider_2"] {
	display: none !important;
}

body.single-product .ct-product-add-to-cart,
body.single-product form.cart {
	margin: 0 !important;
}

body.single-product .fpf-fields {
	margin: 0 0 12px !important;
}

body.single-product .fpf-fields .fpf-field {
	margin: 0 0 10px !important;
}

body.single-product .fpf-fields label,
body.single-product .fpf-fields .fpf-label {
	font-family: var(--fdp-ui) !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	color: var(--fdp-ink) !important;
}

body.single-product .fpf-fields .woocommerce-input-wrapper,
body.single-product .fpf-fields ul {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 6px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body.single-product .fpf-fields li,
body.single-product .fpf-fields .fpf-radio-item {
	margin: 0 !important;
}

body.single-product .fpf-fields input[type="radio"] + label,
body.single-product .fpf-fields label.fpf-option {
	display: flex !important;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 12px !important;
	border: 1px solid var(--fdp-line);
	border-radius: var(--fdp-radius);
	background: #fff;
	font-family: var(--fdp-ui) !important;
	font-weight: 500 !important;
	color: var(--fdp-ink) !important;
	cursor: pointer;
}

body.single-product .ct-cart-actions {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: 8px !important;
	margin: 0 !important;
	width: 100%;
}

body.single-product .ct-cart-actions .quantity {
	--quantity-height: 46px;
	--quantity-width: 118px;
	flex: 0 0 auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center;
	width: var(--quantity-width) !important;
	min-width: var(--quantity-width) !important;
	height: var(--quantity-height) !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--fdp-line) !important;
	border-radius: var(--fdp-radius) !important;
	background: #fff !important;
	overflow: hidden;
	box-sizing: border-box !important;
	position: relative !important;
}

body.single-product .ct-cart-actions .quantity .ct-increase,
body.single-product .ct-cart-actions .quantity .ct-decrease {
	/* Override posizionamento +/- Blocksy. */
	top: 50% !important;
	transform: translateY(-50%) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: var(--fdp-ink) !important;
	opacity: 1 !important;
}

body.single-product .ct-cart-actions .quantity .ct-increase:before,
body.single-product .ct-cart-actions .quantity .ct-decrease:before {
	margin-top: 0 !important;
	line-height: 1 !important;
}

body.single-product .ct-cart-actions .quantity .qty {
	width: 100% !important;
	min-width: 0 !important;
	height: var(--quantity-height) !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	font-family: var(--fdp-ui) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	color: var(--fdp-ink) !important;
	text-align: center !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

body.single-product .ct-cart-actions .quantity .qty::-webkit-outer-spin-button,
body.single-product .ct-cart-actions .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.single-product .ct-cart-actions .single_add_to_cart_button {
	flex: 1 1 auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 46px !important;
	height: 46px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: none !important;
	border-radius: var(--fdp-radius) !important;
	background: var(--fdp-ink) !important;
	color: #fff !important;
	font-family: var(--fdp-ui) !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	box-shadow: none !important;
	text-transform: none !important;
}

body.single-product .ct-cart-actions .single_add_to_cart_button:hover {
	background: var(--fdp-ink-soft) !important;
	color: #fff !important;
}

body.single-product .fpf-fields-config-wrapper {
	margin: 0 0 12px !important;
	padding: 8px 10px !important;
	border: 1px solid var(--fdp-line);
	border-radius: var(--fdp-radius);
	background: var(--fdp-paper);
	font-family: var(--fdp-ui);
	font-size: 0.75rem;
	color: var(--fdp-ink-soft);
}

body.single-product .fpf-fields-config-wrapper .fpf-fields-config {
	margin-top: 6px;
	border-radius: var(--fdp-radius);
	border: 1px solid var(--fdp-line);
	background: #fff;
	font-family: var(--fdp-ui);
	font-weight: 600;
}

/* Thank-you QR */
.fdp-okf-qr {
	display: block;
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	margin: 12px auto;
	line-height: 0;
	overflow: visible;
}

/*
 * Stato di fallimento: qui dentro non c'è più un QR ma una frase. Con
 * line-height: 0 e la larghezza fissa che il painter aveva già impostato, il
 * testo veniva disegnato in una riga di altezza zero, sovrapposto a quello
 * successivo — cioè l'unico messaggio che spiega al cliente cosa fare
 * risultava illeggibile.
 */
.fdp-okf-qr[data-qr-failed="1"] {
	width: auto;
	line-height: 1.4;
	text-align: center;
	font-weight: 600;
}

.fdp-okf-qr img,
.fdp-okf-qr canvas {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}

.fdp-okf-qr.has-canvas-renderer canvas {
	display: block !important;
}

.fdp-okf-qr.has-canvas-renderer img {
	display: none !important;
}

.fdp-okf-qr table {
	border-collapse: collapse;
	border-spacing: 0;
	max-width: 100%;
	width: 100% !important;
	margin: 0 auto;
}

.fdp-okf-qr table td {
	padding: 0 !important;
	border: 0 !important;
	line-height: 0 !important;
}

.fdp-okf-order-meta {
	color: var(--fdp-ink-soft);
	font-size: 0.9em;
}

.accordion-body.center {
	text-align: center;
}

/* Navigazione shop: dissolvenza in arrivo, senza JavaScript.
   Niente transform: sposterebbe l'area scrollabile del documento e farebbe
   comparire la scrollbar per tutta la durata dell'animazione.
   Niente barra di avanzamento né sbiadimento in uscita: erano una maschera
   per il caricamento lento, che ora non c'è più. */
@media (prefers-reduced-motion: no-preference) {
	#main-container {
		animation: fdp-nav-enter 0.28s ease both;
	}
}

@keyframes fdp-nav-enter {
	from {
		opacity: 0.55;
	}
	to {
		opacity: 1;
	}
}

/* Back mobile */
.fdp-mobile-back {
	display: none;
}

@media (max-width: 689.98px) {
	.fdp-mobile-back {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
		background: rgba(243, 244, 246, 0.96);
		border-top: 1px solid var(--fdp-line);
		pointer-events: none;
	}

	.fdp-mobile-back__btn {
		pointer-events: auto;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 46px;
		width: 100%;
		padding: 10px 14px;
		border-radius: var(--fdp-radius);
		background: var(--fdp-ink);
		color: #fff !important;
		font-family: var(--fdp-ui);
		font-weight: 700;
		font-size: 14px;
		line-height: 1.2;
		text-decoration: none !important;
		box-shadow: none;
	}

	.fdp-mobile-back__chevron {
		font-size: 16px;
		line-height: 1;
	}

	body.tax-product_cat .site-main,
	body.single-product .site-main {
		/*
		 * La barra e' alta 70px piu' la safe area del notch (~34px su iPhone
		 * col home indicator): con un valore fisso l'ultimo pezzo di pagina
		 * restava coperto, e i tocchi attorno al pulsante — dove la barra e'
		 * pointer-events:none — passavano attraverso su un elemento invisibile.
		 */
		padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
	}
}
