html,
body,
body main.site-main {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    margin: 0;
    padding: 0;
    padding-inline: 0 !important;
    width: 100vw;
}

article {
    height: auto;
    padding: 0;
    width: 100%;
    gap: 0px;
}

.hero-section {
    position: relative;
    height: 40vh;
    width: 100vw;
    border-radius: 0 0 16px 16px;
    margin-bottom: -16px;
    overflow: visible;
    z-index: 4;
}

.hero-image {
    position: relative;
    height: 100%;
    width: 100%;
    z-index: 0;
    border-radius: inherit;
    object-fit: cover;
    filter: brightness(0.5);
} 

.glassbox.glass-background {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 1px);
    height: calc(100% + 1px);
    border-radius: 0 0 16px 16px;
    border-bottom: 2px solid rgba(245, 132, 53, 0.1);
    overflow: visible;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.glass-background::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 -1px 40px 2px rgba(255, 255, 255, 0.2),
        -1px -1px 4px 1px rgba(255, 255, 255, 0.3);
    border: 5px double transparent;
    filter: blur(2px);
}
.glass-background::after {
  content: "";
  position: absolute;
  width: calc(100% - 6px);
  height: 100%;
  top: -3px;
  left: 3px;
  border-radius: 0 0 16px 16px;
  /* Uma borda interna super sutil que simula o reflexo interno total do vidro */
  border-left: 4px double rgba(0, 0, 0, 0.05);
  border-bottom: 4px double rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 10px 20px -5px #ffffff40,
         inset 2px -2px 26px 8px rgba(0, 0, 0, 0.2);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
  filter: blur(10px);
}

.title-product {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: fit-content;
    padding: 20px;
    text-align: center;
    max-width: 90%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    /* Sem overflow: hidden: o text-shadow do h1 (glow até 30px) renderiza
       para fora da caixa sem ser cortado pela borda do metalbox. */
    box-shadow: -2px -2px 12px 3px rgba(0, 0, 0, 0.6) !important;
}

.title-product h1 {
    font-size: clamp(25px, 26px + 0.2em, 32px);
    font-weight: 500;
    letter-spacing: 1px;
}

/* Product section */

.highlight-section {
    position: relative;
    z-index: 3;
    min-height: 450px;
    height: 60vh;
    max-height: 90vh;
    box-shadow: -10px 0 32px 6px rgba(0, 0, 0, 0.8);
}


.section-content {
    position: relative;
    padding: 46px 0 40px;
    background-color: black;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


.product-hightlight {
    position: relative;
    padding: 15px 2.6em 15px;
    height: fit-content;
    margin-right: 25px;
    width: 45%;
    flex-direction: column;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    gap: 15px;
    text-align: end;
    z-index: 6;
}

.product-hightlight h3 {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    font-size: clamp(25px, 28px + 0.455vw, 32px);
}
.product-hightlight p {
    font-size: var(--uv-fs-md);
    margin: 0;
}

.buy-button {
    height: 2.5em;
}

.product-image {
    position: absolute;
    left: 0;
    top: 0;
    width: 70%;
    height: 100%;
    z-index: 3;
    mask-image: linear-gradient(to right, black 0%, black 70%, transparent 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Wrapper clicavel da imagem do carousel.
   flex: 0 0 auto em vez de flex: 1 porque o eixo principal do pai muda:
   no desktop .product-image e row (flex: 1 cresceria a largura, correto),
   mas no mobile ele vira column e o mesmo flex: 1 esticaria o botao por
   ~80vh, englobando a caixa de texto e fazendo "Adquirir" abrir o popup.
   Com width: 100% + flex: 0 0 auto a largura e preenchida nos dois casos
   sem crescer no eixo do pai, e a img mantem o proprio tamanho (40vh no
   mobile, natural no desktop).
   overflow: visible e explicito porque o box-reflexo da img (linha ~533) e
   desenhado abaixo dela e seria cortado por qualquer overflow oculto. */
.product-image-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    overflow: visible;
    cursor: zoom-in;
}

.product-image-zoom img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.product-image-zoom:focus-visible {
    outline: 2px solid #F58435;
    outline-offset: 2px;
}

/* Desktop apenas (>=788px): carrossel com largura variável (mínimo de
   60%), imagem do carrossel a 100% da altura com largura pela proporção
   natural da foto, ancorada no início do botão (justify-content:
   flex-start). Mobile (<=787px) permanece exatamente como estava: nada
   abaixo deste media query é alterado. */
@media (min-width: 788px) {
    #carousel.product-image {
        width: fit-content;
        min-width: 60%;
    }

    .product-image-zoom {
        justify-content: flex-start;
    }

    .product-image-zoom img {
        height: 100%;
        width: auto;
    }
}

.image-selector {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    height: fit-content;
    width: fit-content;
    z-index: 7;
    background-color: transparent;
}

.row-selector {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 10px;
}
.product-left-arrow {
    position: relative;
    color: white;
    aspect-ratio: 1 / 1;
    height: 35px;
    opacity: 0.8;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.product-left-arrow svg {
    aspect-ratio: 1 / 1;
    height: 100%;
}

.product-right-arrow {
    position: relative;
    color: white;
    aspect-ratio: 1 / 1;
    height: 35px;
    opacity: 0.8;
    transform: rotateZ(180deg);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.product-right-arrow svg {
    aspect-ratio: 1 / 1;
    height: 100%;
}

.product-left-arrow:hover,
.product-left-arrow:focus {
    transform: scale(1.3);
    opacity: 1;
}
.product-right-arrow:hover,
.product-right-arrow:focus {
    transform: rotateZ(180deg) scale(1.3);
    opacity: 1;
}

.button-selector.glassbox {
    position: relative;
    border-radius: 50px;
    aspect-ratio: 1 / 1;
    height: 16px;
    padding: 0;
    z-index: 9;
    transform: scale(1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.button-selector::before {
    content: '';
    position: absolute;
    z-index: 8;
    height: 16px;
    top: 50%;
    left: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: inherit;
    border: 1px solid  rgba(255, 255, 255, 0.5);
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    padding: 0;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0);
    opacity: 0;
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition: /*transform 0.3s ease,*/
        opacity 0.3s ease,
        box-shadow 0.3s ease;
}

.button-selector:hover{
    transform: scale(1.4);
}

.button-selector:hover::before{
    opacity: 1;
    box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.3);
    /*transform: translate(-50%, -50%);*/
}

/* Estado selecionado: inerte. O seletor composto (0,3,0) vence tanto o
   .button-selector.glassbox quanto o :hover, então o dot atual não cresce
   nem troca o brilho branco pelo laranja ao passar o mouse. A geometria
   continua a da regra base (top/left 50% + translate), que é a mesma do
   hover — por isso não usamos inset: 0 aqui, que somado ao translate
   herdado deslocaria o overlay. */
.button-selector.glassbox.button-selected {
    transform: scale(1.25);
    cursor: default;
}

.button-selector.glassbox.button-selected::before {
    opacity: 1;
    background-color: rgba(245, 132, 53, 0.1);
    border: 1px solid rgba(245, 132, 53, 0.6);
    box-shadow: 0 0 15px rgba(245, 132, 53, 0.4);
}

.img-is-changing {
    animation: change-image 0.45s linear;
}

@keyframes change-image {
    0%, 100% {
        filter: blur(0px);
        opacity: 1;

    } 50% {
        filter: blur(20px);
        opacity: 0.2;
    }
}

/* Tab section */

.tab-section {
    position: relative;
    height: clamp(450px, 70vh, 800px);
    min-height: 70vh;
    padding: 20px 30px 20px;
}

/* Título da seção "Como funciona" (single-uv_service.php).
   O h1..h6 global traz margin: 0 0 0.5em, e dentro de .product-tab — que é
   flex column — essa margem empurraria o box de texto para baixo. Zera a
   margem e impede que o título encolha se a descrição for muito longa. */
.service-section-title {
    width: 100%;
    text-align: center;
    margin: 0;
    flex-shrink: 0;
}

.section-content-tab {
    position: relative;
    height: 100%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-tab {
    position: relative;
    height: 100%;
    min-width: 60vw;
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px 35px 25px;
    z-index: 6;
}

.tab-control {
    display: flex;
    min-height: 30px;
    height: fit-content;
    padding: 10px 0;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.service-section-title {
    padding: 20px 20px 10px;
    color: white;
    letter-spacing: 0.13em;
}

.tab-button.glassbox {
    position: relative;
    z-index: 1;
    height: 100%;
    width: fit-content;
    padding: 8px clamp(8px, 10px + 0.2em, 15px) 8px;
    color: white;
    text-shadow: 0 0 4px rgba(245, 132, 53, 0);
    font-family: var(--font-titles);
    letter-spacing: 0.15em;
    font-size: var(--uv-fs-md);
    font-weight: 500;
    transition: text-shadow 0.3s ease-in-out,
        box-shadow 0.3s ease-in-out,
        border-color 0.3s ease-in-out;
}

.tab-button.glassbox:hover,
.tab-button.glassbox:focus {
    box-shadow: 0 0 15px 3px rgba(245, 132, 53, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.tab-button::before{
    position: absolute;
    inset: 0;
    content: '';
    border-radius: inherit;
    box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.3),
        -1px -2px 5px 1px rgba(0, 0, 0, 0.3);
}

.tab-button-label {
    position: relative;
    z-index: 1;
}

.tab-body.glassbox {
    flex: 1;
    position: relative;
    display: flex;
    min-height: 0;
}

.tab-body-text {
    flex: 1;
    min-height: 0;
    padding: clamp(20px, 2em, 35px);
    overflow-y: auto;
    color: white;
    font-size: var(--uv-fs-md);
    line-height: 1.7;
    text-align: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 132, 53, 0.5) transparent;
}

.tab-body-text::-webkit-scrollbar {
    width: 6px;
}

.tab-body-text::-webkit-scrollbar-track {
    background: transparent;
}

.tab-body-text::-webkit-scrollbar-thumb {
    background: rgba(245, 132, 53, 0.5);
    border-radius: 50px;
}

.tab-body-text p {
    margin: 0 0 1em;
}

.tab-body-text p:last-child {
    margin-bottom: 0;
}

.tab-body-empty {
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.tab-button.glassbox.tab-button-selected {
    text-shadow: 0 0 4px rgba(245, 132, 53, 0.4);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(245, 132, 53, 0.4);
}

.tab-button-selected::before {
    --orange: rgba(245, 132, 53, 0.1);
    --bk-white: rgba(245, 132, 53, 0.1); 
    position: absolute;
    content: '';
    opacity: 1;
    z-index: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.6);
    inset: 0;
    background: var(--bk-white);
        /* linear-gradient(to left, var(--bk-white) 0%, var(--orange) 5px, var(--orange) calc(100% - 5px), var(--bk-white) 100%),
        linear-gradient(to bottom, var(--bk-white) 0%, var(--orange) 5px, var(--orange) calc(100% - 5px), var(--bk-white) 100%),
        linear-gradient(70deg, var(--bk-white) 0%, var(--orange) 5px, var(--orange) calc(100% - 5px), var(--bk-white) 100%); */
}

.is-changing-tab {
    animation: change-image 0.45s linear;
}

/* ============================================================
   LIGHTBOX — POPUP DE ZOOM DA IMAGEM DO PRODUTO
   ============================================================
   Fica fora de .section-content no HTML para nao herdar o
   z-index 3 nem a mask-image do .product-image.
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 48px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
}

/* O display: grid acima sobrescreveria o atributo hidden do HTML,
   entao o estado fechado precisa ser explicito. */
.lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    touch-action: none;
}

.lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 40px 5px rgba(0, 0, 0, 0.6);
    cursor: zoom-in;
    transform: scale(1);
    transition: transform 0.3s ease;
}

/* Estado 2x: a imagem cresce e vira o alvo do pan. */
.lightbox-figure.is-zoomed img {
    transform: scale(2);
    cursor: grab;
}

.lightbox-figure.is-zoomed img.is-panning {
    cursor: grabbing;
}

.lightbox-caption {
    font-size: var(--uv-fs-sm);
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.08em;
    text-align: center;
    user-select: none;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

/* O icone e SVG dimensionado em porcentagem, entao o tamanho vem do circulo
   e nao de font-size. display: block e o que remove o gap de baseline do SVG
   inline — sem ele o desenho fica ~4px abaixo do centro. pointer-events: none
   devolve o clique ao botao em vez de acionar o path. */
.lightbox-close svg,
.lightbox-nav svg {
    width: 55%;
    height: 55%;
    display: block;
    pointer-events: none;
}

/* Mesma seta da anterior, so que invertida. */
.lightbox-next svg {
    transform: rotate(180deg);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(245, 132, 53, 0.35);
    border-color: rgba(245, 132, 53, 0.7);
    transform: scale(1.1);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 2px solid #F58435;
    outline-offset: 3px;
}

.lightbox-close {
    top: clamp(12px, 2.5vw, 28px);
    right: clamp(12px, 2.5vw, 28px);
    width: 44px;
    height: 44px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: clamp(8px, 2vw, 24px);
}

.lightbox-next {
    right: clamp(8px, 2vw, 24px);
}

/* Com uma unica imagem nao ha para onde navegar. */
.lightbox.is-single .lightbox-nav {
    display: none;
}

@media (max-width: 787px) {
    .lightbox-figure img {
        max-height: 70vh;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox,
    .lightbox-figure img,
    .lightbox-close,
    .lightbox-nav {
        transition: none;
    }
    .lightbox-figure.is-zoomed img {
        transform: none;
    }
}

@media (max-width: 787px) {
    
    .hero-section {
        height: 40vh;
    }
    .title-product {
        transform: translate(-50%, 0%);
        width: calc(100% - 20px);
        height: 30vh;
        background: linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.4) 30%,
            rgba(0, 0, 0, 1) 50%,
            rgba(0, 0, 0, 0.4) 70%,
            transparent 100%
        );
        mask-image: linear-gradient(to right, transparent 0%, black 25px, black calc(100% - 25px), transparent 100%);
        box-shadow: none !important;
        border: none !important;
        filter: none;
    }
    .title-product::after,
    .title-product::before {
        content: none;
    }
    .title-product h1 {
        font-size: 30px;
    }
    .highlight-section {
        background-color: black;
        position: relative;
        min-height: 90vh;
        height: fit-content;
        display: grid;
        gap: 0px;
        grid-template-rows: 1fr auto;
        align-items: center;
        overflow: hidden;
    }
    .section-content {
        grid-row: 2;
        display: flex;
        align-items: flex-end;
        padding: 0;
        background-color: transparent;
    }
    .product-hightlight {
        margin: 10px 10px 15px;
        padding: 12px;
        width: 100%;
        min-height: fit-content;
        height: 40vh;
        align-items: center;
        text-align: center;
    }
    .product-hightlight p {
        width: 100%;
        margin: 0;
    }
    .product-image {
        grid-row: 1;
        overflow: visible;
        position: relative;
        padding-top: 0;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .product-image-zoom {
        position: absolute;
        height: 90vh;
        display: flex;
        align-items: flex-start;
    }

    .product-image img {
        width: 100%;
        height: 40vh;
        object-fit: cover;
        box-shadow: 0 0 20px 1px rgba(255, 255, 255, 0.2);
        border-top: 1px solid rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(0, 0, 0, 0.4);
        -webkit-box-reflect: below 0px linear-gradient(transparent, rgba(0, 0, 0, 0.3));
        /* A mask do desktop nao e resetada aqui, entao ela valia no celular
           e escurecia a borda direita da foto mesmo com a img a 100%. */
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .transition-filter {
        display: none;
    }

    .image-selector {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, calc(-50% - 25px));
        align-self: center;
    }

    .section-content-tab {
        padding: 0;
    }

    .tab-section {
        padding: 15px;
        overflow: hidden;
    }

    .product-tab {
        flex: 1;
        padding: 20px;
        overflow: hidden;
    }
    .product-tab h2 {
        font-size: clamp(26px, 28px + 0.1vh, 32px);
        padding: 12px 15px 12px;
        color: white;
    }
    .tab-control {
        max-height: 20%;
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        flex-shrink: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory; /* Forces snapping behavior */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
        /* Optional: Hide the ugly scrollbar */
        scrollbar-width: none;
    }
    .tab-button.glassbox {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        flex-wrap: nowrap;
        width: fit-content;
    }

    .service-tab-title {
        width: 100%;
        padding: 10px 15px 10px;
    }
}