/*
 * TAF Machinery – Pagine di categoria e card prodotto (restyling 2026)
 * Figma "TAF Restyling 2026", frame "Pagina prodotto" (8:225).
 * Card 373x475, sfondo #f7f6f5, raggio 20, immagine 373x260, pulsante 60px.
 */

/* ===================================================================
 * Griglia prodotti (vale per tutte le griglie WooCommerce del sito)
 * ================================================================= */
#top ul.products:has(> .taf-card) {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 373px));
	gap: 31px 23px;
	justify-content: center;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

#top ul.products:has(> .taf-card)::before,
#top ul.products:has(> .taf-card)::after {
	display: none;
}

#top ul.products li.taf-card,
#top .products .product.taf-card {
	float: none;
	clear: none;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0;
	list-style: none;
	background: none;
	border: 0;
	box-shadow: none;
}

#top .taf-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 20px;
	overflow: hidden;
	background: #f7f6f5;
	color: #1e1e1e;
	text-decoration: none;
	font-family: 'manrope', 'Manrope', sans-serif;
}

#top .taf-card__link:focus-visible {
	outline: 2px solid #e65100;
	outline-offset: 3px;
}

.taf-card__media {
	display: block;
	aspect-ratio: 373 / 260;
	overflow: hidden;
	background: #e9e7e4;
}

#top .taf-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.3s ease;
}

#top .taf-card__link:hover .taf-card__img {
	transform: scale(1.04);
}

.taf-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 31px 19px 27px;
}

#top .taf-card__title {
	margin: 0;
	padding: 0;
	font-family: 'manrope', 'Manrope', sans-serif;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.36 !important;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #1e1e1e !important;
}

.taf-card__meta {
	display: block;
	margin: 14px 0 0;
	font-size: 16px;
	line-height: 1.25;
	color: #1e1e1e;
}

.taf-card__cat,
.taf-card__year {
	display: block;
}

.taf-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 60px;
	margin-top: auto;
	padding: 10px 20px;
	border-radius: 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 28px;
	color: #ffffff;
	text-align: center;
	transition: background-color 0.2s ease;
}

/* Pulsante in fondo alla card; 18px minimi dal testo (Figma) */
.taf-card__body .taf-card__cta {
	margin-top: auto;
}

.taf-card__body .taf-card__meta {
	margin-bottom: 18px;
}

/* Una o due CTA (noleggio / vendita) in fondo alla card */
.taf-card__ctas {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
}

.taf-card__body .taf-card__ctas .taf-card__cta {
	margin-top: 0;
}

.taf-card__cta--rent,
.taf-card__cta--sale {
	background-color: #e65100;
}

#top .taf-card__link:hover .taf-card__cta--sale,
#top .taf-card__link:focus-visible .taf-card__cta--sale {
	background-color: #c24400;
}

/* Se la macchina è sia a noleggio sia in vendita: la seconda CTA è secondaria */
#top .taf-card__cta--rent + .taf-card__cta--sale {
	background-color: transparent;
	color: #1e1e1e;
	box-shadow: inset 0 0 0 2px #1e1e1e;
}

#top .taf-card__link:hover .taf-card__cta--rent + .taf-card__cta--sale,
#top .taf-card__link:focus-visible .taf-card__cta--rent + .taf-card__cta--sale {
	background-color: #1e1e1e;
	color: #ffffff;
}

#top .taf-card__link:hover .taf-card__cta--rent,
#top .taf-card__link:focus-visible .taf-card__cta--rent {
	background-color: #c24400;
}

.taf-card__cta--sold {
	background-color: #e6000c;
	text-transform: uppercase;
}

.taf-card__arrow {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

#top .taf-card__link:hover .taf-card__arrow {
	transform: translateX(3px);
}

/* ===================================================================
 * Pagine elenco: niente barra titolo / colonna laterale / ordinamento di Enfold
 * ================================================================= */
#top.taf-shop-listing .title_container,
#top.taf-shop-listing .page-thumb,
#top.taf-shop-listing .product-sorting {
	display: none !important;
}

#top.taf-shop-listing .container_wrap_first {
	border: 0;
}

#top.taf-shop-listing .template-shop.content {
	width: 100%;
	padding-top: 77px;
	padding-bottom: 82px;
	border: 0;
}

#top.taf-shop-listing .template-shop.content .entry-content-wrapper {
	padding: 0;
}

#top.taf-shop-listing .woocommerce-info,
#top.taf-shop-listing .woocommerce-no-products-found {
	max-width: 874px;
	margin: 0 auto;
	font-family: 'manrope', 'Manrope', sans-serif;
	font-size: 18px;
	line-height: 28px;
	text-align: center;
}

/* Paginazione */
#top.taf-shop-listing .pagination {
	margin: 48px 0 0;
	padding: 0;
	border: 0;
	text-align: center;
}

/* ===================================================================
 * Fasce sotto la griglia: "Si affidano a noi" e "Dicono di noi"
 * ================================================================= */
.taf-shop-sec {
	--taf-shop-gutter: clamp(20px, 6.25vw, 120px);
	font-family: 'manrope', 'Manrope', sans-serif;
	color: #000000;
	background: #ffffff;
}

.taf-shop-sec__inner {
	width: 100%;
	max-width: calc(1432px + 2 * var(--taf-shop-gutter));
	margin: 0 auto;
	padding: 0 var(--taf-shop-gutter);
	box-sizing: border-box;
}

#top .taf-shop-title {
	margin: 0 0 39px;
	padding: 0;
	font-family: 'manrope', 'Manrope', sans-serif;
	font-size: 42px !important;
	font-weight: 700 !important;
	line-height: 1.36 !important;
	text-align: center;
	text-transform: none;
	color: #1e1e1e !important;
}

.taf-shop-clients {
	padding: 0 0 120px;
}

#top .taf-shop-logos {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px clamp(16px, 2.5vw, 40px);
	margin: 0;
	padding: 0 clamp(0px, 2vw, 39px);
	list-style: none;
}

#top .taf-shop-logos__item {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

#top .taf-shop-logos__img {
	display: block;
	width: auto;
	max-width: min(146px, 100%);
	height: auto;
	max-height: 77px;
	margin: 0 auto;
}

.taf-shop-reviews {
	padding: 0 0 120px;
}

#top .taf-shop-reviews .taf-shop-title {
	margin-bottom: 60px;
}

/* ===================================================================
 * Responsive
 * ================================================================= */
@media (max-width: 1199px) {
	#top ul.products:has(> .taf-card) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px 20px;
	}

	#top .taf-shop-title {
		font-size: 36px !important;
	}

	#top .taf-shop-logos__img {
		max-height: 52px;
	}
}

@media (max-width: 1023px) {
	#top ul.products:has(> .taf-card) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	#top.taf-shop-listing .template-shop.content {
		padding-top: 48px;
		padding-bottom: 64px;
	}

	.taf-shop-clients,
	.taf-shop-reviews {
		padding-bottom: 80px;
	}
}

@media (max-width: 767px) {
	#top .taf-shop-title {
		font-size: 30px !important;
		margin-bottom: 24px;
	}

	#top .taf-shop-reviews .taf-shop-title {
		margin-bottom: 32px;
	}

	#top .taf-shop-logos {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 16px 12px;
		padding: 0;
	}

	#top .taf-shop-logos__img {
		max-height: 40px;
	}

	.taf-shop-clients,
	.taf-shop-reviews {
		padding-bottom: 56px;
	}

	#top.taf-shop-listing .template-shop.content {
		padding-top: 32px;
		padding-bottom: 56px;
	}

	.taf-card__body {
		padding: 20px 16px 18px;
	}

	.taf-card__cta {
		min-height: 52px;
		font-size: 16px;
	}
}

@media (max-width: 599px) {
	#top ul.products:has(> .taf-card) {
		grid-template-columns: minmax(0, 420px);
		gap: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#top .taf-card__img,
	.taf-card__cta,
	.taf-card__arrow {
		transition: none;
	}

	#top .taf-card__link:hover .taf-card__img,
	#top .taf-card__link:hover .taf-card__arrow {
		transform: none;
	}
}
