/* ==========================================================================
   Wreesmann – Startseite
   Design-Tokens aus Figma (Wreesmann Design System)
   ========================================================================== */

/* Jost is served by the site itself instead of loading it from the Google CDN (variable font, weights 400-800).
   Licence: SIL OFL 1.1, see ../fonts/OFL.txt */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Farben */
  /* Green after the Wreesmann Design System (Figma). Primary (primary/500) is reserved for what reacts:
     buttons, links, tabs, chips, pins, selection states, focus rings. Headings and other static texts
     use --color-heading (text/default/heading/default), even where they are green in older frames,
     which still carry the deprecated text/primary/heading. */
  --color-primary: #00893f;
  /* text|icon/primary/default/hovered */
  --color-primary-hover: #00813c;
  /* surface/primary/default/pressed; also green text on the light green surface (text/primary/on_subtle) */
  --color-primary-active: #007a38;
  --color-heading: #00813c;
  /* surface/primary/subtle/default|hovered|pressed: the light green surface, and the hover and pressed
     fill of the outline, ghost and subtle buttons (Figma "Button" 36:32) */
  --color-primary-subtle: #e9f5ef;
  --color-primary-subtle-hover: #d2eadd;
  --color-primary-subtle-pressed: #bce0cd;
  --color-white: #ffffff;
  --color-text: #2b2e33;
  --color-text-subtle: #6b7280;
  /* Secondary text on the light green surface (Figma text/default/body/on_subtle), darker for contrast */
  --color-text-on-subtle: #616773;
  --color-border: #a6aab3;
  /* Outline of text fields and selects (Figma border/default/default/default) */
  --color-border-field: #7a808d;
  --color-border-subtle: #c4c7cc;
  --color-surface-variant: #f0f1f2;
  /* surface/default/default/hovered|pressed: the fill of an outlined icon button (Figma "Icon_Button" 37:48),
     which turns grey rather than green */
  --color-surface-hover: #f0f1f2;
  --color-surface-pressed: #e1e3e6;
  --color-success: #1e9e63;
  --color-success-subtle: #d2ece0;
  --color-error: #c23b2c;
  --color-error-subtle: #f3d8d5;
  --color-offer: #d51920;
  --color-warning: #ff6b00;
  --color-warning-subtle: #ffe1cc;
  --color-gold: #d4af37;

  /* Abstände (scale/…) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --radius: 8px;
  --radius-full: 1000px;

  --font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --page-max-width: 1440px;
  --page-padding: 12px;
  --section-padding-y: 24px;
}

@media (min-width: 1024px) {
  :root {
    --page-padding: 32px;
    --section-padding-y: 32px;
  }
}

/* --------------------------------------------------------------------------
   Reset / Basis
   -------------------------------------------------------------------------- */

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

/* Classic scrollbars take ~15 px: reserve the gutter on every page, so the centred content does not
   shift between short pages without a scrollbar (/whatsapp, /newsletter) and long ones. */
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text);
  background: var(--color-white);
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Sichtbarkeits-Helfer: nur ausblenden, nie ein display setzen,
   damit die Komponenten-Displays (inline-flex, block …) erhalten bleiben */
@media (max-width: 1023.98px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Typografie (Wreesmann/…)
   -------------------------------------------------------------------------- */

.headline-lg {
  font-size: 40px;
  line-height: 56px;
  font-weight: 700;
}

.headline-md {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
}

.title-md {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.label-lg {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.label-md {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.body-md {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Layout-Helfer
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

/* --------------------------------------------------------------------------
   Basis-Komponenten
   -------------------------------------------------------------------------- */

/* Icon-Button (40×40, Icon 20×20) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.icon-btn img {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  background: rgba(43, 46, 51, 0.06);
}

/* Button (Outline). States after Figma "Button" (36:32): hovered and pressed fill the button light green
   (surface/primary/subtle/hovered|pressed), hovered also darkens the border. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.btn img {
  width: 20px;
  height: 20px;
}

.btn:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-subtle-hover);
}

.btn:active {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle-pressed);
}

.btn--text-only {
  padding-right: var(--space-4);
}

/* Toggle button (Figma "Toggleable Button" 581:16345), the wishlist heart: a 44 px hit area around
   a 40 px state layer with radius 8, no circle and no shadow. Both icons are in the page and
   aria-pressed picks one, so the state is the button's and not the image's. The state layer tints
   green while the heart is empty (surface/primary/transparent) and grey once it is filled
   (surface/default/transparent). For a guest the same heart is a link to the login. */
.toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
}

.toggle-btn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: var(--radius);
}

.toggle-btn:hover::before {
  background: rgba(0, 137, 63, 0.08);
}

.toggle-btn:active::before {
  background: rgba(0, 137, 63, 0.12);
}

.toggle-btn[aria-pressed="true"]:hover::before {
  background: rgba(0, 0, 0, 0.04);
}

.toggle-btn[aria-pressed="true"]:active::before {
  background: rgba(0, 0, 0, 0.08);
}

/* Figma ".Focus_indicator": 2 px in primary around the whole hit area */
.toggle-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.toggle-btn__icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.toggle-btn__icon--on,
.toggle-btn[aria-pressed="true"] .toggle-btn__icon--off {
  display: none;
}

.toggle-btn[aria-pressed="true"] .toggle-btn__icon--on {
  display: block;
}

/* The form around the heart of a signed-in customer takes exactly the button's room. */
.wishlist-toggle {
  display: flex;
}

/* Tooltip (Figma "Tooltip" 4355:22, Caret=none): a short hint on the dark inverse surface, 4 px
   above the control the mouse rests on (the wishlist heart: "Produkt merken"). tooltip.js creates
   the one element, fills it from data-tooltip and places it - fixed, because a product card would
   cut it off and next to the window's edge it has to move in. Above the snackbar (1050), below
   the open main menu (1100). */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1060;
  padding: 6px var(--space-3);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  background: #202226;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  color: #f8f8f9;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  pointer-events: none;
}

/* Snackbar (Figma "Snackbar" 4075:77): one short message on the dark inverse surface at the bottom
   of the screen, an optional action and a close button; snackbar.js shows and hides it. Above
   maps and dialogs (1000), below the open main menu (1100). 400 px wide as in the design, a few
   pixels more when message and action need them to stay on one line, and never closer than
   20 px to the screen's edges - on a phone the message wraps instead. */
.snackbar {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  z-index: 1050;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: max-content;
  min-width: min(400px, calc(100% - 40px));
  max-width: calc(100% - 40px);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  border-radius: 4px;
  background: #202226;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  color: #f8f8f9;
}

/* The display above would otherwise beat the hidden attribute. */
.snackbar[hidden],
.snackbar__action[hidden] {
  display: none;
}

.snackbar__message {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 0;
  font-size: 14px;
  line-height: 20px;
}

.snackbar__action {
  flex: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: #a6d6bc;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.snackbar__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.snackbar__close img {
  width: 20px;
  height: 20px;
}

.snackbar__action:hover,
.snackbar__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.snackbar__action:focus-visible,
.snackbar__close:focus-visible {
  outline: 2px solid #a6d6bc;
  outline-offset: -2px;
}

/* Suchfeld */
.search-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.search-field img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  font: inherit;
  color: var(--color-text);
  background: transparent;
}

.search-field input::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

.search-field input::-webkit-search-decoration,
.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-field:focus-within {
  border-color: var(--color-primary);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.badge--angebot {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.badge--neu {
  background: var(--color-error-subtle);
  color: var(--color-error);
}

.badge--limited {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
  border-radius: 10px;
  white-space: normal;
  text-align: left;
}

/* Sternebewertung */
.rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  display: block;
  width: 16px;
  height: 16px;
  position: relative;
  background: url("../icons/star-filled.svg") no-repeat center / 16px 16px;
}

.star--empty {
  background-image: url("../icons/star-empty.svg");
}

.star--half {
  background-image: url("../icons/star-empty.svg");
}

.star--half::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 16px;
  background: url("../icons/star-filled.svg") no-repeat left top / 16px 16px;
}

.rating__count {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.rating__count a {
  text-decoration: underline;
}

/* Verfügbarkeit */
/* Availability in the chosen market (Figma "Availability_Indicator"): icon, label and the market as underlined link */
.availability {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1) 0;
}

.availability__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-1);
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--color-text);
  min-width: 0;
}

.availability__item img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.availability__link {
  text-decoration: underline;
}

/* The whole indicator is a link (no market chosen): the text wraps beside the icon, not below it */
.availability__item.availability__link {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.availability__item.availability__link img {
  margin-top: 2px;
}

/* Colours of the "Lieferbar" line, which is hidden for now (see AvailabilityList.razor) */
.availability__item--error {
  color: var(--color-error);
}

.availability__item--warning {
  color: var(--color-warning);
}

/* On the product cards the link carries the state's colour as well (Figma "Product_Card") */
.availability__link--available {
  color: var(--color-primary);
}

.availability__link--unavailable {
  color: var(--color-offer);
}

.availability__link--unknown {
  color: var(--color-warning);
}

/* --------------------------------------------------------------------------
   Page frame (MainLayout)
   -------------------------------------------------------------------------- */

/* Header, content and footer fill at least the window, so on a short page (WhatsApp, an empty search,
   the 404) the footer sits at the bottom instead of hanging in the middle. The content grows, not the
   footer's margin, so its gap to the content stays on long pages. */
.site-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-layout__content {
  flex: 1 0 auto;
}

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

.site-header {
  position: relative;
  background: var(--color-white);
}

/* While the main menu is open the header lies above the page (also above the Leaflet map of the store
   finder, whose panes and controls go up to 1000). */
.main-menu-open .site-header {
  z-index: 1100;
}

/* App-Banner (nur Mobile) */
.app-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(13.27deg, #e1e3e6 0%, #ffffff 100%);
}

.app-banner__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.app-banner__text {
  flex: 1;
  min-width: 0;
}

.app-banner__title {
  color: var(--color-heading);
}

/* Header-Leiste */
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.logo {
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0;
  white-space: nowrap;
}

/*
 * The logo (391 x 44) replaces the text "WREESMANN" and takes its place: it has the proportions of that
 * text (formerly set in Open Sans 800), so a height of 0.759 em makes it as wide and as high in its capitals as the text was
 * at the same font size. The sizes of the places stay what they were (22 px, 18 px on a phone, 16 px in the footer).
 */
.logo img {
  display: block;
  height: 0.759em;
  width: auto;
  /* Safari showed the text cursor over the SVG logo instead of the link's pointer. */
  cursor: pointer;
}

/* The phone row holds the menu button, the logo and four icons (leaflet, market, heart, account):
   12 + 40 + 8 + 140 + 4 × 40 + 12 = 372 px. Basis 0 and no minimum width let the logo take what the
   icons leave and give way first on narrower screens, so the icons never wrap below it. This follows
   the space the row really has; a media query on the window width missed the scrollbar of desktop
   browsers and let the row wrap between 372 and 389 px. */
.header-bar .logo {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 60px;
  display: flex;
  align-items: center;
  font-size: 18px;
  line-height: normal;
}

/* Header logo: fixed width as in the design (Figma "Top_Navigation": 140 px mobile, 180 px from 1024 px), independent of the font size. */
.header-bar .logo img {
  width: 140px;
  max-width: 100%;
  height: auto;
}

/* Mobile: menu button left of the logo (Figma "Top_Navigation" mobile) */
.header-bar__menu {
  order: 0;
  margin-right: var(--space-2);
}

.header-actions {
  order: 3;
  display: flex;
  align-items: center;
}

/* On a phone the leaflet link and the market selector are icon buttons left of the wishlist and account icons (Figma "Top_Navigation" mobile). */
.header-bar__leaflet {
  order: 2;
}

.header-bar .market-selector {
  order: 2;
  width: 40px;
  height: 40px;
  padding: 0;
}

.header-bar .market-selector:hover {
  background: rgba(43, 46, 51, 0.06);
}

.header-bar .market-selector .market-selector__value {
  display: none;
}

.header-bar .search-field {
  order: 4;
  flex-basis: 100%;
  margin: var(--space-3) 0;
}

/* Markt-Auswahl: Icon + Name, ohne Rahmen und Hintergrund (Figma "Market_Selector") */
.market-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
}

.market-selector:hover {
  background: var(--color-primary-subtle-hover);
}

.market-selector picture {
  display: contents;
}

/* With the picture "contents", <source> would be a flex item of its own and its gap would push the icon aside. */
.market-selector source {
  display: none;
}

.market-selector img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.market-selector__value {
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Long names must not stretch the header; the full value is in the aria-label. */
  max-width: 22ch;
}

/* Menu bar (desktop only; on a phone the menu button in the header bar opens the menu) */
.main-nav {
  display: none;
}

@media (min-width: 1024px) {
  .app-banner {
    display: none;
  }

  /* Figma "Top_Navigation": 10 px above and below the 44 px controls, so the row is 64 px high */
  .header-bar {
    flex-wrap: nowrap;
    gap: var(--space-2);
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-bar .logo {
    order: 0;
    flex: 0 0 auto;
    height: auto;
    font-size: 22px;
    margin-right: var(--space-2); /* 8px gap + 8px = 16px zum Suchfeld (Figma) */
  }

  .header-bar .logo img {
    width: 180px;
    max-width: none;
  }

  .header-bar .search-field {
    order: 0;
    flex: 1 1 auto;
    margin: 0;
  }

  .header-bar .market-selector {
    order: 0;
    width: auto;
    height: auto;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  }

  .header-bar .market-selector:hover {
    background: var(--color-primary-subtle-hover);
  }

  .header-bar .market-selector .market-selector__value {
    display: block;
  }

  .header-actions {
    order: 0;
  }

  /* Menu bar (Figma "Category Nav"): tabs on the left, service links on the right */
  .main-nav {
    display: block;
    padding: 0 var(--page-padding);
    background: var(--color-surface-variant);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  /* As wide as the content of the .container row above it (its max width includes the page padding,
     here the padding sits on .main-nav), so the first tab starts below the logo and the last one ends
     below the account icon on every width, as in Figma. */
  .main-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: calc(var(--page-max-width) - 2 * var(--page-padding));
    margin: 0 auto;
  }

  .main-nav__group {
    display: flex;
    align-items: center;
  }

  .main-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    height: 48px;
    padding: 0 var(--space-4);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: var(--color-text);
    white-space: nowrap;
  }

  .main-nav__item--service {
    font-weight: 400;
    letter-spacing: 0;
  }

  .main-nav__item:hover,
  .main-nav__products[aria-expanded="true"] {
    color: var(--color-primary);
  }

  /* Indicator of the open tab (Figma "Primary tabs", 3 px, rounded on top) */
  .main-nav__products[aria-expanded="true"]::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    height: 3px;
    border-radius: var(--radius-full) var(--radius-full) 0 0;
    background: var(--color-primary);
  }

  .main-nav__arrow {
    width: 24px;
    height: 24px;
  }

  .main-nav__arrow--open,
  .main-nav__products[aria-expanded="true"] .main-nav__arrow {
    display: none;
  }

  .main-nav__products[aria-expanded="true"] .main-nav__arrow--open {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Main menu (Figma "Mega_Menu_Mobile" / "Mega_Menu_Desktop"); main-menu.js opens and switches it
   -------------------------------------------------------------------------- */

.main-menu[hidden],
.main-menu__panel[hidden],
.main-menu__scrim[hidden] {
  display: none;
}

/* Phone: the whole screen, a main category opens its subcategories as a layer on top */
.main-menu {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-white);
}

@media (max-width: 1023.98px) {
  .main-menu-open body {
    overflow: hidden;
  }
}

.main-menu__head,
.main-menu__panel-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 60px;
  padding: 0 var(--page-padding);
  border-bottom: 1px solid var(--color-border-field);
}

.main-menu__logo {
  flex: 1;
}

.main-menu__logo img {
  width: 140px;
  height: auto;
}

.main-menu__start {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-4) var(--page-padding) var(--space-6);
}

.main-menu__tiles {
  display: flex;
  gap: var(--space-2);
}

.main-menu__tile {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 20px;
  overflow: hidden;
  border: 0.5px solid var(--color-border-subtle);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

.main-menu__tile--new {
  background: var(--color-surface-variant);
  color: var(--color-primary-active);
}

/* The leaflet tile (Figma "Mega_Menu_Cards"): label, picture and chevron side by side */
.main-menu__tile--leaflet {
  justify-content: space-between;
  padding: 0 12px 0 20px;
  background: var(--color-primary);
  color: var(--color-white);
}

.main-menu__tile-label {
  position: relative;
  z-index: 1;
}

/* The pictures overhang the card as in the design and are cut off by it. */
.main-menu__tile-image {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

.main-menu__tile--new .main-menu__tile-image {
  top: -26.5px;
  right: -40.5px;
  width: 153px;
  height: 153px;
}

.main-menu__tile--leaflet .main-menu__tile-label {
  flex-shrink: 0;
  padding-right: 56px;
}

/* The picture is 104 px high and overhangs the 80 px tile at the top and bottom. On narrow phones it gives
   way and is cut at its right edge, so the chevron always stays inside the tile. */
.main-menu__tile--leaflet .main-menu__tile-image {
  position: static;
  flex: 0 1 162px;
  min-width: 0;
  height: 104px;
  object-fit: cover;
  object-position: left center;
}

.main-menu__tile-chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

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

/* Phone only: "Weitere Services" below the categories, parted from them by a line. */
.main-menu__services {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.main-menu__label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* A main category (Figma "Nav_Category_Item": picture, name, chevron) and a service link (icon, name),
   both the design system's "List_Item": 48 px high, 16 px between the parts, regular body text */
.main-menu__root,
.main-menu__service {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  border-radius: 6px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  text-align: left;
}

.main-menu__root::after {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: url("../icons/chevron-small-dark.svg") center / 24px no-repeat;
}

.main-menu__root:hover,
.main-menu__service:hover,
.main-menu__links a:hover {
  background: rgba(43, 46, 51, 0.06);
}

.main-menu__root:focus-visible,
.main-menu__service:focus-visible,
.main-menu__links a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  border-radius: 10px;
}

.main-menu__thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-surface-variant);
}

.main-menu__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-menu__root-name {
  flex: 1;
  min-width: 0;
}

.main-menu__service img {
  width: 24px;
  height: 24px;
}

.main-menu__panel {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-white);
}

.main-menu__panel-title {
  flex: 1;
  color: var(--color-heading);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-align: center;
}

.main-menu__links {
  padding: var(--space-4) var(--page-padding) var(--space-6);
}

/* A subcategory (Figma "Nav_Subcategory_Link"), green and underlined (Figma "Mega_Menu_Mobile" / "Mega_Menu_Desktop") */
.main-menu__links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-3);
  border-radius: 6px;
  color: var(--color-primary);
  font-size: 16px;
  line-height: 24px;
  text-decoration: underline;
}

/* Wide screens: below the menu bar, main categories left, the chosen one's subcategories right */
@media (min-width: 1024px) {
  .main-menu {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    bottom: auto;
    z-index: 3;
    overflow: visible;
    background: none;
  }

  .main-menu__body {
    display: flex;
    gap: var(--space-6);
    max-width: var(--page-max-width);
    max-height: calc(100vh - var(--main-menu-top, 113px));
    margin: 0 auto;
    padding: var(--space-6);
    background: var(--color-white);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.16);
  }

  .main-menu__start {
    flex: 0 0 384px;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .main-menu__start .main-menu__group {
    gap: var(--space-3);
  }

  /* The chosen main category: green name on a light green surface, the chevron stays dark (Figma "Mega_Menu_Desktop") */
  .main-menu__root[aria-expanded="true"] {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
  }

  .main-menu__panel {
    position: static;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    padding-left: var(--space-6);
    border-left: 1px solid var(--color-border-subtle);
    background: none;
  }

  .main-menu__links {
    padding: 0;
  }

  /* The page below the menu bar is dimmed (Figma "Scrim": black at 40 % on a layer at 32 %, about 13 %);
     a click on it closes the menu. */
  .main-menu__scrim {
    position: fixed;
    inset: 0;
    top: var(--main-menu-top, 0px);
    z-index: 1;
    background: rgba(0, 0, 0, 0.128);
  }
}

@media (max-width: 1023.98px) {
  .main-menu__scrim {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

/*
 * Figma "Category_Hero" (Start (Neu)). Phone and tablet: photo on top (272 px high), green panel below with the
 * pattern at its right edge. From 1024 px: 360 px high, the photo fills everything right of 512 px and the panel
 * (600 px) lies over it, its right edge slanted to 511.33 px at the bottom, flush with the pattern's last edge.
 */
.hero {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin-inline: auto;
  background: var(--color-primary-active);
  /* macOS renders light text on a dark ground with subpixel smoothing noticeably heavier than Figma does */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero__media {
  position: relative;
  height: 272px;
}

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

/* The home photo's subject has its head in the upper fifth: from about 500 px up to 1023 px the 272 px box cuts the
   photo's height, and centred that cuts off the head. Check this again whenever the photo changes. */
@media (max-width: 1023.98px) {
  .hero--home .hero__image {
    object-position: 50% 15%;
  }
}

.hero__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  overflow: hidden;
  color: var(--color-white);
}

.hero__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hero/pattern.svg") right top / auto 100% no-repeat;
  opacity: 0.75;
}

.hero__title,
.hero__text,
.hero__link {
  position: relative;
}

.hero__title {
  margin: 0;
  font-size: 40px;
  line-height: 56px;
  font-weight: 700;
}

.hero__link {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: 2px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-decoration: underline;
}

.hero__link img {
  width: 24px;
  height: 24px;
}

/* Category pages (Figma "Category_Hero" 3814:71): a supporting text instead of the link */
.hero__text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.hero--category {
  width: 100%;
}

.hero--category .hero__panel {
  min-height: 255px;
}

/* Figma "KI_Hinweis" (4808:34): bottom right of the photo on every width, on a radial shade that fades out of that
   corner so the white text stays readable on light photos */
.hero__ai-notice {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 240px;
  height: 72px;
  margin: 0;
  padding: 0 var(--space-4) var(--space-3) 0;
  background: radial-gradient(240px 72px at 100% 100%, rgb(0 0 0 / 50%) 0%, rgb(0 0 0 / 18%) 60%, rgb(0 0 0 / 0%) 100%);
  color: rgb(255 255 255 / 90%);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}

/* Figma "KI_Hinweis" Position=top: top right with the shade anchored in that corner (the theme world tiles,
   whose bottom carries the green band) */
.hero__ai-notice--top {
  top: 0;
  bottom: auto;
  align-items: flex-start;
  padding: var(--space-3) var(--space-4) 0 0;
  background: radial-gradient(240px 72px at 100% 0%, rgb(0 0 0 / 50%) 0%, rgb(0 0 0 / 18%) 60%, rgb(0 0 0 / 0%) 100%);
}

@media (min-width: 1024px) {
  .hero {
    position: relative;
    display: block;
    height: 360px;
    overflow: hidden;
  }

  .hero__media {
    position: absolute;
    inset: 0 0 0 512px;
    height: auto;
  }

  /* The photo is wider than the box at 1440 px, so its height is cut: a quarter of that from the top, as in the design */
  .hero__image {
    object-position: 50% 25%;
  }

  .hero__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 600px;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-10) 112px var(--space-10) var(--space-10);
    background: var(--color-primary-active) url("../img/hero/pattern.svg") -1028.99px 0 / auto 100% no-repeat;
    clip-path: polygon(0 0, 100% 0, 511.33px 100%, 0 100%);
  }

  .hero__panel::before {
    content: none;
  }

  /* The image box is 512 px high in Figma and its top 56 px are cut off */
  .hero--category .hero__image {
    object-position: 50% 37%;
  }
}

/* --------------------------------------------------------------------------
   Sektionen
   -------------------------------------------------------------------------- */

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.section--subtle {
  background-color: var(--color-primary-subtle);
  background-image: url("../img/pattern.svg");
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: -426px 0;
}

.section--subtle-alt {
  background-position: -1169px 0;
}

/* Wochenangebote (Figma "Start (Neu)" Section 3891:12137 / mobile 3891:12166): plain green surface
   below the welcome line, 32 px top, 40 px bottom on wide screens; at most 1440 px wide and centred
   like the hero */
.section--offers {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  background: var(--color-primary-subtle);
}

@media (min-width: 1024px) {
  .section--offers {
    padding-bottom: var(--space-10);
  }
}

/* Willkommen */
/* Figma "Start (Neu)" 3891:14637 / mobile 3891:14659: the brand is the logo, not text. On a narrow phone
   the logo wraps below the words, both centred. */
.welcome {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: var(--space-2);
  color: var(--color-heading);
  font-size: 28px;
  line-height: 40px;
  font-weight: 700;
  text-align: center;
  margin: 0;
  padding: var(--space-4) 0;
}

.welcome__logo {
  width: 186px;
  height: auto;
}

/* Sektions-Raster: Titel / CTAs / Inhalt
   Mobile: untereinander, zentriert. Desktop: Titel links, CTAs rechts. */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "secondary"
    "content"
    "all";
  row-gap: var(--space-6);
  justify-items: center;
}

/* Text-only buttons (Figma "Button"): 16 px on both sides, full width on a phone */
.section-grid > .section-cta {
  justify-self: stretch;
  padding: var(--space-3) var(--space-4);
}

.section-grid > .product-grid {
  gap: var(--space-4);
}

/* Without a second button there is no row for it, also on a phone (an empty row would still add its gap). */
.section-grid--no-secondary {
  grid-template-areas:
    "title"
    "content"
    "all";
}

.section-grid > .section-title {
  grid-area: title;
}

.section-grid > .section-cta--secondary {
  grid-area: secondary;
}

.section-grid > .section-cta--all {
  grid-area: all;
}

.section-grid > .section-content {
  grid-area: content;
  width: 100%;
  justify-self: stretch;
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-heading);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  text-align: center;
}

.section-subtitle {
  color: var(--color-text-subtle);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .welcome {
    justify-content: flex-start;
    column-gap: 14px;
    font-size: 48px;
    line-height: 68px;
    text-align: left;
    padding: var(--space-6) 0;
  }

  .welcome__logo {
    width: 318px;
  }

  .section-grid {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "title secondary all"
      "content content content";
    column-gap: var(--space-2);
    align-items: center;
    justify-items: start;
  }

  .section-grid > .section-cta {
    justify-self: auto;
  }

  .section-grid--no-secondary {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title all"
      "content content";
  }

  .section-grid > .section-cta--all {
    justify-self: end;
  }

  .section-title {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-3);
    font-size: 40px;
    line-height: 56px;
    text-align: left;
  }

  .section--subtle {
    background-position: 238px 0;
  }
}

/* --------------------------------------------------------------------------
   Produktkarte
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

/* States of Figma "Product_Card": hovered and pressed darken card and image area, the border stays */
.product-card:hover {
  background: var(--color-surface-variant);
}

.product-card:hover .product-card__media {
  background: #e1e3e6;
}

.product-card:active {
  background: #e1e3e6;
}

.product-card:active .product-card__media {
  background: #d3d5d9;
}

/* Focused: the name link covers the card, so the ring goes around the whole card instead of the link */
.product-card:has(.product-card__name a:focus-visible) {
  outline: 2px solid var(--color-primary);
}

.product-card__name a:focus-visible {
  outline: none;
}

/* Stretched Link: der Produktname-Link deckt die ganze Karte ab,
   eigenständige Bedienelemente liegen per z-index darüber */
.product-card__name a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card__wishlist,
.product-card .rating__count a,
.product-card .availability__link {
  position: relative;
  z-index: 2;
}

/* Square on purpose, unlike the landscape area (280:200) of Figma "Product_Card": the variants are square */
.product-card__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-surface-variant);
  border-bottom: 1px solid var(--color-border-subtle);
  overflow: hidden;
}

/* absolut, damit die intrinsische Bildhöhe die aspect-ratio-Box nicht aufbläht */
.product-card__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__media .badge {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
}

/* The heart's 44 px hit area as in Figma "Product_Card": 4 px from the right, 8 px from the top */
.product-card__wishlist {
  position: absolute;
  right: var(--space-1);
  top: var(--space-2);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  padding: var(--space-1) 0;
  white-space: nowrap;
}

.product-card__price .price {
  color: var(--color-offer);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.product-card__price .unit {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.product-card__name {
  padding-bottom: var(--space-1);
  color: var(--color-heading);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

/* Two lines at most, like the description (the clamp sits on the link: the padding of the heading
   would otherwise show the start of a third line) */
.product-card__name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__desc {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .availability {
  margin-top: auto;
}

/* Unlike the price card on the product page, the card's review count is not underlined (Figma "Product_Card") */
.product-card .rating__count a {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Themenwelten (Bild + 2 Produktkarten)
   -------------------------------------------------------------------------- */

/* A theme world on the home page (Figma "Topic_Section"): 32 px top, 40 px bottom on every width, at most
   1440 px wide and centred; the topics alternate between white and the plain light green of the offers
   (no pattern). */
.section--topic {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-top: var(--space-8);
  padding-bottom: var(--space-10);
}

.section--topic-subtle {
  background: var(--color-primary-subtle);
}

/* Header: the title with the topic's text below it, centred on a phone, left from 1024 px with
   "Alle anzeigen" level with its last line (Figma "Section Header", items-end). */
.topic-header {
  grid-area: title;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

.topic-header__text {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

/* "Alle anzeigen": the outlined button across the width below the cards on a phone, a text button with
   the chevron right of the header from 1024 px (Figma "Button" outline / ghost) */
.topic-all {
  color: var(--color-primary);
}

@media (min-width: 1024px) {
  .section-grid--topic {
    align-items: end;
  }

  .topic-header {
    text-align: left;
  }

  .topic-header__text {
    font-size: 16px;
    line-height: 22px;
  }

  .topic-all {
    border-color: transparent;
    background: transparent;
  }

  .topic-all:hover {
    border-color: transparent;
    background: var(--color-primary-subtle-hover);
  }

  .topic-all:active {
    border-color: transparent;
    background: var(--color-primary-subtle-pressed);
  }
}

/* Image above, two cards below it; from 1024 px side by side in two equal halves (Figma
   ".Slot_Topic"). The cards are the shop's product cards (square image area), taller than the
   428 px of the design, so the image tile takes their height and the photo is cut to fit. */
.teaser {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* Figma "Topic_Element": the whole tile is the link; the band at its bottom is only its label. States
   as a layer over the photo (hovered 8 %, pressed 12 %), the focus ring around the tile. */
.teaser__image {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-variant);
}

.teaser__image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser__image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.teaser__image:hover::after {
  background: rgba(43, 46, 51, 0.08);
}

.teaser__image:active::after {
  background: rgba(43, 46, 51, 0.12);
}

.teaser__image:focus-visible {
  outline: 2px solid var(--color-primary);
}

.teaser__image .hero__ai-notice {
  z-index: 2;
}

/* The band (Figma "Foot" on "Pattern Background"): dark green with the lighter zigzag, centred like the
   design's export of it (topic-band.svg holds the shape wider than the widest tile). A longer button text
   wraps and the band grows with it, the pattern scales along. */
.teaser__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-primary-active) url("../img/topic-band.svg") center / auto 100% no-repeat;
  color: var(--color-white);
}

.teaser__title {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* The arrow box (Figma "Icon_Button" outlined): a white 40 px square with a green border inside a 44 px area */
.teaser__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 2px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-white);
}

.teaser__arrow img {
  width: 20px;
  height: 20px;
}

.teaser__image:hover .teaser__arrow {
  background: var(--color-primary-subtle);
}

.teaser__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .teaser {
    grid-template-columns: 1fr 1fr;
  }

  /* The tile stretches to the height of the cards next to it. */
  .teaser__image {
    aspect-ratio: auto;
    min-height: 428px;
  }

  .teaser__title {
    font-size: 24px;
    line-height: 32px;
  }
}

/* --------------------------------------------------------------------------
   Weitere Themenwelten (Ende einer Themenwelt-Seite)
   -------------------------------------------------------------------------- */

/* Figma "Weitere_Themenwelten" (5581:5296) below the products of a topic page: 40 px above it on a phone,
   48 from 1024 px (the page's own gap plus 24), the title 16 px above the tiles. */
.topic-more {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.topic-more__title {
  color: var(--color-heading);
  font-size: 22px;
  line-height: 32px;
  font-weight: 700;
}

/* Two to four topics as a grid (Figma Count=2-4): one below the other on a phone, from 640 px two side
   by side (Count=2, two by two for Count=4) or three in a row (Count=3); 16 px between the columns, 24
   between the rows. */
.topic-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6) var(--space-4);
}

/* Figma "Themenwelt_Teaser": the image in 11:6 (the format of the theme world photos; another one is cut
   to fit), radius 8, 12 px above the text. Hovered looks like enabled (the component's description still
   says "Bild 105 %", its renders show no change); compact, where the whole tile is the link, pressed
   darkens the title; focus rings the image. */
.topic-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--color-primary);
}

.topic-tile__image {
  position: relative;
  display: block;
  aspect-ratio: 11 / 6;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface-variant);
}

.topic-tile__image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Figma "KI_Hinweis" at the tiles' size: 160 × 48 instead of the hero's 240 × 72. */
.topic-tile__image .hero__ai-notice {
  width: 160px;
  height: 48px;
  background: radial-gradient(160px 48px at 100% 100%, rgb(0 0 0 / 50%) 0%, rgb(0 0 0 / 18%) 60%, rgb(0 0 0 / 0%) 100%);
}

.topic-tile:focus-visible {
  outline: none;
}

.topic-tile:focus-visible .topic-tile__image {
  outline: 2px solid var(--color-primary);
}

/* The title with the chevron after its last word (14/20, 16/22 from 1024 px); a long title wraps
   instead of being cut off like in the design. The chevron hangs on a non-breaking space as the
   background of its right padding, so it always wraps together with the last word: an inline-block
   after a non-breaking space would not, browsers may break before any atomic inline (CSS Text 3). */
.topic-tile__label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.topic-tile__label::after {
  content: "\00a0";
  padding-right: 20px;
  background: url("../icons/chevron-right-green-small.svg") right center / 20px 20px no-repeat;
}

.topic-tile:active .topic-tile__label {
  color: var(--color-primary-active);
}

.topic-tile:active .topic-tile__label::after {
  background-image: url("../icons/chevron-right-green-pressed-small.svg");
}

/* Detailed (two topics): title, text and the outlined button below the image, 4 px apart. */
.topic-tile__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.topic-tile__title {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.topic-tile__text {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.topic-tile__button {
  max-width: 100%;
  margin-top: var(--space-1);
  padding: var(--space-3) var(--space-4);
  white-space: normal;
}

/* Five and more topics (Figma Count=5+): one row that scrolls sideways, two and a half tiles in the
   content width (the next one cut off as a hint), on a phone one and a quarter. Below 1024 px the row
   runs to the screen edges and starts at the page margin; from 1024 px it stays inside it and the arrows
   of slider.js move it by one tile. The dots 12 px below follow the scroll position. 2 px above and
   below leave room for the focus ring, which the scrolling box would cut off. */
.topic-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  container-type: inline-size;
}

.topic-slider__list {
  display: flex;
  gap: var(--space-4);
  margin: 0 calc(-1 * var(--page-padding));
  padding: 2px var(--page-padding);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--page-padding);
  scrollbar-width: none;
}

.topic-slider__list::-webkit-scrollbar {
  display: none;
}

.topic-slider__list > li {
  flex: 0 0 calc((100% - var(--space-4)) / 1.25);
  scroll-snap-align: start;
}

.topic-slider__arrow {
  display: none;
}

/* Figma "Slider_Dots": 8 px dots 8 px apart, the active one green; filled by slider.js. */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
}

.slider-dots[hidden] {
  display: none;
}

.slider-dots > span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border-field);
}

.slider-dots > .is-active {
  background: var(--color-primary);
}

@media (min-width: 640px) {
  .topic-tiles--2,
  .topic-tiles--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .topic-slider__list > li {
    flex-basis: calc((100% - 2 * var(--space-4)) / 2.5);
  }
}

@media (min-width: 1024px) {
  .topic-more__title {
    font-size: 32px;
    line-height: 44px;
  }

  .topic-tile__label {
    font-size: 16px;
    line-height: 22px;
  }

  .topic-tile__title {
    font-size: 24px;
    line-height: 32px;
  }

  .topic-slider__list {
    margin: 0 -2px;
    padding: 2px;
    scroll-padding-inline: 2px;
  }

  /* Centred on the images (half a tile's width × 6 / 11 below the 2 px of padding), 24 px from the
     row's edge to the 44 px hit area of the design, i.e. 26 px to the 40 px button. */
  .topic-slider__arrow:not([hidden]) {
    display: inline-flex;
    position: absolute;
    top: calc(2px + (100cqw - 2 * var(--space-4)) / 2.5 * 3 / 11);
    z-index: 1;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .topic-slider__arrow--prev {
    left: 26px;
  }

  .topic-slider__arrow--next {
    right: 26px;
  }
}

/* --------------------------------------------------------------------------
   Sortimente
   -------------------------------------------------------------------------- */

/* "Unsere Sortimente" on the home page (Figma "Sortiment_Section"): 32 px top, 40 px bottom from 1024 px
   (32 on a phone), at most 1440 px wide and centred like the topics; always white with light green
   cards (the component's Background=white), never the light green surface. */
.section--sortiment {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.section--sortiment .section-title {
  margin-bottom: var(--space-6);
}

/* Still used by the commented-out "Unsere Services" block of the home page. */
.section-heading {
  color: var(--color-heading);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-6);
}

/* Figma "Sortiment_Slider": the cards in one row that scrolls sideways (no scrollbar, like the product
   carousel); 8 px above and 16 px below leave room for the focus ring and the enlarged image. On a phone
   the row runs to the screen edges (Content Width=full_bleed) and starts and stops 12 px inside them. */
.sortiment-slider {
  position: relative;
}

.sortiment-slider__list {
  display: flex;
  gap: var(--space-3);
  margin: 0 calc(-1 * var(--page-padding));
  padding: var(--space-2) var(--page-padding) var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--page-padding);
  scrollbar-width: none;
}

.sortiment-slider__list::-webkit-scrollbar {
  display: none;
}

.sortiment-slider__list > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Figma "Sortiment_Card": Size small (112 × 124, image 72) on a phone, default (140 × 140, image 88)
   from 640 px. The image sits at the top edge (the photos are cut out), the name fills the rest and
   wraps to two lines at most. Hovered and pressed enlarge the image by 6 % from its top edge. */
.sortiment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 112px;
  height: 124px;
  padding: 0 var(--space-2) var(--space-2);
  border-radius: var(--radius);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-align: center;
}

.sortiment-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
}

.sortiment-card__image {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  transform-origin: top center;
  transition: transform 150ms ease;
}

/* Cover like the menu's thumbnail: the icons are square cut-outs, an uploaded photo fills the box. */
.sortiment-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sortiment-card:hover .sortiment-card__image,
.sortiment-card:active .sortiment-card__image {
  transform: scale(1.06);
}

.sortiment-card__label {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  overflow-wrap: break-word;
}

/* The arrows (Figma "Icon_Button" outlined) only exist from 1024 px; sortiment-slider.js shows them
   while there is something to scroll to on their side. */
.sortiment-slider__arrow {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sortiment-card__image {
    transition: none;
  }
}

@media (min-width: 640px) {
  .sortiment-card {
    width: 140px;
    height: 140px;
  }

  .sortiment-card__image {
    width: 88px;
    height: 88px;
  }
}

@media (min-width: 1024px) {
  .section--sortiment {
    padding-bottom: var(--space-10);
  }

  .section-heading {
    font-size: 32px;
    line-height: 40px;
    text-align: left;
  }

  /* Inside the page margin (Content Width=contained); 4 px on either side keep the first and last
     card's focus ring from being cut off by the scrolling box. */
  .sortiment-slider__list {
    margin: 0 calc(-1 * var(--space-1));
    padding-inline: var(--space-1);
    scroll-padding-inline: var(--space-1);
  }

  /* Centred on the row, 16 px from its edge to the 44 px hit area of the design, i.e. 18 px to the
     40 px button. */
  .sortiment-slider__arrow:not([hidden]) {
    display: inline-flex;
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .sortiment-slider__arrow--prev {
    left: 18px;
  }

  .sortiment-slider__arrow--next {
    right: 18px;
  }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services-section {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  padding: 0 var(--space-4);
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
}

.service-item__circle {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-primary-subtle);
  border-radius: var(--radius-full);
}

.service-item:hover .service-item__circle {
  background: var(--color-primary-subtle-hover);
}

/* Icon absolut mit 21 % Innenabstand (Figma: 32px in 151px-Kreis) */
.service-item__circle img {
  position: absolute;
  inset: 21%;
  width: 58%;
  height: 58%;
  object-fit: contain;
}

/* Figma: Label fest 150px breit, darf über eine schmalere Spalte hinausragen */
.service-item__label {
  display: block;
  width: 150px;
  max-width: calc(100% + 24px);
}

@media (min-width: 1024px) {
  .services-section {
    margin-top: var(--space-10);
    padding-top: 0;
  }

  .services-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    padding: 0;
  }
}

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

/* A small gap separates it from coloured content blocks above */
.site-footer {
  margin-top: var(--space-6);
  background: var(--color-surface-variant);
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--color-heading);
}

/* Fixed width as in the design (Figma "Footer": 180 px on desktop and mobile), independent of the font size. */
.footer-brand .logo {
  display: flex;
  align-items: center;
}

.footer-brand .logo img {
  width: 180px;
  height: auto;
}

.footer-brand__claim {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col__title {
  color: var(--color-heading);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
}

.footer-links a,
.footer-legal a {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.social-icons a {
  display: block;
  width: 40px;
  height: 40px;
}

.social-icons a > img {
  width: 100%;
  height: 100%;
}

.app-badges {
  display: flex;
  gap: var(--space-2);
}

.app-badges img {
  height: 40px;
  width: auto;
}

/* Figma box 134×40 with cover crop (side by side on a phone, stacked from 1024 px) */
.app-badges .app-badge--google {
  width: 134px;
  object-fit: cover;
}

.footer-divider {
  height: 1px;
  background: var(--color-border);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 1024px) {
  .site-footer {
    padding-top: var(--space-10);
  }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-nav {
    flex-direction: row;
    gap: var(--space-10);
  }

  .app-badges {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-legal {
    flex-direction: row;
  }
}

/* --------------------------------------------------------------------------
   Produktdetailseite
   -------------------------------------------------------------------------- */

.pdp {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-4) 0 var(--space-6);
}

/* Inhaltsspalte: 1200px zentriert (Desktop, 120px Rand bei 1440; Figma "Produktdetail" 2049:6593),
   volle Breite mit Seitenrand (Mobile) */
.pdp__inner {
  width: 100%;
  max-width: calc(1200px + 2 * var(--page-padding));
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.pdp-heading {
  color: var(--color-heading);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.pdp-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pdp-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Breadcrumb – auf Mobile rechtsbündig, damit bei Überlänge die aktuelle Seite sichtbar bleibt */
/* Produkt: Medien + Preiskarte */
.pdp-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pdp-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Square inside the page margin on every width, as in Figma */
.pdp-media__main {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: var(--color-surface-variant);
  cursor: zoom-in;
}

.pdp-media__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.pdp-thumb {
  position: relative;
  display: block;
  flex: none;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--color-surface-variant);
  cursor: pointer;
}

/* Quadratisch gefuellt wie in Figma, auch wenn das Foto quer- oder hochkant ist */
.pdp-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-thumb[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--color-primary);
}

/* Lightbox: das Bild in der Zoomgroesse auf abgedunkeltem Hintergrund */
.pdp-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  /* Oben und unten Platz fuer Schliessen und Zaehler, seitlich fuer die Pfeile */
  padding: 72px var(--space-4);
  border: 0;
  background: transparent;
}

@media (min-width: 1024px) {
  .pdp-lightbox {
    padding: 72px 88px;
  }
}

.pdp-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-lightbox::backdrop {
  background: rgb(0 0 0 / 0.85);
}

.pdp-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: var(--color-white);
}

.pdp-lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-white);
  cursor: pointer;
}

.pdp-lightbox__btn:hover {
  background: var(--color-primary-subtle);
}

.pdp-lightbox__btn img {
  width: 20px;
  height: 20px;
}

.pdp-lightbox__close {
  top: var(--space-4);
  right: var(--space-4);
}

.pdp-lightbox__prev,
.pdp-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.pdp-lightbox__prev {
  left: var(--space-4);
}

.pdp-lightbox__prev img {
  transform: scaleX(-1);
}

.pdp-lightbox__next {
  right: var(--space-4);
}

.pdp-lightbox__counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 14px;
  line-height: 20px;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
}

/* Figma headline/h3 on every width */
.price-card__title {
  padding-right: 48px; /* Platz für die Icon-Buttons oben rechts */
  color: var(--color-heading);
  font-size: 32px;
  line-height: 44px;
  font-weight: 700;
}

/* The wishlist heart (44 px) above the share button (40 px), centred on one axis */
.price-card__actions {
  position: absolute;
  top: 11px;
  right: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

/* "Link kopiert" left of the share button (share.js); empty, it stays in the accessibility tree
   but takes no room, so the status is announced when the text arrives. */
.share-status {
  position: absolute;
  top: 8px;
  right: calc(100% + var(--space-1));
  white-space: nowrap;
  pointer-events: none;
}

.share-status:not(:empty) {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  background: var(--color-text);
  color: var(--color-white);
  font-size: 14px;
  line-height: 16px;
}

.price-card__uvp {
  color: var(--color-text-subtle);
  text-decoration: line-through;
}

.price-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

/* Figma headline/h2 in the offer red on every width */
.price-card__price {
  color: var(--color-offer);
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
}

.price-card__tax {
  color: var(--color-text-subtle);
}

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

.price-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
}

.price-card .availability {
  padding: 0;
}

.points {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  color: var(--color-heading);
  font-size: 12px;
  line-height: 16px;
}

.points img {
  width: 20px;
  height: 20px;
}

.points strong {
  font-weight: 600;
  letter-spacing: 0.15px;
}

/* Mengen-Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 44px;
  padding: 0 1px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
}

.stepper__value {
  min-width: 10px;
  text-align: center;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

/* Button-Varianten */
.btn--primary {
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

.btn--block {
  width: 100%;
}

/* Figma "Icon_Button" outlined: grey fill on hover and press, the border darkens with it */
.icon-btn--outlined {
  background: var(--color-white);
  border: 1px solid var(--color-primary);
}

.icon-btn--outlined:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-surface-hover);
}

.icon-btn--outlined:active {
  border-color: var(--color-primary-active);
  background: var(--color-surface-pressed);
}

/* Infos zum Produkt */
.pdp-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pdp-info__list li::before {
  content: "•\00a0\00a0";
}

/* Figma sets every bullet, paragraph and fact apart by the paragraph spacing of body/medium (20 px);
   only the description and the grey facts are 8 px apart (the gap of .pdp-info). */
.pdp-info__list li + li,
.pdp-info__text p + p,
.pdp-info__facts p + p {
  margin-top: 20px;
}

/* 8 px gap + 12 px = the 20 px between the bullets and the description */
.pdp-info__list + .pdp-info__text {
  margin-top: 12px;
}

.pdp-info__facts {
  color: var(--color-text-subtle);
}

/* The description from the backend's editor (RichText): paragraphs, line breaks, bold, italic,
   underline and links. */

.pdp-info__text a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Produkt-Karussell (Ähnliche Produkte) */
.carousel {
  display: flex;
  gap: var(--space-3);
  margin-right: calc(-1 * var(--page-padding));
  padding-right: var(--page-padding);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel > .product-card {
  flex: 0 0 332px;
  scroll-snap-align: start;
}

/* Kundenbewertungen */
.reviews {
  gap: var(--space-4);
}

.reviews-overview {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.rating-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-subtle);
}

.rating-bar__label {
  width: 10px;
}

.rating-bar__count {
  width: 24px;
  text-align: right;
}

.rating-bar__track {
  display: block;
  flex: 1;
  height: 8px;
  background: var(--color-surface-variant);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rating-bar__fill {
  display: block;
  height: 100%;
  background: var(--color-gold);
  border-radius: var(--radius-full);
}

.rating-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.rating-summary__score {
  color: var(--color-heading);
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
}

.rating-summary__hint {
  color: var(--color-text-subtle);
}

.rate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-primary-subtle);
  border-radius: var(--radius);
}

.rate-box__title {
  color: var(--color-heading);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  text-align: center;
}

.rate-box__stars {
  display: flex;
}

/* Figma "Filter Row": search and order stacked on a phone, side by side from 1024 px */
.review-filter {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.review-filter .search-field {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-color: var(--color-border-field);
}

.review-filter .search-field input {
  flex: 1;
  min-width: 0;
}

.review-filter__order {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.review-filter__label {
  padding: 0 var(--space-1);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.review-list__divider {
  height: 1px;
  background: var(--color-border-subtle);
}

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

.review__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-subtle);
}

.review__title {
  color: var(--color-heading);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.review__recommend {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.review__recommend img {
  width: 16px;
  height: 16px;
}

.review__helpful {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--color-text-subtle);
}

.review__helpful a {
  padding: 2px;
  color: var(--color-primary);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
  text-decoration: underline;
}

/* The vote and report buttons of signed-in customers look like the guests' links */
.review__helpful form {
  display: contents;
}

.review__action {
  padding: 2px;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
  text-decoration: underline;
  cursor: pointer;
}

/* The customer's own vote */
.review__action[aria-pressed="true"] {
  border-radius: 4px;
  background: var(--color-primary-subtle);
  text-decoration: none;
}

.review__report > summary {
  list-style: none;
}

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

.review__report-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

.review__report-form textarea {
  width: min(100%, 480px);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-field);
  border-radius: var(--radius);
  font: inherit;
  resize: vertical;
}

.review__reported {
  font-size: 12px;
  line-height: 16px;
}

/* Paragraphs and line breaks of the customer's text stay */
.review__text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-filter__sort {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border-field);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  font: inherit;
}

.reviews__empty {
  flex: 1 1 460px;
  color: var(--color-text-subtle);
}

.reviews__disclosure {
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
}

/* --------------------------------------------------------------------------
   Review form (/produkt/{slug}/bewerten, Figma "Produkt bewerten" desktop 4801:17968, mobile
   4801:17980): a 640 px column under the breadcrumb, built from the auth-* form parts at the
   sizes of the design (inputs body/large 16/24, radios with 16/24 labels). Colours of the new
   design system come from the --auth-* variables (see "Anmeldeseiten").
   -------------------------------------------------------------------------- */
.review-page__inner {
  max-width: calc(640px + 2 * var(--page-padding));
  margin: 0 auto;
  padding: var(--space-4) var(--page-padding) 80px;
}

.review-page__title {
  margin: var(--space-4) 0 var(--space-6);
  color: var(--color-heading);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-form .auth-input input,
.review-form .auth-input textarea {
  font-size: 16px;
  line-height: 24px;
}

/* The text area is 166 px high like the design; it can be pulled taller. */
.review-field__area textarea {
  min-height: 142px;
}

.review-form .auth-input--disabled {
  border-color: #d3d5d9;
}

.review-form__product {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.review-form__product img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: contain;
}

.review-form__product a {
  overflow: hidden;
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "Öffentlich sichtbar" / "Nicht öffentlich sichtbar" */
.review-form__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 14px;
  line-height: 20px;
}

.review-form__section h2 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.review-form__section--private {
  padding-top: 20px;
}

/* Radio and star groups (Figma "Radio_Group", "Rating_Group"): label, options, an error line,
   8 px apart. The floated legend becomes a plain flex item, so the gap applies to it too. */
.review-group {
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.review-group > legend {
  float: left;
}

.review-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-8);
}

.review-form .auth-radio {
  font-size: 16px;
  line-height: 24px;
}

.review-form .auth-radio input {
  border: 2px solid var(--color-border-field);
}

.review-form .auth-radio input:checked {
  border: 6px solid var(--color-primary);
}

/* A required radio group shows its error at the label and below (Figma "Radio_Button" has no error
   state), so Blazor's red outline from app.css does not apply here. */
.review-form .auth-radio input.invalid:not(:focus-visible) {
  outline: none;
}

.review-form .auth-radio input:disabled {
  border-color: #d3d5d9;
  opacity: 0.4;
  cursor: default;
}

.review-form .review-group:disabled .auth-radio {
  cursor: default;
}

/* Star picker (Figma "Star_Rating" 4553:857): 36 px targets with 24 px stars, 4 px apart. A star
   is filled while it or a later one is checked. Hover and press draw a light gold pill from the
   first star to the pointer, without filling stars; the labels after the first are 40 px wide
   (gap included), so the pill has no holes. Focus rings the whole row. */
.review-stars {
  display: flex;
  align-self: flex-start;
  border-radius: 10px;
}

.review-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.review-stars label {
  width: 40px;
  height: 36px;
  background: url("../icons/star-empty.svg") no-repeat right 6px center / 24px 24px;
  cursor: pointer;
}

.review-stars label:first-of-type {
  width: 36px;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.review-stars input:checked + label,
.review-stars label:has(~ input:checked) {
  background-image: url("../icons/star-filled.svg");
}

.review-stars label:hover,
.review-stars label:has(~ label:hover) {
  background-color: rgb(212 175 55 / 12%);
}

.review-stars label:active,
.review-stars label:has(~ label:active) {
  background-color: rgb(212 175 55 / 24%);
}

.review-stars label:hover {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.review-stars:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
}

.review-stars__selected {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

/* Below a field: error or hint on the left, the character counter on the right */
.review-field__support {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.review-field__count {
  flex: none;
  margin-left: auto;
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}

.review-field__hint {
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
}

/* A field filled in the account: read-only here, "Ändern" leads to the account */
.review-field__from-account {
  color: var(--auth-disabled-text);
  font-size: 12px;
  line-height: 16px;
}

.review-field__from-account--group {
  color: var(--color-text-subtle);
}

.review-field__from-account a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Primary last in the markup: on a phone both full width with "Senden" on top, from 1024 px
   side by side on the right. Slot padding and gap of the design: 48 px above. */
.review-form__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-3);
  margin-top: 28px;
}

.review-form__actions [hidden] {
  display: none;
}

/* Banner (Figma "Alert_Banner"): info, warning, error */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
}

.alert-banner[hidden] {
  display: none;
}

.alert-banner__icon {
  flex: none;
}

.alert-banner__text {
  flex: 1;
  min-width: 0;
}

.alert-banner--info {
  border-color: #3b5bdb;
  background: #ebeffb;
  color: #182458;
}

.alert-banner--warning {
  border-color: var(--color-warning);
  background: var(--color-warning-subtle);
  color: #662b00;
}

.alert-banner--error {
  border-color: #d51920;
  background: #f7d1d2;
  color: #a61319;
}

/* Review dialogs on the product page (AccountDialog with class review-dialog, Figma "Anmelden
   erforderlich", "Bewertung gesendet", "Zu viele Bewertungen"): green title; on a phone the
   buttons span the dialog, the primary one on top. */
.review-dialog .account-dialog__title {
  color: var(--color-heading);
  line-height: 22px;
}

.review-dialog .account-dialog__footer {
  flex-direction: column-reverse;
  gap: var(--space-3);
}

@media (min-width: 1024px) {
  .review-page__title {
    font-size: 32px;
    line-height: 44px;
  }

  .review-form__actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: var(--space-2);
  }

  .review-dialog .account-dialog__footer {
    flex-direction: row;
    gap: var(--space-2);
  }
}

.auth-input textarea {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
  resize: vertical;
}

@media (min-width: 1024px) {
  .pdp {
    gap: var(--space-10);
    padding: var(--space-4) 0 var(--space-10);
  }

  .pdp-heading {
    font-size: 24px;
    line-height: 32px;
  }

  .pdp-section {
    gap: var(--space-6);
  }

  .pdp-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
    align-items: start;
  }

  .price-card__buy {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
  }

  .price-card__buy .btn {
    flex: 1;
  }

  .price-card__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .carousel {
    gap: var(--space-4);
    margin-right: 0;
    padding-right: 0;
  }

  .reviews {
    gap: var(--space-6);
  }

  .reviews-overview {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-10);
  }

  /* 460 / 240 / Rest bei 1160px; Balken und Bewerten-Box schrumpfen bei weniger Platz */
  .rating-bars {
    flex: 1 1 460px;
    max-width: 460px;
    min-width: 0;
  }

  .rating-summary {
    width: 240px;
    flex-shrink: 0;
  }

  .rating-summary__score {
    font-size: 48px;
    line-height: 68px;
  }

  .rate-box {
    flex: 1 1 280px;
    min-width: 0;
  }

  .review-filter {
    flex-direction: row;
    align-items: flex-end;
    gap: var(--space-3);
  }

  .review-filter__order {
    width: 240px;
    flex-shrink: 0;
  }

  .review-list {
    gap: var(--space-6);
  }
}

/* --------------------------------------------------------------------------
   App-Seite
   -------------------------------------------------------------------------- */

.app-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding: var(--space-4) 0 var(--space-8);
}

/* Inhaltsspalte: 1200px zentriert (Desktop, 120px Rand bei 1440) */
.app-page__inner {
  width: 100%;
  max-width: calc(1200px + 2 * var(--page-padding));
  margin: 0 auto;
  padding: 0 var(--page-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.app-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.app-title {
  color: var(--color-heading);
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
}

.app-hero {
  position: relative;
  aspect-ratio: 366 / 244;
  overflow: hidden;
}

.app-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 50%;
}

/* Fließtext body/large, Absätze durch 24px getrennt */
.app-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  font-size: 16px;
  line-height: 24px;
}

/* Listen in Fließtexten (Rechtstexte): der Reset entfernt die Aufzählungszeichen */
.app-text ul {
  list-style: disc;
  padding-left: var(--space-6);
}

.app-text h2,
.app-text h3 {
  font-weight: 700;
}

/* Galerie: Screenshot-Kacheln */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gallery__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* Telefon-Screenshot ragt unten aus der 300:200-Kachel heraus (Figma-Geometrie) */
.gallery__media {
  position: relative;
  aspect-ratio: 300 / 200;
  background: var(--color-surface-variant);
  overflow: hidden;
}

.gallery__media img {
  position: absolute;
  left: 29.84%;
  top: 8.56%;
  width: 37.61%;
  height: 120.31%;
  object-fit: contain;
  object-position: top;
}

/* Download-CTA */
.app-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.app-cta .app-badges img {
  height: 48px;
}

.app-cta .app-badges {
  gap: var(--space-4);
}

.app-cta .app-badges .app-badge--google {
  width: 161px;
}

/* App-Vorteile: Service-Raster mit 8px Innenabstand statt 16px */
.app-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
}

.services-grid--app {
  padding: 0 var(--space-2);
}

@media (min-width: 1024px) {
  .app-page {
    padding-bottom: var(--space-10);
  }

  .app-page__inner {
    padding: 0 var(--page-padding);
  }

  .app-intro {
    gap: var(--space-6);
  }

  .app-title {
    font-size: 40px;
    line-height: 56px;
  }

  .app-hero {
    aspect-ratio: 1200 / 500;
  }

  .app-hero img {
    object-position: 50% 50%;
  }

  .gallery {
    flex-direction: row;
  }

  .gallery__item {
    flex: 1 1 0;
    min-width: 0;
  }

  .app-cta,
  .app-features {
    gap: var(--space-6);
  }

  .app-cta .app-badges {
    flex-direction: row;
  }

  .app-features {
    padding-bottom: 0;
  }

  .services-grid--app {
    padding: 0;
  }
}

/* --------------------------------------------------------------------------
   WhatsApp-Channel (/whatsapp, Figma "WhatsApp-Channel (Landingpage)" 5659:33):
   green hero with the photo beside the text from 1024 px, four step cards,
   closing call to action; hero and call to action span the width on a phone
   -------------------------------------------------------------------------- */

.whatsapp-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-4) 0 48px;
}

.whatsapp-page > .crumbs,
.whatsapp-steps {
  padding: 0 var(--space-4);
}

.whatsapp-hero {
  display: flex;
  gap: 48px;
  padding: var(--space-6) 20px;
  background: var(--color-primary-subtle);
}

.whatsapp-hero__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.whatsapp-hero__title {
  color: var(--color-heading);
  font-size: 28px;
  line-height: 40px;
  font-weight: 700;
}

.whatsapp-lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 16px;
  line-height: 24px;
}

.whatsapp-lead__question {
  font-weight: 600;
}

.whatsapp-benefits {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 24px;
}

.whatsapp-benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.whatsapp-benefits img {
  flex: none;
  width: 24px;
  height: 24px;
}

/* Phone: the buttons span the width; from 1024 px they take their text's width. */
.whatsapp-button {
  align-self: stretch;
}

.whatsapp-note {
  color: var(--color-text-on-subtle);
  font-size: 14px;
  line-height: 20px;
}

.whatsapp-note a {
  color: inherit;
  text-decoration: underline;
}

/* The QR code card (desktop only): 53 modules incl. the quiet zone at 120 px, about 2.3 px each */
.whatsapp-qr {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-white);
  font-size: 16px;
  line-height: 24px;
}

.whatsapp-qr img {
  flex: none;
  width: 120px;
  height: 120px;
}

.whatsapp-qr figcaption {
  width: 216px;
}

/* The photo takes the text column's height and is cut to it. */
.whatsapp-hero__media {
  flex: 0 0 min(463px, 40%);
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--radius);
}

.whatsapp-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.whatsapp-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.whatsapp-steps__title {
  color: var(--color-heading);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

.whatsapp-steps__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.whatsapp-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* A square on a phone, 504 px high from 640 px (Figma "Step_Card"); the photo is cut to the box. */
.whatsapp-step__image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.whatsapp-step__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 16px;
  line-height: 24px;
}

.whatsapp-step__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.whatsapp-step__number {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--color-primary-subtle);
  color: var(--color-primary-active);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.whatsapp-step__title {
  color: var(--color-heading);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.whatsapp-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-6) 20px;
  background: var(--color-primary-subtle);
}

.whatsapp-cta__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 16px;
  line-height: 24px;
}

.whatsapp-cta__title {
  color: var(--color-primary-active);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

@media (min-width: 640px) {
  .whatsapp-steps__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .whatsapp-step__image {
    height: 504px;
    aspect-ratio: auto;
  }
}

@media (min-width: 1024px) {
  .whatsapp-page {
    gap: 48px;
    padding: var(--space-8);
  }

  .whatsapp-page > .crumbs,
  .whatsapp-steps {
    padding: 0;
  }

  .whatsapp-hero {
    align-items: center;
    padding: 48px;
    border-radius: var(--radius);
  }

  .whatsapp-hero__title {
    font-size: 48px;
    line-height: 68px;
  }

  .whatsapp-button {
    align-self: flex-start;
  }

  .whatsapp-steps__title {
    font-size: 40px;
    line-height: 56px;
  }

  .whatsapp-cta {
    flex-direction: row;
    align-items: center;
    padding: var(--space-8) 48px;
    border-radius: var(--radius);
  }

  .whatsapp-cta__text {
    flex: 1;
    min-width: 0;
  }

  .whatsapp-cta .whatsapp-button {
    align-self: center;
  }
}

@media (min-width: 1280px) {
  .whatsapp-steps__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Prospektseiten (/prospekt, /prospekt/wochenprospekt, /prospekt/{slug})
   -------------------------------------------------------------------------- */

.leaflet {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.leaflet__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.leaflet__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.leaflet__validity {
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

/* Phone: the two buttons share the row. */
.leaflet__actions {
  display: flex;
  gap: var(--space-2);
}

.leaflet__actions .btn {
  flex: 1;
}

/* Fallback for leaflets without page images: the browser shows the PDF itself. Fixed height instead
   of an aspect ratio, the leaflet is very tall (170 x 300 mm). */
.leaflet__viewer {
  height: clamp(420px, 78vh, 900px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-variant);
}

.leaflet__viewer object {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Rueckfallebene, wenn der Browser kein PDF einbetten kann - vor allem auf Mobilgeraeten. */
.leaflet__fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-6);
  text-align: center;
}

.leaflet__empty {
  color: var(--color-text-subtle);
}

.leaflet__empty a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Leaflet overview (/prospekt, only while special leaflets are up): one card per leaflet with the
   name over the first page and the validity below it; the whole card is the link. Two per row on every width,
   each at most 400 px wide (at half the desktop page a cover would be about 1000 px tall) and
   centred on the page; the states like the product card. */
.leaflet-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
  justify-content: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .leaflet-cards {
    gap: var(--space-4);
  }
}

.leaflet-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  height: 100%;
  padding: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
}

.leaflet-card__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2) 0;
  aspect-ratio: 170 / 300;
  background: var(--color-surface-variant);
  overflow: hidden;
}

.leaflet-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leaflet-card__cover .leaflet-card__placeholder {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.leaflet-card__name {
  color: var(--color-heading);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.leaflet-card__validity {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.leaflet-card:hover {
  background: var(--color-surface-variant);
}

.leaflet-card:hover .leaflet-card__cover {
  background: #e1e3e6;
}

.leaflet-card:active {
  background: #e1e3e6;
}

.leaflet-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Page viewer. Without script (and on a phone) the pages sit one below the other; leaflet-viewer.js
   adds .leaflet-viewer--js, which turns on the navigator (phone) or the double-page stage (wide). */
.leaflet-viewer {
  --leaflet-page-ratio: 0.5667; /* 170 x 300 mm */
  --leaflet-turn-time: 800ms;
  --leaflet-turn-ease: cubic-bezier(0.45, 0, 0.55, 1);
  display: flex;
  flex-direction: column;
}

.leaflet-index,
.leaflet-arrow,
.leaflet-navigator {
  display: none;
}

/* Lists of pages and thumbnails are ordered lists for the structure only. */
.leaflet-pages,
.leaflet-index__list,
.leaflet-navigator__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaflet-stage {
  padding: var(--space-4);
  background: var(--color-surface-variant);
  border-radius: var(--radius);
}

.leaflet-pages {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.leaflet-page {
  position: relative;
  width: 100%;
  aspect-ratio: var(--leaflet-page-ratio);
  background: var(--color-white);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
  scroll-margin-top: var(--space-4);
}

.leaflet-page > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Loading and error state of a page (only with script, which reports both). */
.leaflet-page__status {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  text-align: center;
  font-size: 16px;
  line-height: 24px;
}

.leaflet-page__status img {
  width: 24px;
  height: 24px;
}

.leaflet-viewer--js .leaflet-page:not(.is-loaded):not(.is-error) > .leaflet-page__status:not(.leaflet-page__status--error) {
  display: flex;
}

.leaflet-viewer--js .leaflet-page:not(.is-loaded):not(.is-error) > .leaflet-page__status img {
  animation: leaflet-spin 1s linear infinite;
}

.leaflet-page.is-error > .leaflet-page__status--error {
  display: flex;
  background: var(--color-white);
}

.leaflet-page.is-error > img {
  visibility: hidden;
}

.leaflet-page__status--error strong {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.leaflet-page__status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface-variant);
}

.leaflet-page__retry {
  padding: var(--space-3) var(--space-4);
  background: none;
  border: 0;
  border-radius: var(--radius);
  color: var(--color-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
}

.leaflet-page__retry:hover {
  background: var(--color-primary-subtle-hover);
}

.leaflet-page__retry:active {
  background: var(--color-primary-subtle-pressed);
}

@keyframes leaflet-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-viewer--js .leaflet-page:not(.is-loaded):not(.is-error) > .leaflet-page__status img {
    animation: none;
  }
}

/* With script a pinch over a page opens it enlarged (leaflet-viewer.js), so the browser must not
   zoom the whole page for it; scrolling stays. */
.leaflet-viewer--js .leaflet-page {
  touch-action: pan-x pan-y;
}

/* The enlarged page: fills the stage (wide) or the screen (phone), the page inside is moved by
   dragging; a click closes it. */
.leaflet-zoom {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--color-surface-variant);
  cursor: zoom-out;
  outline: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  animation: leaflet-zoom-in 160ms ease-out;
}

.leaflet-zoom--screen {
  position: fixed;
  z-index: 100;
}

.leaflet-zoom.is-dragging {
  cursor: grabbing;
}

/* The visible part of the enlarged pages; the layer's grey shows around it like the stage's own
   frame, wide enough at the sides for the arrows. */
.leaflet-zoom__viewport {
  position: absolute;
  inset: var(--space-6) 72px;
  overflow: hidden;
}

.leaflet-zoom--screen .leaflet-zoom__viewport {
  inset: var(--space-4);
}

.leaflet-zoom__sheet {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  transform-origin: 0 0;
  will-change: transform;
}

/* A double page: both pages share the sheet's width. */
.leaflet-zoom__sheet > img {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: auto;
  -webkit-user-drag: none;
}

@keyframes leaflet-zoom-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-zoom {
    animation: none;
  }
}

/* Thumbnails of the page index (wide) and the navigator's film strip (phone). Never shrink: with a
   classic scrollbar the index is narrower than a double thumbnail, and Safari would squeeze the card
   until the pages cover its padding. */
.leaflet-thumb {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 84px;
  color: var(--color-text);
  text-decoration: none;
}

.leaflet-thumb--double {
  width: 154px;
}

.leaflet-thumb__card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 136px;
  padding: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}

.leaflet-thumb__card img {
  flex: none;
  width: 68px;
  max-width: none;
  height: 120px;
  object-fit: cover;
  background: var(--color-surface-variant);
  opacity: 0.5;
}

.leaflet-thumb__caption {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
  text-align: center;
}

.leaflet-thumb:hover .leaflet-thumb__card {
  background: var(--color-surface-variant);
  border-color: #979ca6;
}

.leaflet-thumb:active .leaflet-thumb__card {
  background: #e1e3e6;
  border-color: #898e99;
}

.leaflet-thumb:focus-visible {
  outline: none;
}

.leaflet-thumb:focus-visible .leaflet-thumb__card {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.leaflet-thumb[aria-current="true"] .leaflet-thumb__card {
  padding: 7px;
  background: var(--color-primary-subtle);
  border: 2px solid var(--color-primary);
}

.leaflet-thumb[aria-current="true"] .leaflet-thumb__card img {
  opacity: 1;
}

/* Phone navigator: stays at the bottom of the screen while the pages scroll, "Seite n / N" opens
   the film strip. */
.leaflet-viewer--js .leaflet-navigator {
  display: block;
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: var(--space-4) calc(-1 * var(--page-padding)) 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border-subtle);
}

.leaflet-navigator__strip {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.leaflet-navigator__strip[hidden] {
  display: none;
}

.leaflet-navigator__list {
  display: flex;
  gap: var(--space-2);
  width: max-content;
  padding: var(--space-2) var(--space-2) var(--space-3);
}

.leaflet-navigator__bar {
  display: flex;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
}

.leaflet-navigator__toggle {
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  cursor: pointer;
}

.leaflet-navigator__toggle[aria-expanded="true"] img {
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  .leaflet__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
  }

  .leaflet__actions {
    flex-shrink: 0;
  }

  .leaflet__actions .btn {
    flex: none;
  }

  /* Wide screens with script: index on the left, double-page stage on the right. */
  .leaflet-viewer--js {
    display: grid;
    grid-template-columns: 178px minmax(0, 1fr);
    gap: var(--space-4);
    height: clamp(600px, 85vh, 900px);
  }

  .leaflet-viewer--js .leaflet-index {
    display: block;
    min-height: 0;
    padding-right: var(--space-6);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .leaflet-index__title {
    margin-bottom: var(--space-4);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: 0.1px;
  }

  .leaflet-index__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .leaflet-index__list li {
    display: flex;
  }

  .leaflet-viewer--js .leaflet-stage {
    container-type: size;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) 0;
    overflow: hidden;
  }

  /* The book: two slots side by side, even pages left and odd pages right like in print. A page is
     as high as the stage but never so wide that two of them (and the arrows) would not fit. A
     spread with a single page (cover, back cover) sits in its slot and the whole book slides half
     a page to the side so that it stays centred. */
  .leaflet-viewer--js .leaflet-pages {
    --leaflet-page-h: min(100cqh, calc((100cqw - 136px) / 2 / var(--leaflet-page-ratio)));
    --leaflet-page-w: calc(var(--leaflet-page-h) * var(--leaflet-page-ratio));
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, var(--leaflet-page-w));
    justify-content: center;
    gap: 0;
    height: var(--leaflet-page-h);
    perspective: 2400px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
  }

  .leaflet-viewer--js .leaflet-pages[data-shift="start"] {
    transform: translateX(calc(var(--leaflet-page-w) / -2));
  }

  .leaflet-viewer--js .leaflet-pages[data-shift="end"] {
    transform: translateX(calc(var(--leaflet-page-w) / 2));
  }

  .leaflet-viewer--js .leaflet-pages.is-turning {
    transition: transform var(--leaflet-turn-time) var(--leaflet-turn-ease);
  }

  .leaflet-viewer--js .leaflet-page {
    display: none;
    grid-row: 1;
    width: var(--leaflet-page-w);
    height: var(--leaflet-page-h);
    filter: none;
  }

  .leaflet-viewer--js .leaflet-page--left {
    grid-column: 1;
  }

  .leaflet-viewer--js .leaflet-page--right {
    grid-column: 2;
  }

  .leaflet-viewer--js .leaflet-page.is-visible {
    display: block;
    overflow: hidden;
    cursor: zoom-in;
  }

  .leaflet-viewer--js .leaflet-page:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  /* Page turn: a leaf lies over one slot and swings around the spine. Its front shows the page
     that leaves, its back the page that arrives on the other side; the page that was hidden
     beneath it is already in place (leaflet-viewer.js builds the leaf for each turn). */
  .leaflet-leaf {
    position: absolute;
    top: 0;
    z-index: 3;
    width: var(--leaflet-page-w);
    height: var(--leaflet-page-h);
    transform-style: preserve-3d;
    transition: transform var(--leaflet-turn-time) var(--leaflet-turn-ease);
    will-change: transform;
  }

  .leaflet-leaf--forward {
    left: var(--leaflet-page-w);
    transform-origin: left center;
  }

  .leaflet-leaf--forward.is-turned {
    transform: rotateY(-180deg);
  }

  .leaflet-leaf--back {
    left: 0;
    transform-origin: right center;
  }

  .leaflet-leaf--back.is-turned {
    transform: rotateY(180deg);
  }

  .leaflet-leaf__face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--color-white);
    backface-visibility: hidden;
  }

  .leaflet-leaf__face--back {
    transform: rotateY(180deg);
  }

  .leaflet-leaf__face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Light falls off while the leaf stands upright: the front darkens on its way up, the back
     lightens on its way down. The two shades are the leaf's own pseudo-elements (::before over
     the front, ::after over the back), a pixel in front of their face, so they take part in the
     3D scene and hide with their side. Inside a face, WebKit gives the shade its own layer while
     its opacity animates, and that layer ignores the face's backface-visibility: the shade of the
     side facing away lay over the page until the leaf was removed and then vanished at once. */
  .leaflet-leaf::before,
  .leaflet-leaf::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
    backface-visibility: hidden;
    pointer-events: none;
    transition: opacity var(--leaflet-turn-time) var(--leaflet-turn-ease);
  }

  .leaflet-leaf--back::before,
  .leaflet-leaf--back::after {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
  }

  .leaflet-leaf::before {
    opacity: 0;
    transform: translateZ(1px);
  }

  .leaflet-leaf.is-turned::before {
    opacity: 1;
  }

  .leaflet-leaf::after {
    transform: rotateY(180deg) translateZ(1px);
  }

  .leaflet-leaf.is-turned::after {
    opacity: 0;
  }

  .leaflet-viewer--js .leaflet-arrow:not([hidden]) {
    display: flex;
    position: absolute;
    top: 50%;
    z-index: 2;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    background: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius);
    cursor: pointer;
  }

  .leaflet-viewer--js .leaflet-arrow:not([hidden]):hover {
    border-color: var(--color-primary-hover);
    background: var(--color-surface-hover);
  }

  .leaflet-viewer--js .leaflet-arrow:not([hidden]):active {
    border-color: var(--color-primary-active);
    background: var(--color-surface-pressed);
  }

  .leaflet-arrow:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  .leaflet-arrow--prev {
    left: var(--space-4);
  }

  .leaflet-arrow--next {
    right: var(--space-4);
  }

  .leaflet-viewer--js .leaflet-navigator {
    display: none;
  }
}

@media (min-width: 1280px) {
  .leaflet-viewer--js .leaflet-arrow:not([hidden]) {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .leaflet-arrow--prev {
    left: 20px;
  }

  .leaflet-arrow--next {
    right: 17px;
  }
}

/* --------------------------------------------------------------------------
   Marktsuche (/maerkte)
   -------------------------------------------------------------------------- */

.market-page {
  padding-bottom: var(--space-10);
}

.market-page__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.market-page__title {
  margin-top: var(--space-2);
  color: var(--color-heading);
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
}

.market-page__lead {
  margin-top: var(--space-4);
  color: var(--color-text);
  font-size: 16px;
  line-height: 24px;
}

/* Felder: Suche und Standort */
.market-fields {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.market-fields form {
  margin: 0;
}

.market-fields .search-field {
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.market-fields__search-button {
  display: flex;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.market-fields .btn {
  width: 100%;
  height: 44px;
}

.market-fields .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.market-fields .market-fields__locate {
  justify-content: center;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
}

@media (min-width: 1024px) {
  .market-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .market-fields .market-fields__locate {
    width: auto;
  }
}

/* Hinweis (Fehler) */
.market-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: #f7d1d2;
  border: 1px solid #d51920;
  border-radius: var(--radius);
  color: #a61319;
  font-size: 14px;
  line-height: 20px;
}

.market-alert[hidden] {
  display: none;
}

.market-alert img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.market-alert p {
  flex: 1;
  margin: 0;
}

/* Anzahl der Treffer */
.market-count {
  margin-top: var(--space-6);
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

/* Liste + Karte: mobil untereinander mit der Karte oben, ab 1024 nebeneinander */
.market-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.market-layout__map {
  order: -1;
}

@media (min-width: 1024px) {
  .market-page__inner {
    padding: 0 40px;
  }

  .market-page__title {
    margin-top: var(--space-4);
    font-size: 32px;
    line-height: 44px;
  }

  .market-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    height: 700px;
  }

  .market-layout__map {
    order: 0;
  }
}

/* Liste: scrollt ab 1024 in der Höhe der Karte, unten blendet sie aus */
.market-results {
  position: relative;
  min-height: 0;
}

.market-results__scroll {
  height: 100%;
}

@media (min-width: 1024px) {
  .market-results__scroll {
    overflow-y: auto;
    /* 4 px room on top and left for the focus ring of a card, taken back by the negative margin */
    height: calc(100% + 8px);
    margin: -4px 0 -4px -4px;
    padding: 4px var(--space-4) 4px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-surface-variant);
  }

  .market-results::after {
    content: "";
    position: absolute;
    left: 0;
    right: var(--space-4);
    /* the scroll area reaches 4 px below the list (room for the focus ring), the fade covers that too */
    bottom: -4px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
    transition: opacity 0.15s;
  }

  .market-results.is-end::after {
    opacity: 0;
  }
}

.market-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Mobil nur die ersten fünf Märkte, solange der Besucher nicht mehr anfordert */
@media (max-width: 1023.98px) {
  .market-results[data-collapsed] .market-card:nth-child(n + 6) {
    display: none;
  }
}

.market-more {
  margin-top: var(--space-4);
}

.market-more[hidden] {
  display: none;
}

@media (min-width: 1024px) {
  .market-more {
    display: none;
  }
}

/* Marktkarte */
.market-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  background: var(--color-white);
  cursor: pointer;
  /* scrollIntoView (pin click) leaves some air around the card instead of putting it flush at the edge */
  scroll-margin: var(--space-4) 0;
}

@media (min-width: 1024px) {
  .market-card {
    /* the list fades out over its last 56 px: keep the card clear of that */
    scroll-margin-bottom: 72px;
  }
}

/*
 * Figma state "focused" (card of the pin clicked on the map): a second border, a 2 px ring around the
 * card with a white gap in between. The gap is 1 px next to the 1 px border of a normal card and 2 px
 * next to the 2 px border of the chosen store's card (the ring sits 3 px / 4 px outside in the design).
 */
.market-card--focus {
  box-shadow: 0 0 0 1px var(--color-white), 0 0 0 3px var(--color-primary);
}

.market-card--current.market-card--focus {
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary);
}

.market-card--current {
  padding: calc(var(--space-4) - 1px);
  border: 2px solid var(--color-primary);
  background: var(--color-primary-subtle);
}

.market-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.market-card__name {
  min-width: 0;
  margin: 0;
  color: var(--color-heading);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.market-card--current .market-card__name {
  color: var(--color-primary-active);
}

.market-card__select {
  flex-shrink: 0;
  gap: var(--space-2);
  padding-left: var(--space-3);
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
}

.market-card__select:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
}

.market-card__select:active {
  border-color: var(--color-primary-active);
  background: var(--color-primary-active);
}

.market-card__current {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.market-card__current img {
  width: 20px;
  height: 20px;
}

.market-card__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: 16px;
  line-height: 24px;
}

/* 16 px icons centred on the 24 px line; the SVGs ignore their aspect ratio, so never stretch them */
.market-card__row > img {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  flex-shrink: 0;
}

.market-card__row address {
  flex: 1;
  min-width: 0;
  font-style: normal;
}

/* Distance and route sit right of the address */
/* Opening hours: the lines of the days, below them the open/closed status */
.market-card__hours {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.market-card__hours p {
  margin: 0;
}

.market-card__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

.market-card__status img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.market-card__distance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 24px;
}

.market-card__distance strong {
  font-weight: 600;
}

.market-card__distance a {
  font-size: 16px;
}

.market-card a {
  color: var(--color-primary);
  text-decoration: underline;
}

.market-card--current a {
  color: var(--color-primary-active);
}

.market-card__clear {
  align-self: flex-start;
  margin-top: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

/* Leerer und ladender Zustand */
.market-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  text-align: center;
}

.market-state[hidden] {
  display: none;
}

.market-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface-variant);
}

.market-state__icon img {
  width: 24px;
  height: 24px;
}

.market-state__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}

.market-state__title {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.market-state__text p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.market-state--loading {
  gap: var(--space-2);
}

.market-state--loading img {
  width: 32px;
  height: 32px;
}

.market-state--loading p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

/* Karte (Leaflet) */
.market-map {
  position: relative;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-variant);
  z-index: 0;
}

.market-map__canvas {
  position: absolute;
  inset: 0;
  font-family: var(--font-family);
}

@media (min-width: 1024px) {
  .market-map {
    height: 100%;
  }
}

.market-map__zoom {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.market-map__zoom button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  cursor: pointer;
}

.market-map__zoom button:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-surface-hover);
}

.market-map__zoom button:active {
  border-color: var(--color-primary-active);
  background: var(--color-surface-pressed);
}

.market-map__zoom img {
  width: 20px;
  height: 20px;
}

.market-map__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  text-align: center;
  color: var(--color-text-subtle);
}

.market-map .leaflet-container {
  background: var(--color-surface-variant);
  font: inherit;
}

/* Pins und Cluster als Leaflet-DivIcons */
.market-pin {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: var(--color-white);
}

.market-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

/* The chosen store: filled green, white rim, storefront icon instead of the dot */
.market-pin--current {
  border-color: var(--color-white);
  background: var(--color-primary) url("/assets/icons/storefront-white.svg") center / 20px 20px no-repeat;
}

.market-pin--current::after {
  display: none;
}

/* Leaflet's own stylesheet loads later and sets display:block on marker icons, hence the prefix. */
.market-map .market-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

/* Infofenster */
/* The 16 px rim is padding of the frame: as margin of the content its vertical part would collapse outwards. */
.market-map .leaflet-popup-content-wrapper {
  padding: var(--space-4);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  color: var(--color-text);
}

.market-map .leaflet-popup-content {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.market-map .leaflet-popup-content p {
  margin: 0;
}

.market-map .leaflet-popup-close-button {
  display: none;
}

.market-map .leaflet-control-attribution {
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Warengruppen-, Wochenangebots- und Suchseite
   -------------------------------------------------------------------------- */

/* Figma "Kategorieseite" 3819:360 / "Unterkategorie" 3830:7221: 1280 px content (80 px margin at
   1440), 16 px between the blocks on a phone, 24 px from 1024 px. */
.category-page .app-page__inner {
  max-width: calc(1280px + 2 * var(--page-padding));
  gap: var(--space-4);
}

/* Three columns on tablets (Figma "Tablet"): keeps a card at most 330 px wide up to 1023 px, the
   width of the Small image variant. */
@media (min-width: 640px) {
  .category-page .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .category-page {
    padding-top: var(--space-6);
  }

  .category-page .app-page__inner {
    gap: var(--space-6);
  }

  .category-page .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Breadcrumb (Figma "Breadcrumb" 3809:69): from 1024 px the whole path, below only "‹ parent".
   Every link is a 44 px touch target, short labels get an invisible wider hit area. */
.crumbs a,
.crumbs [aria-current] {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
}

.crumbs a::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: max(100%, 44px);
  transform: translateX(-50%);
}

.crumbs__item a,
.crumbs__back > span {
  text-decoration: underline;
}

.crumbs [aria-current] {
  font-weight: 600;
  letter-spacing: 0.1px;
}

.crumbs__trail {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.crumbs__back {
  gap: var(--space-1);
}

@media (min-width: 1024px) {
  .crumbs__trail {
    display: flex;
  }

  .crumbs .crumbs__back {
    display: none;
  }
}

/* Subcategory chips (Figma "Subcategory_Chips"): from 1024 px wrapped rows, cut to two by
   category-chips.js; below one row that scrolls sideways from edge to edge. */
.category-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.category-chips__list {
  display: flex;
  gap: 0 var(--space-2);
  width: calc(100% + 2 * var(--page-padding));
  margin: 0 calc(-1 * var(--page-padding));
  padding: 0 var(--page-padding);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chips__list::-webkit-scrollbar {
  display: none;
}

/* 44 px touch target around the 32 px chip */
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
}

.chip > span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.chip:hover > span {
  background: var(--color-primary-subtle);
}

.category-chips__toggle {
  display: none;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--color-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
}

.category-chips__toggle:hover {
  background: var(--color-primary-subtle-hover);
}

.category-chips__toggle:active {
  background: var(--color-primary-subtle-pressed);
}

@media (min-width: 1024px) {
  .category-chips__list {
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .category-chips--collapsed .category-chips__list {
    max-height: 88px;
    overflow: hidden;
  }

  .category-chips__toggle:not([hidden]) {
    display: inline-flex;
  }
}

/* Head above the grid (Figma "Category_Header"): stacked on a phone, title left and sorting right
   from tablet width. */
.list-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.list-header__heading {
  color: var(--color-heading);
  font-size: 32px;
  line-height: 44px;
  font-weight: 700;
}

.list-header__heading .section-subtitle {
  display: block;
}

.list-header__count {
  color: var(--color-text-subtle);
  font-size: 16px;
  line-height: 24px;
}

.list-header__sort {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.list-header__sort label {
  padding: 0 var(--space-1);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.list-header__sort select {
  appearance: none;
  width: 100%;
  padding: var(--space-3) 40px var(--space-3) var(--space-3);
  border: 1px solid var(--color-border-field);
  border-radius: var(--radius);
  background: var(--color-white) url("../icons/select-caret.svg") no-repeat right var(--space-3) center / 20px;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.list-header__sort .btn {
  align-self: flex-start;
}

@media (min-width: 640px) {
  .list-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .list-header__sort {
    flex: none;
    width: 240px;
  }
}

/* Numbered pages (Figma "Pagination"): 44 px touch targets around 40 px boxes. */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.pagination__step,
.pagination__item,
.pagination__gap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 2px;
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.pagination__item--current {
  border: 1px solid var(--color-primary);
}

a.pagination__step:hover,
a.pagination__item:hover {
  background: var(--color-primary-subtle);
}

@media (min-width: 1024px) {
  .pagination {
    gap: var(--space-1);
    margin-top: var(--space-4);
  }
}

.category-page__empty {
  padding: var(--space-8) 0;
  color: var(--color-text-subtle);
  text-align: center;
}

.category-page__empty a {
  color: var(--color-primary);
  text-decoration: underline;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.pager__status {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

/* --------------------------------------------------------------------------
   Merkliste (/merkliste, Figma "Merkliste" 4862:12)
   -------------------------------------------------------------------------- */

/* The page shares wrapper and grid with the category page (1280 px content); the design starts
   24 px below the header on a phone and 40 px from 1024 px, with 24 px between head and grid. */
.wishlist-page {
  padding-top: var(--space-6);
}

.wishlist-page .app-page__inner {
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .wishlist-page {
    padding-top: var(--space-10);
  }
}

/* Title with the number of products below it, "Aktualisieren" at the right on the count's line */
.wishlist-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.wishlist-head__title {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

/* Figma headline/h4: 20/28 on a phone, 24/32 from 1024 px */
.wishlist-head__heading {
  color: var(--color-heading);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.wishlist-head__refresh {
  flex: none;
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
}

/* "24 von 34 Artikeln" and the button below the grid; the button spans the width on a phone */
.wishlist-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-6);
}

.wishlist-more__count {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.wishlist-more .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .wishlist-more .btn {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .wishlist-head__heading {
    font-size: 24px;
    line-height: 32px;
  }

  .wishlist-more {
    padding-top: var(--space-8);
  }
}

/* Empty list (Figma "Empty_State" 4310:152 in a bordered box) */
.wishlist-empty {
  display: flex;
  justify-content: center;
  padding: var(--space-8) 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
}

.wishlist-empty__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 360px;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.wishlist-empty__icon {
  display: flex;
  padding: var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
}

.wishlist-empty__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.wishlist-empty__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.wishlist-empty__hint {
  max-width: 240px;
}

/* --------------------------------------------------------------------------
   Kontoseiten (Anmelden, Registrieren, Passwort)
   -------------------------------------------------------------------------- */

.account-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .account-columns {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
  }
}

.account-card {
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
}

.account-card--single {
  max-width: 480px;
}

.account-card__title {
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.account-field label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.account-field input {
  height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border-field);
  border-radius: var(--radius);
  font: inherit;
  color: var(--color-text);
  background: var(--color-white);
}

.account-field input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.account-field__error,
.account-form__errors {
  color: var(--color-error);
  font-size: 13px;
  line-height: 18px;
}

.account-form__errors:empty {
  display: none;
}

.account-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
}

.account-form__alt {
  text-align: center;
}

.account-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 20px;
}

.account-links a {
  color: var(--color-primary);
  text-decoration: underline;
}

.account-hint {
  color: var(--color-text-subtle);
  font-size: 14px;
  line-height: 20px;
}

.account-providers {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.account-providers__btn {
  justify-content: center;
  width: 100%;
}

.account-status {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 20px;
}

.account-status--success {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.account-status--error {
  background: var(--color-error-subtle);
  color: var(--color-error);
}

/* --------------------------------------------------------------------------
   Anmeldeseiten mit AuthLayout (Figma "Login" Desktop 2211:6316, Mobile 2211:12875)
   The error colours of these pages differ from --color-error and therefore live here.
   -------------------------------------------------------------------------- */

/* Colours of the design system that differ from the shop's tokens, also for the account area in the shop layout */
.auth-layout,
.account-area,
.newsletter,
.review-page,
.review-dialog {
  --auth-error: #d51920;
  --auth-error-text: #be161d;
  --auth-error-surface: #fbd2d3;
  --auth-divider: var(--color-border-subtle);
  --auth-disabled-surface: #ececec;
  --auth-disabled-text: var(--color-border);
}

.auth-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-10);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-white);
}

.auth-header {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: var(--space-10) 0 var(--space-6);
}

.auth-header__logo img {
  display: block;
  width: auto;
  height: 24px;
}

.auth-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 440px;
  padding: 0 20px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-10);
}

.auth-card > * + * {
  margin-top: 20px;
}

.auth-title {
  color: var(--color-heading);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
}

/* Fehlerbanner (Figma "Error Banner" 2393:34151); Statusmeldungen aus dem Cookie sehen gleich aus */
.auth-alert,
.auth-card .account-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--auth-error);
  border-radius: var(--radius);
  background: var(--auth-error-surface);
  color: var(--auth-error-text);
  font-size: 14px;
  line-height: 20px;
}

.auth-card .account-status--error::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background: url("../icons/error.svg") no-repeat center / contain;
}

.auth-card .account-status--success {
  border-color: var(--color-success);
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.auth-alert__icon {
  flex: none;
}

.auth-alert__text {
  flex: 1;
  min-width: 0;
}

.auth-alert a {
  color: inherit;
  text-decoration: underline;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* Pflichtfeld-Stern sitzt links vor dem Label, außerhalb der Feldkante */
.auth-label,
.auth-required-note {
  position: relative;
  align-self: flex-start;
  padding: 0 var(--space-1);
  font-size: 12px;
  line-height: 16px;
}

.auth-label {
  font-weight: 600;
  letter-spacing: 0.15px;
}

.auth-label::before,
.auth-required-note::before {
  content: "*";
  content: "*" / "";
  position: absolute;
  left: -5px;
  color: var(--auth-error);
  font-weight: 600;
}

.auth-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border-field);
  border-radius: var(--radius);
  background: var(--color-white);
}

.auth-input:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-input input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.auth-input input::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

/* Masked password (Figma Password=Hidden): the bullets in Arial with spacing. The toggle switches
   the type to "text", so the shown password keeps the normal font; so does the placeholder. */
.auth-input input[type="password"]:not(:placeholder-shown) {
  font-family: Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 2px;
}

.auth-input__toggle {
  display: flex;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Eye icon shows what a click does: open eye while the password is masked ("anzeigen"),
   crossed out while it is shown ("verbergen"). Deliberately unlike Figma Text_Field_Password,
   which crosses it out as soon as a masked value is typed. main.js sets aria-pressed. */
.auth-input__hide,
.auth-input__toggle[aria-pressed="true"] .auth-input__show {
  display: none;
}

.auth-input__toggle[aria-pressed="true"] .auth-input__hide {
  display: block;
}

/* Fehlerzustand: Blazor setzt "invalid" an das Eingabefeld */
.auth-input:has(.invalid) {
  border-color: var(--auth-error);
}

.auth-field:has(.invalid) .auth-label,
.auth-field__error {
  color: var(--auth-error);
}

/* Hilfetext unter dem Feld; im Fehlerzustand ersetzt ihn die Fehlermeldung */
.auth-field__hint {
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
}

.auth-field:has(.invalid) .auth-field__hint {
  display: none;
}

.auth-field__error {
  display: flex;
  gap: var(--space-1);
  font-size: 12px;
  line-height: 16px;
}

.auth-field__error::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: url("../icons/error-field.svg") no-repeat center / contain;
}

.auth-form__forgot {
  display: flex;
  justify-content: flex-end;
}

.auth-link {
  color: var(--color-primary);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
}

.auth-check {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.auth-check input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-white) no-repeat center / 14px;
  cursor: pointer;
}

.auth-check input:checked {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.8' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
}

/* Mehrzeiliges Label: Box oben bündig mit der ersten Zeile */
.auth-check--multiline {
  align-items: flex-start;
  align-self: stretch;
}

.auth-check--required > span::before {
  content: "*";
  margin-right: var(--space-1);
  color: var(--auth-error);
  font-weight: 600;
}

.auth-check input.invalid {
  border-color: var(--auth-error);
}

.auth-check input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-submit {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-white);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
}

a.auth-submit {
  display: block;
  text-align: center;
  text-decoration: none;
}

.auth-submit:hover {
  background: var(--color-primary-hover);
}

.auth-submit:active {
  background: var(--color-primary-active);
}

/* Solange ein Feld leer ist, wirkt der Button inaktiv wie im Design; er bleibt aber klickbar
   und zeigt dann die Feldfehler (ein echtes disabled bräuchte Script und bremst Autofill aus).
   Optional fields (label .auth-label--optional right before the input) do not count. */
.auth-form:has(.auth-input input:placeholder-shown:not(.auth-label--optional + .auth-input input)) .auth-submit,
.auth-form:has(.auth-check--required input:not(:checked)) .auth-submit {
  background: var(--auth-disabled-surface);
  color: var(--auth-disabled-text);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-option.btn {
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
}

/* Das Element trägt nur Attribute für PasskeySubmit.razor.js und würde sonst eine Flex-Lücke belegen */
.auth-form passkey-submit {
  display: none;
}

/* Auf der Anmeldeseite stehen die Dienste in einem eigenen Formular direkt unter dem Passkey-Button */
.auth-card > .auth-form + .account-providers {
  margin-top: var(--space-2);
}

.auth-card .account-providers {
  gap: var(--space-2);
}

.auth-more {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.auth-card > .auth-required-note {
  margin-top: 60px;
}

/* Bestätigungsseiten (Figma 2352:313 "Bestätigung", 2334:13334 Willkommen) */
.auth-card--center {
  align-items: center;
  text-align: center;
}

.auth-card--center > * {
  width: 100%;
}

.auth-card--center .auth-alert {
  text-align: left;
}

.auth-text {
  font-size: 14px;
  line-height: 20px;
}

.auth-dev-hint {
  color: var(--color-text-subtle);
  font-size: 12px;
  line-height: 16px;
}

.auth-dev-hint a {
  color: inherit;
  text-decoration: underline;
}

.auth-text--center {
  text-align: center;
}

/* Seiten mit Illustration rücken enger an den Kopf (24 statt 40 px Abstand) */
.auth-main--illustrated {
  margin-top: -16px;
}

.auth-illustration {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 40px;
}

.auth-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-6) var(--space-3);
  background: var(--color-surface-variant);
  color: var(--color-primary-active);
  font-size: 14px;
  line-height: 20px;
}

.auth-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 16px;
}

.auth-footer__legal a {
  color: inherit;
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .auth-header {
    padding: 56px 0;
  }

  .auth-header__logo img {
    height: 40px;
  }

  .auth-title {
    font-size: 24px;
    line-height: 32px;
  }

  .auth-illustration {
    width: 160px;
    height: 160px;
    margin-bottom: 48px;
  }

  .auth-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) var(--space-8);
  }

  .auth-footer__legal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

/* --------------------------------------------------------------------------
   Mein Konto (Figma Section 2413:38108): Übersicht im Shop-Layout, Dialoge darüber
   -------------------------------------------------------------------------- */

.account-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--page-padding) var(--space-10);
}

.account-area__title {
  color: var(--color-heading);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.account-overview {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
}

.account-overview__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) 0;
}

.account-overview__section + .account-overview__section {
  border-top: 1px solid var(--auth-divider);
}

.account-overview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.account-overview__title {
  color: var(--color-heading);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.account-overview__edit {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-white);
}

.account-overview__edit:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-surface-hover);
}

.account-overview__edit:active {
  border-color: var(--color-primary-active);
  background: var(--color-surface-pressed);
}

.account-overview__value {
  font-size: 16px;
  line-height: 24px;
  overflow-wrap: anywhere;
}

.account-overview__delete {
  align-self: flex-start;
  color: var(--auth-error);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
}

/* Dialog: die Seite ist der geöffnete Dialog, Schließen führt zurück zur Übersicht */
body:has(.account-dialog-layer) {
  overflow: hidden;
}

.account-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.account-dialog-scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 32%);
}

.account-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100dvh - 2 * var(--space-4));
  overflow-y: auto;
  border-radius: 16px;
  background: var(--color-white);
}

.account-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
}

.account-dialog__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.account-dialog__close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
}

.account-dialog__close:hover {
  background: var(--color-surface-variant);
}

.account-dialog__body {
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--auth-divider);
  border-bottom: 1px solid var(--auth-divider);
}

.account-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4);
}

/* Löschen: gefährliche Aktion links, Abbrechen (primär) rechts */
.account-dialog__footer:has(.auth-button--danger) {
  justify-content: space-between;
}

.account-dialog .auth-required-note {
  margin-top: var(--space-10);
}

/* Buttons in Dialogen */
.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-white);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.auth-button:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
}

.auth-button:active {
  border-color: var(--color-primary-active);
  background: var(--color-primary-active);
}

.auth-button--outline {
  background: var(--color-white);
  color: var(--color-primary);
}

.auth-button--outline:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-subtle-hover);
}

.auth-button--outline:active {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle-pressed);
}

.auth-button--danger {
  border-color: var(--auth-error);
  background: var(--color-white);
  color: var(--auth-error);
}

/* Pressed keeps the hover look, so .auth-button:active never turns the red button green */
.auth-button--danger:hover,
.auth-button--danger:active {
  border-color: var(--auth-error);
  background: var(--auth-error-surface);
}

/* Wie beim Login: inaktiv wirkend, solange ein Pflichtfeld leer ist, aber klickbar */
.account-dialog:has(.auth-input input[aria-required="true"]:placeholder-shown) button[type="submit"].auth-button:not(.auth-button--danger) {
  border-color: var(--auth-disabled-surface);
  background: var(--auth-disabled-surface);
  color: var(--auth-disabled-text);
}

.account-dialog:has(.auth-input input[aria-required="true"]:placeholder-shown) .auth-button--danger {
  border-color: var(--auth-divider);
  color: var(--auth-disabled-text);
}

/* Formularteile der Dialoge */
.auth-label--optional::before {
  content: none;
}

.auth-text-block {
  font-size: 14px;
  line-height: 20px;
}

.auth-text-block p + p {
  margin-top: 20px;
}

.auth-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-radio-group legend {
  float: left;
  margin-bottom: var(--space-2);
}

.auth-radio-group__options {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}

.auth-radio {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.auth-radio input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-white);
  cursor: pointer;
}

.auth-radio input:checked {
  border: 6px solid var(--color-primary);
}

.auth-radio input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-row {
  display: flex;
  gap: var(--space-4);
}

.auth-row > * {
  flex: 1;
  min-width: 0;
}

.auth-input--disabled {
  border-color: var(--auth-divider);
}

.auth-input--disabled input {
  color: var(--auth-disabled-text);
}

.auth-success {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  font-size: 14px;
  line-height: 20px;
}

.auth-success img {
  flex: none;
}

@media (min-width: 1024px) {
  .account-area {
    padding: var(--space-10) var(--page-padding) 68px;
  }

  .account-area__title {
    font-size: 24px;
    line-height: 32px;
  }

  .account-overview {
    padding: var(--space-2) var(--space-6);
  }
}

/* Account menu in the header (Figma "Menu" 2438:16737, "Menu_Item" 2438:291) */
.account-menu {
  position: relative;
}

.account-menu > summary {
  list-style: none;
  cursor: pointer;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu[open] > summary {
  background: rgba(43, 46, 51, 0.06);
}

.account-menu__list {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 136px;
  padding: var(--space-1);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.1px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.account-menu__item img {
  width: 20px;
  height: 20px;
}

.account-menu__item:hover,
.account-menu__item:focus-visible {
  background: rgba(43, 46, 51, 0.06);
}

/* --------------------------------------------------------------------------
   Newsletter (/newsletter, /newsletter/bestaetigen, /newsletter/abmelden): the narrow, centred
   card of the sign-in pages (auth-*, Figma "Konto erstellen" 2330:7094) inside the shop layout
   -------------------------------------------------------------------------- */

.auth-main.newsletter {
  margin: 0 auto;
  padding-top: var(--space-10);
}

/* An optional field has no required star */
.auth-label--optional::before {
  content: none;
}

.turnstile {
  min-height: 65px;
}

/* Links underlined by default lose the underline on hover. Kept at the end so each rule beats the
   (equally specific plus :hover) base rule of its link regardless of where that is defined. */
.rating__count a:hover,
.availability__link:hover,
.hero__link:hover,
.crumbs a:hover,
.crumbs__back:hover > span,
.whatsapp-note a:hover,
.review__helpful a:hover,
.review__action:hover,
.market-card a:hover,
.market-card__clear:hover,
.pdp-info__text a:hover,
.main-menu__links a:hover,
.account-links a:hover,
.auth-alert a:hover,
.auth-link:hover,
.review-form__product a:hover,
.review-field__from-account a:hover,
.auth-dev-hint a:hover,
.auth-footer__legal a:hover,
.footer-links a:hover,
.footer-legal a:hover,
.account-overview__delete:hover,
.wishlist-head__refresh:hover,
.category-page__empty a:hover,
.leaflet__empty a:hover {
  text-decoration: none;
}
