@font-face {
      font-family: 'Roboto';
      src: url('fonts/Roboto-Regular.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    :root {
      --blue: #4468B4; /* Blau des Landingpage-Kachelrahmens */
      --blue-dark: #2f4f91;
      --blue-soft: #eef3ff;
      --red: #AF3431;
      --tile-color: #4468B4;
      --accordion-bg: #f4f5f7;
      --accordion-bg-open: #f7f8fa;
      --green: #2e7d32;
      --text: #132033;
      --muted: #64748b;
      --line: #d7e6f4;
      --basket-height: 190px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      padding: 0 5vw 18px;
      min-height: 100vh;
      font-family: 'Roboto', Arial, sans-serif !important;
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(0, 92, 169, 0.14), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    }

    body.has-selection {
      padding-bottom: calc(var(--basket-height) + 34px);
    }

    .page-header {
      max-width: 1600px;
      margin: 0 auto 6px;
      padding: 10px 0 8px;
      background: transparent;
      border-bottom: none;
      box-shadow: none;
    }

    .kicker {
      margin: 0 0 3px;
      color: var(--red);
      font-weight: 900;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-size: 0.92rem;
    }

    .page-header h1 {
      margin: 0;
      color: var(--blue-dark);
      font-size: clamp(1.35rem, 2.1vw, 2.05rem);
      line-height: 1.02;
      letter-spacing: -0.4px;
      font-weight: 900;
    }

    .subtitle {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: clamp(1rem, 1.25vw, 1.25rem);
    }


    .intro-box {
      position: relative;
      margin-top: 6px;
      padding: 9px 14px 9px 18px;
      background: linear-gradient(135deg, #fff7d6 0%, #fff1b8 100%);
      border: 1px solid rgba(239, 215, 125, 0.9);
      border-left: 3px solid var(--blue);
      border-radius: 11px;
      color: #2f2a18;
      font-size: clamp(0.82rem, 0.9vw, 0.94rem);
      line-height: 1.32;
      box-shadow: 0 6px 18px rgba(90, 70, 0, 0.07);
      overflow: hidden;
    }

    .intro-box::after {
      content: "";
      position: absolute;
      right: -44px;
      top: -44px;
      width: 120px;
      height: 120px;
      border-radius: 999px;
      background: rgba(255,255,255,0.38);
      pointer-events: none;
    }

    .intro-box p {
      position: relative;
      z-index: 1;
      margin: 0 0 6px;
    }

    .intro-box p:last-child {
      margin-bottom: 0;
    }

    .intro-box strong {
      color: var(--blue-dark);
      font-weight: 900;
    }


    .choice {
      display: grid;
      gap: 3px;
      max-width: 1600px;
      margin: 0 auto;
    }

    .choice > input[type="checkbox"] { display: none; }

    .label-eins {
      position: relative;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 14px;
      padding: 7px 14px 7px 18px;
      background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
      color: var(--text);
      border: 1px solid rgba(210, 216, 226, 0.95);
      border-left: 3px solid var(--blue);
      border-radius: 11px;
      font-size: clamp(0.9rem, 0.98vw, 1.03rem);
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 2px 7px rgba(19, 32, 51, 0.045);
      transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
      user-select: none;
      overflow: hidden;
    }

    .label-eins::before {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at top right, rgba(255,255,255,0.62), transparent 38%);
      pointer-events: none;
    }

    .label-eins:hover {
      transform: translateY(-1px);
      background: linear-gradient(135deg, #ffffff 0%, #f3f5f7 100%);
      box-shadow: 0 3px 9px rgba(19, 32, 51, 0.065);
    }

    .label-eins:active {
      transform: translateY(0);
      background: linear-gradient(135deg, #f3f4f6 0%, #eceff3 100%);
      color: var(--text);
      border-left-color: var(--red);
    }

    .choice > input[type="checkbox"]:checked + .label-eins {
      background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
      color: var(--text);
      border-color: rgba(215, 220, 228, 0.95);
      border-left-color: var(--red);
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      box-shadow: 0 5px 14px rgba(19, 32, 51, 0.075);
    }

    .choice > input[type="checkbox"]:checked + .label-eins::after,
    .choice > input[type="checkbox"]:not(:checked) + .label-eins::after {
      position: relative;
      z-index: 1;
      display: grid;
      place-items: center;
      width: 28px;
      height: 28px;
      border-radius: 999px;
      font-size: 1.18rem;
      line-height: 1;
      transition: transform 0.24s ease, background 0.24s ease;
    }

    .choice > input[type="checkbox"]:not(:checked) + .label-eins::after {
      content: "›";
      color: var(--blue-dark);
      background: rgba(255,255,255,0.72);
      transform: rotate(90deg);
    }

    .choice > input[type="checkbox"]:checked + .label-eins::after {
      content: "›";
      color: var(--red);
      background: rgba(175,52,49,0.08);
      transform: rotate(-90deg);
    }

    .content {
      display: none;
      padding: 7px 10px 9px;
      border: 1px solid rgba(216, 219, 226, 0.95);
      border-top: none;
      border-left: 3px solid var(--blue);
      border-radius: 0 0 10px 10px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      box-shadow: 0 5px 16px rgba(0, 64, 125, 0.055);
      margin-top: -4px;
    }

    .choice > input[type="checkbox"]:checked + .label-eins + .content { display: block; }
    .choice > input[type="checkbox"]:checked + .label-eins + .content {
      border-left-color: var(--red);
    }


    .gallery {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      align-items: stretch;
    }

    .image-container {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 4px;
      box-shadow: 0 8px 18px rgba(0, 64, 125, 0.10);
      transition: box-shadow 0.18s ease, border-color 0.18s ease;
    }

    .image-container:hover {
      transform: none;
      border-color: rgba(0, 92, 169, 0.55);
      box-shadow: 0 10px 24px rgba(0, 64, 125, 0.13);
    }

.image-container img {
  width: 98% !important;
  height: clamp(240px, 22vw, 340px) !important;
  object-fit: contain !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}

    .card-title {
      margin: 0;
      padding: 6px 10px 0;
      color: var(--blue-dark);
      font-size: 0.98rem;
      font-weight: 900;
      min-height: 24px;
      line-height: 1.15;
    }

    .card-subtitle {
      margin: 0;
      padding: 1px 10px 0;
      color: var(--muted);
      font-size: 0.82rem;
      min-height: 20px;
      line-height: 1.12;
    }

    .buttons { margin-top: auto; padding: 6px 10px 8px; }

    .selectBtn, #generateBasketQrBtn, #showBasketBtn, #clearBasketBtn, #closeBtn {
      border: none;
      border-radius: 999px;
      cursor: pointer;
      font-family: inherit;
      font-weight: 900;
      transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
    }

    .buttons {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
    }

    body.mode-desktop .buttons, body.mode-tablet .buttons {
      grid-template-columns: 1fr 1fr;
    }

    .selectBtn,
    .websiteBtn {
      width: 100%;
      min-height: 38px;
      padding: 8px 10px;
      background: var(--blue);
      color: #ffffff;
      border: 1px solid var(--blue);
      font-size: 1rem;
      box-shadow: 0 8px 18px rgba(0, 92, 169, 0.18);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      font-family: inherit;
      font-weight: 900;
      cursor: pointer;
    }

    .websiteBtn {
      display: none;
      background: #ffffff;
      color: var(--blue);
      border: 2px solid var(--blue);
      box-shadow: none;
    }

    body.mode-desktop .websiteBtn, body.mode-tablet .websiteBtn {
      display: inline-flex;
    }

    .selectBtn:active {
      background: var(--red);
      border-color: var(--red);
    }

    .selectBtn.selected {
      background-color: var(--green);
      border-color: var(--green);
      color: white;
    }

    .selectBtn.selected::before { content: "✓ "; }

    #basket {
      display: none;
      position: fixed;
      left: 50%;
      bottom: 18px;
      transform: translateX(-50%);
      z-index: 2100;
      width: min(1500px, calc(100vw - 36px));
      height: var(--basket-height);
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-rows: auto 1fr;
      gap: 12px 18px;
      align-items: start;
      padding: 18px 20px;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(0, 92, 169, 0.22);
      border-radius: 26px;
      box-shadow: 0 18px 45px rgba(0, 40, 90, 0.24);
      backdrop-filter: blur(14px);
    }

    body.has-selection #basket {
      display: grid;
    }

    .basketInfo {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .basketBadge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 44px;
      height: 44px;
      padding: 0 12px;
      border-radius: 999px;
      background: var(--blue);
      color: #ffffff;
      font-weight: 900;
      font-size: 1.15rem;
    }

    #basket h2 {
      margin: 0;
      color: var(--blue-dark);
      font-size: 1.25rem;
      font-weight: 900;
    }

    #basketHint {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 0.95rem;
    }

    #basketList {
      grid-column: 1 / 2;
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-content: flex-start;
      max-height: 92px;
      overflow-y: auto;
      min-width: 0;
    }

    #basketList li {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      max-width: 340px;
      padding: 8px 10px 8px 12px;
      background: var(--blue-soft);
      border: 1px solid rgba(0, 92, 169, 0.18);
      border-radius: 999px;
      color: var(--blue-dark);
      font-size: 0.92rem;
      white-space: nowrap;
    }

    .basket-chip-text {
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #basketList button {
      width: 28px;
      height: 28px;
      border: none;
      border-radius: 999px;
      background: #ffffff;
      color: var(--red);
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 1px 5px rgba(0,0,0,0.12);
    }

    .basket-empty {
      color: var(--muted) !important;
      background: transparent !important;
      border: 1px dashed rgba(0, 92, 169, 0.28) !important;
      border-radius: 16px !important;
      max-width: none !important;
      white-space: normal !important;
    }

    .basketActions {
      grid-column: 2 / 3;
      grid-row: 1 / 3;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 300px;
    }

    #generateBasketQrBtn {
      min-height: 64px;
      padding: 14px 22px;
      background: var(--blue);
      color: #ffffff;
      font-size: 1.05rem;
      box-shadow: 0 10px 22px rgba(0, 92, 169, 0.22);
    }

    #generateBasketQrBtn:active:not(:disabled) {
      background: var(--red);
    }

    #clearBasketBtn {
      min-height: 46px;
      padding: 7px 14px;
      background: #eef3f8;
      color: #314255;
      font-size: 0.98rem;
    }

    #clearBasketBtn:hover:not(:disabled) { background: #dfe8f1; }

    #generateBasketQrBtn:disabled, #showBasketBtn:disabled, #clearBasketBtn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    #overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(7,20,38,0.68);
      z-index: 3000;
    }

    #basketPopup {
      display: none;
      position: fixed;
      left: 50%;
      top: max(18px, env(safe-area-inset-top));
      bottom: calc(96px + env(safe-area-inset-bottom));
      transform: translateX(-50%);
      z-index: 1950;
      width: min(720px, calc(100vw - 32px));
      max-height: calc(100vh - 132px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
      overflow: hidden;
      background: #ffffff;
      border: 1px solid rgba(0, 92, 169, 0.22);
      border-radius: 11px;
      box-shadow: 0 24px 70px rgba(0,0,0,0.30);
      padding: 18px;
      display: none;
      flex-direction: column;
    }

    #basketPopup h2 {
      margin: 0 0 8px;
      color: var(--blue-dark);
    }

    #basketPopup p {
      margin: 0 0 14px;
      color: var(--muted);
    }

    #basketPopupList {
      list-style: none;
      padding: 0;
      margin: 0 0 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      flex: 1 1 auto;
      min-height: 0;
      padding-right: 4px;
    }

    #basketPopupList li {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      background: var(--blue-soft);
      border: 1px solid rgba(0, 92, 169, 0.18);
      border-radius: 10px;
      padding: 9px 10px;
      color: var(--blue-dark);
      min-height: 84px;
      height: 84px;
      flex: 0 0 84px;
    }

    #basketPopupList li span {
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      white-space: normal;
      line-height: 1.25;
    }

    #basketPopupList button,
    #closeBasketPopupBtn {
      border: none;
      border-radius: 999px;
      background: var(--red);
      color: #ffffff;
      padding: 8px 12px;
      font-weight: 900;
      cursor: pointer;
      min-height: 34px;
      flex: 0 0 auto;
    }

    #closeBasketPopupBtn {
      width: 100%;
      min-height: 44px;
      background: #2f3b4a;
    }

    #popup {
      display: none;
      position: fixed;
      left: 50%;
      top: 46%;
      transform: translate(-50%, -50%);
      background: white;
      padding: 30px 30px 26px;
      border-radius: 12px;
      box-shadow: 0 0 32px rgba(0,0,0,0.38);
      z-index: 3100;
      text-align: center;
      max-width: 560px;
      min-height: 560px;
      width: calc(100% - 40px);
    }

    #qrcodeTarget {
      margin: 14px auto;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 360px;
    }

    #qrcodeTarget canvas, #qrcodeTarget img {
      margin: 0 auto;
      border-radius: 14px;
    }

    #closeBtn {
      min-height: 46px;
      padding: 10px 22px;
      background: #2f3b4a;
      color: white;
      font-size: 1rem;
    }

    #closeBtn:active { background: var(--red); }

    #fullscreenZoom, .modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.90);
      z-index: 1100;
      align-items: center;
      justify-content: center;
      padding: 44px 24px 24px;
      overflow: auto;
    }

    #fullscreenZoom img, #modal-image {
      max-width: 94vw;
      max-height: calc(100vh - 88px);
      object-fit: contain;
      background: white;
      border-radius: 8px;
      padding: 8px;
      margin: auto;
    }


    /* Ruhiger, flacher Akkordeon-Look: nur der linke Streifen zeigt aktiv/dunkelrot */
    .label-eins,
    .content,
    .intro-box {
      border-left-color: var(--blue) !important;
    }

    .choice > input[type="checkbox"]:checked + .label-eins,
    .choice > input[type="checkbox"]:checked + .label-eins + .content {
      border-left-color: var(--red) !important;
    }

    .choice > input[type="checkbox"]:checked + .label-eins {
      background: linear-gradient(135deg, #ffffff 0%, #f3f5f7 100%);
      color: var(--text);
      box-shadow: 0 3px 9px rgba(19, 32, 51, 0.06);
    }

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

      #basket {
        height: 220px;
        grid-template-columns: 1fr;
      }

      .basketActions {
        grid-column: 1 / 2;
        grid-row: auto;
        flex-direction: row;
        min-width: 0;
      }

      #generateBasketQrBtn, #clearBasketBtn { flex: 1; }
    }

    @media (max-width: 760px) {
      :root { --basket-height: 245px; }

      body {
        padding-left: 14px;
        padding-right: 14px;
      }

      body.has-selection {
        padding-bottom: calc(var(--basket-height) + 24px);
      }

      body.has-selection {
      padding-bottom: calc(var(--basket-height) + 34px);
    }

    .page-header {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
      }

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

      .image-container img {
        height: clamp(280px, 62vw, 440px);
      }

      .content { padding: 14px; }

      #basket {
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        padding: 14px;
        z-index: 2100;
      }

      #basket {
        height: auto;
      }

      #basketList {
        display: none;
      }

      .basketInfo {
        display: none;
      }

      .basketActions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
      }

      #generateBasketQrBtn,
      #showBasketBtn,
      #clearBasketBtn {
        min-height: 58px;
        font-size: 0.86rem;
        line-height: 1.15;
        padding: 8px 6px;
        white-space: normal;
      }

      #clearBasketBtn {
        display: block;
      }

      body.mode-smartphone #clearBasketBtn {
        background: var(--red);
        color: #ffffff;
      }

      #basketPopup {
        top: max(12px, env(safe-area-inset-top));
        bottom: calc(92px + env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        max-height: calc(100vh - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding: 14px;
        border-radius: 14px;
      }

      #basketPopup h2 {
        font-size: 1.18rem;
      }

      #basketPopupList li {
        min-height: 84px;
        height: 84px;
        flex-basis: 84px;
      }
    }

    /* Tablet/iPad: Anzeigen einspaltig, Auswahlbox wie Desktop */
    body.mode-tablet .gallery {
      grid-template-columns: 1fr;
      gap: 14px;
    }

    body.mode-tablet .image-container {
      display: grid;
      grid-template-columns: minmax(220px, 42%) minmax(220px, 1fr);
      gap: 18px;
      align-items: center;
      text-align: left;
    }

    body.mode-tablet .image-container img {
      width: 100%;
      max-width: 100%;
      height: auto;
    }

    body.mode-tablet .buttons {
      grid-template-columns: 1fr 1fr;
      align-self: center;
    }

    body.mode-tablet.has-selection {
      padding-bottom: calc(var(--basket-height) + 34px);
    }

    body.mode-tablet #basket {
      display: none;
      height: var(--basket-height);
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-rows: auto 1fr;
      gap: 12px 18px;
      align-items: start;
      padding: 18px 20px;
      bottom: 18px;
      width: min(1500px, calc(100vw - 36px));
    }


    body.mode-tablet.has-selection #basket {
      display: grid;
    }

    body.mode-tablet .basketInfo {
      display: flex;
    }

    body.mode-tablet #basketList {
      display: flex;
      grid-column: 1 / 2;
      max-height: 92px;
      overflow-y: auto;
    }

    body.mode-tablet .basketActions {
      grid-column: 2 / 3;
      grid-row: 1 / 3;
      display: flex;
      flex-direction: column;
      min-width: 300px;
    }

    body.mode-tablet #showBasketBtn {
      display: none !important;
    }

    body.mode-tablet #generateBasketQrBtn,
    body.mode-tablet #clearBasketBtn {
      min-height: 50px;
      font-size: 1rem;
      padding: 10px 18px;
    }

    @media (max-width: 900px) {
      body.mode-tablet .image-container {
        grid-template-columns: 1fr;
        text-align: center;
      }

      body.mode-tablet .buttons {
        grid-template-columns: 1fr 1fr;
      }

      body.mode-tablet .basketActions {
        min-width: 240px;
      }
    }

  
    body.list-popup-open #overlay {
      background: rgba(255,255,255,0.10);
      backdrop-filter: none;
    }

    body.list-popup-open #basketPopup {
      background: #ffffff;
      color: var(--text);
      box-shadow: 0 18px 48px rgba(0, 40, 90, 0.22);
    }

    body.mode-smartphone.list-popup-open #overlay {
      background: rgba(255,255,255,0.04);
    }

  
    body.no-page-scroll {
      overflow: hidden;
    }

    body.no-page-scroll #basketPopupList {
      touch-action: pan-y;
      overscroll-behavior: contain;
    }

    body.mode-smartphone #basketPopup {
      display: none;
      max-height: calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
      overflow: hidden;
      flex-direction: column;
    }

    body.mode-smartphone #basketPopupList {
      flex: 1 1 auto;
      min-height: 0;
      max-height: none;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }

  
    /* Smartphone: Merkliste im Popup wirklich scrollbar machen */
    body.mode-smartphone #basketPopup {
      position: fixed;
      left: 10px;
      right: 10px;
      top: max(12px, env(safe-area-inset-top));
      bottom: calc(104px + env(safe-area-inset-bottom));
      width: auto;
      max-width: none;
      max-height: none;
      height: auto;
      transform: none;
      display: none;
      flex-direction: column;
      overflow: hidden;
      padding: 14px;
    }

    body.mode-smartphone #basketPopup[style*="flex"] {
      display: flex !important;
    }

    body.mode-smartphone #basketPopup h2,
    body.mode-smartphone #basketPopup p,
    body.mode-smartphone #closeBasketPopupBtn {
      flex: 0 0 auto;
    }

    body.mode-smartphone #basketPopupList {
      flex: 1 1 auto;
      min-height: 0;
      height: auto;
      max-height: none;
      overflow-y: scroll;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      padding-right: 6px;
      margin-bottom: 12px;
    }

    body.mode-smartphone #basketPopupList li {
      flex: 0 0 84px;
    }

  
    /* Reparatur: Smartphone-Merkliste im Popup scrollt selbst */
    body.mode-smartphone #basketPopup {
      position: fixed !important;
      left: 10px !important;
      right: 10px !important;
      top: max(12px, env(safe-area-inset-top)) !important;
      bottom: calc(100px + env(safe-area-inset-bottom)) !important;
      width: auto !important;
      max-width: none !important;
      height: auto !important;
      max-height: none !important;
      transform: none !important;
      overflow: hidden !important;
      flex-direction: column !important;
      box-sizing: border-box !important;
      z-index: 3100 !important;
    }

    body.mode-smartphone #basketPopup.is-open {
      display: flex !important;
    }

    body.mode-smartphone #basketPopup h2,
    body.mode-smartphone #basketPopup p,
    body.mode-smartphone #closeBasketPopupBtn {
      flex: 0 0 auto !important;
    }

    body.mode-smartphone #basketPopupList {
      display: block !important;
      flex: 1 1 auto !important;
      min-height: 0 !important;
      height: auto !important;
      max-height: calc(100dvh - 270px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      -webkit-overflow-scrolling: touch !important;
      overscroll-behavior: contain !important;
      touch-action: pan-y !important;
      padding-right: 8px !important;
      margin-bottom: 12px !important;
    }

    body.mode-smartphone #basketPopupList li {
      min-height: 84px !important;
      height: auto !important;
      margin-bottom: 10px !important;
    }

    html.popup-scroll-locked,
    body.popup-scroll-locked {
      overflow: hidden !important;
    }

  
    .popup-close-x {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 42px;
      height: 42px;
      border: none;
      border-radius: 999px;
      background: var(--red);
      color: #ffffff;
      font-size: 1.55rem;
      line-height: 1;
      font-weight: 900;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      z-index: 5;
      box-shadow: 0 8px 18px rgba(0,0,0,0.20);
    }

    .popup-close-x:hover,
    .popup-close-x:focus {
      background: #8f2623;
      outline: none;
    }

    #basketPopup,
    #popup {
      padding-top: 56px;
    }

    #fullscreenZoom .popup-close-x,
    .modal .popup-close-x {
      top: max(14px, env(safe-area-inset-top));
      right: max(14px, env(safe-area-inset-right));
      z-index: 1200;
    }


    /* Kompaktere Akkordeons, damit die Bereiche besser auf eine Bildschirmseite passen */
    @media (min-width: 901px) {
      .choice { gap: 3px; }
      .label-eins { min-height: 34px; }
      .content { padding-top: 6px; padding-bottom: 7px; }
    }

    @media (max-height: 820px) and (min-width: 901px) {
      body { padding-bottom: 10px; }
      .page-header { padding-top: 7px; padding-bottom: 6px; }
      .intro-box { margin-top: 8px; padding-top: 10px; padding-bottom: 10px; }
      .choice { gap: 2px; }
      .label-eins { padding-top: 6px; padding-bottom: 6px; min-height: 32px; }
      .choice > input[type="checkbox"]:checked + .label-eins::after,
      .choice > input[type="checkbox"]:not(:checked) + .label-eins::after {
        width: 22px;
        height: 22px;
      }
    }


/* =========================================================
   Edge/Desktop-Fix: Vier Karten nebeneinander erzwingen
   ---------------------------------------------------------
   Edge erkennt manche große Touch-Monitore/Laptops als Tablet.
   Deshalb gilt ab 1000px Breite für alle Nicht-Smartphones:
   4 Spalten wie am Kiosk/Touchdisplay.
   ========================================================= */
@media (min-width: 1000px) {
  body:not(.mode-smartphone) .choice .content .gallery,
  body.mode-desktop .choice .content .gallery,
  body.mode-tablet .choice .content .gallery,
  body.mode-touchdisplay .choice .content .gallery {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    align-items: stretch !important;
  }

  body:not(.mode-smartphone) .choice .content .gallery > .image-container,
  body.mode-desktop .choice .content .gallery > .image-container,
  body.mode-tablet .choice .content .gallery > .image-container,
  body.mode-touchdisplay .choice .content .gallery > .image-container {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: initial !important;
    grid-template-columns: none !important;
    text-align: center !important;
  }

  body:not(.mode-smartphone) .image-container img,
  body.mode-desktop .image-container img,
  body.mode-tablet .image-container img,
  body.mode-touchdisplay .image-container img {
    width: 96% !important;
    max-width: 96% !important;
    height: clamp(300px, 28vw, 520px) !important;
    object-fit: contain !important;
    align-self: center !important;
  }

  body:not(.mode-smartphone) .buttons,
  body.mode-desktop .buttons,
  body.mode-tablet .buttons,
  body.mode-touchdisplay .buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    margin-top: auto !important;
  }

  body:not(.mode-smartphone) .websiteBtn,
  body.mode-desktop .websiteBtn,
  body.mode-tablet .websiteBtn,
  body.mode-touchdisplay .websiteBtn {
    display: inline-flex !important;
  }
}

@media (min-width: 761px) and (max-width: 999px) {
  body:not(.mode-smartphone) .choice .content .gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .choice .content .gallery {
    grid-template-columns: 1fr !important;
  }
}

.card-subtitle {
  display: none !important;
}

.card-title,
.card-location {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.card-title {
  margin: 0 !important;
  padding: 8px 10px 2px !important;
  color: var(--blue-dark) !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
  min-height: 0 !important;
}

.card-location {
  margin: 0 !important;
  padding: 0 10px 6px !important;
  color: var(--muted) !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

/* =========================================================
   FINAL: Bilder vollständig sichtbar, aber deutlich größer
   ---------------------------------------------------------
   Kein Beschnitt: object-fit: contain
   Kein Überschreiben durch alte max-height-Regeln: max-height: none
   Einheitliche Bildfläche auf Desktop, Touchdisplay, Tablet, Mobil
   ========================================================= */

.image-container {
  overflow: hidden !important;
}

.image-container img,
body:not(.mode-smartphone) .image-container img,
body.mode-desktop .image-container img,
body.mode-tablet .image-container img,
body.mode-touchdisplay .image-container img,
body.kiosk-apb-mode .image-container img {
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;

  height: clamp(280px, 24vw, 420px) !important;
  min-height: 260px !important;
  max-height: none !important;

  object-fit: contain !important;
  object-position: center center !important;

  align-self: stretch !important;
  background: #f8fafc !important;
  border-radius: 14px !important;
  border-bottom: none !important;

  padding: 0 !important;
  margin: 0 0 10px !important;

  cursor: zoom-in !important;
}

/* Große Touchdisplays / Desktop: viel Bildfläche, aber ohne Abschneiden */
@media (min-width: 1401px) {
  .image-container img,
  body:not(.mode-smartphone) .image-container img,
  body.mode-desktop .image-container img,
  body.mode-touchdisplay .image-container img,
  body.kiosk-apb-mode .image-container img {
    height: clamp(320px, 22vw, 500px) !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Mittlere Breiten: zwei Spalten, große vollständig sichtbare Bilder */
@media (min-width: 761px) and (max-width: 1400px) {
  .image-container img,
  body:not(.mode-smartphone) .image-container img,
  body.mode-tablet .image-container img {
    height: clamp(280px, 36vw, 430px) !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Smartphone: Bild hoch genug, aber nicht beschnitten */
@media (max-width: 760px) {
  .image-container img,
  body.mode-smartphone .image-container img {
    height: clamp(260px, 72vw, 460px) !important;
    min-height: 250px !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Landscape-Kompaktregeln dürfen Bilder nicht wieder auf 150px begrenzen */
@media (orientation: landscape) and (max-height: 820px) {
  .image-container img,
  body:not(.mode-smartphone) .image-container img,
  body.mode-desktop .image-container img,
  body.mode-tablet .image-container img,
  body.mode-touchdisplay .image-container img,
  body.kiosk-apb-mode .image-container img {
    height: clamp(240px, 28vh, 340px) !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
