.gallery-page {
    padding: 2rem 0 5rem 0;
}

.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2d5c4;
}

.gallery-header h1 {
    font-size: 2.8rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.gallery-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: rgb(235, 235, 235);
    font-size: 1.05rem;
    line-height: 1.6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background-color: #d1c7b8;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
    cursor: zoom-in;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-modal-caption {
    text-align: center;
    color: white;
    padding: 1rem;
    font-size: 1rem;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: -30px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.2s;
}

.gallery-modal-close:hover {
    color: #ef4444;
}

.gallery-modal-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-prev {
    margin-left: -50px;
}

.modal-next {
    margin-right: -50px;
}

.product-tab {
    padding: 5px 10px;
    background: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.product-tab.active {
    background: #b1ffa8;
}

/* Galerie Navigation */
.gallery-filters {
    display: flex;
    gap: 2rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a4a4a;
}

/* Custom Dropdown (gleicher Stil wie im Shop) */
.custom-dropdown {
    position: relative;
    min-width: 150px;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d4c9b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dropdown-trigger:hover {
    border-color: #9ca3af;
}

.selected-value {
    color: #2c2c2a;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: #9ca3af;
    transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid #d4c9b8;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}

.custom-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
    color: black;
}

.dropdown-item:hover {
    background: #f5f5f0;
}

.dropdown-item.selected {
    background: #e5e5e0;
    font-weight: 500;
    color: black;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: #f9f9f8;
    transition: transform 0.2s;
}

.gallery-caption {
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    position: absolute;
    z-index: 9;
    bottom: 0;
    width: 100%;
    color: white;
    background: #0000005e;
    border: none;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

@media (max-width: 780px) {
    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .gallery-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        justify-content: space-between;
    }

    .custom-dropdown {
        flex: 1;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .gallery-item img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}