/* Narenz — Perfumes by Ingredient (Phase 5) */
/* Scoped: .npi-perfumes-by-ingredient, .npi-pbi-* */

.npi-perfumes-by-ingredient {
	--npi-pbi-gap: 0.75rem;
	--npi-pbi-radius: 6px;
	--npi-pbi-bg: #f9f7f4;
	--npi-pbi-card-bg: #fff;
	--npi-pbi-text: #1a1a1a;
	--npi-pbi-muted: #6b6560;
	--npi-pbi-border: #e8e4df;
	--npi-pbi-focus: #7f6a55;
	direction: rtl;
	font-family: inherit;
	line-height: 1.5;
	color: var(--npi-pbi-text);
	margin: 1.5rem 0;
}

.npi-perfumes-by-ingredient *,
.npi-perfumes-by-ingredient *::before,
.npi-perfumes-by-ingredient *::after {
	box-sizing: border-box;
}

/* === TITLE === */
.npi-pbi-title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--npi-pbi-text);
	border-bottom: 2px solid var(--npi-pbi-border);
	padding-bottom: 0.35rem;
}

/* === GRID === */
.npi-pbi-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--npi-pbi-gap);
}

/* === CARD === */
.npi-pbi-card {
	display: flex;
	flex-direction: column;
	background: var(--npi-pbi-card-bg);
	border: 1px solid var(--npi-pbi-border);
	border-radius: var(--npi-pbi-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, transform 0.15s;
}

.npi-pbi-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
}

.npi-pbi-card:focus-visible {
	outline: 2px solid var(--npi-pbi-focus);
	outline-offset: 2px;
}

/* === IMAGE === */
.npi-pbi-card-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--npi-pbi-bg);
}

.npi-pbi-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* === PLACEHOLDER === */
.npi-pbi-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--npi-pbi-bg);
	color: var(--npi-pbi-muted);
	font-size: 1.5rem;
	font-weight: 600;
	user-select: none;
}

.npi-pbi-card-placeholder span {
	line-height: 1;
}

/* === TITLE === */
.npi-pbi-card-title {
	display: block;
	padding: 0.4rem 0.5rem;
	font-size: 0.8rem;
	font-weight: 500;
	text-align: center;
	line-height: 1.3;
	color: var(--npi-pbi-text);
	word-break: break-word;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
	.npi-pbi-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.npi-pbi-title {
		font-size: 1rem;
	}
	.npi-pbi-card-title {
		font-size: 0.75rem;
	}
}

@media (max-width: 480px) {
	.npi-pbi-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}
	.npi-pbi-card-title {
		font-size: 0.7rem;
		padding: 0.3rem 0.4rem;
	}
	.npi-pbi-card-placeholder {
		font-size: 1.2rem;
	}
}

@media (max-width: 360px) {
	.npi-pbi-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.npi-pbi-card {
		transition: none;
	}
}
