/* ==========================================================================
   DagligFavorit Featured Products – widget.css
   ========================================================================== */

/* ── Custom properties (overridable via Elementor style selectors) ───── */
.df-fp {
	--df-card-bg:     #efeded;
	--df-primary:     var(--wd-primary-color, #2e5d3b);
	--df-badge-bg:    #b89870;
	--df-sale-bg:     #e85454;
	--df-radius:      16px;
	--df-gap:         16px;
	--df-img-height:  200px;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.df-fp__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

/* The WoodMart title-wrapper adds its own bottom margin – cancel it here
   so it doesn't break the flex row alignment with the "see all" link. */
.df-fp__header .title-wrapper {
	margin-bottom: 0 !important;
}

/* Let WoodMart control all title typography; only reset the h4 margin. */
.df-fp__header .woodmart-title-container {
	margin: 0 !important;
}

.df-fp__see-all {
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
	flex-shrink: 0;
}
.df-fp__see-all:hover {
	opacity: 0.65;
}

/* ── Grid ──────────────────────────────────────────────────────────────── */
.df-fp__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--df-gap);
}

@media (max-width: 767px) {
	.df-fp__grid {
		grid-template-columns: 1fr;
	}
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.df-fp__card {
	position: relative;
	background-color: var(--df-card-bg);
	border-radius: var(--df-radius);
	padding: 20px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.df-fp__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.11);
}

/* ── Status badge (Nyhed / Populær) ────────────────────────────────────── */
.df-fp__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-block;
	background-color: var(--df-badge-bg);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 5px 14px;
	border-radius: 99px;
	pointer-events: none;
	letter-spacing: 0.01em;
}

/* ── Image ─────────────────────────────────────────────────────────────── */
.df-fp__image-link {
	display: block;
	text-decoration: none;
}

.df-fp__image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	height: var(--df-img-height);
	margin-bottom: 14px;
	overflow: hidden;
}

.df-fp__image {
	max-height: var(--df-img-height);
	width: auto;
	max-width: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.35s ease;
}
.df-fp__card:hover .df-fp__image {
	transform: scale(1.04);
}

/* ── Body ──────────────────────────────────────────────────────────────── */
.df-fp__body {
	position: relative;
	padding-right: 52px; /* reserve space for the circular cart button */
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 4px;
}

/* ── Title ─────────────────────────────────────────────────────────────── */
.df-fp__title-link {
	text-decoration: none;
	color: inherit;
	display: block;
}
.df-fp__title-link:hover .df-fp__title {
	opacity: 0.75;
}

.df-fp__title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: inherit;
}

/* ── Price row ─────────────────────────────────────────────────────────── */
.df-fp__price-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* Normalise WooCommerce price output */
.df-fp__price,
.df-fp__price .price,
.df-fp__price .woocommerce-Price-amount,
.df-fp__price .woocommerce-Price-amount bdi {
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4;
	color: inherit;
}

.df-fp__price del {
	opacity: 0.5;
	font-size: 12px !important;
}
.df-fp__price ins {
	text-decoration: none;
}

/* ── Sale badge (red pill, price row) ──────────────────────────────────── */
.df-fp__sale-badge {
	display: inline-flex;
	align-items: center;
	background-color: var(--df-sale-bg);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 4px 10px;
	border-radius: 99px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Cart button (circle) ──────────────────────────────────────────────── */
.df-fp__cart-btn {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 44px;
	height: 44px;
	min-width: 44px;
	border-radius: 50%;
	background-color: var(--df-primary) !important;
	border: none;
	outline: none;
	display: flex !important;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	color: #fff !important;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	/* Reset any theme button styles */
	padding: 0 !important;
	font-size: 0 !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
}
.df-fp__cart-btn::after {
	/* Remove WooCommerce loading spinner pseudo-element */
	display: none !important;
}
.df-fp__cart-btn:hover {
	opacity: 0.88;
	transform: scale(1.08);
	color: #fff !important;
	text-decoration: none !important;
}
.df-fp__cart-btn.added {
	opacity: 0.72;
}
.df-fp__cart-btn.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Cart SVG icon */
.df-fp__cart-btn svg {
	width: 19px;
	height: 19px;
	stroke: #fff;
	fill: none;
	flex-shrink: 0;
	display: block;
}

/* ── No products fallback ──────────────────────────────────────────────── */
.df-fp__no-products {
	color: #999;
	font-size: 14px;
	margin: 0;
}
