/* =========================================
   Layout de la Galería 
   ========================================= */
.ecpg-gallery-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ecpg-sidebar-tabs {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ecpg-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.ecpg-tab:hover {
    border-color: #f39c12;
}

.ecpg-tab.active {
    background-color: #f39c12; /* Default primary color */
    color: #fff;
    border-color: #f39c12;
}

.ecpg-tab-icon i {
    font-size: 24px;
    margin-bottom: 5px;
}

.ecpg-tab-count {
    font-size: 18px;
    font-weight: bold;
    display: block;
}

.ecpg-tab-text {
    font-size: 12px;
}

.ecpg-main-display {
    flex: 1;
    min-width: 0;
}

/* Swiper Elements */
.ecpg-main-swiper {
    position: relative;
    border: 1px solid #eee;
    margin-bottom: 10px;
    width: 100%;
}

.ecpg-main-swiper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px;
    cursor: zoom-in;
}

.ecpg-thumb-swiper .swiper-slide {
    width: 20%;
    height: 80px;
    opacity: 0.6;
    border: 1px solid #eee;
    cursor: pointer;
}

.ecpg-thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #f39c12; /* Default override by elementor */
}

.ecpg-thumb-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Layout Horizontal (Default Bottom) */
.ecpg-thumb-pos-bottom .ecpg-images-tab {
    display: block;
}

/* Layout Vertical (Left) */
.ecpg-thumb-pos-left .ecpg-images-tab {
    display: flex;
    flex-direction: row-reverse;
    gap: 15px;
    align-items: stretch; /* Match heights */
}

.ecpg-thumb-pos-left .ecpg-main-swiper {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.ecpg-thumb-pos-left .ecpg-thumb-swiper {
    width: 100px;
    flex: 0 0 100px;
    height: 400px; /* Swiper vertical needs a definitive height */
}

.ecpg-thumb-pos-left .ecpg-thumb-swiper .swiper-slide {
    width: 100%;
    height: 80px !important;
}

/* Fotos Clientes Grid */
.ecpg-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.ecpg-customer-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.ecpg-customer-grid img:hover {
    transform: scale(1.05);
}

/* =========================================
   Lightbox Custom Claro
   ========================================= */
.ecpg-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f8f9fa; /* Fondo claro */
    z-index: 999999;
    display: flex;
    flex-direction: column;
}

.ecpg-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.ecpg-lightbox-tabs {
    display: flex;
    gap: 20px;
}

.ecpg-lb-tab {
    cursor: pointer;
    font-weight: bold;
    color: #666;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.ecpg-lb-tab.active {
    color: #f39c12;
    border-bottom-color: #f39c12;
}

.ecpg-lightbox-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #333;
    cursor: pointer;
}

.ecpg-lightbox-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.ecpg-lightbox-sidebar {
    width: 150px;
    background: #fff;
    border-right: 1px solid #eee;
    overflow-y: auto;
    padding: 10px;
}

.ecpg-lightbox-sidebar img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 10px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
}

.ecpg-lightbox-sidebar img.active {
    opacity: 1;
    border-color: #f39c12;
}

.ecpg-lightbox-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.ecpg-lb-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ecpg-lb-prev, .ecpg-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: 1px solid #ddd;
    color: #ed8407;
    font-size: 40px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.ecpg-lb-prev:hover, .ecpg-lb-next:hover {
    background: #fff;
}

.ecpg-lb-prev { left: 20px; }
.ecpg-lb-next { right: 20px; }

.ecpg-lb-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .ecpg-gallery-layout {
        flex-direction: column;
    }
    
    .ecpg-sidebar-tabs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    
    .ecpg-tab {
        flex: 1;
        min-width: 100px;
    }

    .ecpg-lightbox-sidebar {
        display: none; /* Hide thumbnails sidebar on mobile lightbox */
    }
}
