/**
 * Carrossel de videos estilo stories, por shortcode.
 *
 * As medidas padrao reproduzem o layout medido no Widde (maximumshop.com.br, 29/09/2026):
 * card 255/436 com raio 15, gap 16, cards inativos em escala .86, botao de 64px que sobe
 * 26px sobre os cards inativos e desce 8px no card em destaque, setas de 24px, e no player
 * o video em 608/1080 com no maximo 95% da altura, vizinhos em .86 e .5 com veu de 40%.
 *
 * As medidas chegam como variaveis inline no wrapper (--wvc-*), nunca como regra inline:
 * estilo inline vence media query, e os ajustes de tablet e celular precisam vencer o padrao.
 */

/* ---------------------------------------------------------------- carrossel */

.wvc-wrap {
    width: 100%;
    box-sizing: border-box;

    /* As efetivas nascem aqui, a partir das variantes que o PHP emite inline por faixa.
       Se a efetiva viesse inline, media query nenhuma conseguiria trocar depois. */
    --wvc-gap: var(--wvc-gap-desktop, 16px);
    --wvc-cta-h: var(--wvc-cta-h-desktop, 64px);
    --wvc-cta-fs: var(--wvc-cta-fs-desktop, 14px);
    --wvc-cta-desloc-ativo: var(--wvc-cta-desloc-ativo-desktop, 8px);
    --wvc-cta-desloc-inativo: var(--wvc-cta-desloc-inativo-desktop, -26px);
    --wvc-titulo-fs: var(--wvc-titulo-fs-desktop, 22px);
    --wvc-legenda-fs: var(--wvc-legenda-fs-desktop, 13px);
}

.wvc-wrap *,
.wvc-wrap *::before,
.wvc-wrap *::after {
    box-sizing: border-box;
}

/* Paragrafo vazio que algum filtro de conteudo tenha deixado no meio do carrossel nao ocupa
   espaco: a margem de paragrafo do tema abriria buraco entre a capa, a legenda e o botao. */
.wvc-wrap p:empty {
    display: none;
}

.wvc-titulo {
    display: block;
    margin: 0;
    padding: var(--wvc-titulo-pt, 0) var(--wvc-titulo-pr, 0) var(--wvc-titulo-pb, 0) var(--wvc-titulo-pl, 0);
    color: var(--wvc-titulo-cor, #111);
    font-size: var(--wvc-titulo-fs, 22px);
    font-weight: var(--wvc-titulo-fw, 700);
    text-align: var(--wvc-titulo-align, left);
    line-height: 1.2;
}

.wvc-pro {
    position: relative;
    display: flex;
    margin-top: var(--wvc-mt, 16px);
    margin-bottom: var(--wvc-mb, 0px);
}

.wvc-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wvc-gap, 16px);
    width: 100%;
}

.wvc-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.wvc-seta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--wvc-seta-w, 24px);
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--wvc-seta-cor, #666666);
    cursor: pointer;
    user-select: none;
    z-index: 100;
}

.wvc-seta svg {
    display: block;
    width: 100%;
    height: auto;
}

.wvc-seta[hidden] {
    display: none;
}

.wvc-seta:disabled {
    opacity: .3;
    cursor: default;
}

.wvc-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--wvc-track-h, 520px);
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

/* Cada item e absoluto e vai para o lugar por translate, como no Widde: assim a troca de
   destaque anima posicao e escala juntas, sem reflow da lista. */
.wvc-item {
    position: absolute;
    top: 50%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--wvc-card-w, 262px);
    transform: translate3d(0, -50%, 0);
    transition: transform var(--wvc-ms, 350ms) ease;
    will-change: transform;
}

/* Ate o JS posicionar os cards eles ficam invisiveis: antes disso estavam empilhados com a
   largura padrao, e o salto ate o lugar certo contava como deslocamento de layout (0,105 de CLS
   na home da Joya). O trilho ja reserva a altura. Se o JS nao rodar, a animacao mostra os cards
   depois de 3 s. */
.wvc-wrap:not(.wvc-pronto) .wvc-item {
    visibility: hidden;
    animation: wvc-revelar 0s linear 3s forwards;
}

@keyframes wvc-revelar {
    to {
        visibility: visible;
    }
}

.wvc-escala {
    width: 100%;
    transform: scale(var(--wvc-escala, .86));
    transform-origin: center center;
    transition: transform var(--wvc-ms, 350ms) ease;
}

.wvc-item.is-ativo .wvc-escala {
    transform: scale(1);
}

.wvc-card {
    position: relative;
    width: 100%;
    aspect-ratio: var(--wvc-aspect, 255 / 436);
    border-radius: var(--wvc-raio, 15px);
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: var(--wvc-sombra, none);
}

.wvc-card video,
.wvc-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wvc-card img {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* O video so e montado no card em destaque; enquanto nao existe, a capa segura o lugar. */
.wvc-card video {
    position: relative;
    z-index: 2;
}

/* Capa de quem nao tem imagem: o proprio arquivo em #t=0.1, parado no primeiro quadro. */
.wvc-card video.wvc-capa {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Nome e cargo sobre o card, no mesmo desenho do player: nome em caixa alta e cargo menor
   embaixo. Fica dentro do card, entao acompanha a escala dos laterais. */
.wvc-card-legenda {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 12px 10px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .28) 55%, rgba(0, 0, 0, 0));
    pointer-events: none;
    text-align: var(--wvc-legenda-align, left);
}

.wvc-card-legenda b {
    display: block;
    font-size: var(--wvc-legenda-fs, 13px);
    font-weight: 800;
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: .01em;
}

.wvc-card-legenda span {
    display: block;
    margin-top: 2px;
    font-size: calc(var(--wvc-legenda-fs, 13px) * .78);
    font-weight: 500;
    line-height: 1.15;
    opacity: .92;
}

/* O botao e mais estreito que o card (16px no Widde) e, nos laterais, acompanha a escala do
   card, mas sem escalar a altura nem a fonte: por isso largura calculada, e nao transform. */
.wvc-cta-caixa {
    width: calc(100% * var(--wvc-escala, .86) - var(--wvc-cta-recuo, 16px));
    margin-top: var(--wvc-cta-desloc-inativo, -26px);
    transition: margin-top var(--wvc-ms, 350ms) ease, width var(--wvc-ms, 350ms) ease;
}

.wvc-item.is-ativo .wvc-cta-caixa {
    width: calc(100% - var(--wvc-cta-recuo, 16px));
    margin-top: var(--wvc-cta-desloc-ativo, 8px);
}

.wvc-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--wvc-cta-h, 64px);
    padding: var(--wvc-cta-pad, 4px);
    border: var(--wvc-cta-borda-w, 1px) solid var(--wvc-cta-borda, #d8d8d8);
    border-radius: var(--wvc-cta-raio, 8px);
    background: var(--wvc-cta-fundo, #ffffff);
    color: var(--wvc-cta-cor, #373739);
    font-size: var(--wvc-cta-fs, 14px);
    font-weight: var(--wvc-cta-fw, 700);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: var(--wvc-cta-caixa-alta, uppercase);
    cursor: pointer;
}

.wvc-cta:hover {
    text-decoration: none;
    color: var(--wvc-cta-cor, #373739);
}

.wvc-paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wvc-bolinha {
    width: var(--wvc-bolinha, 8px);
    height: var(--wvc-bolinha, 8px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--wvc-bolinha-off, #cccccc);
    cursor: pointer;
}

.wvc-bolinha.is-ativo {
    background: var(--wvc-bolinha-on, #111111);
}

/* --------------------------------------------------------------- player */

.wvc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483643;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wvc-modal[hidden] {
    display: none;
}

.wvc-modal-fundo {
    position: absolute;
    inset: 0;
    background: var(--wvc-overlay, rgba(0, 0, 0, .8));
}

.wvc-palco {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* O vizinho e a mesma caixa do video ativo, deslocada e reduzida; o veu por cima escurece.
   A altura manda e a largura sai da proporcao, como no Widde: max-height 95% e max-width 100%. */
.wvc-vizinho,
.wvc-ativo {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--wvc-player-maxh, 95%);
    width: auto;
    max-width: 100%;
    max-height: var(--wvc-player-maxh, 95%);
    aspect-ratio: var(--wvc-player-aspect, 608 / 1080);
    border-radius: var(--wvc-player-raio, 5px);
    background: #000;
    overflow: hidden;
    transition: transform var(--wvc-ms, 350ms) ease, opacity var(--wvc-ms, 350ms) ease;
}

.wvc-vizinho {
    cursor: pointer;
}

.wvc-vizinho > img,
.wvc-vizinho > video,
.wvc-ativo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* A capa do vizinho fica embaixo do veu, senao o escurecimento nao aparece. */
.wvc-vizinho > img,
.wvc-vizinho > video {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.wvc-veu {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, var(--wvc-veu, .4));
}

.wvc-ativo {
    z-index: 3;
}

.wvc-barras {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: var(--wvc-barra-gap, 3px);
    padding: 0 8px;
}

.wvc-barra {
    flex: 1 1 0;
    height: var(--wvc-barra-h, 2px);
    border-radius: 4px;
    background: var(--wvc-barra-trilha, #b4b4b5);
    overflow: hidden;
}

.wvc-barra > i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: var(--wvc-barra-cor, #ffffff);
}

.wvc-marca {
    position: absolute;
    top: 18px;
    left: 8px;
    z-index: 6;
    display: flex;
    align-items: center;
    height: var(--wvc-marca-h, 16px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wvc-marca img {
    height: 100%;
    width: auto;
    display: block;
}

.wvc-fechar {
    position: absolute;
    top: 18px;
    right: 8px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--wvc-fechar, 36px);
    height: var(--wvc-fechar, 36px);
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: #fff;
    cursor: pointer;
}

.wvc-fechar svg {
    width: 18px;
    height: 18px;
    display: block;
}

.wvc-acoes {
    position: absolute;
    right: 8px;
    bottom: 142px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--wvc-acao-gap, 8px);
}

.wvc-acao {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--wvc-acao, 42px);
    height: var(--wvc-acao, 42px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--wvc-acao-fundo, rgba(0, 0, 0, .25));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--wvc-acao-cor, #ffffff);
    cursor: pointer;
    transition: all 250ms linear;
}

.wvc-acao svg {
    width: 20px;
    height: 20px;
    display: block;
}

.wvc-acao.is-on {
    color: var(--wvc-acao-on, #ff3b5c);
}

.wvc-acao-conta {
    position: absolute;
    right: -2px;
    bottom: -2px;
    min-width: 16px;
    padding: 0 3px;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.wvc-acao-caixa {
    position: relative;
}

.wvc-legenda {
    position: absolute;
    left: 0;
    right: 60px;
    bottom: 88px;
    z-index: 5;
    padding: 0 16px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
    pointer-events: none;
}

.wvc-legenda b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.wvc-legenda span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    opacity: .9;
}

.wvc-modal-cta-caixa {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    padding: 8px;
}

.wvc-modal-cta {
    display: block;
    width: 100%;
    padding: var(--wvc-mcta-pad, 17px);
    border-radius: var(--wvc-mcta-raio, 8px);
    background: var(--wvc-mcta-fundo, #000000);
    color: var(--wvc-mcta-cor, #ffffff);
    font-size: var(--wvc-mcta-fs, 16px);
    font-weight: 700;
    line-height: 140%;
    text-align: center;
    text-decoration: none;
    text-transform: var(--wvc-cta-caixa-alta, uppercase);
}

.wvc-modal-cta:hover {
    color: var(--wvc-mcta-cor, #ffffff);
    text-decoration: none;
}

/* Zonas de toque para voltar e avancar, como no stories. */
.wvc-zona {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 4;
    width: 25%;
    cursor: pointer;
}

.wvc-zona.wvc-zona-esq {
    left: 0;
}

.wvc-zona.wvc-zona-dir {
    right: 0;
}

.wvc-produtos {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 80px;
    z-index: 7;
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    overflow-x: auto;
}

.wvc-produtos[hidden] {
    display: none;
}

.wvc-produto {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 210px;
    padding: 6px;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
}

.wvc-produto img {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
}

.wvc-produto b {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.wvc-produto span {
    font-size: 12px;
    opacity: .75;
}

.wvc-travado {
    overflow: hidden !important;
}

/* ------------------------------------------------------- tablet e celular */

@media (max-width: 1024px) {
    .wvc-wrap {
        --wvc-gap: var(--wvc-gap-tablet, 16px);
        --wvc-cta-h: var(--wvc-cta-h-tablet, 56px);
        --wvc-cta-fs: var(--wvc-cta-fs-tablet, 12px);
        --wvc-cta-desloc-ativo: var(--wvc-cta-desloc-ativo-tablet, 8px);
        --wvc-cta-desloc-inativo: var(--wvc-cta-desloc-inativo-tablet, -20px);
    }
}

@media (max-width: 767px) {
    .wvc-wrap {
        --wvc-gap: var(--wvc-gap-mobile, 16px);
        --wvc-cta-h: var(--wvc-cta-h-mobile, 46px);
        --wvc-cta-fs: var(--wvc-cta-fs-mobile, 10px);
        --wvc-cta-desloc-ativo: var(--wvc-cta-desloc-ativo-mobile, 8px);
        --wvc-cta-desloc-inativo: var(--wvc-cta-desloc-inativo-mobile, -14px);
        --wvc-titulo-fs: var(--wvc-titulo-fs-mobile, 18px);
        --wvc-legenda-fs: var(--wvc-legenda-fs-mobile, 12px);
    }

    /* No celular o player ocupa a tela inteira, como no Widde. */
    .wvc-modal.is-cheio .wvc-ativo {
        width: 100%;
        height: 100%;
        max-height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
    }

    .wvc-legenda {
        bottom: 84px;
    }

    .wvc-acoes {
        bottom: 132px;
    }

    /* O Widde nao mostra seta no celular: navega por arraste. */
    .wvc-seta.wvc-so-desktop {
        display: none;
    }
}
