/* ===============================================
   MODERN IMAGE GALLERY & PRODUCT SHOWCASE STYLES
   =============================================== */

/* Charger Products Showcase Section */
.products-showcase {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.products-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%2310B981" fill-opacity="0.02"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E') repeat;
    opacity: 0.4;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f0f9ff, #f0fdf4);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gradient-eco);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.product-content {
    padding: 32px;
}

.product-category {
    display: inline-block;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.product-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 15px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.product-features li::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 12px;
}

.product-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.product-cta:hover {
    gap: 12px;
}

/* Installation Gallery Section */
.installation-gallery {
    padding: 120px 0;
    background: var(--background-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 300px;
    gap: 20px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.gallery-item.large {
    grid-column: span 6;
    grid-row: span 2;
}

.gallery-item.medium {
    grid-column: span 4;
}

.gallery-item.small {
    grid-column: span 3;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-overlay h4 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

/* Before/After Comparison Slider */
.before-after-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    position: relative;
    overflow: hidden;
}

.before-after-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.comparison-container {
    max-width: 900px;
    margin: 60px auto 0;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-before {
    z-index: 1;
}

.comparison-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.comparison-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.comparison-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.comparison-handle::before,
.comparison-handle::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.comparison-handle::before {
    border-width: 10px 15px 10px 0;
    border-color: transparent var(--primary-color) transparent transparent;
    left: 12px;
}

.comparison-handle::after {
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent var(--primary-color);
    right: 12px;
}

.comparison-label {
    position: absolute;
    top: 24px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
    z-index: 3;
}

.label-before {
    left: 24px;
}

.label-after {
    right: 24px;
}

/* Brand Showcase - EV Compatibility */
/* Note: Main brands-section styles are now in modern-styles.css (marquee carousel) */

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-top: 60px;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--background-secondary);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 120px;
}

.brand-logo:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    background: white;
}

.brand-logo img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    opacity: 0.6;
    transition: opacity 0.4s ease;
    filter: grayscale(100%);
}

.brand-logo:hover img {
    opacity: 1;
    filter: grayscale(0%);
}

/* Lightbox for Gallery */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .gallery-item.large {
        grid-column: span 12;
    }

    .gallery-item.medium {
        grid-column: span 6;
    }

    .gallery-item.small {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .products-showcase,
    .installation-gallery,
    .before-after-section {
        padding: 80px 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-image-wrapper {
        height: 240px;
    }

    .product-content {
        padding: 24px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        gap: 16px;
    }

    .gallery-item.large,
    .gallery-item.medium,
    .gallery-item.small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .comparison-slider {
        height: 350px;
    }

    .comparison-handle {
        width: 50px;
        height: 50px;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .brand-logo {
        min-height: 100px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .comparison-slider {
        height: 280px;
    }

    .comparison-label {
        font-size: 11px;
        padding: 8px 16px;
    }
}
