/* Contenedor General */
#cle-ig-home {
    width: 100%;
}
#cle-ig-home .products-section-title {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* Carrusel de Miniaturas (Home) */
.ig-swiper-balls {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    width: 100%;
}

.ig-swiper-balls .swiper-wrapper {
    display: flex;
    /* justify-content eliminado para evitar rotura en el inicio */
}

.ig-ball {
    /* El ancho se gestiona ahora por Swiper (slidesPerView) */
    cursor: pointer;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.ig-ball:hover { 
    z-index: 10;
}

.ball-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #eee;
    border-radius: 5px;
}
.ball-img-container img, .ball-img-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MODAL SHOPPABLE */
#ig-modal-shoppable {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100000;
    display: none; 
    align-items: center;
    justify-content: center;
}
.ig-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
}
.ig-modal-body {
    position: relative;
    width: 95%;
    max-width: 1100px;
    height: 80vh;
    background: #fff;
    z-index: 100001;
    display: flex;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden; 
    border-radius: 5px;
}
.ig-flex {
    display: flex;
    width: 100%;
    height: 100%;
}

/* BRANDING INSTAGRAM */
.ig-modal-header-brand {
    margin-bottom: 10px;
}
.ig-modal-header-brand p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.ig-modal-header-brand a {
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}
.ig-modal-header-brand a:hover {
    color: #e1306c; 
}
.ig-modal-header-brand i.fa-instagram {
    font-size: 18px;
}

/* Media Izquierda (Slider del Modal) */
.ig-media-side {
    flex: 1.5;
    background: #000;
    overflow: hidden;
    position: relative;
    min-width: 0;
}
.ig-modal-slider {
    width: 100%;
    height: 100%;
    position: relative;
}
.ig-modal-slider .swiper-slide {
    width: 100% !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ig-modal-slider img, .ig-modal-slider video {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* Flechas de navegación del modal */
.ig-media-side .swiper-button-next, 
.ig-media-side .swiper-button-prev {
    color: #ffffff !important;
    z-index: 100005;
    background: rgba(0,0,0,0.2); 
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.ig-media-side .swiper-button-next::after, 
.ig-media-side .swiper-button-prev::after {
    font-size: 18px;
}

/* Productos Derecha */
.ig-product-side {
    flex: 1;
    padding: 30px;
    background: #fff;
    overflow-y: auto;
}

.ig-post-description {
    font-size: 13.75px;
    line-height: 1.5;
    color: #444;
    margin: 10px 0 20px 0;
    padding-right: 5px;
    border-bottom: 1px solid #fafafa;
}

.ig-post-description p {
    margin-bottom: 8px;
}

.ig-product-side h4.modal-title {
    margin-top: 15px;
    margin-bottom: 20px;
    font-weight: bold;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}
.ig-item-p {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.ig-item-p img {
    width: 80px; height: 80px;
    object-fit: cover;
}

/* Botón Comprar del Post */
a.post-btn.btn.btn-primary.btn-sm {
    width: 150px !important;
    font-size: 12px;
    padding: 7px !important;
}

/* Botón Cerrar */
.ig-close {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 35px;
    color: #333;
    cursor: pointer;
    z-index: 100002;
}