/* Mini-Shop der Glocken-Apotheke – ergänzt die Live-CSS von ApoHomepage (inc.stylesheet-base.css + Theme).
   Alles ist unter .shop gescoped; Farben nur über die vorhandenen Theme-Variablen. */

/* ── Grundlagen & Fallstricke der Basis-CSS neutralisieren ─────────────── */
.shop {
  overflow-wrap: break-word;
  color: var(--color-text-muted);
}

.shop input,
.shop select,
.shop textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-weight: 400;
  color: var(--color-text-dark);
  background-color: var(--color-white);
  margin: 4px 0 0;
  cursor: text;
}

.shop input[type=checkbox],
.shop input[type=radio] {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  margin: 3px 0 0;
  box-shadow: none;
  transform: scale(1.3);
  cursor: pointer;
}

.shop input[type=number] {
  width: 5.5em;
}

.shop label {
  display: block;
  padding: 0;
  font-weight: 600;
  color: var(--color-text-dark);
}

.shop ul.liste,
.shop .infobox ul.liste {
  list-style: square;
  list-style-position: outside;
  padding: 0 0 0 1.4em;
}

.shop h3 {
  margin-left: 0;
}

.shop h1 + section,
.shop section {
  scroll-margin-top: 20px;
}

.shop a {
  color: var(--color-text-dark);
}

.shop a:focus-visible,
.shop button:focus-visible,
.shop input:focus-visible,
.shop textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.shop .klein {
  font-size: 0.85em;
}

/* Buttons im Stil der Seite (.button aus der Basis-CSS) */
.shop .button {
  display: inline-block;
  font: inherit;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  color: var(--color-white);
  box-sizing: border-box;
}

.shop .button-sekundaer {
  background-color: var(--color-white);
  color: var(--color-accent);
}

.shop .link-button {
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit;
  color: var(--color-text-dark);
  text-decoration: underline;
  cursor: pointer;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shop .ico-klein {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.2em;
  margin-right: 0.35em;
}

/* ── Kopfzeile des Shops: Warenkorb ──────────────────── */
.shop .shop-kopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 10px 14px;
}

.shop .warenkorb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 16px;
  border-radius: 24px;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 5px var(--shadow-color-nav-base);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.shop .warenkorb-link:hover {
  transform: scale(1.02);
  box-shadow: 0 3px 8px var(--shadow-color-nav-hover);
}

.shop .warenkorb-link svg {
  width: 1.3em;
  height: 1.3em;
}

/* Kategorie-Navigation: topmenu-buttons, die bei 7 Einträgen sauber umbrechen */
.shop .kategorie-nav li {
  flex: 1 1 auto;
}

.shop .kategorie-nav a {
  padding: 0.35em 1em;
  text-align: center;
}

/* Brotkrumen */
.shop .brotkrumen ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 10px 10px;
  font-size: 0.9em;
}

.shop .brotkrumen li {
  margin: 0;
}

.shop .brotkrumen li + li::before {
  content: "›";
  margin: 0 0.5em;
}

/* Schrittanzeige */
.shop .schritte {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 10px 12px;
}

.shop .schritte li {
  flex: 1 1 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  line-height: 1.3;
  border-radius: 24px;
  background-color: var(--color-bg-stripe);
  color: var(--color-text-dark);
  font-weight: 600;
}

.shop .schritte a {
  color: inherit;
}

.shop .schritte .nr {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-text-dark);
  font-weight: 700;
}

.shop .schritte li.erledigt {
  background-color: var(--color-bg-sidebar);
}

.shop .schritte li.erledigt .nr {
  border-color: var(--color-accent-success);
  background-color: var(--color-accent-success);
  color: var(--color-white);
}

.shop .schritte li[aria-current="step"] {
  background-color: var(--color-nav-active);
  color: var(--color-white);
  box-shadow: 0 2px 5px var(--shadow-color-nav-base);
}

.shop .schritte li[aria-current="step"] .nr {
  border-color: var(--color-white);
}

/* ── Hinweise ──────────────────────────────────────────────────────────── */
.shop .hinweis {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  background-color: var(--color-bg-stripe);
  color: var(--color-text-dark);
}

.shop .intro p {
  max-width: 70em;
  line-height: 1.6;
}

/* ── Produktkarten ─────────────────────────────────────────────────────── */
.shop .kategorie > h2 {
  margin: 30px 0 6px;
}

.shop .produkt-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 10px 0 20px;
}

.shop .produkt-karte {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
}

.shop .produkt-bild {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  margin-bottom: 12px;
  border-radius: 6px;
  background-color: var(--color-bg-stripe);
  color: var(--color-nav-primary);
}

.shop .produkt-bild svg {
  width: 84px;
  height: 84px;
}

.shop .typ {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 6px;
  padding: 2px 9px;
  border-radius: 12px;
  background-color: var(--color-bg-sidebar);
  color: var(--color-text-dark);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop .produkt-karte h3 {
  margin: 2px 0 6px;
  font-size: 1.15em;
}

.shop .produkt-karte h3 a {
  color: inherit;
  text-decoration: none;
}

.shop .produkt-karte h3 a:hover {
  text-decoration: underline;
}

.shop .packung,
.shop .kurz,
.shop .max-menge {
  margin: 0 0 8px;
  font-size: 0.9em;
  line-height: 1.5;
}

.shop .pzn {
  font-size: 0.9em;
}

.shop .preis-block {
  display: flex;
  flex-direction: column;
  margin: 4px 0 8px;
}

.shop .preis {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop .preis-zusatz,
.shop .grundpreis {
  font-size: 0.82em;
}

.shop .produkt-karte .aktionen {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop .produkt-karte form {
  margin: 0;
}

.shop .produkt-karte .button {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.shop .details-link {
  font-size: 0.9em;
  text-align: center;
}

.shop .karte-details {
  margin: 0 0 10px;
  font-size: 0.85em;
}

.shop .karte-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-dark);
}

.shop .karte-details p {
  margin: 6px 0;
}

/* ── Produktdetail ─────────────────────────────────────────────────────── */
.shop .produkt-detail {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 24px;
  align-items: start;
}

.shop .produkt-detail .produkt-bild {
  height: 260px;
}

.shop .produkt-detail .produkt-bild svg {
  width: 150px;
  height: 150px;
}

.shop .detail-preis .preis {
  font-size: 2em;
}

.shop .detail-kauf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 14px 0;
}

.shop .detail-kauf .button {
  margin: 0;
}

.shop .pflichtangaben {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 10px 18px;
  margin: 0 0 14px;
}

.shop .pflichtangaben dt {
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop .pflichtangaben dd {
  margin: 0;
  line-height: 1.6;
}

.shop .pflichttext {
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ── Tabellen (Warenkorb / Prüfen) ─────────────────────────────────────── */
.shop table {
  margin: 6px 0 14px;
}

.shop tbody th {
  background-color: transparent;
  color: var(--color-text-dark);
  font-weight: 700;
}

.shop tbody th a {
  color: var(--color-text-dark);
  text-decoration: underline;
}

.shop .unterzeile {
  display: block;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--color-text-muted);
}

.shop .zahl {
  text-align: right;
  white-space: nowrap;
}

.shop .summen {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 24px;
  max-width: 460px;
  margin: 10px 0 10px auto;
}

.shop .summen dt {
  margin: 0;
}

.shop .summen dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
  color: var(--color-text-dark);
}

.shop .summen .gesamt {
  padding-top: 6px;
  border-top: 2px solid var(--color-border);
  font-size: 1.2em;
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop .summen .mwst {
  font-size: 0.85em;
}

.shop .warenkorb-aktionen {
  text-align: right;
}

.shop .weiter-leiste {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

/* ── Formular (Kasse) ──────────────────────────────────────────────────── */
.shop fieldset {
  min-width: 0;
  margin: 0 0 18px;
  padding: 12px 16px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.shop legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop .feld {
  margin: 10px 0 0;
}

.shop .feld-gruppe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.shop .feld-gruppe.plz-ort {
  grid-template-columns: minmax(7em, 1fr) 3fr;
}

.shop .feld-hinweis {
  margin: 4px 0 0;
  font-size: 0.85em;
}

.shop .pflicht {
  color: var(--color-text-dark);
  font-weight: 700;
}

.shop .checkbox-zeile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 0;
}

.shop .checkbox-zeile label {
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.shop details.abweichend > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-dark);
  padding: 4px 0;
}

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.shop .hp-feld {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Prüfen ────────────────────────────────────────────────────────────── */
.shop .pruef-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.shop .pruef-raster > div {
  padding: 10px 14px;
  border-radius: 6px;
  background-color: var(--color-bg-stripe);
}

.shop .pruef-raster h3,
.shop .zusammenfassung-titel {
  margin: 0 0 6px;
  font-size: 1.05em;
  color: var(--color-text-dark);
  text-shadow: none;
}

.shop .pruef-raster p {
  margin: 0 0 6px;
  line-height: 1.5;
}

.shop .aendern {
  font-size: 0.85em;
}

.shop .bestell-zeile {
  margin: 0 0 6px;
}

.shop .bestell-abschluss {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px solid var(--color-border);
}

.shop .bestellbutton {
  font-size: 1.1em;
  padding: 14px 24px;
}

/* ── Bestätigung ───────────────────────────────────────────────────────── */
.shop .bestaetigung {
  text-align: center;
}

.shop .bestaetigung p {
  max-width: 44em;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.shop .bestell-id-label {
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--color-text-dark);
}

.shop .bestell-id {
  display: inline-block;
  margin: 0 0 18px;
  padding: 10px 26px;
  border: 2px dashed var(--color-border);
  border-radius: 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 2.2em;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-dark);
}

/* ── Shop-Fußbereich (Pflichtangaben) ──────────────────────────────────── */
.shop .shop-fuss {
  margin: 40px 1% 10px;
  padding-top: 16px;
  border-top: 2px solid var(--color-bg-sidebar);
  font-size: 0.9em;
}

.shop .shop-fuss .spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.shop .fuss-titel {
  margin: 0 0 6px;
  font-size: 1.05em;
  color: var(--color-text-dark);
  text-shadow: none;
  opacity: 1;
}

.shop .fuss-titel:hover {
  text-shadow: none;
}

.shop .shop-fuss ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shop .shop-fuss li {
  margin: 0 0 4px;
}

.shop .shop-fuss p {
  margin: 0 0 6px;
  line-height: 1.5;
}

.shop .eu-logo {
  display: inline-block;
  line-height: 0;
}

.shop .eu-logo img {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.shop .shop-fuss .telefon {
  font-size: 1.25em;
  font-weight: 700;
}

.shop .shop-fuss .pflichttext {
  margin-top: 16px;
}

/* ── Mobil ─────────────────────────────────────────────────────────────── */
@media screen and (max-width: 700px) {
  .shop .produkt-detail {
    grid-template-columns: 1fr;
  }

  .shop .produkt-detail .produkt-bild {
    height: 180px;
  }

  .shop .pflichtangaben {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .shop .pflichtangaben dd {
    margin-bottom: 10px;
  }

  .shop .feld-gruppe,
  .shop .feld-gruppe.plz-ort {
    grid-template-columns: 1fr;
  }

  .shop .button {
    min-width: 0;
  }

  .shop .weiter-leiste .button,
  .shop .bestellbutton {
    width: 100%;
  }

  .shop .bestell-id {
    font-size: 1.6em;
    padding: 8px 14px;
  }
}

@media screen and (max-width: 650px) {
  /* Tabellen werden zu gestapelten Karten – keine horizontale Scrollleiste */
  .shop table.responsiv thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .shop table.responsiv,
  .shop table.responsiv tbody,
  .shop table.responsiv tr,
  .shop table.responsiv th,
  .shop table.responsiv td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .shop table.responsiv tr {
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .shop table.responsiv td {
    padding: 4px 9px;
    text-align: left;
  }

  .shop table.responsiv td[data-label]::before {
    content: attr(data-label) ": ";
    display: inline-block;
    min-width: 7.5em;
    font-weight: 700;
    color: var(--color-text-dark);
  }
}

/* ── Druck (Bestätigungsseite speichern/drucken) ──────────────────────── */
@media print {
  .sidebar,
  .sidebar-toggle-button,
  .shop .shop-kopf,
  .shop .lieferpflicht,
  .shop .schritte {
    display: none !important;
  }

  body.layout-sidebar .main-content {
    margin: 0;
    box-shadow: none;
  }
}

/* ---- Produktbilder, Kategorien ---- */
.shop .produkt-bild img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.shop .produkt-karte .produkt-bild {
  height: 170px;
  padding: 8px;
  background-color: var(--color-white);
  border: 1px solid var(--color-bg-stripe);
}

.shop .produkt-detail .produkt-bild {
  padding: 12px;
  background-color: var(--color-white);
  border: 1px solid var(--color-bg-stripe);
}

.shop .produkt-karte h3 a {
  color: inherit;
}

.shop .kategorie-nav {
  flex-wrap: wrap;
}

.shop .bildnachweis {
  margin: 4px 0 0;
  font-size: 0.75em;
  color: var(--color-text-muted);
}

.shop .pflichtangaben dd p {
  margin: 0 0 6px;
}

.shop .kategorie .kategorie-anzahl {
  font-size: 0.7em;
  font-weight: normal;
  color: var(--color-text-muted);
}

/* ── Fehlermeldungen im Formular ─────────────────────────────────────── */
.shop .fehlerliste {
  margin: 14px 0;
  padding: 10px 14px 10px 32px;
  border-left: 4px solid var(--color-text-dark);
  background-color: var(--color-bg-stripe);
  color: var(--color-text-dark);
}

.shop .feld.ungueltig input,
.shop .feld.ungueltig textarea {
  outline: 2px solid var(--color-text-dark);
}

.shop .feld-fehler {
  margin: 4px 0 0;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--color-text-dark);
}

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

/* ── Gewährleistungshinweis (Kopf) und Widerrufsfunktion (Fuß) ───────── */
.shop .gewaehrleistung-link {
  font-size: 0.9em;
  color: var(--color-text-dark);
}

.shop .widerruf-button {
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 14px;
  border: 2px solid var(--color-accent);
  border-radius: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text-dark);
}

.shop .widerruf-button:hover {
  background-color: var(--color-bg-stripe);
}

.shop .inhalt img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 1px solid var(--color-bg-stripe);
}

/* ── Hinweis zur Lieferpflicht (Kontrahierungszwang): oben auf jeder Shopseite ── */
.shop .lieferpflicht {
  margin: 0 10px 16px;
  padding: 12px 16px;
  border: 2px solid var(--color-accent);
  border-left-width: 8px;
  border-radius: 6px;
  background-color: var(--color-bg-stripe);
  color: var(--color-text-dark);
}

.shop .lieferpflicht p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.shop .lieferpflicht p:last-child {
  margin-bottom: 0;
}

.shop .lieferpflicht-titel {
  font-size: 1.3em;
}

.shop .lieferpflicht-wege {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.shop .lieferpflicht-wege li {
  margin: 0;
}

.shop .lieferpflicht-wege .button {
  margin: 0;
}

.shop .lieferpflicht-kurz {
  padding: 8px 14px;
  font-size: 0.95em;
}
