/* ============================================================
   PRODOTTI CORRELATI
   ============================================================ */


.correlati-section {
	width: 100%;
	box-sizing: border-box;

	margin: 0 0 45px 0;
	padding: 28px 0 28px 0;

	/*border-bottom: 2px solid #e8e8e8;*/
}


/* ============================================================
   HEADER
   ============================================================ */


.correlati-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;

	margin-bottom: 22px;
}


.correlati-header-testo {
	min-width: 0;
}


.correlati-label {
	display: block;

	margin-bottom: 5px;

	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;

	letter-spacing: 1.2px;

	color: #1786a1;
}


.correlati-header h2 {
	margin: 0;

	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;

	color: #222;
}


.correlati-header p {
	margin: 6px 0 0 0;

	font-size: 14px;
	line-height: 1.45;

	color: #777;
}


/* ============================================================
   CAROUSEL
   ============================================================ */


.correlati-carousel {
	width: 100%;
	box-sizing: border-box;
}


/* Evita problemi prima che Flickity venga inizializzato */

.correlati-carousel:after {
	content: '';
	display: block;
	clear: both;
}


/* ============================================================
   CARD
   ============================================================ */


.correlati-card {
	width: 225px;

	margin-right: 18px;
	margin-bottom: 10px;

	box-sizing: border-box;
}


.correlati-card-link {
	display: flex;
	flex-direction: column;

	height: 100%;

	background: #fff;

	border: 1px solid #e7e7e7;
	/*border-radius: 12px;*/
	
	margin-top: 2px;

	overflow: hidden;

	text-decoration: none !important;

	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}


.correlati-card-link:hover {
	text-decoration: none !important;

	border-color: #d3d3d3;

	box-shadow:
		0 7px 22px rgba(0, 0, 0, 0.07);

	transform: translateY(-2px);
}


/* ============================================================
   IMMAGINE
   ============================================================ */


.correlati-card-immagine {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	height: 205px;

	padding: 18px;

	box-sizing: border-box;

	background: #fff;
}


.correlati-card-immagine img {
	display: block;

	width: 100%;
	height: 100%;

	max-width: 100%;
	max-height: 100%;

	object-fit: contain;
}


/* ============================================================
   BADGE SCONTO
   ============================================================ */


.correlati-badge-sconto {
	position: absolute;

	top: 12px;
	left: 12px;

	z-index: 2;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 26px;

	padding: 0 9px;

	border-radius: 20px;

	/*background: #222;*/
	background: #FF0000;

	color: #fff;

	font-size: 16px;
	font-weight: 700;
}


/* ============================================================
   BODY
   ============================================================ */


.correlati-card-body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;

	flex: 1;

	min-height: 115px;

	padding: 14px 16px 15px 16px;

	border-top: 1px solid #f0f0f0;

	box-sizing: border-box;
}


.correlati-card-titolo {
	display: -webkit-box;

	margin: 0 0 14px 0;

	overflow: hidden;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;

	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;

	color: #222;
}


/* ============================================================
   PREZZO
   ============================================================ */


.correlati-card-footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;

	gap: 10px;

	margin-top: auto;
}


.correlati-card-prezzo {
	display: flex;
	flex-direction: column;

	min-width: 0;
}


.correlati-prezzo-originale {
	margin-bottom: 1px;

	font-size: 12px;
	line-height: 1.2;

	text-decoration: line-through;

	color: #999;
}


.correlati-prezzo-attuale {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;

	color: #111;
}


/* ============================================================
   LINK INTERNI CARD
   ============================================================ */

.correlati-card-media-link,
.correlati-card-titolo-link {
	display: block;

	color: inherit;
	text-decoration: none !important;
}


.correlati-card-titolo-link:hover {
	color: inherit;
	text-decoration: none !important;
}


/* ============================================================
   PULSANTI CARD
   ============================================================ */

.correlati-card-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 auto;

	min-height: 34px;

	padding: 0 12px;

	box-sizing: border-box;

	border: 0;

	background: #1687a2;

	color: #fff !important;

	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;

	text-decoration: none !important;

	cursor: pointer;

	white-space: nowrap;

	transition:
		background 0.2s ease,
		transform 0.2s ease,
		opacity 0.2s ease;
}


.correlati-card-btn:hover {
	background: #116f86;

	color: #fff !important;
	text-decoration: none !important;

	transform: translateY(-1px);
}


/* PRODOTTO DA CONFIGURARE */

.correlati-card-btn--scegli {
	background: #222;
}


.correlati-card-btn--scegli:hover {
	background: #000;
}


/* DETTAGLI */

.correlati-card-btn--dettagli {
	background: #f1f1f1;

	color: #333 !important;
}


.correlati-card-btn--dettagli:hover {
	background: #e5e5e5;

	color: #111 !important;
}


/* AJAX - CARICAMENTO */

.correlati-card-btn.is-loading {
	opacity: 0.65;

	cursor: wait;

	transform: none;
}


/* AJAX - AGGIUNTO */

.correlati-card-btn.is-added {
	background: #22a55b;

	color: #fff !important;
}


/* AJAX - ERRORE */

.correlati-card-btn.is-error {
	background: #c84141;

	color: #fff !important;
}


/* ============================================================
   FLICKITY - PUNTINI
   ============================================================ */


.correlati-carousel .flickity-page-dots {
	position: relative;

	bottom: auto;

	margin: 18px 0 0 0;
}


.correlati-carousel .flickity-page-dots .dot {
	width: 7px;
	height: 7px;

	margin: 0 5px;

	background: #c8c8c8;

	opacity: 1;

	transition:
		width 0.2s ease,
		background 0.2s ease,
		border-radius 0.2s ease;
}


.correlati-carousel .flickity-page-dots .dot.is-selected {
	width: 20px;

	border-radius: 5px;

	background: #222;
}


/* ============================================================
   TABLET
   ============================================================ */





/* ============================================================
   TABLET PICCOLO
   ============================================================ */


@media screen and (max-width: 760px) {

	.correlati-section {
		margin-top: 30px;
		padding-top: 24px;
	}


	.correlati-header h2 {
		font-size: 21px;
	}


	.correlati-header p {
		font-size: 13px;
	}


	.correlati-card {
		width: calc(50% - 10px);

		margin-right: 15px;
	}


	.correlati-card-immagine {
		height: 180px;
	}


	.correlati-carousel .flickity-prev-next-button.previous {
		left: 5px;
	}


	.correlati-carousel .flickity-prev-next-button.next {
		right: 5px;
	}

}


/* ============================================================
   MOBILE
   ============================================================ */


@media screen and (max-width: 520px) {

	.correlati-section {
		width: 100%;
		max-width: none;

		margin: 26px auto 32px auto;
		padding-top: 20px;
	}


	.correlati-label {
		font-size: 10px;
	}


	.correlati-header h2 {
		font-size: 20px;
	}


	.correlati-header p {
		max-width: 290px;
	}


	/*
	 * 82% permette di vedere un pezzetto
	 * della card successiva e fa capire
	 * subito che il blocco è scorrevole.
	 */
	.correlati-card {
		width: 82%;

		margin-right: 14px;
	}


	.correlati-card-immagine {
		height: 190px;
	}


	.correlati-card-body {
		min-height: 105px;

		padding: 13px 14px 14px 14px;
	}


	.correlati-card-titolo {
		font-size: 14px;
	}


	.correlati-prezzo-attuale {
		font-size: 16px;
	}


	.correlati-carousel .flickity-prev-next-button {
		display: none;
	}

}

/* ============================================================
   SPEDIZIONE
   ============================================================ */

.correlati-card-spedizione {
	display: flex;
	align-items: flex-start;

	gap: 6px;

	min-height: 31px;

	margin: -4px 0 12px 0;

	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;

	color: #777;
}


.correlati-spedizione-dot {
	flex: 0 0 auto;

	width: 8px;
	height: 8px;

	margin-top: 4px;

	border-radius: 50%;
}


.correlati-spedizione-separatore {
	margin: 0 3px;

	color: #bbb;
}

/* ============================================================
   BODY CARD
   ============================================================ */

.correlati-card-body {
	display: flex;
	flex-direction: column;

	flex: 1;

	min-height: 170px;

	padding: 14px 16px 15px 16px;

	border-top: 1px solid #f0f0f0;

	box-sizing: border-box;
}


/* ============================================================
   TITOLO
   ============================================================ */

.correlati-card-titolo {
	display: -webkit-box;

	margin: 0 0 10px 0;
	min-height: 40px;

	overflow: hidden;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;

	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;

	color: #222;
}


/* ============================================================
   SPEDIZIONE
   ============================================================ */

.correlati-card-spedizione {
	display: flex;
	align-items: flex-start;

	gap: 6px;

	min-height: 32px;
	margin: 0 0 12px 0;

	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;

	color: #777;
}


.correlati-spedizione-dot {
	flex: 0 0 auto;

	width: 8px;
	height: 8px;

	margin-top: 4px;

	border-radius: 50%;
}


.correlati-card-spedizione-testo {
	display: -webkit-box;

	overflow: hidden;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}


.correlati-spedizione-separatore {
	margin: 0 3px;
	color: #bbb;
}

/* ============================================================
   COLORI TEMPI DI CONSEGNA
   ============================================================ */


/* 24-48 h */

.correlati-spedizione-dot--verde {
	background: #72d84b;
}


/* 2-3 giorni */

.correlati-spedizione-dot--verde-chiaro {
	background: #91dc57;
}


/* 8-30 giorni */

.correlati-spedizione-dot--giallo {
	background: #e3bd43;
}


/* consegna prevista a metà mese */

.correlati-spedizione-dot--arancio {
	background: #e9865f;
}


/* consegna prevista fine mese */

.correlati-spedizione-dot--rosso {
	background: #ff1717;
}


/* fallback */

.correlati-spedizione-dot--neutro {
	background: #bdbdbd;
}

/* ============================================================
   AREA LOGISTICA CARD
   ============================================================ */

.correlati-card-logistica {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;

	min-height: 48px;

	margin: 0 0 10px 0;
}


/* ============================================================
   TEMPI DI CONSEGNA
   ============================================================ */

.correlati-card-spedizione {
	display: flex;
	align-items: flex-start;

	gap: 6px;

	min-height: 17px;

	margin: 0;

	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;

	color: #777;
}


.correlati-card-spedizione-testo {
	display: -webkit-box;

	overflow: hidden;

	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}


/* ============================================================
   SPEDIZIONE GRATUITA
   ============================================================ */

.correlati-spedizione-gratuita {
	display: inline-flex;
	align-items: center;

	gap: 4px;

	margin-top: 5px;
	padding: 3px 7px;

	background: #edf8f0;

	border: 1px solid #c7e9d0;

	color: #168143;

	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;

	white-space: nowrap;
}


.correlati-spedizione-gratuita-icona {
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* ============================================================
   SWIPE / TOUCH CAROUSEL
   ============================================================ */

.correlati-carousel .flickity-viewport {
	touch-action: pan-y;
	-ms-touch-action: pan-y;

	cursor: grab;
}


.correlati-carousel .flickity-viewport:active {
	cursor: grabbing;
}


/*
 * Evita il trascinamento nativo delle immagini
 * mentre si fa swipe sul carousel.
 */
.correlati-carousel img {
	-webkit-user-drag: none;
	user-drag: none;

	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}


/*
 * Evita selezione accidentale del testo
 * durante uno swipe.
 */
.correlati-card {
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}