/**
 * Cartes produit — Delta Trailers
 *
 * Grille flexbox responsive 4 colonnes
 * Hover : zoom image, flèche CTA, bouton "NOUS APPELER"
 */

/* Masquer la sidebar Divi sur les archives produit */
.post-type-archive-produit #sidebar {
	display: none !important;
}

.post-type-archive-produit #left-area {
	width: 100% !important;
	padding-right: 0 !important;
	float: none !important;
}

.post-type-archive-produit .container::before {
	display: none !important;
}

/* Grille */
.dt-produits-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
}

/* Carte */
.dt-produit-card {
	flex: 0 0 calc(25% - 30px);
	background: #ffffff;
	border: 1px solid #707070;
	overflow: hidden;
	position: relative;
	transition: box-shadow 0.3s ease;
}

.dt-produit-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Lien carte */
.dt-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

/* Image */
.dt-card-image-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: #f0f0f0;
}

.dt-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.dt-produit-card:hover .dt-card-img {
	transform: scale(1.1);
}

.dt-card-no-img {
	width: 100%;
	height: 100%;
	background-color: #ddd;
}

/* Badge nombre de photos */
.dt-card-photo-count {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 0px 8px;
	border-radius: 3px;
	z-index: 2;
}

.dt-card-photo-count svg {
	width: 14px;
	height: 14px;
}

/* Flèche CTA sur image — fond blanc */
.dt-card-arrow {
	position: absolute;
	bottom: 0;
	right: -10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dt-rouge);
	background: rgba(255, 255, 255, 0.9);
	padding: 0 8px;
	opacity: 0;
	transform: translateY(100%);
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 2;
}

.dt-produit-card:hover .dt-card-arrow {
	opacity: 1;
	transform: translateY(0);
}

.dt-card-arrow svg {
	width: 50px;
	height: 50px;
}

/* Contenu */
.dt-card-content {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.dt-card-title {
	font-size: 1.2em;
	font-weight: 400;
	color: #222222;
	margin: 0;
	line-height: 1.3;
}

.dt-card-meta {
	font-size: 13px;
	color: #888888;
	margin: 0 0 4px;
}

.dt-card-marque {
	font-size: 1.3em;
	font-weight: 600;
	color: #444444;
	margin: 0;
	padding-bottom: 0;
}

.dt-card-desc {
	font-size: 13px;
	color: #555555;
	margin: 0 0 8px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Badge disponibilité — calé en bas */
.dt-card-dispo-badge {
	margin-top: auto;
	font-size: 12px;
	color: #5d5d5d;
	padding: .5em !important;
	background: #e5e5e5;
	white-space: nowrap;
	line-height: 1;
	align-self: flex-start;
}

/* Prix */
.dt-card-prix {
	font-size: 20px;
	font-weight: 700;
	color: var(--dt-rouge);
	margin: 10px 0 0;
}

/* Quand pas de dispo, le prix se cale en bas */
.dt-card-content > .dt-card-prix:not(.dt-card-dispo-badge + .dt-card-prix) {
	margin-top: auto;
}

/* Pied de carte : prix gauche, bouton droite */
.dt-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px 16px;
	margin-top: auto;
}

.dt-card-cta-btn {
	display: inline-block;
	padding: 8px 16px;
	background: #4a4a4a;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	border-radius: 2px;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(5px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.dt-produit-card:hover .dt-card-cta-btn {
	opacity: 1;
	transform: translateY(0);
}

/* Aucun produit */
.dt-no-produits {
	text-align: center;
	padding: 40px;
	color: #888888;
	font-size: 15px;
}

/* Header archive produit */
/* Navigation et bandeau rouge fixes sur les pages avec le bandeau */
.post-type-archive-produit #main-header,
.archive #main-header,
.category #main-header,
.single-produit #main-header,
.page-template-page-bandeau-rouge #main-header {
	position: fixed !important;
	top: 0;
	width: 100%;
	z-index: 10000;
}

.dt-archive-header {
	background-color: var(--dt-rouge);
	padding: 2em 1em 0.7em 0;
	width: 80%;
	z-index: 999;
	position: fixed;
	box-sizing: border-box;
}

/* Spacer pour compenser la nav + bandeau fixes */
.dt-archive-content {
	padding: 2em 0 8em;
}


.dt-archive-header-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
}

.dt-archive-header-inner .dt-archive-title {
	width: 100%;
}

.dt-archive-title {
	font-size: 2.5em;
	font-weight: 300;
	color: #ffffff;
	margin: 0;
	transition: font-size 0.3s ease;
	padding: 0;
}

.dt-header-sticky .dt-archive-title {
	font-size: 22px;
	margin: 0 0 4px;
}

.dt-breadcrumb {
	font-size: 0.9em;
	color: #ffffff;
}

.dt-breadcrumb a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
}

.dt-breadcrumb a:hover {
	color: #ffffff;
}

.dt-breadcrumb-sep {
	margin: 0 4px;
}

.dt-archive-header-left {
	width: 50%;
}

.dt-archive-header-right {
	display: flex;
	align-items: flex-end;
	gap: 30px;
	flex-direction: row;
	justify-content: flex-end;
	width: 50%;
}

.dt-archive-contact,
.dt-archive-phone {
	color: #ffffff;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: opacity 0.3s ease;
	display: inline-block;
}

.dt-archive-contact:hover,
.dt-archive-phone:hover {
	opacity: 0.7;
}

.dt-archive-content {
	padding: 2em 0 8em;
}

body:not(.et-tb) #main-content .container,
body:not(.et-tb-has-header) #main-content .container {
	padding-top: 10em;
}

/* Responsive */
@media (max-width: 1200px) {
	.dt-produit-card {
		flex: 0 0 calc(33.333% - 16px);
	}
}

@media (max-width: 980px) {
	body:not(.et-tb) #main-content .container,
	body:not(.et-tb-has-header) #main-content .container {
		padding-top: 2em;
	}

	.container {
		width: 95%;
		max-width: 1080px;
		margin: auto;
		position: relative;
	}

	.dt-archive-header {
		width: 100%;
		position: relative;
		padding: 1em 1.2em 0.7em 1.2em;
	}

	.dt-archive-header-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.dt-archive-header-left {
		width: 100%;
		order: -1;
	}

	.dt-archive-header-right {
		width: 100%;
		justify-content: flex-start;
		gap: 35px;
	}

	.dt-archive-title {
		font-size: 2rem;
	}

}

@media (max-width: 768px) {
	.dt-produit-card {
		flex: 0 0 calc(50% - 12px);
	}

	.dt-produits-grid {
		gap: 16px;
	}

	.dt-archive-contact {
		display: block;
	}
}

@media (max-width: 480px) {
	.dt-produit-card {
		flex: 0 0 100%;
	}
}
