/*
 Theme Name:   Ecoflex
 Theme URI:    https://agenciamillennium.com/
 Description:  Tema responsivo para Ecoflex, por Agência Millennium
 Author:       Agência Millennium
 Author URI:   https://agenciamillennium.com/
 Template:     generatepress
 Requires at least: 6.0
 Tested up to: 6.0.2
 Requires PHP: 7.0
 Version:      1.1.2
*/

:root {
    --corner-xl: 32px;
    --corner-l: 24px;
    --Title-Large-Font-size: 22px;
    --Title-Large-Line-height: 28px;
    --Title-Large-Letter-spacing: 0px;
}

a {
    text-decoration: none;
}

.footer-border-btn {
    border-bottom: 1px solid #ffffff6e;
    padding-bottom: 1%;
}

.colecoes a {
    flex-basis: calc(50% - 5px);
}

.infoscolecao {
    backdrop-filter: blur(calc(var(--corner-l, 24px) / 2));
}

.lista-produtos .product-card {
    flex: 0 1 calc(33.333% - 10px);
    height: max-content;
}

.colchao-ideal-resultado .lista-produtos .product-card {
    flex: 0 1 calc(50% - 10px);
}

.categorias-produto .categoria {
    flex-basis: calc((100% - 20px) / 3);
}

.medidas-produto table tr:nth-child(2) td:first-child {
    border-radius: 8px 0 0 0;
}

.medidas-produto table tr:nth-child(2) td:last-child {
    border-radius: 0 8px 0 0;
}

.medidas-produto table tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.medidas-produto table tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}


/* Estilos do Modal YouTube */
.youtube-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.youtube-close:hover {
    color: #ff0000;
}

.youtube-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Adicionar cursor pointer na seção de vídeo */
.am-video-bg {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.am-video-bg:hover {
    opacity: 0.9;
}

.cb-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transition: transform 0.1s, opacity 0.1s;
    transform-style: preserve-3d;
    will-change: transform;
}

.cb-cursor::before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid transparent;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 50%;
    transition: width 0.3s ease, height 0.3s ease;
}

.cb-cursor.-hidden {
    opacity: 0;
}

.cb-cursor-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s, opacity 0.3s;
}

.cb-cursor-text {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    width: 100px;
    height: 100px;
    text-align: center;
    color: #fff;
    font-weight: 700;
    left: 50%;
    line-height: 1;
    font-size: 14px;
    transform: scale(0);
    transition: transform 0.4s, opacity 0.3s;
    opacity: 0;
}

.cb-cursor.is-active .cb-cursor-inner .cb-cursor-text {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.cb-cursor.is-active::before {
    background-color: #ffffff25;
    width: 128px;
    border-color: #ffffff50;
    height: 128px;
    @apply backdrop-blur-sm;
}

.cb-cursor.is-media::before {
    width: 110px;
    border-color: transparent;
    height: 110px;
    background: transparent;
}

.cb-cursor.is-media .cb-cursor-inner .cb-cursor-text {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    font-size: 12px;

    &::after {
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        background: url("assets/img/play-icon-1.png") no-repeat center center;
    }

    &::before {
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        background: url("assets/img/Frame.png") no-repeat center center;
        animation: rotate 10s linear infinite;
    }
}

.animation-rotate {
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


:root {
    --brand: #3569B1;
    --brand-2: #6aa1f0;
    --text: #0e2340;
    --muted: #6b7785;
    --bg: #f6f8fb;
    --rail: #d7deea;

    --dot: 16px;
    --b: 2px;
    --dotTotal: calc(var(--dot) + (var(--b) * 2));
    --halfTotal: calc(var(--dotTotal) / 2);

    --rail-margin: 12px;
    --radius: 22px;

    /* largura fixa e tamanho do ANO */
    --year-box: 320px;
    /* largura da caixa do ano */
    --year-size: 320px;
    /* tamanho do ano destacado */
}

.kicker {
    text-align: center;
    font-weight: 700;
    color: #77839a;
    margin: 0 0 6px
}

.title {
    text-align: center;
    margin: 0 0 22px;
    font-size: clamp(18px, 2.6vw, 24px)
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    margin: 8px auto 10px;
    padding: 28px 0 56px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    max-width: 90vw;
}

.timeline::-webkit-scrollbar {
    height: 6px
}

.timeline::-webkit-scrollbar-thumb {
    background: #c7d2e3;
    border-radius: 999px
}

.rail {
    position: relative;
    height: 4px;
    background: var(--rail);
    border-radius: 999px;
    margin: 0 var(--rail-margin);
    width: max(260px, 100% - calc(var(--rail-margin)*2))
}

.rail .progress {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 0px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    border-radius: inherit;
    transition: width .25s cubic-bezier(.2, .7, .2, 1);
    will-change: width
}

.rail .stops {
    position: absolute;
    inset: 0;
    padding-inline: var(--halfTotal);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    z-index: 2
}

.stop {
    position: relative;
    width: 0;
    height: 100%
}

.stop button {
    all: unset;
    cursor: pointer;
    position: absolute;
    inset: 0;
    width: 0
}

.dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--dot);
    height: var(--dot);
    background: #9fb4d3;
    border-radius: 50%;
    border: var(--b) solid #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .06);
    transition: .25s
}

.stop[aria-current="true"] .dot {
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(42, 105, 199, .20);
    transform: translate(-50%, -50%) scale(1.15)
}

.year-label {
    position: absolute;
    left: 0;
    top: calc(50% + var(--halfTotal) + 10px);
    transform: translateX(-50%);
    font-size: 11px;
    color: #6b7785;
    font-weight: 700;
    letter-spacing: .04em;
    user-select: none;
    white-space: nowrap
}

.stop:first-child .year-label {
    transform: none;
    left: 0;
    text-align: left
}

.stop:last-child .year-label {
    transform: translateX(-100%);
    text-align: right
}

/* ===== PAINEL ===== */
.panel {
    text-align: center;
    margin-top: 10px;
    position: relative;
    max-width: 100vw;
    overflow: hidden
}

.headline {
    margin: 0 0 8px;
    color: #0e2340;
    font-weight: 600;
    font-size: 32px;
}

/* FULL-BLEED: corta só os fantasmas nas bordas */
.bleed {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    overflow: hidden
}

.yearsRow {
    position: relative;
    width: 100%;
    margin: 6px auto 8px;
    padding-inline: clamp(10px, 6vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 0;
    /* sem espaçamento - botões colados ao yearBox */
}

/* ANO DESTACADO — tamanho ajustado ao conteúdo */
.yearBox {
    flex: 0 0 auto;
    /* não cresce nem encolhe, tamanho do conteúdo */
    min-width: 200px;
    /* largura mínima para não ficar muito pequeno */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    isolation: isolate;
    padding: 0 20px;
    /* espaço interno para o texto não encostar nas bordas */
}

.big-year {
    display: inline-block;
    /* inline-block para tamanho exato do conteúdo */
    color: var(--brand);
    font-weight: 600;
    line-height: .85;
    white-space: nowrap;
    user-select: none;
    font-variant-numeric: tabular-nums;
    font-size: 320px;
    /* altura fixa de 320px */
    letter-spacing: -.01em;
    position: relative;
    z-index: 0;
    pointer-events: none;
    text-shadow: 0 6px 20px rgba(42, 105, 199, .15);
    /* leve destaque */
}

/* BOTÕES com tamanho fixo e sem sobreposição */
.nav-btn {
    position: relative;
    z-index: 2;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #0e2340;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 0 0 1px #e1e8f3 inset, 0 8px 24px rgba(0, 0, 0, .06);
    flex: 0 0 48px;
    /* tamanho fixo, não pode encolher */
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 0 1px #e1e8f3 inset, 0 12px 32px rgba(0, 0, 0, .12);
}

.nav-btn:disabled {
    opacity: .35;
    cursor: not-allowed
}

/* ANOS-FANTASMA — 50% para fora (metade visível), cortados pelo .bleed */
.side-year {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #2a69c7;
    opacity: .12;
    filter: blur(.2px);
    font-weight: 600;
    line-height: .8;
    white-space: nowrap;
    user-select: none;
    font-size: 320px;
    /* mesma altura do ano principal */
    pointer-events: none;
    z-index: -1;
}

.side-left {
    left: 0;
    transform: translate(-50%, -50%)
}

/* 50% para fora à esquerda */
.side-right {
    right: 0;
    transform: translate(50%, -50%)
}

/* 50% para fora à direita */

.swap {
    animation: swap .45s cubic-bezier(.2, .7, .2, 1)
}

@keyframes swap {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(.985)
    }

    100% {
        opacity: 1;
        transform: none
    }
}

.desc {
    color: #000;
    margin: 40px auto 40px;
    color: #22303f;
    font-size: 20px;
    padding: 0 10px;
    max-width: 60%;
}

/* ===== GALERIA ===== */
.gallery {
    display: none;
    margin: 8px auto 0;
    padding: 0 6px
}

.gallery.visible {
    display: grid
}

.gal-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto 1fr;
    gap: 16px;
    grid-template-areas:
        "card hero"
        "thumbs hero";
    min-height: 400px;
    /* altura mínima ao invés de fixa */
}

/* Container para as duas imagens lado a lado */
.thumbs-container {
    grid-area: thumbs;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    grid-area: card;
    background: #F1ECE3;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(13, 39, 80, .06);
    border: 1px solid #e8eef8;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card h4 {
    color: var(--bege-bege-sarja, #857760);
    font-family: var(--Headline-Large-Typeface, Livvic);
    font-size: var(--Headline-Large-Font-size, 24px);
    font-style: normal;
    font-weight: var(--Headline-Large-Font-weight, 600);
    line-height: var(--Headline-Large-Line-height, 30px);
    letter-spacing: var(--Headline-Large-Letter-spacing, 0);
    margin: 0 0 8px 0;
}

.card h4 b {
    font-weight: 700;
    font-style: italic;
}

.card p {
    font-size: 14px;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

.img {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(13, 39, 80, .06);
    border: 1px solid #e8eef8;
    background: #e9edf5;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.img:hover {
    transform: scale(1.02);
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f8f9fa;
}

.hero {
    grid-area: hero;
    aspect-ratio: 16/9;
    /* garantir proporção da imagem principal */
}

.thumb1,
.thumb2 {
    aspect-ratio: 4/3;
    /* proporção para as thumbs menores */
}

.extra-row {
    display: none;
}

/* não usar mais a extra-row */

/* LIGHTBOX */
.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, .8);
    display: none;
    place-items: center;
    z-index: 999999 !important;
    /* z-index extremamente alto */
    backdrop-filter: blur(2px);
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.lightbox.open {
    display: grid
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    position: relative;
    z-index: 10000;
}

.lb-close,
.lb-prev,
.lb-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: #fff;
    color: #111;
    font-size: 20px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    cursor: pointer;
    z-index: 1000000 !important;
    /* acima de tudo */
}

.lb-close {
    top: 8% !important;
    right: 4% !important;
    transform: none !important;
}

.lb-prev {
    left: 3% !important;
}

.lb-next {
    right: 3% !important;
}

/* ===== RESPONSIVO ===== */
@media (max-width:600px) {
    .timeline {
        padding-bottom: 46px
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        flex: 0 0 40px;
    }

    .side-year {
        display: none
    }

    /* fantasmas somem no mobile */
    .yearBox {
        min-width: 120px;
        padding: 0 10px;
    }

    /* mais compacto no mobile */
    .big-year {
        font-size: 90px;
    }

    /* manter 320px mesmo no mobile */
    .side-year {
        font-size: 90px;
    }

    /* anos sombra também 320px no mobile */
    .gal-grid {
        gap: 12px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "card"
            "hero"
            "thumbs";
        height: auto;
    }

    .thumbs-container {
        gap: 12px;
    }

    :root {
        --dot: 14px
    }

    .yearsRow {
        gap: 0;
        padding-inline: 12px
    }
}



.cf7-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.cf7-popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.cf7-popup-content h2 {
  margin-bottom: 10px;
}
.cf7-close {
  background: #333;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  margin-top: 15px;
  cursor: pointer;
}
.cf7-close:hover {
  background: #555;
}