/* NPD product cards — 2-row flex wrap:
 * Row 1: image (107px) + title/price (flex)
 * Row 2: quick-buy-packs (full width)
 */

.npd-card-wrapper,
.products .product.npd-product-card-item,
.npd-fct__item .npd-card-wrapper {
	color: inherit;
	height: 100%;
	position: relative;
	text-decoration: none;
	font-family: 'Outfit', sans-serif;
}

.npd-card {
	--npd-card-radius: 12px;
	--npd-card-fg: #121212;
	--npd-card-bg: #ffffff;
	--npd-card-accent: #459bff;
	--npd-card-image-size: 107px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	height: 100%;
	position: relative;
	box-sizing: border-box;
	border-radius: var(--npd-card-radius);
	background: var(--npd-card-bg);
	border: 1px solid rgba(18, 18, 18, 0.08);
	box-shadow: 0 2px 8px rgba(18, 18, 18, 0.04);
	overflow: hidden;
	text-align: left;
	color: var(--npd-card-fg);
	padding: 0.75rem 0.75rem 0;
	gap: 0;
}

/* —— Part 1: image —— */
.npd-card__media {
	position: relative;
	flex: 0 0 var(--npd-card-image-size);
	width: var(--npd-card-image-size);
	max-width: var(--npd-card-image-size);
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	align-self: flex-start;
}

.npd-card__badge {
	position: absolute;
	z-index: 2;
	left: 0.35rem;
	bottom: 0.35rem;
	top: auto;
	pointer-events: none;
	max-width: calc(100% - 0.5rem);
}

.npd-card__badge-label {
	display: inline-block;
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	background: #121212;
	color: #fff;
	font-size: 0.55rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.npd-card__media-link {
	display: block;
	height: 100%;
	width: 100%;
}

.npd-card__media-frame {
	display: block;
	position: relative;
	height: 100%;
	width: 100%;
	overflow: hidden;
}

.npd-card__image,
.npd-card__media-frame img,
.npd-card__media-frame .woocommerce-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.25s ease;
}

.npd-card__image--secondary {
	opacity: 0;
}

.npd-card-wrapper:hover .npd-card__media-frame--has-secondary .npd-card__image--primary,
.npd-card-wrapper:focus-within .npd-card__media-frame--has-secondary .npd-card__image--primary {
	opacity: 0;
}

.npd-card-wrapper:hover .npd-card__media-frame--has-secondary .npd-card__image--secondary,
.npd-card-wrapper:focus-within .npd-card__media-frame--has-secondary .npd-card__image--secondary {
	opacity: 1;
}

/* —— Part 2: title + price —— */
.npd-card__information {
	flex: 1 1 calc(100% - var(--npd-card-image-size));
	min-width: 0;
	max-width: calc(100% - var(--npd-card-image-size));
	padding: 0.15rem 0 0.5rem 0.75rem;
	box-sizing: border-box;
	align-self: center;
}

.tag-99p-deal .npd-card__badge-label,
.npd-card__offer-badge {
	background: red;
	color: #fff;
	font-weight: 700;
	font-size: 10px;
}

.npd-card__offer-badge {
	display: inline-block;
	margin: 0 0 5px;
	padding: 5px 13px 6px;
	border-radius: 40px;
	line-height: 1;
	letter-spacing: 1px;
	text-align: center;
}

.npd-card__heading {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
}

.npd-card__title-link {
	color: inherit;
	text-decoration: none;
}

.npd-card__title-link:hover,
.npd-card__title-link:focus-visible {
	text-decoration: underline;
}

.npd-card__price {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--npd-card-fg);
}

.npd-card__from {
	font-weight: 500;
	margin-right: 0.15rem;
}

.npd-card__price del {
	opacity: 0.55;
	margin-right: 0.35rem;
}

.npd-card__price ins {
	text-decoration: none;
	font-weight: 700;
}

/* —— Part 3: packs (full second row) —— */
.npd-card > .quick-buy-packs {
	flex: 1 1 100%;
	width: 100%;
	max-width: 100%;
	margin-top: 0.25rem;
}

/* Shop loop */
.products .product.npd-product-card-item {
	display: flex;
	flex-direction: column;
	list-style: none;
}

.products .product.npd-product-card-item > .npd-card-wrapper {
	width: 100%;
}

/* FCT grid items */
.npd-fct__item {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
}

.npd-fct__item > .npd-card-wrapper {
	width: 100%;
}
