/* ===========================
   Galerie-Seite
=========================== */

.gallery-page {
    background: var(--cream);
}

.gallery-section {
    padding: 110px 0 130px;
    background: var(--cream);
}

.gallery-category {
    margin-bottom: 90px;
}

.gallery-category:last-child {
    margin-bottom: 0;
}

.gallery-category-header {
    text-align: center;
    margin-bottom: 55px;
}

.gallery-category-header h2 {
    font-size: clamp(42px, 6vw, 64px);
    color: var(--primary);
    margin: 20px 0 0;
}


/* ===========================
   Galerie Raster
=========================== */

.simple-gallery {
    columns: 3 280px;
    column-gap: 24px;
}

.simple-gallery-item {
    position: relative;
    margin: 0 0 24px;
    break-inside: avoid;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--cream-light);
}

.simple-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: .35s;
}

.simple-gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-empty {
    text-align: center;
    font-size: 22px;
    color: var(--accent);
}


/* ===========================
   Wasserzeichen Speisen
=========================== */

.has-watermark::after {
    content: "Konditorei Knappe";
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(58,36,21,.72);
    color: var(--cream-light);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    pointer-events: none;
}


/* ===========================
   Galerie Lightbox
=========================== */

.gallery-open {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-open img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-dialog {
    width: min(1100px, 92vw);
    border: 0;
    padding: 0;
    background: transparent;
    overflow: visible;
}

.gallery-dialog::backdrop {
    background: rgba(43, 28, 18, .82);
    backdrop-filter: blur(4px);
}

.gallery-dialog-frame {
    position: relative;
}

.gallery-dialog-image {
    display: block;
    max-width: 100%;
    max-height: 86vh;
    margin: auto;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
    background: var(--cream-light);
}

.gallery-dialog-watermark {
    display: none;
    position: absolute;
    right: 24px;
    bottom: 24px;
    background: rgba(58,36,21,.76);
    color: var(--cream-light);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
}

.gallery-dialog-watermark.is-visible {
    display: inline-block;
}

.gallery-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--cream-light);
    color: var(--primary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.gallery-close:hover {
    background: var(--border);
}


/* ===========================
   Galerie mobil
=========================== */

@media (max-width: 900px) {
    .simple-gallery {
        columns: 2 260px;
    }
}

@media (max-width: 600px) {
    .gallery-section {
        padding: 80px 0 100px;
    }

    .gallery-category {
        margin-bottom: 70px;
    }

    .gallery-category-header {
        margin-bottom: 38px;
    }

    .simple-gallery {
        columns: 1;
    }

    .simple-gallery-item {
        margin-bottom: 20px;
    }

    .gallery-close {
        top: -14px;
        right: -10px;
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .gallery-dialog-watermark {
        right: 14px;
        bottom: 14px;
        font-size: 14px;
        padding: 8px 12px;
    }
}