/* Oeffentliche Bestellstrecke – bewusst schlank, kein Build-Tooling. */

:root {
    --rand: #d9d9de;
    --akzent: #1f5c8b;
    --hell: #f5f6f8;
    --fehler: #a4262c;
    --erfolg: #1d6b3f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1c1c20;
    background: #fff;
    line-height: 1.5;
}

.kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    background: var(--akzent);
    color: #fff;
}

.kopf a {
    color: #fff;
}

.marke {
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}

main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem;
}

.fuss {
    max-width: 1080px;
    margin: 2rem auto 3rem;
    padding: 1rem 1.5rem 0;
    border-top: 1px solid var(--rand);
    color: #62626b;
    font-size: 0.85rem;
}

h1 {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
}

h2 {
    font-size: 1.2rem;
    margin: 2rem 0 0.75rem;
}

.hinweis {
    color: #62626b;
}

/* Meldungen */

.meldungen {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.meldung {
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--rand);
    background: var(--hell);
    margin-bottom: 0.5rem;
}

.meldung.error {
    border-color: var(--fehler);
    color: var(--fehler);
}

.meldung.success {
    border-color: var(--erfolg);
    color: var(--erfolg);
}

/* Formularelemente */

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select {
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--rand);
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

button {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--akzent);
    border-radius: 6px;
    background: var(--akzent);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

button.zweitrangig {
    background: #fff;
    color: var(--akzent);
}

label {
    display: block;
    font-size: 0.85rem;
    color: #4a4a52;
}

.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 1rem;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: var(--hell);
    margin-bottom: 1.5rem;
}

.feldgruppe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Artikelliste */

.artikel-gitter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.artikel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--rand);
    border-radius: 8px;
    padding: 0.9rem;
}

.artikel .galerie-hauptbild img,
.artikel .kein-foto {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--hell);
}

/* Fotogalerie je Artikel */

.galerie-hauptbild {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.galerie-zaehler {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
}

.galerie-vorschau {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.galerie-vorschau button {
    padding: 0;
    border: 1px solid var(--rand);
    border-radius: 4px;
    background: none;
    cursor: zoom-in;
    line-height: 0;
}

.galerie-vorschau img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 3px;
}

/* Lightbox */

body.lightbox-offen {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-inhalt {
    margin: 0;
    max-width: 90vw;
    text-align: center;
}

.lightbox-inhalt img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 6px;
    background: #fff;
}

.lightbox-inhalt figcaption {
    margin-top: 0.6rem;
    color: #fff;
    font-size: 0.9rem;
}

.lightbox button {
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
}

.lightbox button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-schliessen {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.artikel .kein-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8a92;
    font-size: 0.85rem;
}

.artikel h3 {
    margin: 0;
    font-size: 1rem;
}

.kategorie {
    font-size: 0.8rem;
    color: #62626b;
}

.artikel form {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.artikel form input[type="number"] {
    width: 5rem;
}

/* Tabellen / Karten */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--rand);
    vertical-align: top;
}

.karte {
    border: 1px solid var(--rand);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.status {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--hell);
    border: 1px solid var(--rand);
    font-size: 0.8rem;
}

.aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
