/* ═════════════════════════════════════════════════════════════
   ASTRO-GALERIE – zusätzlich zu style.css laden
   Alle Klassen beginnen mit "ag-" und stören den Rest der Seite nicht.
   ═════════════════════════════════════════════════════════════ */
#astro-galerie {
    --ag-text: #f5f7ff;
    --ag-leise: #9aa0b5;
    --ag-linie: rgba(245, 247, 255, 0.14);
    --ag-flaeche: rgba(245, 247, 255, 0.05);
    --ag-akzent: #8fb4ff;
    color: var(--ag-text);
}

/* ── Filterleiste ── */
.ag-filter { display: grid; gap: 12px; margin: 8px 0 28px; }
.ag-suche {
    width: 100%; max-width: 420px; box-sizing: border-box;
    padding: 10px 14px; font: inherit; color: var(--ag-text);
    background: var(--ag-flaeche); border: 1px solid var(--ag-linie); border-radius: 999px;
}
.ag-suche::placeholder { color: var(--ag-leise); }
.ag-chips, .ag-varianten { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chip {
    padding: 7px 14px; font: inherit; font-size: 0.9rem; cursor: pointer;
    color: var(--ag-text); background: transparent;
    border: 1px solid var(--ag-linie); border-radius: 999px;
    transition: background 0.15s, border-color 0.15s;
}
.ag-chip:hover { border-color: var(--ag-akzent); }
.ag-chip[aria-pressed="true"] { background: var(--ag-text); border-color: var(--ag-text); color: #05060a; }
.ag-suche:focus-visible, .ag-chip:focus-visible, .ag-kachel:focus-visible,
.ag-detail button:focus-visible { outline: 2px solid var(--ag-akzent); outline-offset: 2px; }
.ag-anzahl { margin: 0; font-size: 0.85rem; color: var(--ag-leise); }

/* ── Gruppen und Raster ── */
.ag-gruppe { margin-bottom: 40px; }
.ag-gruppe h2 {
    display: flex; align-items: baseline; gap: 10px;
    margin: 0 0 14px; padding-bottom: 8px;
    font-size: 1.15rem; font-weight: 600; text-align: left;
    border-bottom: 1px solid var(--ag-linie);
}
.ag-gruppe h2 span { font-size: 0.85rem; font-weight: 400; color: var(--ag-leise); }
.ag-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; }

.ag-kachel { display: block; color: inherit; text-decoration: none; }
.ag-bild {
    position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden;
    border-radius: 6px; background: var(--ag-flaeche);
}
.ag-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.ag-kachel:hover .ag-bild img { transform: scale(1.04); }
.ag-marke {
    position: absolute; right: 8px; bottom: 8px; padding: 3px 9px;
    font-size: 0.75rem; color: #fff; background: rgba(5, 6, 10, 0.72); border-radius: 999px;
}
.ag-kachel-text { display: block; padding: 9px 2px 0; }
.ag-katalog {
    display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ag-leise);
}
.ag-name { display: block; font-size: 1rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ag-ort { display: block; font-size: 0.82rem; color: var(--ag-leise); }

/* ── Detailansicht ── */
.ag-detail {
    width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh;
    margin: 0; padding: 0; border: 0; box-sizing: border-box;
    color: var(--ag-text); background: rgba(5, 6, 10, 0.97);
}
.ag-detail::backdrop { background: #05060a; }
.ag-detail-innen {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px;
    min-height: 100%; box-sizing: border-box; padding: 56px 64px 32px;
}
.ag-gross { display: flex; align-items: center; justify-content: center; min-width: 0; }
/* Wasserzeichen wie in der bisherigen Lightbox (Text hier ändern) */
.ag-wasserzeichen { position: relative; display: block; max-width: 100%; }
.ag-wasserzeichen::after {
    content: "© Winfried Brehler";
    position: absolute; right: 20px; bottom: 20px; z-index: 1;
    font-size: 18px; font-weight: 600; color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7); pointer-events: none;
}
.ag-gross img { display: block; max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 4px; }
.ag-info { align-self: center; min-width: 0; }
.ag-info h2 { margin: 2px 0 2px; font-size: 1.5rem; line-height: 1.2; text-align: left; overflow-wrap: anywhere; }
.ag-info p { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.55; color: #dddddd; }
.ag-info .ag-typ { margin: 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ag-akzent); }
.ag-info .ag-katalog { margin-bottom: 16px; }
.ag-varianten { margin: 14px 0 18px; }
.ag-daten {
    display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
    margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--ag-linie); font-size: 0.9rem;
}
.ag-daten dt { color: var(--ag-leise); }
.ag-daten dd { margin: 0; overflow-wrap: anywhere; }

.ag-zu, .ag-nav {
    position: fixed; z-index: 2; width: 44px; height: 44px; padding: 0;
    font-size: 1.7rem; line-height: 1; cursor: pointer;
    color: var(--ag-text); background: rgba(245, 247, 255, 0.08);
    border: 1px solid var(--ag-linie); border-radius: 50%;
}
.ag-zu { top: 12px; right: 14px; }
.ag-nav { top: 50%; transform: translateY(-50%); }
.ag-zurueck { left: 10px; }
.ag-vor { right: 10px; }
.ag-nav:disabled { opacity: 0.25; cursor: default; }
.ag-zu:hover, .ag-nav:not(:disabled):hover { background: rgba(245, 247, 255, 0.18); }

@media (max-width: 900px) {
    .ag-detail-innen { grid-template-columns: 1fr; gap: 18px; padding: 64px 16px 28px; align-content: start; }
    .ag-gross img { max-height: 62dvh; }
    .ag-wasserzeichen::after { right: 12px; bottom: 12px; font-size: 14px; }
    .ag-info { align-self: start; }
    .ag-nav { top: auto; bottom: 12px; transform: none; }
    .ag-detail-innen { padding-bottom: 72px; }
    .ag-raster { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .ag-bild img, .ag-chip { transition: none; }
}
