/**
 * SpeedShot Galerie CSS
 * 
 * Global Styles für alle Layouts
 */

/* ========================================================================
   RESET & BASE
   ======================================================================== */

.speedshot-galerie-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

.speedshot-galerie-wrapper * {
    box-sizing: border-box;
}

/* ========================================================================
   HEADER
   ======================================================================== */

.galerie-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 2px solid #eee;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.galerie-header .header-left {
    min-width: 0; /* Wichtig für text-overflow */
}

.galerie-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.galerie-header .event-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.galerie-header .header-right {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ========================================================================
   LAYOUT SWITCHER
   ======================================================================== */

.layout-switcher {
    display: flex;
    gap: 8px;
    background: #f5f5f5;
    padding: 6px;
    border-radius: 8px;
}

.layout-switcher .layout-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.layout-switcher .layout-btn.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.layout-switcher .layout-btn:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}

.layout-switcher .layout-btn .icon {
    font-size: 18px;
}

/* ========================================================================
   FILTER SWITCHER
   ======================================================================== */

.filter-switcher select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    font-weight: 500;
}

/* ========================================================================
   CONTENT AREA
   ======================================================================== */

.galerie-content {
    min-height: calc(100vh - 120px);
    background: #fafafa;
    padding: 20px;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

.galerie-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

/* Bilder-Container */
.galerie-images-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.galerie-images {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 20px;
}

@media (max-width: 768px) {
    .galerie-images {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .galerie-images {
        padding: 10px;
    }
}

/* ========================================================================
   NO IMAGES STATE
   ======================================================================== */

/* ========================================================================
   NO IMAGES / EMPTY STATE - CLEAN LAYOUT
   ======================================================================== */

.no-images {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 30px;
    /* KRITISCH: Überschreibe Masonry column-count */
    column-span: all;
    -webkit-column-span: all;
    break-inside: auto;
    page-break-inside: auto;
}

/* Haupt-Empty-State Card - BLOCK Element */
.no-images-main {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: block; /* WICHTIG: Block, kein Grid/Flex */
    width: 100%;
    /* KRITISCH: Masonry Override */
    column-span: all;
    -webkit-column-span: all;
    break-inside: avoid;
    page-break-inside: avoid;
}

.no-images-main-content {
    display: block; /* WICHTIG: Block */
    max-width: 100%;
}

.no-images .no-images-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
    display: block; /* WICHTIG: Block */
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.no-images h3 {
    font-size: 30px;
    margin: 0 0 16px 0;
    color: #1a1a1a;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: block; /* WICHTIG: Block */
}

.no-images-main p {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #6c757d;
    line-height: 1.6;
    display: block; /* WICHTIG: Block */
}

.no-images-hint {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    color: #495057;
}

/* Countdown Box */
.no-images .countdown {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 30px;
    border-radius: 12px;
    margin: 30px auto 0;
    max-width: 600px;
    display: block; /* WICHTIG: Block */
    break-inside: avoid;
    page-break-inside: avoid;
}

.no-images .countdown h4 {
    margin: 0 0 20px 0;
    font-size: 17px;
    font-weight: 700;
    color: #495057;
    display: block; /* WICHTIG: Block */
}

.no-images .countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.no-images .countdown-timer .time-unit {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 16px 8px;
    text-align: center;
}

.no-images .countdown-timer .time-value {
    display: block;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 6px;
    font-family: 'Courier New', monospace;
    color: #1a1a1a;
}

.no-images .countdown-timer .time-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #6c757d;
}

/* Parallele Events Section */
.no-images .parallel-events {
    margin-top: 60px;
    display: block; /* WICHTIG: Block */
    break-inside: avoid;
    page-break-inside: avoid;
}

.no-images .parallel-events-header {
    text-align: center;
    margin-bottom: 30px;
    display: block; /* WICHTIG: Block */
}

.no-images .parallel-events h4 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: block; /* WICHTIG: Block */
}

.no-images .parallel-events-subtitle {
    font-size: 15px;
    color: #6c757d;
    margin: 0;
    display: block; /* WICHTIG: Block */
}

.no-images .parallel-events .event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.no-images .parallel-events .event-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s ease;
    display: block; /* WICHTIG: Block */
    break-inside: avoid;
    page-break-inside: avoid;
}

.no-images .parallel-events .event-card:hover {
    border-color: #2271b1;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 113, 177, 0.12);
}

.no-images .parallel-events .event-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.no-images .parallel-events .event-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.no-images .parallel-events .event-card-content {
    flex: 1;
    min-width: 0;
}

.no-images .parallel-events .event-name {
    font-weight: 700;
    font-size: 17px;
    line-height: 1.4;
    color: #1a1a1a;
    display: block;
    margin-bottom: 6px;
}

.no-images .parallel-events .event-info {
    font-size: 14px;
    color: #2271b1;
    display: block;
    font-weight: 600;
}

.no-images .parallel-events .event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 14px;
}

.no-images .parallel-events .event-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .no-images {
        margin: 40px auto;
        padding: 0 20px;
    }
    
    .no-images-main {
        padding: 40px 24px;
        margin-bottom: 40px;
    }
    
    .no-images .no-images-icon {
        font-size: 60px;
    }
    
    .no-images h3 {
        font-size: 24px;
    }
    
    .no-images-main p {
        font-size: 15px;
    }
    
    .no-images .countdown {
        padding: 24px 20px;
    }
    
    .no-images .countdown-timer {
        gap: 10px;
    }
    
    .no-images .countdown-timer .time-unit {
        padding: 12px 6px;
    }
    
    .no-images .countdown-timer .time-value {
        font-size: 28px;
    }
    
    .no-images .countdown-timer .time-label {
        font-size: 9px;
    }
    
    .no-images .parallel-events {
        margin-top: 40px;
    }
    
    .no-images .parallel-events h4 {
        font-size: 20px;
    }
    
    .no-images .parallel-events .event-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .no-images .parallel-events .event-card {
        padding: 20px;
    }
    
    .no-images .parallel-events .event-icon {
        font-size: 28px;
    }
    
    .no-images .parallel-events .event-name {
        font-size: 16px;
    }
}

/* ========================================================================
   MASONRY FIX: Deaktiviere column-count wenn no-images vorhanden
   ======================================================================== */

/* KRITISCH: Wenn .no-images im Masonry-Container ist, erzwinge 1 Spalte */
.galerie-masonry:has(.no-images) {
    column-count: 1 !important;
    -webkit-column-count: 1 !important;
    -moz-column-count: 1 !important;
}

/* Fallback für Browser ohne :has() Support */
.galerie-masonry .no-images {
    width: 100% !important;
    max-width: none !important;
    column-span: all !important;
    -webkit-column-span: all !important;
    display: block !important;
}

.galerie-masonry .no-images-main {
    column-span: all !important;
    -webkit-column-span: all !important;
    display: block !important;
    width: 100% !important;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 768px) {
    .galerie-content {
        padding: 15px;
    }
    
    .galerie-header {
        padding: 15px 20px;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .galerie-header h1 {
        font-size: 20px;
    }
    
    .galerie-header .header-left {
        width: 100%;
    }
    
    .galerie-header .header-right {
        width: 100%;
        justify-content: flex-end; /* Warenkorb rechtsbündig */
    }
    
    /* Mobile: Layout-Switcher verstecken (nicht prioritär) */
    .layout-switcher {
        display: none !important;
    }
    
    /* Mobile: Filter-Position-Switcher verstecken (nicht prioritär) */
    .filter-switcher {
        display: none !important;
    }
    
    .layout-switcher .layout-btn .text {
        display: none;
    }
    
    .no-images .countdown {
        padding: 20px 25px;
    }
    
    .no-images .countdown-timer {
        gap: 15px;
    }
    
    .no-images .countdown-timer .time-value {
        font-size: 28px;
    }
    
    .no-images .parallel-events .event-list {
        flex-direction: column;
        align-items: stretch;
    }
    
    .no-images .parallel-events .event-card {
        min-width: unset;
    }
}

/* Mobile Hochformat (Portrait) - Optimiert für schmale Displays */
@media (max-width: 480px) and (orientation: portrait) {
    .galerie-content {
        padding: 10px;
    }
    
    .galerie-header {
        padding: 10px 12px;
    }
    
    .galerie-header h1 {
        font-size: 18px;
    }
    
    .galerie-header .event-meta {
        font-size: 12px;
        gap: 10px;
    }
}

/* Mobile Querformat (Landscape) - Nutzt mehr Breite */
@media (max-width: 900px) and (orientation: landscape) {
    .galerie-content {
        padding: 12px;
    }
    
    .galerie-header {
        padding: 12px 15px;
    }
    
    .galerie-header h1 {
        font-size: 20px;
    }
}

/* Sehr kleine Displays */
@media (max-width: 480px) {
    .galerie-content {
        padding: 10px;
    }
    
    .galerie-header {
        padding: 12px 15px;
    }
    
    .galerie-header h1 {
        font-size: 18px;
    }
    
    .galerie-header .event-meta {
        font-size: 12px;
        gap: 12px;
    }
    
    .layout-switcher {
        padding: 4px;
        gap: 4px;
    }
    
    .layout-switcher .layout-btn {
        padding: 8px 12px;
    }
}

/* ========================================================================
   UTILITIES
   ======================================================================== */

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, opacity, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Focus styles */
button:focus,
a:focus,
select:focus,
input:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #4CAF50;
    color: white;
}

/* ========================================================================
   INFO-BOX
   ======================================================================== */

.galerie-info-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #c5ddf5;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    padding: 16px 50px 16px 20px;
    margin: 0 30px 20px 30px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.galerie-info-box.hidden {
    display: none;
}

.galerie-info-box .info-box-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d4e7f;
}

.galerie-info-box .info-box-content {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.galerie-info-box .info-box-content p {
    margin: 0 0 8px 0;
}

.galerie-info-box .info-box-content p:last-child {
    margin-bottom: 0;
}

.galerie-info-box .info-box-content a {
    color: #2271b1;
    text-decoration: underline;
}

.galerie-info-box .info-box-content a:hover {
    color: #135e96;
}

.galerie-info-box .info-box-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.galerie-info-box .info-box-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* Mobile Info-Box */
@media (max-width: 768px) {
    .galerie-info-box {
        margin: 0 15px 15px 15px;
        padding: 12px 40px 12px 15px;
    }
    
    .galerie-info-box .info-box-title {
        font-size: 14px;
    }
    
    .galerie-info-box .info-box-content {
        font-size: 13px;
    }
    
    .galerie-info-box .info-box-close {
        top: 8px;
        right: 8px;
        font-size: 20px;
    }
}

/* ========================================================================
   GRID CARD COMPONENT
   ======================================================================== */

.speedshot-grid-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* WICHTIG: Verhindert Overflow */
    max-width: 100%; /* WICHTIG: Verhindert Overflow */
}

/* Bild Container - RESPONSIVE HÖHE basierend auf Spaltenanzahl */
.grid-card-image-container {
    position: relative;
    background: #f4f4f4;
    cursor: pointer;
    overflow: hidden;
    height: 200px; /* Standard für 5 Spalten - wird per JS angepasst */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Verhindert Schrumpfen */
}

.grid-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Badges */
.grid-card-id-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.grid-card-id-badge:hover {
    background: rgba(102, 126, 234, 0.95);
}

.grid-card-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* Content - MIT RESPONSIVE MINDESTHÖHE */
.grid-card-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 100px; /* Mindesthöhe für Content - reduziert */
}

/* Bei weniger Spalten: Mehr Platz für Content */
@media (max-width: 1200px) {
    .grid-card-content {
        min-height: 110px;
    }
}

@media (max-width: 768px) {
    .grid-card-content {
        padding: 10px;
        min-height: 90px;
    }
}

.grid-card-event-link {
    font-size: 11px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* WICHTIG: Verhindert Overflow */
}

.grid-card-event-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.grid-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6em; /* 2 Zeilen fest */
    word-wrap: break-word; /* Bricht lange Wörter */
    overflow-wrap: break-word; /* Alternative für neuere Browser */
}

.grid-card-description {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6em; /* 2 Zeilen fest */
    word-wrap: break-word; /* Bricht lange Wörter */
    overflow-wrap: break-word; /* Alternative für neuere Browser */
}

.grid-card-players {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto; /* Push nach unten */
    max-width: 100%; /* WICHTIG: Verhindert Overflow */
    overflow: hidden;
}

.player-tag {
    background: #f0f0f0;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* WICHTIG: Verhindert Overflow */
}

.player-tag-more {
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

/* Actions - KOMPAKT & FESTE HÖHE */
.grid-card-actions {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 6px;
    flex-shrink: 0; /* Verhindert Schrumpfen */
    height: 44px; /* Feste Höhe - REDUZIERT von 48px */
}

.grid-card-btn {
    flex: 1;
    padding: 6px 10px; /* Padding reduziert */
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap; /* Kein Umbruch */
}

.grid-card-btn.btn-view {
    background: #f0f0f0;
    color: #333;
}

.grid-card-btn.btn-shop {
    background: #667eea;
    color: white;
}

.grid-card-btn.btn-shop.in-cart {
    background: #4CAF50;
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
}

.grid-card-btn.btn-shop.in-cart:disabled {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .grid-card-image-container {
        height: 180px;
    }
    
    .grid-card-content {
        padding: 10px;
        min-height: 100px;
    }
    
    .grid-card-actions {
        padding: 8px 10px;
        flex-direction: column;
        height: auto;
        gap: 6px;
    }
    
    .grid-card-btn {
        width: 100%;
        font-size: 11px;
        padding: 8px;
    }
}
/* ======================================================================== cart-icon.php ======================================================================== */
.speedshot-cart-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.speedshot-cart-icon:hover {
    transform: scale(1.1);
    background: #45a049;
}

.speedshot-cart-icon .cart-icon {
    font-size: 24px;
}

.speedshot-cart-icon .cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 0.3s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ======================================================================== cart-panel.php ======================================================================== */
.speedshot-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9998;
    display: none;
}

.speedshot-cart-panel.active {
    display: block;
}

.speedshot-cart-panel .cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.speedshot-cart-panel .cart-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 90vw;
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s;
}

.speedshot-cart-panel .cart-header {
    padding: 20px;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speedshot-cart-panel .cart-header h3 {
    margin: 0;
    font-size: 22px;
}

.speedshot-cart-panel .cart-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.speedshot-cart-panel .cart-close:hover {
    color: #333;
}

.speedshot-cart-panel .cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.speedshot-cart-panel .cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.speedshot-cart-panel .cart-empty-hint {
    font-size: 14px;
    margin-top: 10px;
}

.speedshot-cart-panel .cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.speedshot-cart-panel .cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.2s;
}

.speedshot-cart-panel .cart-item:hover {
    background: #f0f0f0;
}

.speedshot-cart-panel .cart-item-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.speedshot-cart-panel .cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.speedshot-cart-panel .cart-item-players {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.speedshot-cart-panel .cart-item-price {
    font-size: 16px;
    color: #4CAF50;
    font-weight: bold;
}

.speedshot-cart-panel .cart-item-remove {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    transition: transform 0.2s;
}

.speedshot-cart-panel .cart-item-remove:hover {
    transform: scale(1.2);
}

.speedshot-cart-panel .cart-footer {
    padding: 20px;
    border-top: 2px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.speedshot-cart-panel .cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    padding: 10px 0;
}

.speedshot-cart-panel .cart-total strong {
    font-size: 24px;
    color: #4CAF50;
}

.speedshot-cart-panel .cart-checkout-btn {
    padding: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.speedshot-cart-panel .cart-checkout-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.speedshot-cart-panel .cart-clear-btn {
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.speedshot-cart-panel .cart-clear-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ======================================================================== image-card.php ======================================================================== */
.speedshot-image-card {
    position: relative;
    width: 100%;
    height: auto; /* Auto für Masonry */
    cursor: pointer;
    overflow: hidden;
}

/* Für Grid-Layout: Auto Höhe */
.layout-grid .speedshot-image-card {
    height: auto;
}

/* Für Fullwidth-Layout: Auto Höhe */
.layout-fullwidth .speedshot-image-card {
    height: auto;
}

.speedshot-image-card .card-image {
    width: 100%;
    height: auto; /* Auto für natürliche Proportionen */
    display: block; /* Verhindert whitespace unter Bild */
    object-fit: contain; /* Zeigt komplettes Bild ohne Abschneiden */
}

/* Für Grid-Layout: contain statt cover */
.layout-grid .speedshot-image-card .card-image,
.layout-fullwidth .speedshot-image-card .card-image {
    object-fit: contain; /* Zeigt komplettes Bild */
    background: #f4f4f4; /* Heller Hintergrund für Letterboxing */
}

.speedshot-image-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0) 70%,
        rgba(0,0,0,0.5) 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
    padding: 12px;
}

.speedshot-image-card:hover .card-overlay {
    opacity: 1;
}

/* SPIELERNAMEN - Oben links als Badge */
.speedshot-image-card .card-players-center {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: auto;
    transform: none;
    text-align: left;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 60%; /* Maximal 60% der Bildhöhe */
    overflow: hidden;
}

.speedshot-image-card:hover .card-players-center {
    opacity: 1;
}

.speedshot-image-card .player-name-big {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    display: inline-block;
    white-space: nowrap;
    align-self: flex-start;
    max-width: calc(100% - 60px); /* Platz für Rating rechts */
    overflow: hidden;
    text-overflow: ellipsis;
}

.speedshot-image-card .player-name-big .player-number {
    color: #ffd700;
    font-weight: 800;
    margin-right: 6px;
}

.speedshot-image-card .card-info {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    z-index: 4;
}

/* ID Badge - oben links, immer sichtbar */
.speedshot-image-card .card-id-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 10;
    cursor: pointer;
}

.speedshot-image-card .card-id-badge:hover {
    background: rgba(102, 126, 234, 0.95);
}

.speedshot-image-card .card-players,
.speedshot-image-card .card-rating {
    background: rgba(255,255,255,0.95);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
}

.speedshot-image-card .card-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    z-index: 5;
}

.speedshot-image-card .card-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speedshot-image-card .btn-cart.in-cart {
    background: #4CAF50;
    color: white;
}

/* Shop Button (jetzt der einzige Cart) */
.speedshot-image-card .btn-shop {
    background: rgba(34, 113, 177, 0.95); /* Blau wie Media Hub */
    color: white;
}

.speedshot-image-card .btn-shop.in-cart {
    background: rgba(76, 175, 80, 0.95); /* Grün für "Im Warenkorb" */
    color: white;
    cursor: not-allowed;
}

.speedshot-image-card .btn-shop.in-cart:disabled {
    opacity: 0.9;
}

/* ======================================================================== lightbox.php ======================================================================== */
.speedshot-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.speedshot-lightbox.active {
    display: flex;
}

.speedshot-lightbox .lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s;
}

.speedshot-lightbox .lightbox-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.speedshot-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.speedshot-lightbox .lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.speedshot-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 48px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speedshot-lightbox .lightbox-prev {
    left: 20px;
}

.speedshot-lightbox .lightbox-next {
    right: 20px;
}

.speedshot-lightbox .lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.speedshot-lightbox .lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.speedshot-lightbox .lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

.speedshot-lightbox .lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.speedshot-lightbox .lightbox-loader.active {
    display: block;
}

.speedshot-lightbox .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.speedshot-lightbox .lightbox-info {
    background: rgba(0,0,0,0.8);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.speedshot-lightbox .info-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.speedshot-lightbox .info-players {
    font-size: 16px;
    font-weight: 600;
}

.speedshot-lightbox .info-rating {
    font-size: 18px;
}

.speedshot-lightbox .lightbox-action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: #4CAF50;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.speedshot-lightbox .lightbox-action-btn:hover {
    background: #45a049;
}

.speedshot-lightbox .lightbox-action-btn.in-cart {
    background: #2196F3;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Keyboard Navigation */
.speedshot-lightbox .keyboard-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

