.astation-highlights {
    --astation-highlights-accent: #1a73e8;
    --astation-highlights-text: #333e48;
    --astation-highlights-reflection: #8ec5ff;
    --astation-highlights-viewed: #aeb4bc;
    --astation-highlights-ring-thickness: 3px;
    --astation-highlights-size: 58px;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    line-height: normal;
}

.astation-highlights *,
.astation-highlights *::before,
.astation-highlights *::after {
    box-sizing: border-box;
}

.astation-highlights__track {
    display: flex;
    align-items: flex-start;
    justify-content: safe center;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.astation-highlights__track::-webkit-scrollbar {
    display: none;
}

.astation-highlights__item {
    flex: 0 0 auto;
    width: 66px;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

.astation-highlights__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: var(--astation-highlights-text);
    font: inherit;
    line-height: normal;
    text-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transform: translateZ(0);
    transition: transform .14s cubic-bezier(.2,.8,.2,1);
}

.astation-highlights__button.is-pressed {
    transform: scale(.94);
}

.astation-highlights__button.is-launching {
    transform: scale(.9);
}


.astation-highlights__button:focus-visible {
    outline: 2px solid var(--astation-highlights-accent);
    outline-offset: 4px;
    border-radius: 8px;
}

.astation-highlights__ring {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: calc(var(--astation-highlights-size) + (var(--astation-highlights-ring-thickness) * 2));
    height: calc(var(--astation-highlights-size) + (var(--astation-highlights-ring-thickness) * 2));
    margin: 0;
    padding: var(--astation-highlights-ring-thickness);
    border: 0;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--astation-highlights-accent) 0%,
        var(--astation-highlights-accent) 28%,
        var(--astation-highlights-reflection) 52%,
        var(--astation-highlights-accent) 76%,
        var(--astation-highlights-accent) 100%
    );
    transition: background .22s ease, transform .18s ease, box-shadow .18s ease;
}

.astation-highlights__item.is-viewed .astation-highlights__ring {
    background: var(--astation-highlights-viewed);
}

.astation-highlights__button.is-launching .astation-highlights__ring {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--astation-highlights-reflection) 24%, transparent);
    transform: scale(.96);
}

.astation-highlights__item.is-viewed .astation-highlights__button.is-launching .astation-highlights__ring {
    box-shadow: 0 0 0 5px rgba(174, 180, 188, .16);
}

.astation-highlights__image-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--astation-highlights-size);
    height: var(--astation-highlights-size);
    margin: 0;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #f4f4f4;
}

.astation-highlights__image,
.astation-highlights__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.astation-highlights__image {
    object-fit: cover;
    object-position: 50% 50%;
}

.astation-highlights__placeholder {
    background: linear-gradient(135deg, #f1f3f4, #dfe3e7);
}

.astation-highlights__label {
    display: -webkit-box;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: var(--astation-highlights-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* Remove o espaçamento padrão do widget de Shortcode do Elementor somente quando ele contém o Astation Highlights. */
.elementor-widget-shortcode:has(.astation-highlights),
.elementor-widget-shortcode:has(.astation-highlights) > .elementor-widget-container {
    min-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Compatibilidade com contêineres flex/grid do Elementor que aplicam espaçamento entre widgets. */
.elementor-element:has(> .elementor-widget-container > .astation-highlights) {
    --kit-widget-spacing: 0px;
    --widgets-spacing: 0px;
}

.astation-highlights-empty {
    padding: 12px;
    border: 1px dashed #c7cbd1;
    border-radius: 6px;
    background: #fff;
    color: #59636e;
    font-size: 13px;
}

@media (min-width: 768px) {
    .astation-highlights {
        --astation-highlights-size: 64px;
    }

    .astation-highlights__track {
        gap: 14px;
        padding: 12px 12px 0;
    }

    .astation-highlights__item {
        width: 76px;
    }

    .astation-highlights__label {
        font-size: 13px;
    }
}


@media (min-width: 992px) {
    .astation-highlights {
        --astation-highlights-size: var(--astation-highlights-desktop-size) !important;
    }

    .astation-highlights__track {
        justify-content: flex-start;
        gap: 22px;
        width: min(100%, 1266px);
        max-width: 1266px;
        margin-right: auto;
        margin-left: auto;
        padding: 18px 12px 6px;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 12px;
    }

    .astation-highlights__item {
        flex: 0 0 136px;
        width: 136px;
        scroll-snap-align: start;
    }

    .astation-highlights__button {
        gap: 10px;
    }

    .astation-highlights__label {
        font-size: 15px;
        font-weight: 600;
        line-height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .astation-highlights__track { scroll-behavior: auto; }
    .astation-highlights__button,
    .astation-highlights__ring { transition: none; }
}

/* Visualizador de stories */
.astation-story-viewer[hidden] { display: none !important; }
.astation-story-viewer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.astation-story-viewer.is-open { opacity: 1; visibility: visible; }
.astation-story-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 17, 20, .88);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.astation-story-viewer__panel {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100dvh - 48px);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: #101114;
    box-shadow: 0 28px 90px rgba(0,0,0,.48);
    transform: scale(.86) translateY(14px);
    transition: transform .24s cubic-bezier(.2,.82,.2,1), opacity .18s ease;
    opacity: .72;
}
.astation-story-viewer.is-open .astation-story-viewer__panel { transform: scale(1) translateY(0); opacity: 1; }
.astation-story-viewer__media,
.astation-story-viewer__image { width: 100%; height: 100%; }
.astation-story-viewer__media { background: #0e0f12; }
.astation-story-viewer__image { display: block; object-fit: cover; }
.astation-story-viewer__header {
    position: absolute;
    z-index: 5;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    min-height: 70px;
    padding: 14px 14px 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,0));
    color: #fff;
}
.astation-story-viewer__identity { display: flex; align-items: center; gap: 9px; min-width: 0; padding-right: 8px; }
.astation-story-viewer__avatar {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #e8eaed center/cover no-repeat;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.astation-story-viewer__highlight-title {
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.astation-story-viewer__type {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(0,0,0,.28);
    color: rgba(255,255,255,.9);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}
.astation-story-viewer__counter {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.astation-story-viewer__close,
.astation-story-viewer__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.astation-story-viewer__close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin-left: 7px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,.42);
}
.astation-story-viewer__close svg,
.astation-story-viewer__nav svg,
.astation-story-viewer__link svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.astation-story-viewer__content {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 96px 20px 22px;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.58) 48%, rgba(0,0,0,0) 100%);
    color: #fff;
    text-align: left;
}
.astation-story-viewer__title {
    margin: 0 0 7px;
    color: #fff;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.18;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.astation-story-viewer__description {
    margin: 0 0 14px;
    color: rgba(255,255,255,.92);
    font-size: 14px;
    line-height: 1.45;
}
.astation-story-viewer__coupon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 7px 10px;
    border: 1px dashed rgba(255,255,255,.65);
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    color: #fff;
}
.astation-story-viewer__coupon[hidden] { display: none !important; }
.astation-story-viewer__coupon span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.astation-story-viewer__coupon strong { font-size: 15px; letter-spacing: .04em; }
.astation-story-viewer__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    background: #1a73e8;
    box-shadow: 0 8px 24px rgba(26,115,232,.3);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}
.astation-story-viewer__link svg { width: 19px; height: 19px; }
.astation-story-viewer__link:hover,
.astation-story-viewer__link:focus { color: #fff; text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.astation-story-viewer__nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 42px;
    height: 56px;
    padding: 10px;
    transform: translateY(-50%);
    background: rgba(0,0,0,.28);
}
.astation-story-viewer__nav--prev { left: 0; border-radius: 0 12px 12px 0; }
.astation-story-viewer__nav--next { right: 0; border-radius: 12px 0 0 12px; }
.astation-story-viewer__nav:disabled { opacity: .18; cursor: default; }
.astation-story-viewer__panel[data-story-type="coupon"] .astation-story-viewer__link { background: #1a73e8; }
html.astation-story-viewer-open,
html.astation-story-viewer-open body { overflow: hidden !important; }

@media (max-width: 600px) {
    .astation-story-viewer { padding: 0; }
    .astation-story-viewer__panel {
        width: 100%;
        height: 100dvh;
        max-height: none;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
    }
    .astation-story-viewer__content { padding-right: 18px; padding-bottom: max(22px, env(safe-area-inset-bottom)); padding-left: 18px; }
    .astation-story-viewer__header { padding-top: max(14px, env(safe-area-inset-top)); }
}


@media (min-width: 992px) {
    .astation-highlights {
        --astation-highlights-size: var(--astation-highlights-desktop-size) !important;
    }

    .astation-highlights__track {
        justify-content: flex-start;
        gap: 22px;
        width: min(100%, 1266px);
        max-width: 1266px;
        margin-right: auto;
        margin-left: auto;
        padding: 18px 12px 6px;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 12px;
    }

    .astation-highlights__item {
        flex: 0 0 136px;
        width: 136px;
        scroll-snap-align: start;
    }

    .astation-highlights__button {
        gap: 10px;
    }

    .astation-highlights__label {
        font-size: 15px;
        font-weight: 600;
        line-height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .astation-story-viewer,
    .astation-story-viewer__panel,
    .astation-story-viewer__link { transition: none; }
}

/* Informações de produto WooCommerce */
.astation-story-viewer__product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}
.astation-story-viewer__product-meta[hidden] { display: none !important; }
.astation-story-viewer__category,
.astation-story-viewer__sale-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.astation-story-viewer__category {
    max-width: 68%;
    overflow: hidden;
    background: rgba(255,255,255,.16);
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.astation-story-viewer__sale-badge {
    background: #00a650;
    color: #fff;
}
.astation-story-viewer__price {
    margin: 0 0 5px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.18;
}
.astation-story-viewer__price[hidden],
.astation-story-viewer__stock[hidden] { display: none !important; }
.astation-story-viewer__price del {
    margin-right: 6px;
    color: rgba(255,255,255,.66);
    font-size: 13px;
    font-weight: 500;
}
.astation-story-viewer__price ins { color: #fff; text-decoration: none; }
.astation-story-viewer__price .woocommerce-Price-currencySymbol { font-size: .72em; }
.astation-story-viewer__stock {
    margin: 0 0 11px;
    color: rgba(255,255,255,.86);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}
.astation-story-viewer__panel[data-story-type="product"] .astation-story-viewer__description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Progresso, gestos e personalização visual */
.astation-highlights__item {
    width: calc(var(--astation-highlights-size) + 8px);
}

.astation-story-viewer__panel {
    touch-action: pan-y;
}

.astation-story-viewer__progress {
    position: absolute;
    z-index: 8;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    height: 3px;
    pointer-events: none;
}

.astation-story-viewer__progress-segment {
    position: relative;
    flex: 1 1 0;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .38);
}

.astation-story-viewer__progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.astation-story-viewer__header {
    padding-top: 23px;
}

.astation-story-viewer.is-paused .astation-story-viewer__panel::after {
    content: "Pausado";
    position: absolute;
    z-index: 9;
    top: 50%;
    left: 50%;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@media (max-width: 767px) {
    .astation-story-viewer__progress {
        top: max(10px, env(safe-area-inset-top));
    }

    .astation-story-viewer__header {
        padding-top: max(23px, calc(env(safe-area-inset-top) + 13px));
    }
}

/* Toque prolongado para pausa */
.astation-story-viewer__image {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}


/* Seleção de texto com proteção da imagem */
.astation-story-viewer__content,
.astation-story-viewer__content * {
    -webkit-user-select: text;
    user-select: text;
}

.astation-story-viewer__image[hidden] { display: none !important; }
.astation-story-viewer__panel.has-no-story-image .astation-story-viewer__media { background: linear-gradient(160deg, #1d232b, #0e0f12); }
