/* WC Filter Slider Gallery Styles - EXAKT WIE GRID GALLERY */

/* Container */
.wc-filter-slider-container {
    width: 100%;
    margin: 40px 0;
    position: relative;
}

/* Title */
.slider-title {
    margin: 0 0 30px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
    position: relative;
}

.slider-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #d12500, #ff8c00);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Slider Wrapper - Mit Platz für Navigation Buttons */
.slider-wrapper {
    position: relative;
    margin: 0 24px; /* Platz für die halben Navigation-Buttons */
}

/* Navigation Buttons - NEUES DESIGN */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.slider-nav svg {
    width: 24px;
    height: 24px;
    stroke: #E30613; /* Orange Pfeile */
    stroke-width: 3;
    transition: all 0.3s ease;
}

.slider-nav:hover:not(:disabled) {
    background: linear-gradient(135deg, #FCAE00, #E30613);
    border-color: #E30613;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav:hover:not(:disabled) svg {
    stroke: #fff; /* Weiße Pfeile bei Hover */
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-nav:disabled:hover {
    transform: translateY(-50%);
    background: #fff;
}

/* Position der Buttons - Mitte aligned mit Kartenrand */
.slider-prev {
    left: -24px; /* Halbe Button-Breite */
}

.slider-next {
    right: -24px; /* Halbe Button-Breite */
}

/* Track */
.slider-track-wrapper {
    overflow: hidden;
    margin: 0 10px;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

/* Product Cards - EXAKT WIE GRID MIT GLEICHER HÖHE */
.slider-product-card {
    flex: 0 0 calc(25% - 15px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.slider-product-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.slider-product-card .product-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image Container */
.slider-product-card .product-image-container {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f8f8f8;
}

.slider-product-card .product-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-product-card .product-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.slider-product-card:hover .product-image {
    transform: scale(1.05);
}

/* Action Buttons */
.slider-product-card .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-product-card .wishlist-button,
.slider-product-card .compare-button {
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.slider-product-card .wishlist-button:hover,
.slider-product-card .compare-button:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Product Info Container - WICHTIG FÜR GLEICHE HÖHE */
.slider-product-card .product-info {
    position: relative;
    overflow: visible;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* VARIATIONS BAR - VON UNTEN WIE BEI GRID! */
.slider-product-card .product-variations-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid #e0e0e0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 5 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Desktop Hover - VON UNTEN! */
@media (min-width: 992px) {
    .slider-product-card:hover .product-variations-bar {
        transform: translateY(0);
    }
}

.slider-product-card .variations-scroll-container {
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
}

/* Force Horizontal Layout - ERWEITERT für verschiedene Klassen */
.slider-product-card .variations-scroll-container .pkonfig-farben-horizontal,
.slider-product-card .variations-scroll-container .pkonfig-farben,
.slider-product-card .variations-scroll-container > div[class*="farben"],
.slider-product-card .variations-scroll-container > div[class*="variation"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    height: 100%;
    align-items: center;
}

.slider-product-card .variations-scroll-container .pkonfig-farben-item,
.slider-product-card .variations-scroll-container a[class*="farben"],
.slider-product-card .variations-scroll-container a[class*="variation"] {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    border: 2px solid #e0e0e0 !important;
    display: block !important;
    overflow: hidden !important;
}

.slider-product-card .variations-scroll-container .pkonfig-farben-item img,
.slider-product-card .variations-scroll-container a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.slider-product-card .variations-scroll-container .pkonfig-farben-item span,
.slider-product-card .variations-scroll-container a span {
    display: none !important;
}

/* Scrollbar */
.slider-product-card .variations-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.slider-product-card .variations-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.slider-product-card .variations-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

/* Product Details Container - MIT WEISSEM HINTERGRUND */
.slider-product-card .product-details-container {
    position: relative;
    padding: 15px;
    background: #fff !important;
    z-index: 10 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Title */
.slider-product-card .product-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.slider-product-card .product-title a {
    color: #333 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.slider-product-card .product-title a:hover {
    color: #E30613 !important;
}

/* Price */
.slider-product-card .product-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.slider-product-card .product-price .amount {
    color: #000 !important;
    text-shadow: 
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        2px 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-product-card .product-price small {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
    text-shadow: none;
}

/* Button Container - IMMER UNTEN */
.slider-product-card .product-button {
    margin-top: auto;
}

.slider-product-card .product-link-button {
    display: block;
    width: 100%;
    text-align: center;
    background: #000 !important;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.slider-product-card .product-link-button:hover {
    background: linear-gradient(135deg, #FCAE00, #E30613) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

/* Mobile Variations Button - SPEZIELLES STYLING */
.slider-product-card .mobile-variations-button {
    display: none;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FCAE00, #E30613) !important;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.3);
    -webkit-tap-highlight-color: transparent; /* Entfernt blauen Highlight auf iOS */
    user-select: none; /* Verhindert Text-Selektion */
}

.slider-product-card .mobile-variations-button:active {
    transform: scale(0.98);
}

/* Mobile Variations Overlay */
.slider-product-card .mobile-variations-overlay {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid #e0e0e0;
    height: 120px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 25;
}

.slider-product-card .mobile-variations-overlay.active {
    transform: translateY(0);
}

.slider-product-card .mobile-variations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.slider-product-card .mobile-variations-title {
    font-weight: 600;
    font-size: 14px;
}

.slider-product-card .close-variations {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.slider-product-card .close-variations:hover {
    color: #E30613;
}

/* Mobile Variations Container */
.slider-product-card .mobile-variations-overlay .variations-scroll-container {
    padding: 10px 15px;
}

/* Graues Overlay beim Öffnen */
.slider-product-card .product-image-container.variations-open::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;
}

/* Variations Placeholder & Loading */
.variations-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 60px;
    color: #999;
    font-size: 13px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #E30613;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-text {
    color: #E30613;
    font-size: 12px;
}

/* Verstecke nur komplett leere Varianten-Container */
.slider-product-card .variations-scroll-container:empty {
    min-height: 60px; /* Zeige trotzdem Platz */
}

/* Wenn nur Text drin ist (wie ∞), verstecke es */
.slider-product-card .variations-scroll-container:not(:has(*)) {
    font-size: 0 !important;
    color: transparent !important;
}

/* Zeige eine Nachricht wenn keine Varianten da sind */
.slider-product-card .variations-scroll-container:empty::after {
    content: "Keine Varianten verfügbar";
    font-size: 12px;
    color: #999;
    display: block;
    text-align: center;
    padding: 20px;
}

/* Fix für gleiche Höhe der Cards - ALLE CARDS GLEICH */
.slider-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.3s ease;
    gap: 20px;
}

/* Gleiche Mindesthöhe für ALLE Cards */
.slider-product-card {
    min-height: 450px;
}

@media (max-width: 1199px) {
    .slider-product-card {
        min-height: 420px;
    }
}

/* Mobile Specific Fixes */
@media (max-width: 991px) and (min-width: 577px) {
    .slider-product-card {
        flex: 0 0 calc(50% - 10px);
        min-height: 380px;
    }
}

@media (max-width: 576px) {
    .slider-product-card {
        min-height: 380px;
    }
}

/* Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: #999;
}

.slider-dot.active {
    background: #E30613;
    transform: scale(1.2);
}

/* Alle Cards haben jetzt die gleiche Struktur */
.slider-product-card .product-info {
    position: relative;
    overflow: visible;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slider-product-card .product-image-container {
    padding-top: 100%;
}

/* Verstecke leere Varianten-Container */
.slider-product-card .product-variations-bar:empty,
.slider-product-card .variations-placeholder:empty {
    display: none !important;
}

/* Fix für fehlerhaften Varianten-Output */
.slider-product-card .pkonfig-farben-horizontal:only-child {
    display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .slider-product-card {
        flex: 0 0 calc(33.333% - 13.33px);
    }
}

@media (max-width: 991px) {
    .slider-product-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .slider-prev {
        left: -15px;
    }
    
    .slider-next {
        right: -15px;
    }
    
    /* Mobile Variations */
    .slider-product-card .product-variations-bar {
        display: none !important;
    }
    
    .slider-product-card.has-variations .mobile-variations-button {
        display: block;
    }
    
    .slider-product-card .mobile-variations-overlay {
        display: block;
    }
}

/* Mobile Fixes - KORRIGIERT */
@media (max-width: 576px) {
    .slider-product-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    .slider-track {
        gap: 0 !important; /* KEIN GAP auf Mobile */
        padding: 0 !important;
    }
    
    .slider-wrapper {
        margin: 0 20px; /* Weniger Margin auf Mobile für Navigation Buttons */
    }
    
    .slider-track-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .slider-product-card .product-inner {
        margin: 0 !important;
    }
    
    .slider-product-card .product-info {
        padding: 15px 15px 0 15px; /* Gleiches Padding auf Mobile */
    }
    
    .slider-product-card .product-details-container {
        padding: 0 0 15px 0; /* Nur unten Padding */
    }
    
    .slider-product-card .product-title {
        font-size: 14px;
    }
    
    .slider-product-card .product-price {
        font-size: 18px;
    }
    
    /* Stelle sicher dass Mobile Variations Button sichtbar ist */
    .slider-product-card .mobile-variations-button {
        display: block !important;
        position: relative;
        z-index: 20;
        touch-action: manipulation;
    }
    
    /* Mobile Variations Overlay Position Fix */
    .slider-product-card .mobile-variations-overlay {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: 50vh;
        z-index: 9999;
        transform: translateY(100%);
    }
    
    .slider-product-card .mobile-variations-overlay.active {
        transform: translateY(0);
    }
    
    /* Verhindere Scroll wenn Overlay offen */
    body.variations-open {
        overflow: hidden;
    }
    
    /* Navigation Buttons auf Mobile */
    .slider-nav {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .slider-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .slider-prev {
        left: -20px; /* Halbe Button-Breite für Mobile */
    }
    
    .slider-next {
        right: -20px; /* Halbe Button-Breite für Mobile */
    }
    
    /* Dots auf Mobile kleiner */
    .slider-dots {
        margin-top: 20px;
    }
    
    .slider-dot {
        width: 8px;
        height: 8px;
    }
}

/* Track auf Mobile */
@media (max-width: 576px) {
    .slider-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Wrapper muss genau 100% sein */
    .slider-track-wrapper {
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Cards müssen genau 100% breit sein */
    .slider-product-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}

/* Utility Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}