/**
 * Estilos para a Galeria de Produtos
 * Inspirado no design do Xbox
 */

/* Container principal */
.gcp-product-gallery-wrapper {
    width: 100%;
    margin: 40px 0;
    position: relative;
}

/* Cabeçalho com título */
.gcp-gallery-header {
    margin-bottom: 24px;
}

.gcp-gallery-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    letter-spacing: 0.5px;
}

/* Carrossel */
.gcp-gallery-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gcp-carousel-track-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gcp-carousel-track {
    display: flex;
    gap: 16px !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: stretch;
}

/* Slides - 5 imagens visíveis */
.gcp-carousel-slide {
    flex: 0 0 auto !important;
    width: calc((100% - 64px) / 5) !important;
    min-width: calc((100% - 64px) / 5) !important;
    max-width: calc((100% - 64px) / 5) !important;
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    position: relative !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #000 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

.gcp-carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.3s ease;
    line-height: 0 !important;
    font-size: 0 !important;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gcp-carousel-slide:hover img {
    transform: scale(1.05);
}

/* Overlay removido - usuário não quer ícone de zoom */
.gcp-slide-overlay {
    display: none;
}

.gcp-zoom-icon {
    display: none;
}

/* Botões de navegação do carrossel - sobre as imagens */
.gcp-carousel-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: rgba(128, 128, 128, 0.8) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.3s ease, opacity 0.3s ease !important;
    z-index: 10 !important;
    opacity: 0 !important;
    box-sizing: border-box !important;
}

/* Mostra setas apenas se houver mais de 5 imagens */
.gcp-gallery-carousel.has-navigation .gcp-carousel-nav {
    display: flex !important;
}

.gcp-gallery-carousel.has-navigation:hover .gcp-carousel-nav {
    opacity: 1 !important;
}

.gcp-carousel-nav:hover {
    background: rgba(96, 96, 96, 0.9) !important;
}

.gcp-carousel-nav:active {
    background: rgba(80, 80, 80, 1) !important;
}

.gcp-carousel-nav svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    pointer-events: none !important;
}

.gcp-carousel-prev {
    left: 16px !important;
    right: auto !important;
}

.gcp-carousel-next {
    right: 16px !important;
    left: auto !important;
}

.gcp-carousel-nav:disabled {
    background: rgba(180, 180, 180, 0.5) !important;
    cursor: not-allowed !important;
    opacity: 0.3 !important;
}

.gcp-carousel-nav:disabled:hover {
    background: rgba(180, 180, 180, 0.5) !important;
}

.gcp-gallery-carousel.has-navigation:hover .gcp-carousel-nav:disabled {
    opacity: 0.3 !important;
}

/* Lightbox */
.gcp-lightbox {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.gcp-lightbox.active {
    display: flex !important;
    opacity: 1 !important;
}

.gcp-lightbox-content {
    position: relative !important;
    max-width: 75vw !important;
    max-height: 80vh !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gcp-lightbox-image {
    display: block !important;
    max-width: 100% !important;
    max-height: 75vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Indicadores (bolinhas) */
.gcp-lightbox-indicators {
    position: absolute !important;
    bottom: -50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gcp-lightbox-indicator {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gcp-lightbox-indicator:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.2) !important;
}

.gcp-lightbox-indicator.active {
    background: transparent !important;
    border-color: #ffffff !important;
    border-width: 2px !important;
    transform: scale(1.3) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
}

/* Oculta contador antigo */
.gcp-lightbox-counter {
    display: none;
}

.gcp-lightbox-current {
    display: none;
}

.gcp-lightbox-total {
    display: none;
}

/* Botão fechar - canto superior direito da imagem */
.gcp-lightbox-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    z-index: 10002 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.gcp-lightbox-close:hover {
    background: rgba(255, 0, 0, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1) rotate(90deg) !important;
}

.gcp-lightbox-close svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    pointer-events: none !important;
}

/* Navegação do lightbox - nas laterais da imagem */
.gcp-lightbox-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 10001 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.gcp-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-50%) scale(1.15) !important;
}

.gcp-lightbox-nav svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    pointer-events: none !important;
}

.gcp-lightbox-prev {
    left: 12px !important;
    right: auto !important;
}

.gcp-lightbox-next {
    right: 12px !important;
    left: auto !important;
}

.gcp-lightbox-nav:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    background: rgba(80, 80, 80, 0.5) !important;
}

.gcp-lightbox-nav:disabled:hover {
    background: rgba(80, 80, 80, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-50%) !important;
}

/* Responsivo */
@media (max-width: 1200px) {
    .gcp-carousel-slide {
        width: calc((100% - 48px) / 4) !important;
    }
}

@media (max-width: 992px) {
    .gcp-carousel-slide {
        width: calc((100% - 32px) / 3) !important;
    }
}

@media (max-width: 768px) {
    .gcp-gallery-title {
        font-size: 20px;
    }
    
    .gcp-carousel-slide {
        width: calc((100% - 16px) / 2) !important;
        height: 140px;
    }
    
    .gcp-carousel-nav {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }
    
    .gcp-carousel-nav svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .gcp-carousel-prev {
        left: 12px !important;
    }
    
    .gcp-carousel-next {
        right: 12px !important;
    }
    
    /* Lightbox responsivo */
    .gcp-lightbox-content {
        max-width: 90vw;
        max-height: 85vh;
    }
    
    .gcp-lightbox-image {
        max-height: 70vh;
    }
    
    .gcp-lightbox-nav {
        width: 44px;
        height: 44px;
    }
    
    .gcp-lightbox-nav svg {
        width: 24px;
        height: 24px;
    }
    
    .gcp-lightbox-prev {
        left: 10px;
    }
    
    .gcp-lightbox-next {
        right: 10px;
    }
    
    .gcp-lightbox-close {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
    }
    
    .gcp-lightbox-close svg {
        width: 20px;
        height: 20px;
    }
    
    .gcp-lightbox-indicators {
        bottom: -45px;
        gap: 8px;
    }
    
    .gcp-lightbox-indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .gcp-carousel-slide {
        width: 100% !important;
        height: 120px;
    }
    
    .gcp-carousel-nav {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
    
    .gcp-carousel-nav svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .gcp-carousel-prev {
        left: 8px !important;
    }
    
    .gcp-carousel-next {
        right: 8px !important;
    }
    
    /* Lightbox mobile */
    .gcp-lightbox-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .gcp-lightbox-image {
        max-height: 65vh;
    }
    
    .gcp-lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .gcp-lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .gcp-lightbox-prev {
        left: 8px;
    }
    
    .gcp-lightbox-next {
        right: 8px;
    }
    
    .gcp-lightbox-close {
        top: 4px;
        right: 4px;
        width: 32px;
        height: 32px;
    }
    
    .gcp-lightbox-close svg {
        width: 18px;
        height: 18px;
    }
    
    .gcp-lightbox-indicators {
        bottom: -40px;
        gap: 6px;
    }
    
    .gcp-lightbox-indicator {
        width: 7px;
        height: 7px;
    }
}

/* Animação de carregamento */
@keyframes gcp-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.gcp-carousel-slide.loading {
    animation: gcp-pulse 1.5s ease-in-out infinite;
}

/* Acessibilidade */
.gcp-carousel-nav:focus,
.gcp-lightbox-nav:focus,
.gcp-lightbox-close:focus {
    outline: 2px solid #107c10;
    outline-offset: 2px;
}

/* Previne scroll do body quando lightbox está aberto */
body.gcp-lightbox-open {
    overflow: hidden;
}

