/* ============ CARROSSEL NO CELULAR ============ */
.gallery-carousel {
    position: relative;
    margin-top: 10px;
}

.carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: transparent !important; /* Forçar transparência no container principal */
    border-radius: 12px;
    aspect-ratio: 1;
}

.carousel-track-container {
    overflow: hidden;
    position: relative;
    background: transparent !important; /* Forçar transparência no track */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.empty-gallery-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    text-align: center;
    padding: 20px;
}

.empty-gallery-state i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-gallery-state p {
    font-size: 14px;
}

/* BOTÕES DO CARROSSEL */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* INDICADORES DO CARROSSEL */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* COMPRESSÃO LOADER */
.compression-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 20;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.compression-loader p {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 5px;
}

.compression-loader small {
    font-size: 10px;
    color: #a0aec0;
}

/* BADGE DE COMPRESSÃO */
.compression-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.compression-badge i {
    font-size: 8px;
}

/* ============ MODO GRID (4 E 6 IMAGENS) ============ */
.gallery-grid {
    width: 100%;
    height: 100%;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: transparent !important; /* Removido fundo cinza padrão */
    border: none !important; /* Removida borda padrão */
    transition: all 0.3s ease;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* Aumentar altura do container quando em modo grid */
.carousel-container {
    min-height: 300px;
}

/* Ajuste responsivo para grid */
@media (max-width: 480px) {
    .carousel-container {
        min-height: 280px;
        aspect-ratio: auto;
    }
}

@media (min-width: 375px) and (max-width: 425px) {
    .carousel-container {
        min-height: 320px;
        aspect-ratio: auto;
    }
}