/* ==========================================================================
   Quarto Fuoco — Collezioni
   Pixel-perfect from Figma nodes 192:96 + 208:1017
   ========================================================================== */

.qf-collections,
.qf-collections * {
	box-sizing: border-box;
}

.qf-collections {
	padding: 96px 0;
	background: #FFFFFF;
}

.qf-collections__inner {
	max-width: var(--qf-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* ----- Top heading ----- */
.qf-collections__header {
	text-align: center;
	margin-bottom: 75px;
}
.qf-collections__eyebrow {
	margin: 0 0 5px;
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 27px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9A4F3F;
}
.qf-collections__title {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 48px;
	line-height: 72px;
	color: #5C2E26;
}

/* ----- Group: subtitle + carousel + CTA usando grid areas ----- */
.qf-collections__group {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"subtitle cta"
		"carousel carousel";
	column-gap: 24px;
	row-gap: 40px;
}
.qf-collections__group + .qf-collections__group {
	margin-top: 96px;
}
.qf-collections__subtitle {
	grid-area: subtitle;
	margin: 0;
	align-self: center;
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 36px;
	line-height: 54px;
	color: #9A4F3F;
}
.qf-collections__cta {
	grid-area: cta;
	align-self: center;
	flex-shrink: 0;
}
.qf-collections__group .qf-carousel {
	grid-area: carousel;
}

/* ==========================================================================
   Carousel
   ========================================================================== */

.qf-carousel {
	position: relative;
	display: grid;
	grid-template-columns: 48px 1fr 48px;
	column-gap: 20px;
	align-items: center;
}

/* Il VIEWPORT è il vero scroll container (pattern canonico iOS-safe) */
.qf-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	border: 0;
}
.qf-carousel__viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
	background: transparent;
}
.qf-carousel__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 24px;
	cursor: grab;
	user-select: none;
}
.qf-product-related__carousel .qf-carousel__track {
	padding-bottom: 20px;
}
.qf-carousel__viewport--dragging .qf-carousel__track {
	cursor: grabbing;
}
.qf-carousel__viewport--dragging .qf-card,
.qf-carousel__viewport--dragging .qf-card * {
	pointer-events: none;
}

/* Arrow buttons (48x48 circles) */
.qf-carousel__arrow {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background: transparent;
	transition: background-color 150ms ease, transform 150ms ease;
}
.qf-carousel__arrow svg {
	display: block;
	width: 10px;
	height: 18px;
}
.qf-carousel button.qf-carousel__arrow--prev,
.qf-carousel__arrow--prev {
	border: 1px solid #5C2E26 !important;
	color: #5C2E26 !important;
	background: #FFFFFF !important;
}
.qf-carousel button.qf-carousel__arrow--prev:hover,
.qf-carousel button.qf-carousel__arrow--prev:focus,
.qf-carousel__arrow--prev:hover {
	background: #F4ECE3 !important;
	color: #5C2E26 !important;
	border-color: #5C2E26 !important;
	box-shadow: none !important;
	outline: none !important;
}
.qf-carousel button.qf-carousel__arrow--next,
.qf-carousel__arrow--next {
	border: 0 !important;
	background: #5C2E26 !important;
	color: #FFFFFF !important;
}
.qf-carousel button.qf-carousel__arrow--next:hover,
.qf-carousel button.qf-carousel__arrow--next:focus,
.qf-carousel__arrow--next:hover {
	background: #7E3E32 !important;
	color: #FFFFFF !important;
	box-shadow: none !important;
	outline: none !important;
}
.qf-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Pagination dots */
.qf-carousel__dots {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 80px;
}
.qf-carousel__dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #12110F;
	opacity: 0.5;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: opacity 150ms ease;
}
.qf-carousel__dot--active {
	opacity: 1;
}
.qf-carousel__dot:hover {
	opacity: 0.8;
}
.qf-carousel__dot--active:hover {
	opacity: 1;
}

/* ==========================================================================
   Card
   ========================================================================== */

.qf-collections .qf-card,
ul.qf-carousel__track li.qf-card {
	position: relative;
	flex: 0 0 calc((100% - 72px) / 4);
	width: auto;
	max-width: none;
	min-width: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #FFFFFF;
	border: 1px solid #E3D4C6;
	border-radius: 24px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qf-card__badge {
	position: absolute;
	top: 21px;
	left: 22px;
	z-index: 2;
	background: #CF2617;
	color: #FFFFFF;
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 27px;
	padding: 4px 8px;
	border-radius: 4px;
}

.qf-card__media {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #F4ECE3;
}
.qf-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.qf-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	padding: 20px;
}

.qf-card__info {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.qf-card__name {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.qf-card__title {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 30px;
	color: #9A4F3F;
}

.qf-collections .qf-card__subtitle,
p.qf-card__subtitle {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #12110F;
}

/* Bottega tag */
.qf-card__bottega {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--qf-bottega, #5C2E26);
}
.qf-card__bottega-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--qf-bottega, #5C2E26);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.qf-card__bottega-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}
.qf-card__bottega-name {
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--qf-bottega, #5C2E26);
}

/* Footer (price + add to cart) */
.qf-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.qf-card__price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-family: "Inter", sans-serif;
}
.qf-card__price-old {
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #616161;
	text-decoration: line-through;
}
.qf-card__price-now {
	font-weight: 700;
	font-size: 22px;
	line-height: 33px;
	color: #5C2E26;
}

.qf-card__add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 14px;
	background: #5C2E26;
	color: #FFFFFF;
	border: 0;
	border-radius: 100px;
	cursor: pointer;
	font-family: "Inter", sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 27px;
	transition: background-color 150ms ease;
}
.qf-card__add:hover {
	background: #7E3E32;
}
.qf-card__add:focus,
.qf-card__add:focus-visible {
	background: #5C2E26;
	outline: none;
}
.qf-card__add svg {
	width: 24px;
	height: 24px;
	display: block;
	flex-shrink: 0;
}

/* ==========================================================================
   VARIANT: In evidenza (sfondo cream, header allineato a sinistra)
   ========================================================================== */
.qf-collections--evidenza {
	background: #E3D4C6;
}
.qf-collections--evidenza .qf-collections__header {
	text-align: left;
}

/* ==========================================================================
   VARIANT: Offerte (sfondo marrone scuro, testo chiaro, card bordo cream)
   ========================================================================== */
.qf-collections--offerte {
	background: #5C2E26;
}
.qf-collections--offerte .qf-collections__header {
	text-align: left;
}
.qf-collections--offerte .qf-collections__eyebrow {
	color: #E3D4C6;
}
.qf-collections--offerte .qf-collections__title {
	color: #FFFFFF;
}

/* Card con bordo cream */
.qf-collections--offerte .qf-card,
ul.qf-carousel__track li.qf-card {
	/* fallback, sovrascritto sotto */
}
.qf-collections--offerte .qf-card {
	border-color: rgba(227, 212, 198, 0.35);
}

/* Frecce variant */
.qf-collections--offerte .qf-carousel__arrow--prev {
	border-color: #E3D4C6;
}
.qf-collections--offerte .qf-carousel__arrow--prev svg path {
	stroke: #E3D4C6;
}
.qf-collections--offerte .qf-carousel__arrow--prev:hover {
	background: rgba(227, 212, 198, 0.1);
}
.qf-collections--offerte .qf-carousel__arrow--next {
	background: #E3D4C6;
}
.qf-collections--offerte .qf-carousel__arrow--next svg path {
	stroke: #5C2E26;
}
.qf-collections--offerte .qf-carousel__arrow--next:hover {
	background: #FFFFFF;
}

/* Dots variant */
.qf-collections--offerte .qf-carousel__dot {
	background: #FFFFFF;
	opacity: 0.5;
}
.qf-collections--offerte .qf-carousel__dot--active {
	opacity: 1;
}



/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Laptop / tablet landscape */
@media (max-width: 1463px) {
	.qf-collections {
		padding: 72px 0;
	}
	.qf-collections__title {
		font-size: 40px;
		line-height: 56px;
	}
}

/* ==========================================================================
   MOBILE / TABLET — fino a 991px (Figma node 192:1248)
   Layout: subtitle sopra → carousel → CTA sotto (centered)
   ========================================================================== */
@media (max-width: 991px) {
	.qf-collections {
		padding: 56px 0;
	}
	.qf-collections__inner {
		padding: 0 20px;
	}
	.qf-collections__header {
		margin-bottom: 32px;
		padding: 0;
	}
	.qf-collections__title {
		font-size: 32px;
		line-height: 44px;
	}

	/* Mobile grid: 1 colonna, 3 righe */
	.qf-collections__group {
		grid-template-columns: 1fr;
		grid-template-areas:
			"subtitle"
			"carousel"
			"cta";
		padding: 0;
		row-gap: 24px;
	}
	.qf-collections__subtitle {
		font-size: 28px;
		line-height: 40px;
	}
	.qf-collections__cta {
		justify-self: center;
		align-self: start;
	}

	/* Card mobile: 322px fissi (Figma 231:547) — peek prossima card a destra */
	.qf-collections .qf-card,
	ul.qf-carousel__track li.qf-card {
		width: auto;
		max-width: none;
		flex: 0 0 275px;
	}
	.qf-card__media {
		aspect-ratio: 320 / 278;
	}

	/* Body: padding 16 + gap 10 (Figma mobile) */
	.qf-card__body {
		padding: 16px;
		gap: 10px;
	}
	.qf-card__info {
		gap: 10px;
	}
	.qf-card__name {
		gap: 10px;
	}

	/* Bottega: cerchio 32 + icona 18 */
	.qf-card__bottega-icon {
		width: 32px;
		height: 32px;
	}
	.qf-card__bottega-icon svg {
		width: 18px;
		height: 18px;
	}

	/* Aggiungi button più piccolo su mobile */
	.qf-card__add {
		font-size: 16px;
		line-height: 24px;
	}

	/* Carousel mobile: niente frecce, swipe nativo sul viewport */
	.qf-carousel {
		grid-template-columns: 1fr;
		column-gap: 0;
	}
	.qf-carousel__arrow {
		display: none;
	}
	.qf-carousel__viewport {
		/* Estende il viewport oltre il padding destro del wrapper così il peek
		   della prossima card va fino al bordo schermo. */
		margin-right: -20px;
		padding: 0;
	}
	.qf-carousel__track {
		gap: 16px;
		cursor: auto;
		user-select: auto;
	}
	.qf-carousel__dots {
		display: none;
	}
}

/* Mobile small */
@media (max-width: 600px) {
	.qf-collections__title {
		font-size: 28px;
		line-height: 38px;
	}
	.qf-collections__subtitle {
		font-size: 22px;
		line-height: 32px;
	}
}

/* Link overlay card prodotto (click → dettaglio) */
ul.qf-carousel__track li.qf-card .qf-card__link {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 5;
	display: block;
	text-decoration: none;
	border: 0;
	background: transparent;
	border-radius: inherit;
	cursor: pointer;
}
ul.qf-carousel__track li.qf-card .qf-card__add,
ul.qf-carousel__track li.qf-card .qf-card__bottega {
	position: relative;
	z-index: 10;
}
