/* Go2Store Elementor Shorts Widget Stylesheet */

.g2s-shorts-section {
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.g2s-shorts-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}

.g2s-shorts-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.g2s-shorts-header-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #000000;
    text-transform: none;
    line-height: 1.2;
}

/* Grid/Carousel Base */
.g2s-shorts-grid {
    width: 100%;
    box-sizing: border-box;
    position: relative !important;
}

/* Layout: Grid */
.g2s-shorts-grid.layout-grid {
    display: grid;
    gap: 16px;
}

.g2s-shorts-grid.layout-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.g2s-shorts-grid.layout-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.g2s-shorts-grid.layout-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.g2s-shorts-grid.layout-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.g2s-shorts-grid.layout-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

/* Layout: Carousel */
.g2s-shorts-grid.layout-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    scroll-behavior: smooth;
    padding-top: 12px; /* Espaço para o zoom do hover no desktop */
    padding-bottom: 24px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    -webkit-overflow-scrolling: touch;
}

.g2s-shorts-grid.layout-carousel::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
}

.g2s-shorts-grid.layout-carousel .g2s-shorts-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
}

/* Responsive constraints for layout grid */
@media (max-width: 1024px) {
    .g2s-shorts-grid.layout-grid.columns-5,
    .g2s-shorts-grid.layout-grid.columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .g2s-shorts-grid.layout-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .g2s-shorts-grid.layout-carousel .g2s-shorts-card {
        flex: 0 0 160px;
    }
}

@media (max-width: 480px) {
    .g2s-shorts-grid.layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .g2s-shorts-grid.layout-carousel {
        gap: 12px;
    }
    .g2s-shorts-grid.layout-carousel .g2s-shorts-card {
        flex: 0 0 140px;
    }
}

/* Card Styling */
.g2s-shorts-card {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.g2s-shorts-card:hover {
    transform: scale(1.02);
}

.g2s-shorts-link {
    display: block;
    text-decoration: none;
    outline: none;
}

.g2s-shorts-media-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden !important;
    background-color: transparent !important; /* Mudar para transparente evita vazamento escuro nas bordas */
    box-shadow: none !important; /* Elimina sombras que parecem contornos escuros nas imagens claras */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    border: none !important; /* Remove bordas indesejadas do tema */
    outline: none !important; /* Remove contornos do tema */
}

/* Botão de Mudo/Som nos Cards */
.g2s-shorts-mute-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: background-color 0.2s, transform 0.2s, border-color 0.2s !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}

.g2s-shorts-mute-btn:hover {
    background: rgba(0, 0, 0, 0.85) !important;
    transform: scale(1.1) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.g2s-shorts-mute-btn svg {
    display: block;
    pointer-events: none !important;
}

/* Poster Image */
.g2s-shorts-poster {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    z-index: 2 !important;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    pointer-events: none !important;
    border-radius: inherit !important; /* Herda o border-radius do container pai */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    border: none !important; /* Garante que nenhuma borda seja herdada do tema */
    outline: none !important;
}

/* Hover Video */
.g2s-shorts-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    opacity: 0 !important;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    pointer-events: none !important;
    border-radius: inherit !important; /* Herda o border-radius do container pai */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    border: none !important; /* Garante que nenhuma borda seja herdada do tema */
    outline: none !important;
}

.g2s-shorts-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%) !important;
    z-index: 3 !important;
    pointer-events: none !important;
    transition: background 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.g2s-shorts-card:hover .g2s-shorts-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%) !important;
}

/* State Classes for Hover Transitions */
.g2s-shorts-card.is-playing .g2s-shorts-video {
    opacity: 1 !important;
}

.g2s-shorts-card.is-playing .g2s-shorts-poster {
    opacity: 0 !important;
}

/* Play/Pause SVG Indicator Removed */

/* Info Overlay at Bottom */
.g2s-shorts-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 4;
    pointer-events: none;
    box-sizing: border-box;
}

.g2s-shorts-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.g2s-shorts-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    gap: 4px;
    flex-wrap: nowrap;
}

.g2s-shorts-price {
    font-weight: 700;
    color: #10b981;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.g2s-shorts-price del {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 4px;
    font-size: 9px;
    text-decoration: line-through;
}

.g2s-shorts-price ins {
    text-decoration: none;
}

.g2s-shorts-likes {
    font-weight: 500;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Fallback/No Products Message */
.g2s-shorts-no-products {
    padding: 24px;
    border: 1px dashed #cccccc;
    border-radius: 8px;
    text-align: center;
    color: #666666;
    background: #f9f9f9;
}

/* Botões de Navegação por Setas (Desktop) */
.g2s-shorts-nav-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50% !important;
    display: none !important; /* Oculto por padrão no mobile/tablet */
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
    cursor: pointer !important;
    z-index: 10 !important;
    color: #374151 !important;
    transition: transform 0.2s, background-color 0.2s, color 0.2s !important;
    padding: 0 !important;
}

.g2s-shorts-nav-btn:hover {
    background: #f9fafb !important;
    color: #111827 !important;
    transform: translateY(-50%) scale(1.08) !important;
}

.g2s-shorts-nav-btn.nav-left {
    left: -22px !important;
}

.g2s-shorts-nav-btn.nav-right {
    right: -22px !important;
}

.g2s-shorts-nav-btn svg {
    display: block;
    pointer-events: none !important;
}

@media (min-width: 1025px) {
    .g2s-shorts-nav-btn {
        display: flex !important;
    }
}

/* Oculta valores e parcelamentos na galeria em telas de desktop */
@media (min-width: 769px) {
    .g2s-shorts-price {
        display: none !important;
    }
}

/* Efeito de Foco Mobile no Carrossel de Shorts */
@media (max-width: 768px) {
    .g2s-shorts-grid.layout-carousel {
        padding-left: calc(50% - 80px) !important;
        padding-right: calc(50% - 80px) !important;
        scroll-snap-type: x mandatory !important;
        padding-top: 18px !important; /* Espaço superior para acomodar o zoom do card ativo */
        padding-bottom: 24px !important;
    }
    
    .g2s-shorts-grid.layout-carousel .g2s-shorts-card {
        scroll-snap-align: center !important;
        opacity: 0.55;
        transform: scale(1) !important; /* Escala de tamanho idêntica durante o arraste */
        transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }
    
    /* Card Focado - Zoom APENAS quando parado e NÃO scrolando/arrastando */
    .g2s-shorts-grid.layout-carousel:not(.is-scrolling) .g2s-shorts-card.is-focused {
        opacity: 1;
        transform: scale(1.06) !important; /* Zoom premium acionado apenas no estado de repouso */
        z-index: 5;
    }
    
    /* Estado de Arraste Ativo - Mantém todos os cards do mesmo tamanho e opacidade estável no scroll */
    .g2s-shorts-grid.layout-carousel.is-scrolling .g2s-shorts-card {
        opacity: 0.65 !important;
        transform: scale(1) !important;
    }
}

@media (max-width: 480px) {
    .g2s-shorts-grid.layout-carousel {
        padding-left: calc(50% - 70px) !important;
        padding-right: calc(50% - 70px) !important;
        padding-top: 18px !important;
        padding-bottom: 24px !important;
    }
}

