:root {
	--color-ink: #111318;
	--color-muted: #62666d;
	--color-border: #e2e5e3;
	--color-surface: #fff;
	--color-surface-soft: #f6f8f7;
	--color-action: #0aa84f;
	--color-warning: #e9aa00;
	--color-attention: #ef6c00;
	--color-danger: #df2525;
	--radius-sm: 6px;
	--radius-md: 8px;
	--shadow-subtle: 0 6px 24px rgb(17 19 24 / 7%);
	--layout-gutter: 20px;
	--layout-wide: 1280px;
	--mobile-nav-height: 76px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	max-width: 100%;
	overflow-x: hidden;
	overflow-x: clip;
}

body {
	max-width: 100%;
	overflow-x: hidden;
	overflow-x: clip;
	margin: 0;
	background: var(--color-surface);
	color: var(--color-ink);
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

img,
svg {
	display: block;
	max-width: 100%;
}

button,
input,
select,
textarea {
	font: inherit;
}

button {
	cursor: pointer;
}

.layout-container {
	width: min(calc(100% - (2 * var(--layout-gutter))), var(--layout-wide));
	max-width: 100%;
	margin-inline: auto;
}

.site-main {
	min-height: 60vh;
	padding-block: 32px calc(var(--mobile-nav-height) + 32px);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	z-index: 100000;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: var(--color-surface);
	color: var(--color-ink);
	box-shadow: var(--shadow-subtle);
}

.site-header {
	position: relative;
	z-index: 20;
	border-bottom: 1px solid var(--color-border);
	background: rgb(255 255 255 / 96%);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 68px;
	gap: 20px;
}

.site-brand__text {
	display: inline-flex;
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

.site-brand__text strong {
	color: var(--color-action);
}

.custom-logo {
	width: auto;
	max-height: 34px;
}

.primary-navigation {
	display: none;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-header__saved {
	display: none;
}

.icon {
	width: 1.5rem;
	height: 1.5rem;
	flex: 0 0 auto;
}

.icon-button {
	display: inline-grid;
	width: 44px;
	height: 44px;
	place-items: center;
	border-radius: var(--radius-md);
}

.icon-button:hover,
.icon-button:focus-visible {
	background: var(--color-surface-soft);
}

.button {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font-weight: 800;
	line-height: 1;
	text-align: center;
}

.button--dark {
	background: var(--color-ink);
	color: #fff;
}

.button--outline {
	border-color: var(--color-action);
	background: var(--color-surface);
	color: #087f3d;
}

.button--ghost {
	border-color: transparent;
	background: transparent;
	color: var(--color-muted);
}

.button--green {
	background: var(--color-action);
	color: #fff;
}

.content-list {
	display: grid;
	gap: 16px;
}

.content-item,
.card {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
}

.content-item {
	padding: 20px;
}

.content-item__title {
	margin: 0;
	font-size: 1.25rem;
}

.content-item__summary {
	color: var(--color-muted);
}

.product-card__link,
.ingredient-card__link {
	display: block;
	height: 100%;
}

.product-card {
	position: relative;
	overflow: hidden;
}

.product-card__media {
	display: grid;
	width: 100%;
	aspect-ratio: 1;
	place-items: center;
	padding: 16px;
	background: var(--color-surface-soft);
	overflow: hidden;
}

.product-card__media img {
	width: auto !important;
	height: auto !important;
	max-width: 86% !important;
	max-height: 86% !important;
	object-fit: contain !important;
	object-position: center;
}

.product-card__body,
.ingredient-card__body {
	padding: 16px;
}

.product-card__title,
.ingredient-card__title {
	margin: 0 0 12px;
	font-size: 1rem;
	line-height: 1.35;
}

.product-card__save {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 88%);
	color: var(--color-ink);
}

.product-card__save[aria-pressed="true"] {
	background: var(--color-action);
	color: #fff;
}

[data-toknow-save][aria-pressed="true"] .icon {
	fill: currentcolor;
}

.product-card__placeholder {
	display: grid;
	width: 70px;
	height: 70px;
	place-items: center;
	border-radius: 50%;
	background: #e8efeb;
	color: #7d8982;
}

.product-card__placeholder .icon {
	width: 30px;
	height: 30px;
}

.product-card__meta {
	min-height: 1.2em;
	margin: 0 0 6px;
	overflow: hidden;
	color: var(--color-muted);
	font-size: 0.75rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.product-card__footer {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 8px;
	color: var(--color-muted);
	font-size: 0.6875rem;
}

.ingredient-card__concern {
	color: var(--color-muted);
	font-size: 0.875rem;
}

.score {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.score__label,
.score__band {
	font-size: 0.8125rem;
}

.score__value {
	font-size: 2rem;
	line-height: 1;
}

.score__value small {
	font-size: 0.875rem;
}

.score--compact .score__value {
	font-size: 1rem;
}

.score--compact .score__band {
	display: none;
}

.score--high {
	color: var(--color-action);
}

.score--medium {
	color: var(--color-warning);
}

.score--low {
	color: var(--color-attention);
}

.score--critical {
	color: var(--color-danger);
}

.ingredient-card__concern--muy_alto i,
.ingredient-card__concern--very-high i {
	background: #9f1239;
}

.ingredient-card__concern--muy_alto,
.ingredient-card__concern--very-high {
	color: #9f1239;
}

.ingredient-card__concern--desconocido i,
.ingredient-card__concern--unknown i {
	background: var(--color-muted);
}

.ingredient-card__evidence {
	display: block;
	margin-top: 4px;
	color: var(--color-muted);
	font-size: 0.6875rem;
}

.empty-state {
	display: grid;
	justify-items: center;
	gap: 16px;
	padding: 64px 20px;
	text-align: center;
}

.empty-state h1 {
	margin: 0;
	font-size: 1.5rem;
}

.empty-state--compact {
	min-height: 150px;
	padding: 28px;
	border: 1px dashed var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface-soft);
}

.empty-state--compact strong {
	font-size: 0.9375rem;
}

.empty-state--compact p {
	max-width: 460px;
	margin: 0;
	color: var(--color-muted);
	font-size: 0.8125rem;
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}

.section-heading h2 {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 850;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.section-heading a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--color-action);
	font-size: 0.8125rem;
	font-weight: 700;
}

.section-heading a .icon {
	width: 16px;
	height: 16px;
}

.site-footer {
	border-top: 1px solid var(--color-border);
	padding-block: 40px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 28px);
	background: #fbfcfb;
}

.site-footer__inner,
.site-footer__brand,
.site-footer__nav,
.site-footer__nav div {
	display: grid;
	gap: 18px;
}

.site-footer__brand {
	gap: 10px;
}

.site-footer__brand p,
.site-footer__brand small {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.8125rem;
}

.site-footer__nav {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px 18px;
}

.site-footer__nav div {
	align-content: start;
	gap: 8px;
	min-width: 0;
}

.site-footer__nav strong {
	font-size: 0.8125rem;
}

.site-footer__nav a {
	color: var(--color-muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
	color: var(--color-action);
}

.site-footer ul,
.primary-navigation ul,
.mobile-navigation ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.mobile-navigation {
	position: fixed;
	z-index: 50;
	right: 0;
	bottom: 0;
	left: 0;
	min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
	border-top: 1px solid var(--color-border);
	background: rgb(255 255 255 / 96%);
	box-shadow: 0 -6px 24px rgb(17 19 24 / 8%);
	backdrop-filter: blur(12px);
	width: 100%;
	max-width: 100%;
	padding-bottom: env(safe-area-inset-bottom);
}

.mobile-navigation ul {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: stretch;
	min-height: var(--mobile-nav-height);
}

.mobile-navigation li {
	min-width: 0;
}

.mobile-navigation a {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 5px;
	padding: 10px 6px;
	font-size: 0.75rem;
	text-align: center;
	min-width: 0;
	max-width: 100%;
}

.mobile-navigation button,
.mobile-navigation__placeholder {
	display: grid;
	width: 100%;
	height: 100%;
	align-content: center;
	justify-items: center;
	gap: 5px;
	padding: 10px 6px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 0.75rem;
	min-width: 0;
	max-width: 100%;
}

.mobile-navigation a > span:last-child,
.mobile-navigation button > span:last-child,
.mobile-navigation__placeholder > span:last-child {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mobile-navigation__placeholder {
	color: var(--color-muted);
}

.mobile-navigation__scanner {
	position: relative;
}

.mobile-navigation__scanner a,
.mobile-navigation__scanner button {
	position: absolute;
	top: -24px;
	left: 50%;
	width: 72px;
	height: 72px;
	padding: 8px;
	transform: translateX(-50%);
	border: 5px solid var(--color-surface);
	border-radius: 50%;
	background: var(--color-action);
	color: #fff;
	box-shadow: 0 7px 20px rgb(10 168 79 / 28%);
}

.mobile-navigation__scanner .icon {
	width: 26px;
	height: 26px;
}

.mobile-navigation__scanner span {
	font-size: 0.6875rem;
}

.mobile-navigation .current-menu-item > a {
	color: var(--color-action);
}

.has-categories-drawer {
	overflow: hidden;
}

.has-categories-drawer body {
	overflow: hidden;
}

.categories-drawer {
	position: fixed;
	z-index: 70;
	inset: 0;
	visibility: hidden;
	pointer-events: none;
}

.categories-drawer__backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: rgb(17 19 24 / 52%);
	opacity: 0;
	transition: opacity 180ms ease;
}

.categories-drawer__sheet {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	max-height: min(78vh, 620px);
	max-height: min(78dvh, 620px);
	border-radius: 16px 16px 0 0;
	background: var(--color-surface);
	box-shadow: 0 -12px 36px rgb(17 19 24 / 18%);
	transform: translateY(100%);
	transition: transform 220ms ease;
	overflow: hidden;
}

.categories-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.categories-drawer.is-open .categories-drawer__backdrop {
	opacity: 1;
}

.categories-drawer.is-open .categories-drawer__sheet {
	transform: translateY(0);
}

.categories-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px var(--layout-gutter) 14px;
	border-bottom: 1px solid var(--color-border);
}

.categories-drawer__header h2 {
	margin: 0;
	font-size: 1.25rem;
}

.categories-drawer__body {
	padding: 10px var(--layout-gutter) max(24px, env(safe-area-inset-bottom));
	overflow-y: auto;
	overscroll-behavior: contain;
}

.categories-drawer__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 14px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.categories-drawer__list li {
	min-width: 0;
}

.categories-drawer__list a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	min-height: 50px;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.875rem;
	font-weight: 650;
	overflow-wrap: anywhere;
}

.categories-drawer__list .icon {
	width: 16px;
	height: 16px;
	color: var(--color-action);
}

.categories-drawer__empty {
	margin: 10px 0 18px;
	color: var(--color-muted);
	font-size: 0.875rem;
}

.categories-drawer__secondary {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	padding-top: 20px;
}

.categories-drawer__secondary a {
	color: var(--color-action);
	font-size: 0.8125rem;
	font-weight: 700;
}

@media (min-width: 800px) {
	:root {
		--layout-gutter: 32px;
	}

	.site-header__inner {
		min-height: 76px;
	}

	.primary-navigation {
		display: block;
	}

	.primary-navigation ul {
		display: flex;
		align-items: center;
		gap: 32px;
	}

	.primary-navigation a {
		font-size: 0.875rem;
		font-weight: 600;
	}

	.site-header__saved {
		display: inline-grid;
	}

	.site-main {
		padding-block: 48px 72px;
	}

	.content-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mobile-navigation {
		display: none;
	}

	.categories-drawer {
		display: none;
	}

	.site-footer {
		padding-block: 48px;
	}

	.site-footer__inner {
		grid-template-columns: minmax(220px, 1fr) minmax(0, 2.1fr);
		align-items: start;
	}

	.site-footer__nav {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.app-install-prompt,
.cookie-consent {
	position: fixed;
	inset: 0;
	pointer-events: none;
}

.app-install-prompt {
	z-index: 90;
}

.cookie-consent {
	z-index: 45;
}

.app-install-prompt[hidden],
.cookie-consent[hidden] {
	display: none;
}

.app-install-prompt__panel {
	position: absolute;
	right: var(--layout-gutter);
	bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 16px);
	left: var(--layout-gutter);
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	max-width: 520px;
	padding: 18px;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	background: var(--color-surface);
	box-shadow: 0 16px 50px rgb(17 19 24 / 18%);
	pointer-events: auto;
}

.app-install-prompt__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
}

.app-install-prompt__icon {
	display: grid;
	width: 46px;
	height: 46px;
	place-items: center;
	border-radius: 50%;
	background: #e9f8ef;
	color: var(--color-action);
}

.app-install-prompt h2,
.app-install-prompt p {
	margin: 0;
}

.app-install-prompt h2 {
	font-size: 1rem;
}

.app-install-prompt p,
.app-install-prompt summary {
	color: var(--color-muted);
	font-size: 0.8125rem;
}

.app-install-prompt details {
	margin-top: 10px;
}

.app-install-prompt summary {
	cursor: pointer;
	font-weight: 700;
}

.app-install-prompt__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.cookie-consent {
	display: grid;
	place-items: center;
	padding: var(--layout-gutter) var(--layout-gutter) calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + var(--layout-gutter));
}

.cookie-consent__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(17 19 24 / 42%);
	pointer-events: auto;
}

.cookie-consent__modal {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 18px;
	width: min(100%, 560px);
	max-height: min(82vh, 680px);
	max-height: min(82dvh, 680px);
	padding: 22px;
	overflow-y: auto;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	background: var(--color-surface);
	box-shadow: 0 20px 60px rgb(17 19 24 / 22%);
	pointer-events: auto;
}

.cookie-consent header {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 12px;
}

.cookie-consent header > span {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 50%;
	background: #e9f8ef;
	color: var(--color-action);
}

.cookie-consent h2,
.cookie-consent p {
	margin: 0;
}

.cookie-consent h2 {
	font-size: 1.25rem;
}

.cookie-consent p,
.cookie-consent small {
	color: var(--color-muted);
	font-size: 0.8125rem;
}

.cookie-consent__options {
	display: grid;
	gap: 10px;
}

.cookie-consent__options label {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	padding: 13px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.cookie-consent__options span {
	display: grid;
	gap: 3px;
}

.cookie-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.cookie-consent__legal {
	font-size: 0.75rem;
}

.cookie-consent__legal a {
	color: var(--color-action);
	font-weight: 700;
}

@media (min-width: 800px) {
	.app-install-prompt__panel {
		right: 32px;
		bottom: 32px;
		left: auto;
	}

	.cookie-consent {
		z-index: 90;
		padding: var(--layout-gutter);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.categories-drawer__backdrop,
	.categories-drawer__sheet {
		transition: none;
	}
}
