/* ==========================================================================
   Allergene & Inhaltsstoffe – Styles
   Mobile first, ohne externe Abhängigkeiten.
   ========================================================================== */

:root {
  --bg: #f7f2e9;
  --paper: #fffdf8;
  --ink: #1e1a16;
  --ink-soft: #3a332c;
  --muted: #6f6558;
  --muted-strong: #5c5145;
  --line: #e4dacb;
  --line-strong: #d3c5b1;
  --gold: #b08a4a;
  --gold-dark: #815c22;
  --warm: #efe6d6;
  --danger: #8c3525;
  --danger-bg: #f8e3dc;
  --danger-line: #e7b9a8;
  --ok: #2f6347;
  --ok-bg: #e3efe6;
  --ok-line: #c7ddcf;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --container: 1180px;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% -10%, rgba(176, 138, 74, 0.16), transparent 48%),
    radial-gradient(ellipse at 8% 18%, rgba(255, 253, 248, 0.9), transparent 38%);
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
ul,
dl,
dd {
  margin-top: 0;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--gold-dark);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(255, 253, 248, 0.7);
}

.btn--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.82rem;
}

.btn--profile {
  min-height: 42px;
  padding: 0 14px;
  border-color: var(--line);
  background: var(--paper);
  font-size: 0.8rem;
}

.btn--profile:hover {
  border-color: var(--gold);
}

.btn--profile svg {
  width: 17px;
  height: 17px;
  color: var(--gold-dark);
}

.profile-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold-dark);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted-strong);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-btn:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(211, 197, 177, 0.7);
  background: rgba(247, 242, 233, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--muted-strong);
  font-size: 0.86rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Section label
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 1px;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(54px, 7vw, 92px) 0;
}

#dufte {
  padding-top: clamp(40px, 6vw, 64px);
}

.section--allergens {
  border-block: 1px solid var(--line);
  background: #f1e9dc;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section-head h2 {
  max-width: 16ch;
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.section-head > p {
  max-width: 48ch;
  margin: 0 0 4px;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.section-note {
  max-width: 72ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.result-count {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Profile / Toolbar
   -------------------------------------------------------------------------- */

.profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding: 16px 20px;
  border: 1px solid #dfcfb6;
  border-radius: 16px;
  background: #f3eadb;
}

.profile-banner__label {
  display: block;
  color: var(--gold-dark);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-banner__text p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.search {
  position: relative;
  flex: 1 1 340px;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 50px;
  padding: 0 20px 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search input::placeholder {
  color: #7a6f61;
}

.search input:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(176, 138, 74, 0.18);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted-strong);
  font-size: 0.8rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d8ccbb;
  transition: background-color 0.18s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 20, 10, 0.24);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch__track {
  background: var(--ink);
}

.switch input:checked + .switch__track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px 0 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.76rem;
  cursor: pointer;
}

.filter-pill strong {
  font-weight: 700;
}

.filter-pill svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

.filter-pill:hover svg {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 24px 50px -34px rgba(50, 35, 20, 0.4);
  transform: translateY(-3px);
}

.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.product-card__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 206px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 38%, var(--soft), #fbf7f0 72%);
}

.product-card__visual::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 50%;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translateX(-50%);
}

.product-card__visual::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.28));
  pointer-events: none;
}

.flacon {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 146px;
  filter: drop-shadow(0 20px 18px rgba(40, 25, 10, 0.18));
}

.flacon__cap {
  position: absolute;
  top: 0;
  left: 50%;
  width: 30px;
  height: 18px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #d8b878, #9d7335);
  transform: translateX(-50%);
}

.flacon__neck {
  position: absolute;
  top: 17px;
  left: 50%;
  width: 22px;
  height: 14px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.35));
  transform: translateX(-50%);
}

.flacon__body {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 116px;
  border-radius: 14px 14px 18px 18px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset -12px 0 18px rgba(0, 0, 0, 0.18),
    inset 10px 0 14px rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
}

.flacon__label {
  width: 46px;
  padding: 8px 4px;
  border-radius: 2px;
  background: rgba(255, 251, 243, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  color: #2a241d;
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 22px;
}

.product-card__brand {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-card__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.product-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  padding: 4px 8px;
  border: 1px solid #e4dacb;
  border-radius: 999px;
  background: #f2ece2;
  color: #6a5d4d;
  font-size: 0.66rem;
  line-height: 1.3;
}

.tag--match {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 700;
}

.tag--more {
  border-style: dashed;
  background: transparent;
}

.card-status {
  margin-top: 2px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.status--warn {
  background: var(--danger-bg);
  color: var(--danger);
}

.status--ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.product-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
}

.product-card__cta span:last-child {
  color: var(--gold-dark);
  font-size: 1rem;
  transition: transform 0.18s ease;
}

.product-card:hover .product-card__cta span:last-child {
  transform: translateX(3px);
}

.empty {
  grid-column: 1 / -1;
  padding: 52px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.55);
  text-align: center;
}

.empty h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
}

.empty p {
  max-width: 42ch;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Allergen index
   -------------------------------------------------------------------------- */

.allergen-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.allergen-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.allergen-pill:hover {
  border-color: var(--gold);
}

.allergen-pill__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #efe7d9;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.allergen-pill.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.allergen-pill.is-active .allergen-pill__count {
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Info
   -------------------------------------------------------------------------- */

.info {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-top: 42px;
}

.info-card {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.info-card__num {
  color: var(--gold-dark);
  font-family: var(--serif);
  font-size: 1rem;
}

.info-card h3 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.info-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Detail view
   -------------------------------------------------------------------------- */

.detail {
  padding: clamp(28px, 5vw, 54px) 0 84px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.detail-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 36%, var(--soft), #fbf7f0 72%);
}

.detail-visual .flacon {
  transform: scale(1.45);
}

.detail-intro h1 {
  max-width: 14ch;
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.8vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.detail-badges span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted-strong);
  font-size: 0.7rem;
}

.detail-lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
}

.detail-actions {
  margin-top: 14px;
}

.allergen-check-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.allergen-check-bar--warn {
  border-color: var(--danger-line);
  background: #fbf0eb;
}

.allergen-check-bar--ok {
  border-color: var(--ok-line);
  background: #eef5ef;
}

.allergen-check-bar__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--gold-dark);
}

.allergen-check-bar--warn .allergen-check-bar__icon,
.allergen-check-bar--warn .allergen-check-bar__label {
  color: var(--danger);
}

.allergen-check-bar--ok .allergen-check-bar__icon,
.allergen-check-bar--ok .allergen-check-bar__label {
  color: var(--ok);
}

.allergen-check-bar__icon svg {
  width: 100%;
  height: 100%;
}

.allergen-check-bar__text {
  flex: 1;
  min-width: 0;
}

.allergen-check-bar__label {
  display: block;
  margin-bottom: 2px;
  color: var(--gold-dark);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.allergen-check-bar__text p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.5;
}

.allergen-check-bar .btn {
  flex: 0 0 auto;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.panel h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.panel__label {
  margin: 0 0 6px;
  color: var(--gold-dark);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel__sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.panel__sub strong {
  color: var(--ink-soft);
}

.allergen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.allergen-chip {
  padding: 7px 11px;
  border: 1px solid #e5dacb;
  border-radius: 999px;
  background: #f3ede4;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.allergen-chip.is-match {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 700;
}

.allergen-chip__flag {
  margin-left: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.fineprint {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 24px;
  margin: 4px 0 0;
}

.facts div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.inci summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.inci summary::-webkit-details-marker {
  display: none;
}

.inci summary:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 4px;
  border-radius: 6px;
}

.summary__label {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.summary__meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inci__icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.inci__icon::before,
.inci__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.inci__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.inci[open] .inci__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.inci__content {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.inci-text {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 2;
}

.inci-item + .inci-item::before {
  content: ", ";
  color: var(--muted);
  font-weight: 400;
}

.inci-item.is-allergen {
  color: var(--danger);
  font-weight: 700;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.legend__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--danger);
}

.detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.detail-nav a {
  padding: 17px clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.detail-nav a:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.detail-nav__label {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-nav__name {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.2;
}

.detail-nav__next {
  text-align: right;
}

.detail-source {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.empty--large {
  max-width: 720px;
  margin: 40px auto;
  padding: 72px 28px;
}

.empty--large h1 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: clamp(48px, 6vw, 72px) 0 30px;
  background: #1d1a17;
  color: #efe7da;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: flex-start;
}

.footer-nav a {
  color: #cfc4b5;
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-fine {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #a99e90;
  font-size: 0.68rem;
}

.footer-fine p {
  max-width: 76ch;
  margin: 0;
}

.footer-fine p:last-child {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Dialog
   -------------------------------------------------------------------------- */

.dialog {
  width: min(660px, calc(100% - 32px));
  max-height: min(88vh, 780px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(30, 20, 10, 0.45);
}

.dialog::backdrop {
  background: rgba(29, 26, 23, 0.56);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog[open] {
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

.dialog__inner {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 780px);
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 0;
}

.dialog__head h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.dialog__close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.dialog__close:hover {
  border-color: var(--ink);
}

.dialog__close svg {
  width: 18px;
  height: 18px;
}

.dialog__body {
  overflow-y: auto;
  padding: 14px 24px 8px;
  overscroll-behavior: contain;
}

.dialog__intro {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.dialog__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 16px;
}

.dialog__count {
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dialog__tool-buttons {
  display: flex;
  gap: 16px;
}

.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.check:hover {
  border-color: var(--gold);
  background: #faf5ec;
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check__box {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid #b9ab97;
  border-radius: 5px;
  background: #fff;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.check input:checked + .check__box {
  border-color: var(--ink);
  background: var(--ink);
}

.check input:checked + .check__box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.check input:focus-visible + .check__box {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.check__text {
  line-height: 1.25;
}

.check__text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.65rem;
}

.dialog__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.dialog__hint {
  max-width: 26ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.dialog__actions {
  display: flex;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Legal page
   -------------------------------------------------------------------------- */

.legal {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(48px, 7vw, 80px) 0 96px;
}

.legal-header {
  text-align: center;
}

.legal-header .eyebrow {
  justify-content: center;
}

.legal h1 {
  max-width: none;
  margin: 14px auto 16px;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-align: center;
}

.legal-intro {
  max-width: 48ch;
  margin: 0 auto;
  color: var(--muted-strong);
  font-size: 0.92rem;
  text-align: center;
}

.legal-content {
  max-width: 640px;
  margin: clamp(36px, 5vw, 52px) auto 0;
}

.legal-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.legal-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-section h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
}

.legal-section h3 {
  margin: 24px 0 8px;
  font-size: 0.92rem;
}

.legal-section p,
.legal-section li {
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section a {
  color: var(--gold-dark);
}

.legal-section ul {
  padding-left: 20px;
}

.legal-section .legal-updated {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.noscript-note {
  margin: 20px 0;
  padding: 14px 18px;
  border: 1px solid var(--danger-line);
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
    gap: 32px;
  }

  .detail-visual {
    min-height: 320px;
  }

  .detail-visual .flacon {
    transform: scale(1.45);
  }

  .info-grid {
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 40px);
  }

  .nav {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .section-head h2 {
    max-width: none;
  }

  .section-head > p {
    max-width: 56ch;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-card__visual {
    min-height: 170px;
  }

  .product-card__body {
    padding: 16px 16px 18px;
  }

  .product-card__name {
    font-size: 1.35rem;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-visual {
    min-height: 240px;
  }

  .detail-visual .flacon {
    transform: scale(1.25);
  }

  .detail-intro h1 {
    max-width: none;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 30px;
  }

  .info-card {
    padding: 20px 0;
  }

  .info-card:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .footer-fine {
    flex-direction: column;
    gap: 12px;
  }

  .footer-fine p:last-child {
    white-space: normal;
  }

  .detail-nav {
    grid-template-columns: 1fr;
  }

  .detail-nav__next {
    text-align: left;
  }

  .dialog__foot {
    align-items: stretch;
  }

  .dialog__hint {
    max-width: none;
  }

  .dialog__actions {
    flex: 1;
  }

  .dialog__actions .btn {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .btn--profile {
    min-height: 40px;
    padding: 0 12px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card__visual {
    min-height: 190px;
  }

  .profile-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    flex-basis: auto;
  }

  .switch {
    align-self: flex-start;
  }

  .checklist {
    grid-template-columns: 1fr;
  }

  .dialog {
    width: calc(100% - 24px);
    max-height: 92vh;
  }

  .dialog__inner {
    max-height: 92vh;
  }

  .dialog__head {
    padding: 20px 20px 0;
  }

  .dialog__body {
    padding: 12px 20px 6px;
  }

  .dialog__foot {
    padding: 14px 20px 20px;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .facts dt {
    font-size: 0.66rem;
  }

  .detail-actions .btn {
    width: 100%;
  }

  .allergen-check-bar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px 24px;
  }

  .allergen-check-bar__text {
    flex: 1 1 calc(100% - 38px);
  }

  .allergen-check-bar .btn {
    width: 100%;
  }

  .detail {
    padding-bottom: 64px;
  }
}

@media (max-width: 400px) {
  .btn--profile {
    gap: 6px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .detail-badges span {
    font-size: 0.64rem;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion / print
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toolbar,
  .profile-banner,
  .active-filters,
  .result-count,
  .detail-nav,
  .back-link,
  .detail-actions,
  .allergen-check-bar .btn,
  .skip-link,
  .dialog {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .detail {
    padding: 0;
  }

  .detail-hero {
    grid-template-columns: 180px 1fr;
    gap: 24px;
  }

  .detail-visual {
    min-height: 220px;
    background: #fff;
  }

  .detail-visual .flacon {
    transform: scale(1);
  }

  .panel,
  .allergen-check-bar,
  .detail-nav a {
    border-color: #ccc;
    background: #fff;
    box-shadow: none;
  }

  .allergen-chip,
  .tag,
  .status {
    border: 1px solid #999;
    background: #fff;
    color: #000;
  }

  .inci-item.is-allergen {
    color: #000;
  }
}
