﻿:root {
    --stories-header-height: 64px;
}

@media (min-width: 992px) {
    :root {
        --stories-header-height: 80px;
    }
}

@media (max-width: 991px){
   .stories-fixed-header a:has(.header__logo){
        display: none;
        visibility: hidden;
    }
}

.sobre-1 {
    min-height: calc(100dvh - (var(--stories-header-height) + 63px));
    max-width: none;
    width: 100%;
    background: linear-gradient(to bottom, #556F97 0%, #556F97 68.994%, white 111%);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    box-sizing: border-box;
}

.pilula-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pilula-container {
    position: relative;
    width: 230px;
    height: 379px;
    border-radius: 500px;
    overflow: hidden;
    box-shadow: inset 0 0 16px 2px rgba(0,0,0,0.25);
    margin: 0;
}

    .pilula-container::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient( to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.33) 33.934%, rgba(0,0,0,0) 46.059% );
        pointer-events: none;
        z-index: 1;
    }

    .pilula-container::after {
        content: '';
        position: absolute;
        bottom: -26px;
        left: -17px;
        width: 256px;
        height: 104px;
        background: rgba(0,0,0,0.8);
        filter: blur(50px);
        pointer-events: none;
    }

.pilula-imagem {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pilula-nome {
    position: absolute;
    width: 260px;
    height: 49px;
    opacity: 1;
    top: 47px;
    right: 0;
    z-index: 2;
    margin: 0;
    color: white;
    font-family: 'Nuosu SIL', serif;
    font-size: 24px;
    line-height: 24px;
    text-shadow: 0 3px 4.5px rgba(33,43,58,0.33);
    pointer-events: none;
    white-space: nowrap;
}

.pilula-countdown {
    position: absolute;
    z-index: 2;
    top: calc(100% - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
}

.cd-numeros {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    height: 18px;
    line-height: 24px;
}

.cd-num {
    min-width: 28px;
    text-align: center;
}

.cd-sep {
    width: 4px;
    text-align: center;
}

.cd-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    margin-top: 2px;
}

    .cd-labels span {
        min-width: 28px;
        text-align: center;
    }

.sobre-mensagem {
    text-align: center;
    color: white;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    max-width: 328px;
    margin: 0;
}

@media (min-width: 992px) {
    .sobre-1 {
        min-height: calc(100dvh - var(--stories-header-height));
        padding: 40px 32px;
        background: linear-gradient(to bottom, #556F97 76.953%, white 248.18%);
        gap: 24px;
    }

    .pilula-nome {
        right: 110px;
        top: 69px;
        font-size: 40px;
        width: 260px;
        height: 68px;
        line-height: 34px;
    }

    .pilula-container {
        width: 304px;
        height: 489px;
        border-radius: 500px;
        box-shadow: inset 0 0 24px 3px rgba(0,0,0,0.25);
    }

        .pilula-container::after {
            width: 500px;
            height: 156px;
            left: -98px;
            bottom: -40px;
        }

    .pilula-countdown {
        top: calc(100% - 74px);
    }

    .sobre-mensagem {
        max-width: 624px;
        font-size: 16px;
    }
}

/* ── sobre-2 ── */
.sobre-2 {
    min-height: calc(100dvh - (60px + 63px));
    max-width: none;
    width: 100%;
    background: var(--semantica-background-primary);
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 28px;
    box-sizing: border-box;
}

.s2-fotos {
    position: relative;
    width: 215px;
    height: 267px;
    flex-shrink: 0;
}

.s2-foto {
    position: absolute;
    width: 176px;
    height: 240px;
    background: var(--neutral-lightest);
    border-radius: 4px;
    box-shadow: 0 0 4px 2px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 50px;
    box-sizing: border-box;
    transition: transform 0.4s ease, left 0.4s ease;
}

    .s2-foto::after {
        content: '';
        position: absolute;
        inset: 16px 16px 50px;
        border-radius: 2px;
        box-shadow: inset 0 0 6px 0 rgba(0,0,0,0.4);
        pointer-events: none;
    }

    .s2-foto img {
        width: 100%;
        flex: 1;
        object-fit: cover;
        border-radius: 2px;
        min-height: 0;
    }

.s2-fotos-vazio {
    width: 216px;
    height: 216px;
    object-fit: cover;
}

.s2-foto:nth-child(1) {
    transform: rotate(10deg);
    left: 28px;
    top: 14px;
    z-index: 3;
}

.s2-foto:nth-child(2) {
    left: 20px;
    top: 14px;
    z-index: 2;
}

.s2-foto:nth-child(3) {
    transform: rotate(-10deg);
    left: 12px;
    top: 14px;
    z-index: 1;
}

.s2-foto:nth-child(n+4) {
    display: none;
}

.s2-quote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.s2-aspas {
    font-family: serif;
    font-size: 72px;
    color: #cee2ff;
    line-height: 0.7;
    height: 26px;
    overflow: hidden;
    display: block;
    user-select: none;
}

.s2-aspas--fecha {
    transform: rotate(180deg);
}

.s2-texto {
    font-size: 14px;
    font-weight: 400;
    color: var(--semantica-content-primary-darkest);
    text-align: center;
    line-height: normal;
    max-width: 328px;
    margin: 0;
}

@media (min-width: 992px) {
    .sobre-2 {
        min-height: calc(100dvh - 60px);
        padding: 40px 32px;
        gap: 32px;
    }

    .s2-fotos {
        width: 226px;
        height: 280px;
    }

    .s2-foto {
        width: 185px;
        height: 252px;
        padding: 17px 17px 52px;
    }

        .s2-foto::after {
            inset: 17px 17px 52px;
        }

        .s2-foto:nth-child(2) {
            left: 21px;
            top: 14px;
        }

    .s2-texto {
        font-size: 16px;
        max-width: 784px;
    }
}

@keyframes s2SaiFrente {
    0% {
        transform: rotate(10deg) translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: rotate(28deg) translate(40px, -60px) scale(0.85);
        opacity: 0;
    }
}

@keyframes s2EntraAtras {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.s2-foto.s2-saindo {
    animation: s2SaiFrente 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    z-index: 10;
    display: flex !important;
}

.s2-foto.s2-entrando {
    animation: s2EntraAtras 0.4s ease-out forwards;
}

.sobre-3 {
    max-width: none;
    width: 100%;
    min-height: calc(100dvh - (60px));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#presentes-placeholder {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.sobre-3-bg {
    position: absolute;
    inset: 0;
    background: #000620B2;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apresentacao-presentes {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 32px;
    flex-direction: column;
    align-items: center;
    width: 328px;
    box-sizing: border-box;
}

/* ── Stories ── */
.stories-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

#tab-sobre,
#presentes-placeholder .preview-mode,
#presentes-placeholder .preview-mode > .background-primary {
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 992px) {

    .sobre-1, .sobre-2, .sobre-3 {
        padding-bottom: 0;
    }
}

.sobre-1, .sobre-2, .sobre-3 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: unset;
    padding-bottom: 64px;
    box-sizing: border-box;
    overflow: hidden;
    will-change: transform;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
}

    .sobre-1.stories-slide--active,
    .sobre-2.stories-slide--active,
    .sobre-3.stories-slide--active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
        z-index: 2;
    }

    .sobre-1.stories-slide--prev,
    .sobre-2.stories-slide--prev,
    .sobre-3.stories-slide--prev {
        transform: translateX(-100%);
        opacity: 0;
        z-index: 1;
    }

.stories-progress-bar {
    flex: 1;
    height: 2px;
    background: #2984FC;
    border-radius: 100px;
    overflow: hidden;
}

.stories-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--semantica-background-primary);
    border-radius: 100px;
}

.stories-progress-bar.completo .stories-progress-fill {
    width: 100%;
    transition: none;
}

/* ── Stories fixed header ── */
.stories-fixed-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--stories-header-height);
    background: var(--semantica-background-primary-brand);
    transition: all ease-in-out 0.2s;
    border-bottom: 1px solid transparent;
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
    z-index: 201;
    box-sizing: border-box;
    margin-bottom: var(--stories-header-height);
}

    .stories-fixed-header.ativo {
        display: flex;
    }

.stories-fixed-header__inner {
    width: 100%;
}

.stories-fixed-header.nav-modo-gradient {
    background: #556F97;
}

.stories-fixed-header .stories-fixed-header__back,
.stories-fixed-header .header__logo {
    display: none;
}


.stories-fixed-header__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 16px;
}

.stories-fixed-header__title {
    color: var(--neutral-lightest);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.stories-fixed-header .stories-progress-container {
    display: flex;
    gap: 4px;
    pointer-events: none;
}

.stories-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    background: transparent;
    border: 1.5px solid white;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: white;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.stories-arrow--prev {
    left: 16px;
}

.stories-arrow--next {
    right: 16px;
}

@keyframes storiesItemEntra {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-stories-animate] {
    opacity: 0;
}

[data-stories-animate].stories-item--visivel {
    animation: storiesItemEntra 0.5s ease forwards;
}

@media (min-width: 992px) {
    .stories-fixed-header {
        height: var(--stories-header-height);
        align-items: center;
    }

        .stories-fixed-header.nav-modo-gradient {
            background: #556F97;
            border-bottom-color: rgba(160,180,209,0.5);
        }

    .stories-fixed-header__inner {
        width: 100%;
        max-width: 1294px;
        height: 64px;
        margin: 0 auto;
        gap: 24px;
        justify-content: space-between;
    }

    .stories-fixed-header .stories-fixed-header__back {
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        transition: background 0.2s;
    }

        .stories-fixed-header .stories-fixed-header__back:hover {
            background: rgba(255,255,255,0.15);
        }

    .stories-fixed-header .header__logo {
        display: inline-block;
        transform: none;
        margin-left: 0;
        width: calc(140px * 1.3);
        height: calc(16px * 1.3);
    }

    .stories-fixed-header__brand-text {
        color: white;
        font-weight: 700;
        font-size: 11px;
        line-height: 1.3;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .stories-fixed-header__content {
        padding: 0 24px;
        justify-content: center;
    }

    .stories-fixed-header__title {
        margin-bottom: 4px;
    }

    .stories-progress-bar {
        width: 292px;
        flex: none;
    }

    .stories-wrapper:has(.sobre-1.stories-slide--active) .stories-arrow--next {
        display: flex;
    }

    .stories-wrapper:has(.sobre-2.stories-slide--active) .stories-arrow {
        display: flex;
        border-color: var(--semantica-border-primary-brand);
        color: var(--semantica-content-accent);
    }

    .stories-wrapper:has(.sobre-3.stories-slide--active) .stories-arrow--prev {
        display: flex;
    }
}

.preview-mode .faq,
.preview-mode footer,
.preview-mode #valepresente-preview {
    display: none;
}

#presentes-placeholder {
    display: flex;
    flex-direction: column;
}

#presentes-placeholder .listagem-produtos__section {
    padding: 0;
    flex: 1;
}

#presentes-placeholder .categoria-sticky {
    margin: 0;
    padding: 0;
    top: 0;
}

#presentes-placeholder .preview-mode > input,
#presentes-placeholder .preview-mode > br {
    display: none;
}
