/* ═══════════════════════════════════════════════════════════════════════════
   Onlineshop (EXT:shop) im Gewand des Designsystems

   Wird nur von der Site "alt" geladen, und zwar NACH der CSS der Extension und
   nach Bootstrap 3 — deshalb genügen hier einfache Selektoren, ohne
   Spezifitätswettlauf. Dieselbe Lösung wie bei kalender.css.

   Die Klassennamen mit dem Präfix "shop__" stammen aus
   Configuration/Sets/LiesbornAltbestand/shop.typoscript. Wo die Extension gar
   keine Klasse ausgibt, greifen die Regeln über die Struktur; solche Stellen
   sind unten einzeln vermerkt.
   ═══════════════════════════════════════════════════════════════════════════ */

.tx-shop {
    font-family: var(--sans);
    color: var(--ink);
}

/* ── Produktraster ──────────────────────────────────────────────────────── */

.tx-shop .shop__raster,
/* Ohne gesetzte Klasse: Die Liste steckt in #product-list > .group. */
.tx-shop #product-list > .group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    /* "stretch", damit alle Mintflächen einer Reihe gleich hoch sind — sonst
       endet jede Kachel dort, wo ihr Text aufhört. */
    align-items: stretch;
}
.tx-shop #product-list > .group > div,
.tx-shop .shop__zelle { min-width: 0; display: flex; }

/* ── Produktkachel ──────────────────────────────────────────────────────── */

/* Jede Kachel trägt "product-category-<n>" — das ist der einzige verlässliche
   Haken, den die Extension ohne Konfiguration ausgibt. */
.tx-shop [class*="product-category-"] {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Die Kachel steht auf Mint — dieselbe Fläche wie Infobox und Kaufkasten.
   Sie füllt ihre Rasterzelle ganz aus, damit die Flächen einer Reihe auf einer
   Linie enden; die Schaltfläche wird dafür nach unten geschoben. */
.tx-shop .shop__karte {
    flex: 1;
    background: var(--mint);
    border-radius: var(--radius);
    padding: 20px;
}
.tx-shop .shop__karte-inhalt {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
}
.tx-shop .shop__karte .shop__aktion { margin-top: auto; padding-top: 4px; }

.tx-shop [class*="product-category-"] img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Titel — in der Liste ein h2, auf der Produktseite ein h2 (Einstellung
   detail.headline). Beide bekommen die Serifenschrift des Hauses. */
.tx-shop h1,
.tx-shop h2,
.tx-shop h3 {
    font-family: var(--serif);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}
.tx-shop [class*="product-category-"] h2 { font-size: 20px; }
.tx-shop [class*="product-category-"] h2 a {
    color: var(--ink);
    text-decoration: none;
}
.tx-shop [class*="product-category-"] h2 a:hover { color: var(--gold-deep); }

.tx-shop [class*="product-category-"] p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
    margin: 0;
}

/* Preis: "Preis" ist die Beschriftung, das h3 der Betrag. Die Extension gibt
   beide ohne Klasse aus, wenn keine gesetzt ist — deshalb zusätzlich über die
   Struktur. */
.tx-shop .shop__preis-label,
.tx-shop [class*="product-category-"] p + h3 { margin: 0; }
.tx-shop .shop__preis-label,
.tx-shop [class*="product-category-"] h3 ~ p {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.tx-shop .shop__preis-wert,
.tx-shop [class*="product-category-"] h3 {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
}

/* ── Menge und Schaltfläche ─────────────────────────────────────────────── */

/* Bootstrap 3 baut .input-group als Tabelle. Für eine Zeile aus Feld und
   Knopf ist Flex das einfachere Mittel — und nur so lassen sich die
   Abstände des Designsystems setzen. */
.tx-shop .input-group.product-add-to-basket {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: auto;
    margin-top: 4px;
}
.tx-shop .input-group.product-add-to-basket .input-group-append {
    display: flex;
    width: auto;
}

.tx-shop .form-control.product-add-to-basket-quantity {
    width: 64px;
    flex: 0 0 64px;
    height: auto;
    padding: 11px 10px;
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1;
    text-align: center;
    color: var(--ink);
    background: var(--paper);
    border: 2.5px solid var(--ink);
    border-radius: 0;
    box-shadow: none;
}
.tx-shop .form-control.product-add-to-basket-quantity:focus-visible {
    outline: 3px solid var(--gold-deep);
    outline-offset: 2px;
}

/* Der Knopf „In den Warenkorb“ bekommt vom TypoScript die Klasse .btn; ohne
   Konfiguration bliebe er nackt — deshalb greift die Regel auch über die
   Struktur. */
.tx-shop .product-add-to-basket button,
.tx-shop button.btn,
.tx-shop a.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 2.5px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    border-radius: 0;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.tx-shop .product-add-to-basket button:hover,
.tx-shop button.btn:hover,
.tx-shop a.btn:hover {
    background: transparent;
    color: var(--ink);
}
.tx-shop .btn--ghost { background: transparent; color: var(--ink); }
.tx-shop .btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ── Produktseite ───────────────────────────────────────────────────────── */

/* Text links, Kaufkasten rechts — dasselbe Verhältnis wie beim
   Bild-Text-Slider (7 zu 5). Unter 991 px untereinander. */
.tx-shop .shop__detail-raster {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: start;
}
.tx-shop .shop--detail [class*="product-category-"] { display: block; }

.tx-shop .shop--detail .shop__titel {
    font-size: clamp(26px, 3vw, 38px);
    margin-bottom: 20px;
}

/* Anriss und Beschreibung bekommen von der Extension dieselbe Klasse. Der
   erste Block ist der kurze Anriss und steht deshalb in der Serifenschrift
   eine Stufe größer — wie der Vorspann einer Nachricht. */
.tx-shop .shop__anriss {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 720px;
}
.tx-shop .shop__anriss + .shop__anriss { margin-top: 20px; }
.tx-shop .shop__anriss p + p { margin-top: 14px; }
.tx-shop .shop__detail-haupt .shop__anriss:first-of-type {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink);
}

/* Galerie, falls das Produkt Bilder mitbringt.

   Begrenzt auf 360 px: Die Extension legt die Bilder in ein Bootstrap-5-
   Karussell, das hier mangels Bootstrap 5 nicht anspringt — sie stehen also
   untereinander. Über die volle Spaltenbreite gezogen würde aus einem
   Buchcover eine Plakatwand. */
.tx-shop .shop__galerie {
    max-width: 360px;
    margin-bottom: 28px;
}
/* Die Bilder stehen im Einzelbild-Karussell des Sitepackages
   (Partials/Product/Detail/Images.html); Größe, Rundung und Bühne kommen aus
   .einzelbild in liesborn.css. Früher standen hier Regeln für gestapelte
   Bilder mit "img { width: 100% }" — die waren spezifischer als die des
   Karussells und hätten das unbeschnittene Einpassen verhindert. */

/* Der Kaufkasten bleibt beim Scrollen stehen — bei langen Produkttexten
   sonst der Weg zurück nach oben, nur um in den Warenkorb zu legen. */
.tx-shop .shop__kaufbox {
    background: var(--mint);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: sticky;
    top: 24px;
}
.tx-shop .shop__kaufbox .shop__preis-label { margin-bottom: 2px; }
.tx-shop .shop__kaufbox .shop__preis-wert { font-size: 30px; }
.tx-shop .shop__preis-hinweis {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.tx-shop .shop__artikelnummer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.tx-shop .shop__artikelnummer dt,
.tx-shop .shop__artikelnummer dd { margin: 0; font-weight: 500; }
.tx-shop .shop__kaufbox .shop__aktion { margin-top: 22px; }

/* Der Zurück-Knopf gehört nach unten links — wie auf jeder Unterseite des
   Hauses. Im Markup steht er aber als letztes Kind der RECHTEN Spalte, und
   dort kommt er mit Rasterlogik nicht heraus: Er liegt drei Ebenen tief und
   ist kein eigenes Rasterfeld.

   Deshalb der Umweg über eine absolute Lage im Produktblock. Der Streifen
   dafür ist unten am Block reserviert (padding-bottom), damit der Knopf nicht
   über der längeren Spalte liegt. */
.tx-shop .shop__detail {
    position: relative;
    padding-bottom: 72px;
}
.tx-shop .shop__zurueck {
    position: absolute;
    left: 0;
    bottom: 0;
}

/* Kategorien, Merkmale und Ähnliches unter dem Kasten */
.tx-shop .shop__detail-seite h3 {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 32px 0 10px;
}
.tx-shop .shop__detail-seite ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}
.tx-shop .shop__detail-seite li + li { margin-top: 4px; }

@media (max-width: 991px) {
    .tx-shop .shop__detail-raster { grid-template-columns: 1fr; gap: 32px; }
    .tx-shop .shop__kaufbox { position: static; }
}

/* ── Tabellen in Warenkorb und Bestellstrecke ───────────────────────────── */

.tx-shop table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.tx-shop table th,
.tx-shop table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}
.tx-shop table th {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom-color: var(--rule-strong);
}

/* ── Meldungen ──────────────────────────────────────────────────────────── */

.tx-shop .shop__hinweis {
    padding: 14px 18px;
    margin-bottom: 24px;
    border-left: 3px solid var(--gold);
    background: var(--paper-2);
    font-size: 15px;
}
.tx-shop .shop__hinweis--fehler { border-left-color: #A4362F; }
.tx-shop .shop__hinweis--erfolg { border-left-color: #3F6B4A; }

/* ── Formulare der Bestellstrecke ───────────────────────────────────────── */

.tx-shop input[type="text"],
.tx-shop input[type="email"],
.tx-shop input[type="tel"],
.tx-shop input[type="number"],
.tx-shop select,
.tx-shop textarea {
    font-family: var(--sans);
    font-size: 15px;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
}
.tx-shop label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 575px) {
    .tx-shop .shop__raster,
    .tx-shop #product-list > .group { grid-template-columns: 1fr; }
}


/* ── Warenkorb-Knopf ─────────────────────────────────────────────────────
   Helle Schaltfläche des Hauses (.btn.btn--ghost: schwarzer Rahmen, eckig)
   mit Einkaufswagen, Zahl im schwarzen Kreis und dem Wort „Warenkorb"
   (Template: Resources/Private/Extensions/Shop/Templates/Basket/ShowBasketButton.html).
   Rahmen, Schrift und Umkehr beim Überfahren kommen aus .btn/.btn--ghost in
   liesborn.css; hier steht nur, was der Knopf zusätzlich braucht. */
a.warenkorb-knopf {
    gap: 12px;
    padding: 10px 18px 10px 14px;
}
/* Wagen und Kreis als eigene Einheit: Der Kreis sitzt oben rechts am Wagen,
   nicht am Rand der Schaltfläche. */
.warenkorb-knopf__wagen {
    position: relative;
    display: inline-flex;
    padding: 6px 10px 0 0;
}
.warenkorb-knopf__symbol {
    font-size: 20px;
    line-height: 1;
}
.warenkorb-knopf__zahl {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 0 0 2px var(--paper);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
/* Beim Überfahren füllt sich die Schaltfläche schwarz — der Kreis kehrt sich
   um, sonst verschwände er auf der Fläche. */
a.warenkorb-knopf:hover .warenkorb-knopf__zahl {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 0 0 2px var(--ink);
}

/* Im rechten Rand (15 %) wird es unter etwa 1100 px Fensterbreite eng: Bei
   992 px ist die Spalte nur 132 px breit, der Knopf mit vollem Innenabstand
   145 px. Dann weniger Luft — und falls es trotzdem nicht reicht, rutscht
   das Wort unter den Wagen, statt aus der Spalte zu ragen. */
a.warenkorb-knopf {
    max-width: 100%;
    flex-wrap: wrap;
}
@media (max-width: 1199px) {
    .seitenraster__rand a.warenkorb-knopf {
        gap: 8px;
        padding: 10px 8px;
    }
}

/* Zurück-Schaltfläche unter der Produktliste (shop.typoscript, Ende). Die
   Liste bringt unten keinen eigenen Abstand mit. Doppelte Klasse, damit die
   Regel sowohl ".spalte > .frame { margin: 0 }" (Randlayout) als auch
   ".seiteninhalt > .frame + .frame" schlägt. */
.frame.shop__zurueck-unten { margin-top: 48px; }
