/* Estilos do carrossel */
:root {
    --cor-primaria: #4CAF50;
    --cor-secundaria: #e74c3c;
    --cor-texto: #333;
    --cor-texto-claro: #555;
    --cor-fundo: #f0f0f0;
    --sombra: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carrossel-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    padding: 10px;
    margin: 30px auto;
    background: linear-gradient(to top, rrgb(248, 243, 237) 40%, rgb(192, 221, 241)80%, #ffffff 100%);
}

.promocao-box {
    text-align: center;
    padding: 20px;
    position: relative;
    margin-bottom: 20px;
}

.promocao-box img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.promocao-box:hover img {
    transform: scale(1.02);
}

.promocao-box h2 {
    margin-top: 15px;
    font-size: 3rem;
    color: #e74c3c;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

.promocao-box h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f51a02, transparent);
}

.carrossel {
    display: flex;
    gap: 20px;
    padding: 15px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carrossel::-webkit-scrollbar {
    display: none;
}

.carrossel:active {
    cursor: grabbing;
}



.carrossel-item {
    width: 200px;
    flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(0, 10, 0, 1);
    overflow: hidden;

    text-align: center;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    margin-bottom: 20px;
    font-size: 15px;
    text-decoration: none;

    --rX: 0deg;
    --rY: 0deg;
    --bX: 50%;
    --bY: 80%;

    background-color: #fff;
    border-radius: 20px;
    transform: rotateX(var(--rX)) rotateY(var(--rY));
    box-shadow: 0 30px 20px #5555;
}

.carrossel-item:hover {
    transform: scale(1.05);
    background: #e9bd91;
}

.carrossel-img {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 25px;
    background: #fff;
}

.carrossel-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.carrossel-img img {
    width: 50%;
    height: auto;
    object-fit: cover;
}

.carrossel-item:hover .carrossel-img img {
    transform: scale(1.05);
}

.carrossel-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 0 5px;
}

.carrossel-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--cor-texto);
}

.carrossel-text p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--cor-texto-claro);
    line-height: 1.4;
}

.carrossel-text .preco {
    font-weight: bold;
    margin-top: 10px;
    padding: 10px;
}

.descricao_abreviada {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
    min-height: 40px;
}

.preco-antigo {
    text-decoration: line-through;
    color: var(--cor-secundaria);
    margin-right: 8px;
    font-size: 0.9rem;
}

.preco-promocional {
    color: var(--cor-primaria);
    font-weight: bold;
    font-size: 0.91rem;
}

.btn-add-carrinho {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-add-carrinho:hover {
    background-color: #3d8b40;
    transform: scale(1.1);
}

.btn-favorito {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    z-index: 2;
}

.btn-favorito:hover,
.btn-favorito.ativo {
    color: #ff5252;
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.sem-promocoes {
    text-align: center;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--sombra);
    width: 90%;
    max-width: 500px;
    margin: 30px auto;
}

.sem-promocoes h3 {
    color: var(--cor-secundaria);
    margin-bottom: 10px;
}

.sem-promocoes p {
    color: var(--cor-texto-claro);
}

/* Responsividade */
@media (max-width: 550px) {
    .carrossel-container {
        margin: 20px auto;
    }

    .promocao-box h2 {
        font-size: 1.5rem;
    }

    .carrossel-item {
        width: 240px;
        min-width: 240px;
    }

    .carrossel-img {
        height: 130px;
    }
}

@media (max-width: 350px) {
    .carrossel-item {
        width: 200px;
        min-width: 200px;
        padding: 12px;
    }

    .carrossel-img {
        height: 110px;
    }

    .carrossel-text h4 {
        font-size: 15px;
    }

    .promocao-box h2 {
        font-size: 1.3rem;
    }
}

@media (hover: none) {
    .carrossel-item:hover {
        transform: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .carrossel-item:hover .carrossel-img img {
        transform: scale(1);
    }

    .btn-add-carrinho:hover,
    .btn-favorito:hover {
        transform: none;
    }
}