/* ============================================
   Carrossel de Produtos - Design Minimalista
   Cores: #2C4C4C (Verde Principal)
   ============================================ */

/* Container Principal - SEM ESPAÇAMENTOS */
.sp-products-carousel-wrapper {
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
}

/* Container do Carrossel */
.sp-products-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Container da Track */
.sp-carousel-track-container {
    overflow: hidden;
    border-radius: 16px;
    flex: 1;
    position: relative;
    width: 100%;
}

/* Track do Carrossel */
.sp-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 10px 0;
    align-items: stretch;
}

/* Item do Carrossel - 3 itens perfeitos no desktop */
.sp-carousel-item {
    flex: 0 0 calc((100% - 60px) / 3); /* (100% - 2 gaps de 30px) / 3 itens */
    min-width: 0;
    max-width: calc((100% - 60px) / 3);
}

/* Card do Produto */
.sp-carousel-product {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sp-carousel-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(44, 76, 76, 0.25);
}

/* Link do Produto */
.sp-carousel-product-link {
    text-decoration: none;
    display: block;
    flex: 1;
}

/* Imagem do Produto */
.sp-carousel-product-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.sp-carousel-product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sp-carousel-product:hover .sp-carousel-product-image img {
    transform: scale(1.05);
}

/* Informações do Produto */
.sp-carousel-product-info {
    padding: 20px;
}

/* Título do Produto */
.sp-carousel-product-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Preço do Produto */
.sp-carousel-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    margin: 0;
}

.sp-carousel-product-price del {
    opacity: 0.5;
    font-size: 18px;
    margin-right: 8px;
}

.sp-carousel-product-price ins {
    text-decoration: none;
}

/* Botão Adicionar ao Carrinho */
.sp-carousel-add-to-cart {
    background: #2C4C4C;
    color: white !important;
    border: none;
    padding: 14px 24px;
    border-radius: 0 0 16px 16px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    display: block;
    text-decoration: none;
    margin-top: auto;
}

.sp-carousel-add-to-cart:hover {
    background: #3d6666;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 76, 76, 0.4);
}

/* Botões de Navegação - MINIMALISTAS */
.sp-carousel-nav,
.sp-carousel-prev,
.sp-carousel-next {
    background: transparent !important;
    background-color: transparent !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.sp-carousel-nav:hover:not(:disabled),
.sp-carousel-prev:hover:not(:disabled),
.sp-carousel-next:hover:not(:disabled) {
    border-color: #333 !important;
    background: rgba(0, 0, 0, 0.02) !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.sp-carousel-nav:disabled,
.sp-carousel-prev:disabled,
.sp-carousel-next:disabled {
    opacity: 0.2 !important;
    cursor: not-allowed !important;
    border-color: #eee !important;
    background: transparent !important;
    background-color: transparent !important;
}

.sp-carousel-nav svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Indicadores (Dots) - PRETO/CINZA MINIMALISTA */
.sp-carousel-dots {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 20px !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.sp-carousel-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #ccc !important;
    background-color: #ccc !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.sp-carousel-dot:hover {
    background: #999 !important;
    background-color: #999 !important;
}

.sp-carousel-dot.active {
    background: #333 !important;
    background-color: #333 !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* ====== RESPONSIVO ====== */

/* Tablet (2 itens) */
@media (max-width: 1024px) {
    .sp-carousel-item {
        flex: 0 0 calc((100% - 30px) / 2); /* (100% - 1 gap de 30px) / 2 itens */
        max-width: calc((100% - 30px) / 2);
    }
}

/* Mobile (1 item) */
@media (max-width: 768px) {
    .sp-products-carousel-wrapper {
        padding: 0;
        margin: 0;
    }

    .sp-carousel-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .sp-carousel-track {
        gap: 20px;
    }

    .sp-carousel-nav {
        width: 32px;
        height: 32px;
    }

    .sp-carousel-nav svg {
        width: 14px;
        height: 14px;
    }

    .sp-carousel-product-title {
        font-size: 16px;
    }

    .sp-carousel-product-price {
        font-size: 20px;
    }

    .sp-carousel-product-info {
        padding: 15px;
    }

    .sp-carousel-dots {
        margin-top: 15px;
    }
}

/* Mobile Pequeno */
@media (max-width: 480px) {
    .sp-products-carousel {
        gap: 8px;
    }

    .sp-carousel-nav {
        width: 30px;
        height: 30px;
    }

    .sp-carousel-nav svg {
        width: 12px;
        height: 12px;
    }

    .sp-carousel-dots {
        margin-top: 12px;
        gap: 6px;
    }

    .sp-carousel-dot {
        width: 6px;
        height: 6px;
    }

    .sp-carousel-dot.active {
        width: 18px;
    }
}

/* ====== ANIMAÇÕES ====== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sp-carousel-item {
    animation: slideIn 0.5s ease forwards;
}

/* Loading State */
.sp-products-carousel-wrapper.loading .sp-carousel-track {
    opacity: 0.5;
    pointer-events: none;
}

/* Acessibilidade */
.sp-carousel-nav:focus,
.sp-carousel-dot:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

/* Remove padding/margin problemáticos */
.sp-carousel-product-price .amount {
    font-size: inherit;
}
