/* app/static/css/carousel_produtos.css */

/* Estilização geral do carrossel */
.carousel-section {
    position: relative;
    background-color: white;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 30px auto;
    overflow: visible;
    padding: 20px 0 5px 0;
    box-sizing: border-box;
}

.carousel-section[data-carousel-state='loading'] {
    min-height: 350px;
}

.carousel-section[data-carousel-state='ready'] {
    min-height: 0;
}

.carousel-section[data-carousel-state='pending'],
.carousel-section[data-carousel-state='empty'],
.carousel-section[data-carousel-state='error'] {
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.carousel__title {
    text-align: left;
    font-size: 24px;
    margin-bottom: 30px;
    padding-left: 20px;
}

.carousel__container {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.carousel__items {
    display: flex;
    transition: transform 0.3s ease-in-out;
    padding: 10px 10px 20px 10px;
}

/* --- Item do Carrossel: Largura Fixa e Estilo --- */
.carousel__item {
    width: 170px; /* CORREÇÃO: Largura padrão cravada para não estourar a tela */
    flex-shrink: 0;
    margin: 0 10px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 292px;
}

.carousel__item--category {
    min-height: 230px;
}

.carousel__item:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.carousel__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- Imagem do Produto --- */
.carousel__image-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-bottom: 1px solid #eee;
}

/* CORREÇÃO: Garante que a tag picture respeite o wrapper */
.carousel__image-wrapper picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Detalhes do Conteúdo (Nome, Preço, Frete) --- */
.carousel__content-details {
    padding: 10px;
    flex: 0 0 auto;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* --- Título do Produto (Nome) --- */
.carousel__name {
    font-size: 14px;
    margin: 0 0 15px 0;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: normal;
    color: var(--azul-padrao);
}

.carousel__item:hover .carousel__name {
    color: #3483fa;
}

/* --- Preços --- */
.carousel__old-price {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.carousel__old-price s {
    text-decoration: line-through;
}

.carousel__old-price .old-centavos {
    font-size: 8px;
    vertical-align: super;
}

.carousel__current-price-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.carousel__current-price {
    font-size: 24px;
    font-weight: normal;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    white-space: nowrap;
}

.carousel__current-price .integer {
    margin-left: 2px;
}

.carousel__current-price .centavos {
    font-size: 12px;
    vertical-align: super;
}

.carousel__discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #16883f;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Parcelamento --- */
.carousel__installments {
    font-size: 13px;
    color: #000000e6;
    margin-bottom: 5px;
}

.carousel__installments-text {
    color: #000000e6;
}

.carousel__installments-value {
    color: #00a650;
    font-weight: bold;
}

.carousel__installments-info {
    color: #00a650;
}

/* --- Frete --- */
.carousel__shipping {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 25px;
    margin-top: 7px;
    padding: 4px 9px;
    border: 1px solid #cce8d6;
    border-radius: 999px;
    background: #eaf7ef;
    color: #0f6d32;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.carousel__shipping-text {
    color: #0f6d32;
}

.carousel__shipping-text::before {
    content: '✓';
    margin-right: 5px;
    font-weight: 900;
}


/* --- Botões de Navegação do Carrossel --- */
.carousel__button--prev,
.carousel__button--next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    font-weight: 100;
}

.carousel__button--prev:hover,
.carousel__button--next:hover {
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
    background-color: #f8f8f8;
}

.carousel__button--prev.disabled,
.carousel__button--next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.carousel__button--prev.disabled:hover,
.carousel__button--next.disabled:hover {
    background-color: white;
    box-shadow: none;
}

/* Regras para Desktop */
@media (min-width: 769px) {
    .carousel__item {
        width: 170px;
    }

    .carousel__button--prev,
    .carousel__button--next {
        width: 64px;
        height: 64px;
        font-size: 32px;
        color: #3483fa;
    }

    .carousel__button--prev {
        left: -32px;
        transform: translateY(-50%);
    }

    .carousel__button--next {
        right: -32px;
        transform: translateY(-50%);
    }
}

/* Regras para Mobile */
@media (max-width: 768px) {
    /*
     * Reserva metade da largura das setas nas laterais da seção.
     * Assim, cada botão continua visualmente metade sobre o carrossel
     * e metade para fora dele, sem ultrapassar a largura da página.
     */
    .carousel-section {
        --carousel-mobile-button-size: 45px;
        --carousel-mobile-button-half: 22.5px;
        padding: 20px var(--carousel-mobile-button-half) 5px;
        margin: 20px 0;
    }

    .carousel__button--prev,
    .carousel__button--next {
        display: none;
        width: var(--carousel-mobile-button-size);
        height: var(--carousel-mobile-button-size);
        font-size: 16px;
        color: #3483fa;
        opacity: 0.9;
    }

    .carousel__button--prev {
        left: 0;
        transform: translateY(-50%);
    }

    .carousel__button--next {
        right: 0;
        transform: translateY(-50%);
    }

    /* Habilita a rolagem horizontal somente dentro do carrossel */
    .carousel__container {
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    /* Oculta a barra de rolagem para navegadores baseados em WebKit */
    .carousel__container::-webkit-scrollbar {
        display: none;
    }

    /* Ajusta os itens para o alinhamento de rolagem e largura */
    .carousel__item {
        scroll-snap-align: start;
        margin: 0 5px;
        width: calc(42% - 10px);
    }

    .carousel__items {
        padding: 10px 5px 20px 5px !important;
    }

    .carousel__title {
        font-size: 20px;
        padding-left: 0;
    }

    .carousel__current-price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .carousel__item {
        margin: 0 4px;
        width: calc(48% - 8px);
    }

    .carousel__title {
        font-size: 18px;
        padding-left: 0;
    }

    .carousel__items {
        padding: 10px 5px 20px 5px !important;
    }

    .carousel__current-price {
        font-size: 16px;
    }

    .carousel__current-price .centavos {
        font-size: 10px;
    }

    .carousel__current-price-container {
        gap: 5px;
    }

    .carousel__discount {
        min-height: 18px;
        padding: 3px 6px;
        font-size: 10px;
        border-radius: 5px;
    }
}

/* --- Estilos Adicionais Exclusivos para Ícones de Categorias no Carrossel --- */
.carousel__item--category .carousel__image-wrapper {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.carousel__category-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: #888;
    transition: transform 0.3s ease, color 0.3s ease;
}

.carousel__item--category:hover .carousel__category-icon {
    transform: translate(-50%, -50%) scale(1.1);
    color: #007bff;
}



/* --- Estados de carregamento e estabilidade da seção --- */
.carousel-section[data-carousel-state='pending'],
.carousel-section[data-carousel-state='empty'],
.carousel-section[data-carousel-state='error'] {
    display: none !important;
    height: 0;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.carousel-section[data-carousel-state='loading'],
.carousel-section[data-carousel-state='ready'] {
    min-height: 350px;
}

.carousel-section[data-carousel-state='ready'] {
    visibility: visible;
}

/* Skeleton individual da imagem: os textos podem aparecer sem deixar a mídia branca. */
.carousel__image-wrapper[data-image-state='loading'],
.carousel__image-wrapper[data-image-state='error'] {
    background-color: #e3e6e9;
}

.carousel__image-wrapper[data-image-state='loading']::before,
.carousel__image-wrapper[data-image-state='error']::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #e3e6e9;
    pointer-events: none;
}

.carousel__image-wrapper[data-image-state='loading']::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.55) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer-carousel-image 1.5s infinite;
    will-change: transform;
}

@keyframes shimmer-carousel-image {
    100% {
        transform: translateX(100%);
    }
}

.carousel__image-wrapper[data-image-state='loading'] .carousel__image {
    opacity: 0;
}

.carousel__image-wrapper[data-image-state='ready'] .carousel__image {
    opacity: 1;
}

.carousel__image-wrapper[data-image-state='error'] .carousel__image {
    opacity: 0;
}

.carousel__image {
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.carousel__item--category .carousel__image-wrapper,
.carousel__item--category .carousel__image-wrapper[data-image-state='ready'] {
    background-color: #f8f9fa;
}

/* --- INÍCIO - Estilos do Skeleton Loading do Carrossel --- */
.carousel-section .skeleton-carousel-wrapper {
    display: flex;
    min-width: max-content;
    padding: 0 10px;
}

.carousel-section .skeleton-carousel-wrapper .product-card-skeleton {
    flex-shrink: 0;
    margin: 0 10px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 170px;
}

/* Base da Animação (Shimmer) */
.carousel-section .skeleton-carousel-wrapper .skeleton-box {
    position: relative;
    overflow: hidden;
    background-color: #e0e0e0;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer-carousel 1.5s infinite;
    content: '';
}

@keyframes shimmer-carousel {
    100% {
        transform: translateX(100%);
    }
}

/* Elementos Específicos do Esqueleto */
.carousel-section .skeleton-carousel-wrapper .skeleton-img {
    width: 100%;
    padding-bottom: 100%;
    border-bottom: 1px solid #eee;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-text {
    border-radius: 4px;
    margin: 10px;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-title-1 {
    height: 14px;
    width: 90%;
    margin-bottom: 5px;
    margin-top: 10px;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-title-2 {
    height: 14px;
    width: 60%;
    margin-bottom: 15px;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-price-old {
    height: 12px;
    width: 40%;
    margin-bottom: 5px;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-price-main {
    height: 24px;
    width: 60%;
    margin-bottom: 10px;
}

.carousel-section .skeleton-carousel-wrapper .skeleton-installments {
    height: 13px;
    width: 80%;
    margin-bottom: 15px;
}

/* Responsividade do Skeleton - Acompanhando o Card Real */
@media (max-width: 768px) {
    .carousel-section .skeleton-carousel-wrapper .product-card-skeleton {
        margin: 0 5px;
        width: calc(42% - 10px);
    }

    .carousel-section .skeleton-carousel-wrapper .skeleton-price-main {
        height: 18px;
    }
}

@media (max-width: 480px) {
    .carousel-section .skeleton-carousel-wrapper .product-card-skeleton {
        margin: 0 4px;
        width: calc(48% - 8px);
    }

    .carousel-section .skeleton-carousel-wrapper .skeleton-price-main {
        height: 16px;
    }
}

/* --- FIM - Estilos do Skeleton Loading do Carrossel --- */

@media (max-width: 768px) {
    .carousel-section[data-carousel-state='loading'],
    .carousel-section[data-carousel-state='ready'] {
        min-height: 330px;
    }

    .carousel__item {
        min-height: 300px;
    }

    .carousel__item--category {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .carousel__image,
    .carousel__item,
    .carousel__category-icon,
    .carousel__items,
    .carousel__button--prev,
    .carousel__button--next {
        transition: none;
    }

    .carousel__image-wrapper[data-image-state='loading']::after,
    .carousel-section .skeleton-carousel-wrapper .skeleton-box::after {
        animation: none;
        transform: none;
    }
}

.carousel__item--review{min-height:286px}.carousel__item--review .carousel__content-details{min-height:106px}.carousel__item--review .carousel__name{margin-bottom:6px!important}.carousel__item--review .carousel__content-details>div:last-child{margin-top:4px!important}


/* Destaques factuais dos carrosséis de ofertas e mais vendidos. */
.carousel__image-wrapper {
    position: relative;
}

.carousel__highlight-badge {
    position: absolute;
    z-index: 3;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #ffd9b8;
    background: #fff5ec;
    color: #b85a0b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    box-shadow: 0 3px 9px rgba(169, 67, 8, .08);
    pointer-events: none;
}

.carousel__highlight-badge--featured {
    border-color: #b9dcff;
    background: #eef7ff;
    color: #075da6;
    box-shadow: 0 3px 10px rgba(7, 93, 166, .1);
}

.carousel__highlight-badge--featured::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    margin-right: 4px;
    border-radius: 50%;
    background: #d9edff;
    color: #075da6;
    font-size: 9px;
    font-weight: 900;
}

/* Selo de destaque fixo e estável.
   Fica preso ao card, não ao wrapper da imagem.
   Assim ele não disputa ::before/::after com o skeleton da imagem e não vira bola grande. */
.carousel__item {
    position: relative;
}

.carousel__item--featured::before {
    content: '✓ Destaque';
    position: absolute;
    z-index: 12;
    top: 10px;
    left: 10px;
    right: auto;
    bottom: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 22px;
    max-width: calc(100% - 20px);
    padding: 4px 8px;
    border: 1px solid rgba(0, 86, 179, .18);
    border-radius: 999px;
    background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 100%);
    color: #075da6;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(7, 93, 166, .10);
    pointer-events: none;
    transform: none;
    animation: none;
}

.carousel__item--featured .carousel__highlight-badge--featured {
    display: none !important;
}



/* Estabilidade de carregamento compartilhada - v14 */
.carousel__image-wrapper {
    contain: layout paint;
}
.carousel__image {
    display: block;
    aspect-ratio: 1 / 1;
}
.carousel-section[data-carousel-state="ready"] {
    content-visibility: visible;
}
.carousel-section[data-carousel-state="pending"] {
    contain-intrinsic-size: auto 340px;
}


/* =========================================================
   Correção definitiva do selo Destaque no carregamento
   - selo fica no card
   - skeleton fica somente na imagem
   - nenhuma bolinha/bloco estranho aparece antes da imagem
   ========================================================= */
.carousel__item--featured {
    position: relative;
}

.carousel__item--featured::before {
    content: '✓ Destaque' !important;
    position: absolute !important;
    z-index: 30 !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 22px !important;
    max-width: calc(100% - 20px) !important;
    padding: 4px 8px !important;
    border: 1px solid rgba(0, 86, 179, .18) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 100%) !important;
    color: #075da6 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
    white-space: nowrap !important;
    box-shadow: 0 3px 10px rgba(7, 93, 166, .10) !important;
    pointer-events: none !important;
    transform: none !important;
    animation: none !important;
}

.carousel__item--featured .carousel__image-wrapper::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #e3e6e9 !important;
    color: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
    transform: none !important;
    animation: none !important;
}

.carousel__item--featured .carousel__image-wrapper[data-image-state='ready']::before,
.carousel__item--featured .carousel__image-wrapper[data-image-state='ready']::after {
    display: none !important;
}

.carousel__item--featured .carousel__highlight-badge,
.carousel__item--featured .carousel__highlight-badge--featured {
    display: none !important;
}

/* ==========================================================
   Carrosséis editoriais mistos da home / 404
   Produto + Review + Artigo com altura e leitura consistentes.
   ========================================================== */
.carousel__item--mixed {
    min-height: 330px;
}

.carousel__item--mixed-article .carousel__image {
    object-fit: cover;
}

.carousel__item--mixed-review .carousel__image,
.carousel__item--mixed-product .carousel__image {
    object-fit: contain;
}

.carousel__content-details--mixed {
    min-height: 148px;
    padding: 10px 11px 11px;
}

.mixed-card__topline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-bottom: 8px;
}

.mixed-card__badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.mixed-card__badge--article {
    background: #eaf7f5;
    color: #006b67;
}

.mixed-card__badge--review {
    background: #eef4ff;
    color: #174a7c;
}

.mixed-card__badge--product {
    background: #fff4df;
    color: #7a4b00;
}

.mixed-card__category {
    min-width: 0;
    overflow: hidden;
    color: #68727c;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mixed-card__title {
    min-height: 34px;
    margin-bottom: 7px;
    color: var(--azul-padrao);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.mixed-card__meta,
.mixed-card__product-note {
    margin-bottom: 8px;
    color: #68727c;
    font-size: 11px;
    line-height: 1.3;
}

.mixed-card__price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #2f3439;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.2;
}

.mixed-card__discount {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 5px;
    border-radius: 5px;
    background: #e9f7ee;
    color: #14733a;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.mixed-card__cta {
    margin-top: auto;
    color: #007185;
    font-size: 11px;
    font-weight: 700;
}

.home-page #section-carrossel-categorias-populares .carousel__item--category {
    min-height: 210px;
}

.home-page #section-carrossel-categorias-populares .carousel__content-details {
    min-height: 72px;
    justify-content: center;
}

.home-page #section-carrossel-categorias-populares .carousel__name {
    margin: 0;
    font-weight: 650;
}

@media (max-width: 768px) {
    .carousel__item--mixed {
        min-height: 310px;
    }

    .carousel__content-details--mixed {
        min-height: 142px;
        padding: 9px;
    }

    .mixed-card__category {
        display: none;
    }

    .mixed-card__title {
        font-size: 12px;
    }
}

/* Vida Elite v5 - setas e cards de carrossel */
.carousel__container{
    overflow-x:auto;
    overflow-y:hidden;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -ms-overflow-style:none;
}
.carousel__container::-webkit-scrollbar{display:none;}
.carousel__items{width:max-content;min-width:100%;}
.carousel__button--prev,.carousel__button--next{display:flex!important;}
.carousel__button[hidden]{display:none!important;}
.mixed-card__cta{font-size:13px;font-weight:800;color:#007185;}
.carousel__item{border-radius:8px;}
.carousel__name{font-weight:800;}

/* =========================================================
   PageSpeed v8 - exibição imediata das imagens pré-renderizadas
   ========================================================= */
.carousel__image-wrapper[data-image-state='loading']::after,
.carousel-section .skeleton-carousel-wrapper .skeleton-box::after {
    animation: none !important;
    transform: none !important;
    display: none !important;
}
.carousel__image-wrapper[data-image-state='loading']::before {
    background:#f3f5f6 !important;
    opacity:.35;
}
.carousel__image-wrapper[data-image-state='loading'] .carousel__image,
.carousel__image-wrapper[data-image-state='ready'] .carousel__image,
.carousel__image {
    opacity:1 !important;
    transition:none !important;
}
.carousel__image-wrapper[data-image-state='ready']::before,
.carousel__image-wrapper[data-image-state='ready']::after {
    display:none !important;
}


/* ==========================================================
   Vida Elite v13 - carrosséis compactos em toda a home
   Mantém produtos, artigos, reviews e categorias no mesmo padrão.
   ========================================================== */
.home-page .carousel-section {
    overflow: visible;
}
.home-page .carousel__container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}
.home-page .carousel__items {
    width: max-content;
    min-width: 100%;
    gap: 8px;
    padding: 8px 4px 16px !important;
}
.home-page .carousel__item,
.home-page .carousel__item--mixed,
.home-page .carousel__item--article,
.home-page .carousel__item--review,
.home-page .carousel__item--category {
    flex: 0 0 170px;
    width: 170px;
    margin: 0;
    min-height: 292px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}
.home-page .carousel__item--category {
    min-height: 220px;
}
.home-page .carousel__image-wrapper {
    flex: 0 0 auto;
    width: 100%;
    height: 170px;
    padding-bottom: 0;
}
.home-page .carousel__item--category .carousel__image-wrapper {
    height: 145px !important;
    padding-bottom: 0 !important;
}
.home-page .carousel__content-details,
.home-page .carousel__content-details--mixed {
    min-height: 0;
    padding: 9px;
}
.home-page .carousel__item--mixed {
    min-height: 292px;
}
.home-page .mixed-card__topline {
    margin-bottom: 5px;
}
.home-page .mixed-card__meta,
.home-page .mixed-card__product-note {
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1.25;
}
.home-page .mixed-card__cta {
    margin-top: 5px;
    font-size: 11px;
}
.home-page .carousel__name,
.home-page .mixed-card__title {
    min-height: 0;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
}
.home-page .carousel__button--prev,
.home-page .carousel__button--next {
    display: flex !important;
}
.home-page .carousel__button[hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .home-page .carousel-section {
        --carousel-mobile-button-size: 36px;
        --carousel-mobile-button-half: 18px;
        padding: 14px var(--carousel-mobile-button-half) 2px;
        margin: 16px 0;
    }
    .home-page .carousel__title {
        margin-bottom: 14px;
        font-size: 17px;
        line-height: 1.25;
    }
    .home-page .carousel__items {
        gap: 8px;
        padding: 6px 4px 14px !important;
    }
    .home-page .carousel__item,
    .home-page .carousel__item--mixed,
    .home-page .carousel__item--article,
    .home-page .carousel__item--review,
    .home-page .carousel__item--category {
        flex: 0 0 clamp(142px, 44vw, 164px);
        width: clamp(142px, 44vw, 164px);
        margin: 0;
        min-height: 270px;
    }
    .home-page .carousel__item--category {
        min-height: 198px;
    }
    .home-page .carousel__image-wrapper {
        height: clamp(142px, 44vw, 164px);
        padding-bottom: 0;
    }
    .home-page .carousel__item--category .carousel__image-wrapper {
        height: 128px !important;
    }
    .home-page .carousel__content-details,
    .home-page .carousel__content-details--mixed {
        min-height: 0;
        padding: 8px;
    }
    .home-page .mixed-card__badge {
        min-height: 19px;
        padding: 3px 6px;
        font-size: 9px;
    }
    .home-page .mixed-card__category,
    .home-page .mixed-card__meta {
        display: none;
    }
    .home-page .carousel__button--prev,
    .home-page .carousel__button--next {
        width: var(--carousel-mobile-button-size);
        height: var(--carousel-mobile-button-size);
        font-size: 15px;
    }
    .home-page .carousel__button--prev { left: 0; }
    .home-page .carousel__button--next { right: 0; }
    .home-page .carousel-section[data-carousel-state='loading'],
    .home-page .carousel-section[data-carousel-state='ready'] {
        min-height: 0;
    }
}

/* ==========================================================
   Vida Elite v14 - cards leves no padrão leve de vitrine
   Títulos discretos; informações comerciais em verde.
   ========================================================== */
.carousel__name,
.mixed-card__title {
    color: #333 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.home-page .carousel__item {
    border: 1px solid #eeeeee;
    border-radius: 8px;
    box-shadow: none;
}

.home-page .carousel__item:hover {
    transform: none;
    border-color: #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.home-page .carousel__content-details,
.home-page .carousel__content-details--mixed {
    padding: 9px 10px 11px;
}

.home-page .carousel__name,
.home-page .mixed-card__title {
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 400 !important;
    line-height: 1.34;
    color: #333 !important;
}

.home-page #section-carrossel-categorias-populares .carousel__name {
    font-weight: 500 !important;
    color: #333 !important;
}

/* Etiquetas editoriais leves: contexto sem pesar o card. */
.mixed-card__badge {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: #00a650 !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.mixed-card__category {
    color: #777;
    font-size: 10px;
    font-weight: 400;
}

.mixed-card__meta,
.mixed-card__product-note {
    color: #777;
    font-size: 11px;
    font-weight: 400;
}

.mixed-card__cta {
    color: #00a650 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

/* Produto: preço, desconto, parcelas e frete como informação comercial. */
.mixed-card__old-price {
    margin: 0 0 1px;
    color: #999;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: line-through;
}

.mixed-card__price-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin: 0 0 4px;
}

.mixed-card__price {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
}

.mixed-card__discount,
.home-page .carousel__discount {
    min-height: 18px;
    padding: 2px 5px;
    border: 0;
    border-radius: 3px;
    background: #00a650 !important;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.mixed-card__installments,
.mixed-card__shipping {
    color: #00a650;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.mixed-card__shipping {
    margin-top: 4px;
    font-weight: 600;
}

.carousel__old-price {
    color: #999;
}

.home-page .carousel__current-price-container {
    gap: 5px;
    margin-bottom: 4px;
}

.home-page .carousel__current-price {
    color: #333;
    font-size: 20px;
    font-weight: 400;
}

.home-page .carousel__installments,
.home-page .carousel__installments-text,
.home-page .carousel__installments-value,
.home-page .carousel__installments-info {
    color: #00a650 !important;
    font-size: 11px;
    font-weight: 500;
}

.home-page .carousel__shipping {
    min-height: 0;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #00a650 !important;
    font-size: 11px;
    font-weight: 600;
}

.home-page .carousel__shipping-text {
    color: #00a650 !important;
}

.home-page .carousel__shipping-text::before {
    content: none;
}

.home-page .carousel__item--mixed-product .mixed-card__cta {
    display: none;
}

@media (max-width: 768px) {
    .home-page .carousel__name,
    .home-page .mixed-card__title {
        font-size: 12px;
        line-height: 1.3;
    }

    .mixed-card__price,
    .home-page .carousel__current-price {
        font-size: 18px;
    }

    .mixed-card__installments,
    .mixed-card__shipping,
    .home-page .carousel__installments,
    .home-page .carousel__shipping {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .home-page .mixed-card__badge {
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent !important;
        color: #00a650 !important;
        font-size: 9px;
        font-weight: 600;
    }
}


/* ==========================================================
   Vida Elite v23 - correção do carrossel relacionado no mobile
   Evita que width:max-content do carrossel global faça os cards
   crescerem depois que o CSS assíncrono termina de carregar.
   ========================================================== */
@media (max-width: 768px) {
    .product-detail-page #section-carrossel-relacionados.carousel-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    .product-detail-page #section-carrossel-relacionados .carousel__container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        box-sizing: border-box;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .product-detail-page #section-carrossel-relacionados .carousel__items {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 10px 5px 20px 5px !important;
        box-sizing: border-box;
    }

    .product-detail-page #section-carrossel-relacionados .carousel__item {
        flex: 0 0 calc(42% - 10px);
        width: calc(42% - 10px);
        max-width: calc(42% - 10px);
        min-width: 0;
        margin: 0 5px;
        box-sizing: border-box;
        scroll-snap-align: start;
    }

    .product-detail-page #section-carrossel-relacionados .skeleton-carousel-wrapper {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }

    .product-detail-page #section-carrossel-relacionados .product-card-skeleton {
        flex: 0 0 calc(42% - 10px);
        width: calc(42% - 10px);
        max-width: calc(42% - 10px);
        min-width: 0;
        margin: 0 5px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .product-detail-page #section-carrossel-relacionados .carousel__item,
    .product-detail-page #section-carrossel-relacionados .product-card-skeleton {
        flex-basis: calc(48% - 8px);
        width: calc(48% - 8px);
        max-width: calc(48% - 8px);
        margin: 0 4px;
    }
}

/* ==========================================================
   Vida Elite v24 - mídia dinâmica nos cards de produto
   A imagem principal aparece primeiro. Se houver vídeo nas
   mídias secundárias, o JS carrega e reproduz sob demanda.
   ========================================================== */
.carousel__image-wrapper[data-card-video-src] {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #fff;
}

.carousel__image-wrapper[data-card-video-src] .carousel__image {
    transition: opacity 220ms ease;
}

.carousel__card-video {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.carousel__image-wrapper[data-card-video-src].carousel__image-wrapper--video-active .carousel__image {
    opacity: 0;
}

.carousel__image-wrapper--video-active .carousel__card-video {
    opacity: 1;
    visibility: visible;
    transition: opacity 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .carousel__image-wrapper[data-card-video-src] .carousel__image {
        transition: none;
    }

    .carousel__card-video {
        display: none !important;
        transition: none;
    }
}
