/* === PRODUCTS ARCHIVE GRID === */
.lb-products-archive-wrapper {
    
}

.lb-products-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--lb-products-grid-gap, 20px);
    margin-bottom: 40px;
}

/* === GRID LAYOUT SYSTEM === */
.lb-product-card {
    background: #ffffff;
    border-radius: var(--lb-products-card-radius, 12px);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e8e8e8;
    height: 420px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.lb-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Banner positioning in grid - 2x2 Layout (2 Zeilen hoch, 2 Spalten breit, immer rechts) */
.lb-banner-container.lb-banner-2x2 {
    grid-column: 3 / span 2; /* Startet bei Spalte 3, spannt 2 Spalten (rechts) */
    grid-row: 2; /* Zweite Zeile */
    /* background: #f8f9fa; */
    border-radius: var(--lb-products-card-radius, 12px);
    overflow: hidden;
    position: relative;
    /* border: 1px solid #e8e8e8; */
    transition: all 0.3s ease;
    height: 420px; /* Gleiche Höhe wie Product-Cards */
}

.lb-banner-container.lb-banner-2x2:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); */
}

/* Banner Items für Rotation */
.lb-banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.lb-banner-item.lb-banner-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.lb-banner-item.lb-banner-hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.lb-banner-container.lb-banner-2x2:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); */
}

.lb-banner-single {
    position: relative;
    width: 100%;
    height: 100%;
}

.lb-banner-single img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

.lb-banner-overlay {
    display: none !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3), transparent);
    color: white;
    padding: 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.lb-banner-container:hover .lb-banner-overlay {
    transform: translateY(0);
    opacity: 1;
}

.lb-banner-overlay h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.lb-banner-container a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* === PRODUCT CARD STYLING === */
.lb-product-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 12px 12px 0 0; /* Nur oben abgerundet */
    margin: 0; /* Kein Margin */
    padding: 0; /* Kein Padding */
}

.lb-product-image img, .lb-product-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block; /* Entfernt Leerraum unter Bildern */
    margin: 0;
    padding: 0;
}

.lb-product-card:hover .lb-product-image img,
.lb-product-card:hover .lb-product-image svg {
    transform: scale(1.02); /* Weniger aggressive Skalierung */
}

.lb-product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.lb-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #191970; /* Dunkelblau wie products-carousel.php */
}

.lb-product-title a {
    color: #191970; /* Dunkelblau wie products-carousel.php */
    text-decoration: none;
    transition: color 0.3s ease;
}

.lb-product-title a:hover {
    color: #4B0082; /* Dunkelviolett beim Hover wie products-carousel.php */
}

.lb-product-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.lb-product-location svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.lb-product-description {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.lb-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.lb-product-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.lb-product-capacity {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lb-product-capacity svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.lb-product-price {
    font-weight: 600;
    color: #4B0082; /* Dunkelviolett wie products-carousel.php */
    font-size: 16px;
    margin-top: 4px;
}

/* Buttons in Blautönen wie products-carousel.php */
.lb-product-btn {
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    background: #191970; /* Dunkelblau wie products-carousel.php */
}

.lb-product-btn:hover {
    background: #4B0082; /* Dunkelviolett beim Hover wie products-carousel.php */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

/* Kleine Category Badges - verwenden zentrale Farben */
.lb-product-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* === BANNER STYLING === */
.lb-banner-slider,
.lb-banner-single {
    height: 100%;
    position: relative;
}

.lb-banner-slide,
.lb-banner-single {
    height: 100%;
}

.lb-banner-slide img,
.lb-banner-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Banner Pagination Dots */
.lb-banner-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.lb-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.lb-banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.lb-banner-dot.active {
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.3);
}

/* === BANNER POSITIONIERUNG === */
/* Links-Position */
.lb-banner-container.lb-banner-position-left {
    grid-column: 1 / span 2 !important;
}

/* Rechts-Position */
.lb-banner-container.lb-banner-position-right {
    grid-column: 3 / span 2 !important;
}

/* === PAGINATION === */
.lb-products-pagination {
    text-align: center;
    margin: 40px 0;
}

.lb-products-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: #F8F9FA; /* --lb-bg-secondary */
    color: #666666; /* --lb-text-secondary */
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lb-products-pagination .page-numbers:hover,
.lb-products-pagination .page-numbers.current {
    background: var(--e-global-color-primary, #191970); /* Elementor Primary Color */
    color: #FFFFFF; /* Weiß */
}

.lb-products-pagination.lb-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* === LOAD MORE BUTTON === */
.lb-load-more-wrapper {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
}

.lb-load-more-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #F09819 0%, #EDDE5D 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 152, 25, 0.3);
}

.lb-load-more-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 152, 25, 0.4);
}

.lb-load-more-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.lb-load-more-info {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.lb-all-loaded {
    color: #4B0082;
    font-weight: 500;
}

/* === LAZY LOADING === */
.lb-products-lazy-loading {
    text-align: center;
    padding: 40px 20px;
}

.lb-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F09819;
    border-radius: 50%;
    animation: lb-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* === RESPONSIVE === */

/* Laptop: 3 Spalten */
@media (max-width: 1366px) {
    .lb-products-archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lb-banner-container.lb-banner-2x2 {
        grid-column: 2 / span 2; /* Startet bei Spalte 2, spannt 2 Spalten (rechts) */
        grid-row: 2; /* Zweite Zeile */
        height: 400px; /* Gleiche Höhe wie Product-Cards */
    }
    
    /* Banner-Positionierung bei 3 Spalten */
    .lb-banner-container.lb-banner-position-left {
        grid-column: 1 / span 2 !important;
    }
    
    .lb-banner-container.lb-banner-position-right {
        grid-column: 2 / span 2 !important;
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px) {
    .lb-products-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lb-banner-container.lb-banner-2x2 {
        grid-column: 1 / span 2 !important; /* Spannt beide Spalten */
        grid-row: auto !important;
        height: 380px; /* Gleiche Höhe wie Product-Cards */
    }
    
    /* Auf Tablet immer volle Breite */
    .lb-banner-container.lb-banner-position-left,
    .lb-banner-container.lb-banner-position-right {
        grid-column: 1 / span 2 !important;
    }
    
    .lb-product-image {
        height: 180px;
    }
    
    .lb-product-content {
        padding: 16px;
    }
}

/* Mobile: 1 Spalte */
@media (max-width: 768px) {
    .lb-products-archive-grid {
        grid-template-columns: 1fr;
    }
    
    .lb-banner-container.lb-banner-2x2,
    .lb-banner-container.lb-banner-position-left,
    .lb-banner-container.lb-banner-position-right {
        grid-column: span 1 !important; /* Spannt die einzige Spalte */
        grid-row: auto !important;
        height: 380px; /* Gleiche Höhe wie Product-Cards */
    }
    
    .lb-product-card {
        height: 380px;
    }
    
    .lb-product-image {
        height: 160px;
    }
    
    .lb-product-content {
        padding: 14px;
    }
    
    .lb-product-title {
        font-size: 15px;
    }
    
    .lb-load-more-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

