
/* Before After Gallery Pro - Main Styles */
.bagp-gallery {
    margin: 30px auto;
    position: relative;
}

/* Single Comparison */
.bagp-single-comparison,
.bagp-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: ew-resize;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background: #f5f5f5;
}

.bagp-comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.bagp-before-wrap,
.bagp-after-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bagp-before-wrap img,
.bagp-after-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mode: Slider */
.bagp-mode-slider .bagp-after-wrap {
    width: 50%;
    transition: width 0.3s ease;
}

.bagp-mode-slider.bagp-dragging .bagp-after-wrap {
    transition: none;
}

/* Mode: Fade */
.bagp-mode-fade .bagp-after-wrap {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Mode: Curtain */
.bagp-mode-curtain .bagp-after-wrap {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

/* Mode: Split */
.bagp-mode-split .bagp-before-wrap {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.bagp-mode-split .bagp-after-wrap {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* Mode: Circle */
.bagp-mode-circle .bagp-after-wrap {
    clip-path: circle(50% at 50% 50%);
    transition: clip-path 0.4s ease;
}

/* Handle */
.bagp-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.3s ease, width 0.3s ease;
}

.bagp-handle:hover {
    width: 6px;
}

.bagp-handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    font-size: 20px;
}

/* Labels */
.bagp-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    font-size: 14px;
    z-index: 5;
    backdrop-filter: blur(5px);
}

.bagp-label-before {
    left: 20px;
}

.bagp-label-after {
    right: 20px;
}

/* Multi Gallery Grid */
.bagp-multi-gallery {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 3), 1fr);
    gap: 30px;
    padding: 20px 0;
}

.bagp-gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bagp-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
}

/* Lightbox */
.bagp-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.bagp-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.bagp-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    width: 1200px;
    position: relative;
}

.bagp-lightbox-comparison {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
}

.bagp-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .bagp-multi-gallery {
        grid-template-columns: 1fr;
    }
    
    .bagp-label {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .bagp-handle-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .bagp-label-before,
    .bagp-label-after {
        top: 10px;
        left: 10px;
        right: auto;
    }
    
    .bagp-label-after {
        top: 50px;
    }
}