/**
 * Sélection du Moment — Featured Products Grid.
 *
 * CSS variables (set via inline style):
 *   --ps-bg            section background
 *   --ps-card-bg       card background
 *   --ps-card-border   card border color
 *   --ps-card-r        card border-radius
 *   --ps-label-color   small label color
 *   --ps-title-color   heading color
 *   --ps-accent        accent / price / badge color
 *   --ps-name-color    product name color
 *   --ps-name-size     product name font size
 *   --ps-cols          grid columns (desktop)
 *   --ps-pad           section vertical padding
 *
 * @package DroxAuto
 */

/* ─── Section ─── */
.drox-ps-section {
	background: var(--ps-bg, #ffffff);
	padding: var(--ps-pad, 56px) 0;
}

.drox-ps-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

/* ─── Header ─── */
.drox-ps-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 32px;
}

.drox-ps-label {
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--ps-accent, #f5700a);
	margin-bottom: 4px;
}

.drox-ps-title {
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: 26px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ps-title-color, #1a2b3c);
	margin: 0;
	line-height: 1.2;
}

.drox-ps-viewall {
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--ps-accent, #f5700a);
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.drox-ps-viewall:hover {
	opacity: 0.75;
}

/* ─── Grid ─── */
.drox-ps-grid {
	display: grid;
	grid-template-columns: repeat(var(--ps-cols, 4), 1fr);
	gap: 20px;
}

/* ─── Card ─── */
.drox-ps-card {
	background: var(--ps-card-bg, #ffffff);
	border: 1.5px solid var(--ps-card-border, #e8e8e8);
	border-radius: var(--ps-card-r, 12px);
	overflow: hidden;
	position: relative;
	transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
}

.drox-ps-card:hover {
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
	transform: translateY(-4px);
	border-color: var(--ps-accent, #f5700a);
}

/* ─── Badge ─── */
.drox-ps-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--ps-accent, #f5700a);
	color: #fff;
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 4px;
	z-index: 2;
	line-height: 1.3;
}

.drox-ps-badge--new {
	background: #00a86b;
}

/* ─── Image ─── */
.drox-ps-img {
	height: 190px;
	background: #f7f7f5;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-bottom: 1px solid var(--ps-card-border, #e8e8e8);
}

.drox-ps-img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.35s;
}

.drox-ps-card:hover .drox-ps-img img {
	transform: scale(1.06);
}

.drox-ps-img__placeholder {
	width: 80px;
	height: 60px;
	opacity: 0.3;
}

/* ─── Body ─── */
.drox-ps-body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.drox-ps-compat {
	font-family: "Barlow", system-ui, sans-serif;
	font-size: 11px;
	color: #999;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.drox-ps-name {
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: var(--ps-name-size, 15px);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--ps-name-color, #1a2b3c);
	line-height: 1.3;
	margin-bottom: 14px;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ─── Footer (price + add-to-cart) ─── */
.drox-ps-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.drox-ps-price {
	font-family: "Barlow Condensed", system-ui, sans-serif;
	font-size: 22px;
	font-weight: 800;
	color: var(--ps-accent, #f5700a);
	letter-spacing: -0.5px;
	line-height: 1;
}

.drox-ps-price-old {
	font-family: "Barlow", system-ui, sans-serif;
	font-size: 12px;
	color: #bbb;
	text-decoration: line-through;
	margin-top: 2px;
}

/* ─── Add to Cart Button ─── */
.drox-ps-add {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	background: var(--ps-accent, #f5700a);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.2s;
}

.drox-ps-add:hover {
	filter: brightness(1.15);
	transform: scale(1.08);
}

.drox-ps-add svg {
	width: 18px;
	height: 18px;
}

.drox-ps-add.added {
	background: #00a86b;
}

.drox-ps-add--incart {
	background: #00a86b;
}
.drox-ps-add--incart:hover {
	filter: brightness(1.15);
	transform: scale(1.08);
}

.drox-ps-add.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ─── Tablet (< 992px) ─── */
@media (max-width: 991px) {
	.drox-ps-section {
		padding: calc(var(--ps-pad, 56px) * 0.75) 0;
	}

	.drox-ps-inner {
		padding: 0 20px;
	}

	.drox-ps-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}

	.drox-ps-title {
		font-size: 22px;
	}

	.drox-ps-img {
		height: 160px;
	}
}

/* ─── Mobile (< 640px) ─── */
@media (max-width: 639px) {
	.drox-ps-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.drox-ps-header {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 20px;
	}

	.drox-ps-title {
		font-size: 20px;
	}

	.drox-ps-img {
		height: 140px;
	}

	.drox-ps-body {
		padding: 14px;
	}

	.drox-ps-name {
		font-size: 13px;
	}

	.drox-ps-price {
		font-size: 18px;
	}

	.drox-ps-add {
		width: 34px;
		height: 34px;
	}
}

/* ─── WooCommerce "View cart" (wc-forward) ─── */
a.wc-forward {
	display: inline-block;
	padding: 8px 16px;
	background: var(--ps-accent, #f5700a);
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s;
}
a.wc-forward:hover {
	background: #d95f08;
	color: #fff;
}
