/* ==========================================================================
   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 */
  --color-primary: #009846;
  --color-primary-hover: #00893f;
  --color-primary-active: #007a38;
  --color-primary-subtle: #e6f5ed;
  --color-primary-subtle-hover: #d2eadd;
  --color-primary-border-subtle: #99d6b5;
  --color-white: #ffffff;
  --color-text: #2b2e33;
  --color-text-subtle: #6b7280;
  --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;
  --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;
}

html {
  -webkit-text-size-adjust: 100%;
}

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) */
.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 {
  background: var(--color-primary-subtle);
}

.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-hover);
  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-hover);
}

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

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

/* --------------------------------------------------------------------------
   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-primary);
}

/* 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;
}

.header-bar .logo {
  order: 1;
  /* Basis auto: with `flex: 1` (basis 0) the link collapsed to 0 px and took the image with it. */
  flex: 1 0 auto;
  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;
  height: auto;
}

/* With the wishlist heart the row needs 332 px (menu, logo, market, heart, account); on the
   narrowest phones the logo gives way so the icons do not wrap below it. */
@media (max-width: 339.98px) {
  .header-bar .logo img {
    width: 124px;
  }
}

/* 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 market selector is an icon button left of the account icon (Figma "Top_Navigation" mobile). */
.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;
  }

  .header-bar {
    flex-wrap: nowrap;
    gap: var(--space-2);
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .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;
  }

  .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);
  }

  .main-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--page-max-width);
    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);
}

.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: 16px;
  line-height: 22px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.main-menu__tile--offers {
  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--offers .main-menu__tile-image {
  top: -28px;
  left: 99.5px;
  width: 201px;
  height: 128px;
}

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

.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 */
.main-menu__root,
.main-menu__service {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  text-align: left;
}

.main-menu__root::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("../icons/chevron-right-gray.svg") center / 20px 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;
  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"), underlined */
.main-menu__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-3);
  border-radius: var(--radius);
  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);
  }

  .main-menu__root[aria-expanded="true"] {
    background: var(--color-primary-subtle);
    color: var(--color-primary);
  }

  .main-menu__root[aria-expanded="true"]::after {
    background-image: url("../icons/chevron-right-green-small.svg");
  }

  .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"); 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.32);
  }
}

@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;
}

.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;
}

@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-primary-hover);
  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);
}

.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-primary-hover);
  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-hover);
}

.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-primary-hover);
  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 "Start (Neu)" Section 3891:12143 / 3891:12146, mobile
   3891:12172): the offers' spacing, 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-8);
}

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

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

/* 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
   418 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 button on it 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-hover);
}

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

.teaser__button {
  position: absolute;
  left: var(--space-6);
  bottom: var(--space-6);
  z-index: 2;
  max-width: calc(100% - 2 * var(--space-6));
}

.teaser__button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaser__image:hover .teaser__button {
  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: 418px;
  }
}

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

.section-heading {
  color: var(--color-primary);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-6);
}

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

.sortiment-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  aspect-ratio: 177 / 200;
  padding: var(--space-6);
  background: var(--color-primary-subtle);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sortiment-tile:hover {
  background: #cceada;
}

.sortiment-tile img {
  flex: 1;
  min-height: 0;
  width: auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

@media (min-width: 1024px) {
  .section-heading {
    font-size: 32px;
    line-height: 40px;
    text-align: left;
  }

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

  .sortiment-tile {
    aspect-ratio: 216 / 240;
  }
}

/* --------------------------------------------------------------------------
   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: #cceada;
}

/* 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-primary-hover);
}

/* 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-text);
  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-hover);
  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-hover);
  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-primary);
  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-primary);
  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-primary);
  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--block {
  width: 100%;
}

.icon-btn--outlined {
  background: var(--color-white);
  border: 1px solid var(--color-primary);
}

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

/* 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-hover);
  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-primary);
  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-primary);
  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-primary);
  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__notice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-success-subtle);
}

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

.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): the narrow card of the account pages */
.review-form__status {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface-variant);
  font-size: 14px;
  line-height: 20px;
}

.review-form__status--approved {
  background: var(--color-success-subtle);
}

.review-form__status--rejected {
  background: var(--color-error-subtle);
}

.review-form__stars,
.review-form__recommend {
  border: 0;
  margin: 0;
  padding: 0;
}

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

.review-form__recommend > legend {
  margin-bottom: var(--space-2);
}

.review-form__recommend > .auth-field__error {
  flex-basis: 100%;
}

.auth-check--radio input {
  border-radius: 50%;
}

.auth-check--radio input:checked {
  background-image: none;
  box-shadow: inset 0 0 0 3px var(--color-white);
}

/* Star picker: the inputs come 5…1 in the markup and are shown 1…5, so "~" lights up a star
   and every lower one, on hover as well as for the choice */
.star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: var(--space-1);
}

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

.star-input label {
  width: 36px;
  height: 36px;
  background: url("../icons/star-empty.svg") no-repeat center / 32px 32px;
  cursor: pointer;
}

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

.star-input input:focus-visible + label {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.star-input input.invalid + label {
  background-image: url("../icons/star-outline.svg");
}

.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-primary);
  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;
  }
}

/* --------------------------------------------------------------------------
   Prospektseite (/prospekt)
   -------------------------------------------------------------------------- */

.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);
}

/* 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-hover);
  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);
}

@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-hover);
  outline-offset: 2px;
}

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

.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-hover);
    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. */
  .leaflet-leaf__face::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
    opacity: 0;
    transition: opacity var(--leaflet-turn-time) var(--leaflet-turn-ease);
  }

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

  .leaflet-leaf.is-turned .leaflet-leaf__face:not(.leaflet-leaf__face--back)::after {
    opacity: 1;
  }

  .leaflet-leaf:not(.is-turned) .leaflet-leaf__face--back::after {
    opacity: 1;
  }

  .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-hover);
    border-radius: var(--radius);
    cursor: pointer;
  }

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

  .leaflet-arrow:focus-visible {
    outline: 2px solid var(--color-primary-hover);
    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-primary-hover);
  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-hover);
}

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

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

.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-primary-hover);
  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-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-white);
  cursor: pointer;
}

.market-card__select:hover {
  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-hover);
  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-hover);
  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-hover);
  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 {
  background: var(--color-primary-subtle);
}

.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-hover);
  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-hover);
}

/* 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-hover) 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-hover);
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-primary-hover);
  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- und Kollektionsseite
   -------------------------------------------------------------------------- */

/* 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-hover);
  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-hover);
  border-radius: var(--radius);
  color: var(--color-primary-hover);
  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-hover);
  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);
}

@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-primary-hover);
  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-hover);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.pagination__item--current {
  border: 1px solid var(--color-primary-hover);
}

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;
}

.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-primary-hover);
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.wishlist-head__refresh {
  flex: none;
  color: var(--color-primary-hover);
  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: #e9f5ef;
}

.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)
   Primärfarbe des neuen Design Systems ist #00893f (= --color-primary-hover);
   die Fehlerfarben weichen von --color-error ab und stehen deshalb hier.
   -------------------------------------------------------------------------- */

/* Farben des neuen Design Systems, auch für den Kontobereich im Shop-Layout */
.auth-layout,
.account-area,
.newsletter,
.review-form {
  --auth-primary: var(--color-primary-hover);
  --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(--auth-primary);
  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(--auth-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(--auth-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(--auth-primary);
  background-color: var(--auth-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(--auth-primary);
  outline-offset: 1px;
}

.auth-submit {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius);
  background: var(--auth-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-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);
  border-color: var(--auth-primary);
  color: var(--auth-primary);
}

/* 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(--auth-primary);
  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(--auth-primary);
  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(--auth-primary);
  border-radius: var(--radius);
  background: var(--color-white);
}

.account-overview__edit:hover {
  background: var(--color-primary-subtle);
}

.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(--auth-primary);
  border-radius: var(--radius);
  background: var(--auth-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-active);
  background: var(--color-primary-active);
}

.auth-button--outline {
  background: var(--color-white);
  color: var(--auth-primary);
}

.auth-button--outline:hover {
  border-color: var(--auth-primary);
  background: var(--color-primary-subtle);
}

.auth-button--danger {
  border-color: var(--auth-error);
  background: var(--color-white);
  color: var(--auth-error);
}

.auth-button--danger:hover {
  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(--auth-primary);
}

.auth-radio input:focus-visible {
  outline: 2px solid var(--auth-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,
.auth-main.review-form {
  margin: 0 auto;
  padding-top: var(--space-10);
}

.newsletter__areas {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
}

.newsletter__areas legend {
  margin-bottom: var(--space-3);
}

.newsletter__area {
  display: flex;
  flex-direction: column;
}

.newsletter__area-name {
  font-weight: 600;
}

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

/* 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,
.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,
.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 {
  text-decoration: none;
}
