@keyframes fade-in {
    from {
        background-color: rgba(0, 0, 0, 0);
    }
    to {
        background-color: rgba(0, 0, 0, 0.8);
    }
}

@keyframes fade-out {
    from {
        background-color: rgba(0, 0, 0, 0.8);
    }
    to {
        background-color: rgba(0, 0, 0, 0);
    }
}

@keyframes slide-in {
    from {
        transform: translateX(500px);
    }
    to {
        transform: translateX(0px);
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0px);
    }
    to {
        transform: translateX(500px);
    }
}

@layer base {
}

#cart-drawer[data-state="open"] {
    animation: fade-in 0.4s forwards;
}

#cart-drawer[data-state="closed"] {
    animation: fade-out 0.4s forwards;
}

#cart-drawer[data-state="open"] > div {
    animation: slide-in 0.4s forwards;
}

#cart-drawer[data-state="closed"] > div {
    animation: slide-out 0.4s forwards;
}

.dialog[data-state="open"] {
    animation: fade-in 0.4s forwards;
}

.dialog[data-state="closed"] {
    animation: fade-out 0.4s forwards;
}

.dialog[data-state="open"] > div {
    animation: dialog-in 0.2s forwards;
}

.dialog[data-state="closed"] > div {
    animation: dialog-out 0.2s forwards;
}

@keyframes dialog-in {
    from {
        opacity: 0;
        scale: 50%;
    }
    to {
        opacity: 1;
        scale: 100%;
    }
}

@keyframes dialog-out {
    from {
        opacity: 1;
        scale: 100%;
    }
    to {
        opacity: 0;
        scale: 50%;
    }
}

[data-category-section],
#category #products-list {
    scroll-margin-top: 100px;
    opacity: 1;
    transform: none;
}

@keyframes loading {
    0% {
        left: -50%;
    }

    to {
        left: 100%;
    }
}

/* Carrossel de avaliações (rolagem contínua; pausa ao passar o mouse) */
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

.reviews-marquee {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding: 0.5rem 0;
    animation: marquee 60s linear infinite;
}

.reviews-marquee:hover .marquee-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
    .reviews-marquee {
        overflow-x: auto;
    }
}

/* Cards de produto: formato vertical inspirado em vitrines de jogos, com a
   identidade cromática configurada no painel da própria loja. */
.alpha-product-card {
    isolation: isolate;
    background:
        radial-gradient(circle at 100% 0%, rgb(var(--primary) / 0.11), transparent 38%),
        linear-gradient(180deg, rgb(var(--card)) 0%, rgb(var(--background) / 0.96) 100%);
    box-shadow: 0 16px 38px rgb(0 0 0 / 0.28);
    content-visibility: auto;
    contain-intrinsic-size: auto 380px;
    transform: translateZ(0);
    will-change: transform;
}

.alpha-product-card::after {
    content: "";
    position: absolute;
    inset: auto 12% -1px;
    z-index: 0;
    height: 2px;
    border-radius: 999px;
    background: rgb(var(--primary));
    box-shadow: 0 0 18px rgb(var(--primary) / 0.7);
    opacity: 0;
    transform: scaleX(0.55);
    transition: opacity 240ms ease, transform 240ms ease;
}

.alpha-product-card:hover::after,
.alpha-product-card:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.alpha-product-card__media {
    border-bottom: 1px solid rgb(255 255 255 / 0.07);
}

.alpha-product-card__backdrop {
    filter: blur(14px) saturate(1.25);
    opacity: 0.28;
    pointer-events: none;
    transform: translateZ(0);
}

.alpha-product-card__image {
    filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.32));
}

.alpha-delivery-badge {
    display: inline-flex;
    height: 1.65rem;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0 0.55rem;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    color: white;
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
}

.alpha-delivery-badge--auto {
    border: 1px solid rgb(var(--primary) / 0.55);
    background: rgb(var(--primary) / 0.88);
    color: rgb(var(--primary-foreground));
    box-shadow: 0 6px 20px rgb(var(--primary) / 0.25);
}

.alpha-delivery-badge--manual {
    border: 1px solid rgb(251 191 36 / 0.42);
    background: rgb(82 54 10 / 0.88);
    color: rgb(253 230 138);
}

.alpha-pix-mark {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(50 188 173 / 0.28);
    border-radius: 0.65rem;
    background: rgb(50 188 173 / 0.09);
    color: rgb(50 188 173);
}

.alpha-product-card__cta {
    display: flex;
    width: 100%;
    height: 2.65rem;
    margin-top: auto;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--accent)) 100%);
    color: rgb(var(--primary-foreground));
    font-size: 0.8125rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgb(var(--primary) / 0.24);
    transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.alpha-product-card:hover .alpha-product-card__cta:not(.alpha-product-card__cta--disabled) {
    filter: brightness(1.1);
    box-shadow: 0 10px 26px rgb(var(--primary) / 0.34);
}

.alpha-product-card:active .alpha-product-card__cta:not(.alpha-product-card__cta--disabled) {
    transform: scale(0.98);
}

.alpha-product-card__cta--disabled {
    border: 1px solid rgb(255 255 255 / 0.08);
    background: rgb(255 255 255 / 0.045);
    color: rgb(var(--muted-foreground));
    box-shadow: none;
}

.alpha-product-card__body {
    gap: 0.45rem !important;
}

.alpha-product-card__pricing {
    margin-top: 0.15rem !important;
    border-top: 0 !important;
    padding-top: 0.15rem !important;
}

/* Grade e card usados nas categorias. A largura controlada mantém a mesma
   presença vertical da vitrine de referência, mesmo quando há só um item. */
.alpha-reference-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 232px)) !important;
    justify-content: start;
    gap: 1rem !important;
}

.alpha-reference-card {
    position: relative;
    display: flex;
    min-height: auto;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 100% 0%, rgb(var(--primary) / 0.12), transparent 38%),
        linear-gradient(180deg, rgb(var(--card)) 0%, rgb(var(--background) / 0.96) 100%);
    color: rgb(var(--foreground));
    box-shadow: 0 14px 34px rgb(0 0 0 / 0.3);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.alpha-reference-card:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--primary) / 0.58);
    box-shadow: 0 18px 40px rgb(0 0 0 / 0.34), 0 0 24px rgb(var(--primary) / 0.12);
}

.alpha-reference-card:focus-visible {
    outline: 2px solid rgb(var(--primary));
    outline-offset: 3px;
}

.alpha-reference-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    flex: none;
    overflow: hidden;
    border-bottom: 1px solid rgb(255 255 255 / 0.07);
    background: rgb(0 0 0 / 0.35);
}

.alpha-reference-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 58%, rgb(var(--card) / 0.42));
}

.alpha-reference-card__backdrop {
    position: absolute;
    inset: -8%;
    z-index: 0;
    width: 116%;
    height: 116%;
    object-fit: cover;
    filter: blur(18px) saturate(1.25);
    opacity: 0.3;
}

.alpha-reference-card__image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.32));
    transition: transform 420ms ease;
}

.alpha-reference-card:hover .alpha-reference-card__image {
    transform: scale(1.035);
}

.alpha-reference-card__media .alpha-delivery-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 4;
}

.alpha-reference-card__media .alpha-delivery-badge--manual {
    border-color: rgb(255 255 255 / 0.2);
    background: rgb(0 0 0 / 0.76);
    color: rgb(255 255 255 / 0.94);
}

.alpha-reference-card__body {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: auto;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.8rem;
}

.alpha-reference-card__title {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: white;
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.35;
}

.alpha-reference-card__pricing {
    display: flex;
    margin-top: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.15rem;
}

.alpha-reference-card__pricing > div:first-child > span {
    color: white;
    font-size: 1.25rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.025em;
}

.alpha-reference-card__pricing > div:first-child > p {
    margin-top: 0.3rem;
    font-size: 0.6875rem;
}

.alpha-reference-card__pricing > div:last-child > div {
    display: flex;
    width: 2rem !important;
    height: 2rem !important;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem !important;
    padding: 0.38rem !important;
}

.alpha-reference-card__cta {
    display: flex;
    width: 100%;
    height: 2.65rem;
    margin-top: auto;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--primary) / 0.72));
    color: rgb(var(--primary-foreground));
    font-size: 0.8125rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgb(var(--primary) / 0.22);
}

@media (max-width: 520px) {
    .alpha-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .alpha-reference-card {
        min-height: auto;
    }

    .alpha-reference-card__body {
        min-height: auto;
        padding: 0.7rem;
    }

    .alpha-reference-card__title {
        font-size: 0.8rem;
    }
}

@media (max-width: 420px) {
    .alpha-delivery-badge {
        max-width: calc(100% - 1rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .alpha-product-card,
    .alpha-product-card::after,
    .alpha-product-card__image,
    .alpha-product-card__cta {
        transition: none;
    }
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Otimizações de renderização e performance para celular e PC */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    content-visibility: auto;
}


/* Indicador de estoque formato card (azul/primária alinhado em linha única) */
.alpha-product-card__stock-note,
.alpha-last-units {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4.5px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #facc15 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

.alpha-product-card__stock-note svg,
.alpha-product-card__stock-note i,
.alpha-last-units svg,
.alpha-last-units i {
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    color: inherit !important;
    stroke: currentColor !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.alpha-product-card__stock-note--low,
.alpha-last-units--count {
    color: rgb(var(--primary)) !important;
}
