/* ========================================
   GALLERY SECTION - HERO + THUMBNAILS
   ======================================== */

.store-gallery-section {
    padding: var(--section-spacing) 0;
    background: white;
}

/* ✅ NEUE GALERIE STRUKTUR */
.gallery-hero-container {
    max-width: var(--widget-max-width, 1400px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ✅ HERO IMAGE */
.gallery-hero {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gallery-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-hero:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    color: white;
    pointer-events: none; /* Allow clicks through to image */
}

.hero-info {
    pointer-events: auto; /* Re-enable clicks on info */
}

.hero-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.9);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.hero-info p {
    font-size: 1rem;
    margin: 0;
    opacity: 1;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.9);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ✅ PLAY BUTTONS & ICONS */
.hero-play-button,
.hero-360-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--smg-500);
    transition: all 0.3s ease;
}

.hero-play-button:hover,
.hero-360-icon:hover {
    background: var(--smg-500);
    color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.hero-360-icon span {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

/* ✅ GALLERY COUNTER */
.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ✅ THUMBNAIL GRID */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.gallery-thumbnail-item,
.gallery-show-all {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-thumbnail-item:hover,
.gallery-show-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block; /* ✅ Entfernt Leerzeichen unter Bildern */
}

.gallery-thumbnail-item:hover img {
    transform: scale(1.1);
}

/* ✅ THUMBNAIL ICONS */
.thumbnail-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

/* ✅ "ALLE ANZEIGEN" BUTTON */
.gallery-show-all {
    background: linear-gradient(135deg, var(--smg-600), var(--smg-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.show-all-content {
    text-align: center;
}

.show-all-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.show-all-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* ✅ RESPONSIVE GALLERY */
@media (max-width: 968px) {
    .gallery-hero-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .hero-info h3 {
        font-size: 1.25rem;
    }

    .hero-play-button,
    .hero-360-icon {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        aspect-ratio: 16/9;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-overlay {
        padding: 1rem;
    }

    .hero-info h3 {
        font-size: 1.125rem;
    }

    .hero-info p {
        font-size: 0.875rem;
    }
}

.media-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ✅ SUMA Gallery Styles - Höhere Bilder */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl, 1.5rem);
}

.gallery-item {
    cursor: pointer;
    border-radius: var(--radius-xl, 1.5rem);
    overflow: hidden;
    transition: all var(--transition-normal, 0.3s ease);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--card-shadow);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--smg-500-rgb, 227, 30, 36), 0.1);
}

.gallery-item-inner {
    position: relative;
    height: 350px; /* ✅ Erhöht von 250px auf 350px */
    overflow: hidden;
}

.gallery-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block; /* ✅ Entfernt Leerzeichen unter Bildern */
}

.gallery-item:hover .gallery-thumbnail img {
    transform: scale(1.1);
}

.media-type-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.media-icon {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.media-icon.tour-icon {
    flex-direction: column;
    border-radius: var(--border-radius);
    padding: 0.75rem;
}

.media-icon.tour-icon span {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.gallery-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-hover-overlay {
    transform: translateY(0);
}

.hover-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.hover-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.9);
}

.lightbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lightbox-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #000;
}

.lightbox-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-media iframe {
    width: 100%;
    height: 500px;
}

.lightbox-info {
    padding: 1.5rem;
    background: white;
}

.lightbox-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.lightbox-description {
    margin: 0;
    color: #4a5568;
    line-height: 1.6;
}

.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 1rem;
    pointer-events: none;
}

.lightbox-prev, .lightbox-next {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

