/* =========================================================
   Product Ingredients — key ingredients + INCI modal
   ========================================================= */

.product-ingredients {
	margin-bottom: var(--section-space);
}

.product-ingredients__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.product-ingredients__heading-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	text-align: left;
}

.product-ingredients__heading {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 900;
	line-height: 1.46;
	color: #4c4d4f;
	text-transform: uppercase;
}

.product-ingredients__heading-bar {
	display: block;
	width: 70px;
	height: 5px;
	background-color: #383e44;
	flex-shrink: 0;
}

.product-ingredients__grid {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	width: 100%;
}

.product-ingredients__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	width: 100%;
	text-align: left;
}

.product-ingredients__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 0;
	margin-inline: 0;
}

.product-ingredients--circle .product-ingredients__image-wrap {
	border-radius: 50%;
}

.product-ingredients__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-ingredients__title-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	max-width: 100%;
	gap: 0;
}

.product-ingredients__number {
	flex-shrink: 0;
	font-size: 6rem;
	font-style: italic;
	font-weight: 400;
	line-height: 1.2;
	text-transform: uppercase;
	color: #4c4d4f;
}

.product-ingredients__title {
	margin: 0;
	padding-left: 1.25rem;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.56;
	text-transform: uppercase;
	color: #4c4d4f;
}

.product-ingredients__title p {
	margin: 0;
}

.product-ingredients__title strong,
.product-ingredients__title b {
	font-weight: 900;
}

.product-ingredients__description {
	margin: 0;
	width: 100%;
	font-size: 0.875rem;
	line-height: 1.07;
	color: #4c4d4f;
}

.product-ingredients__description p {
	margin-block: 0 0.5em;
}

.product-ingredients__description p:last-child {
	margin-bottom: 0;
}

.product-ingredients__description strong,
.product-ingredients__description b {
	font-weight: 700;
}

.product-ingredients__inci-trigger-wrap {
	display: flex;
	justify-content: center;
	padding-block: 1.5rem;
	width: 100%;
}

.product-ingredients__inci-trigger {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 1rem;
	font-weight: 900;
	line-height: 1.5;
	color: #4c4d4f;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
}

@media (hover: hover) {
	.product-ingredients__inci-trigger:hover {
		opacity: 0.75;
	}
}

.product-ingredients__inci-trigger:focus-visible {
	opacity: 0.75;
	outline: 2px solid var(--color-text);
	outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Narrative variant — image + centered body + shared INCI button
   Mobile: image → text → button. Desktop: two columns under heading.
   -------------------------------------------------------------------------- */

.product-ingredients__narrative {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	width: 100%;
	align-items: center;
}

.product-ingredients__narrative-media {
	width: 100%;
	min-width: 0;
}

.product-ingredients__narrative-image {
	display: block;
	width: 100%;
	height: auto;
}

.product-ingredients__narrative-body {
	min-width: 0;
	color: #4c4d4f;
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: left;
}

.product-ingredients__narrative-body p {
	margin-block: 0 0.75em;
}

.product-ingredients__narrative-body p:last-child {
	margin-bottom: 0;
}

.product-ingredients__narrative-body strong,
.product-ingredients__narrative-body b {
	font-weight: 900;
}

.product-ingredients__narrative-body em {
	font-style: italic;
}

.product-ingredients--narrative .product-ingredients__inci-trigger-wrap {
	padding-block: 0.5rem 0;
}

/* --------------------------------------------------------------------------
   INCI modal
   -------------------------------------------------------------------------- */

.product-inci-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-3) var(--space-2);
}

.product-inci-modal[hidden] {
	display: none;
}

.product-inci-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(76, 77, 79, 0.8);
	cursor: pointer;
}

.product-inci-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow: hidden;
	padding: 3rem 3rem 2rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow:
		0 10px 15px -3px rgba(0, 0, 0, 0.1),
		0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.product-inci-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0.125rem;
	background: #fff;
	color: #4c4d4f;
	opacity: 0.7;
	cursor: pointer;
}

.product-inci-modal__close svg {
	display: block;
	width: 1rem;
	height: 1rem;
}

@media (hover: hover) {
	.product-inci-modal__close:hover {
		opacity: 1;
	}
}

.product-inci-modal__close:focus-visible {
	opacity: 1;
	outline: 2px solid var(--color-text);
	outline-offset: 2px;
}

.product-inci-modal__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	justify-content: safe center;
	gap: 1.5rem;
	width: 100%;
	min-height: 0;
	flex: 1 1 auto;
	overflow: auto;
	text-align: center;
}

.product-inci-modal__title {
	flex-shrink: 0;
	margin: 0;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.46;
	color: #4c4d4f;
	text-align: center;
}

.product-inci-modal__list {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.07;
	color: #4c4d4f;
	text-align: center;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.product-inci-modal__list p {
	margin: 0 0 1rem;
}

.product-inci-modal__list p:last-child {
	margin-bottom: 0;
}

.product-inci-modal__list strong {
	font-weight: 700;
}

body.product-inci-modal-open {
	overflow: hidden;
}

@media (min-width: 768px) {
	.product-ingredients__inner {
		gap: 2rem;
	}

	.product-ingredients__heading {
		font-size: 1.75rem;
		line-height: 1.83;
	}

	.product-ingredients__description {
		line-height: 1.21;
	}

	.product-inci-modal {
		padding: var(--space-3);
	}

	.product-inci-modal__dialog {
		width: min(100%, 44.8rem);
		padding: 3rem;
	}

	.product-inci-modal__title {
		font-size: 1.5rem;
		line-height: 1.83;
	}

	.product-inci-modal__list {
		line-height: 1.21;
	}
}

@media (min-width: 1024px) {
	.product-ingredients__heading-wrap {
		align-items: flex-start;
		text-align: left;
	}

	.product-ingredients__grid {
		flex-direction: row;
		justify-content: center;
		align-items: flex-start;
		gap: 2rem;
	}

	.product-ingredients__item {
		flex: 1 1 0;
		align-items: flex-start;
		width: auto;
		text-align: left;
	}

	.product-ingredients__image-wrap {
		max-width: none;
		width: 100%;
		margin-inline: 0;
	}

	.product-ingredients__title-row {
		justify-content: flex-start;
		width: 100%;
	}

	.product-ingredients__narrative {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 2rem;
	}

	.product-ingredients--image-left .product-ingredients__narrative-media {
		order: 1;
	}

	.product-ingredients--image-left .product-ingredients__narrative-body {
		order: 2;
	}

	.product-ingredients--narrative:not(.product-ingredients--image-left) .product-ingredients__narrative-media {
		order: 2;
	}

	.product-ingredients--narrative:not(.product-ingredients--image-left) .product-ingredients__narrative-body {
		order: 1;
	}

	.product-inci-modal__dialog {
		width: min(100%, 84rem);
	}
}
