@keyframes st-fade-in {
    from {
        background-color: transparent;
    }
    to {
        background-color: rgba(0, 0, 0, 0.35);
    }
}

@keyframes st-fade-out {
    from {
        background-color: rgba(0, 0, 0, 0.35);
    }
    to {
        background-color: transparent;
    }
}

@keyframes st-slide-in {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes st-slide-out {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@layer base {
    /* Custom SellTrust Basic Resets */
}

#cart-drawer[data-state="open"] {
    animation: st-fade-in 0.3s ease-out forwards;
}

#cart-drawer[data-state="closed"] {
    animation: st-fade-out 0.3s ease-in forwards;
}

#cart-drawer[data-state="open"] > div {
    animation: st-slide-in 0.3s ease-out forwards;
}

#cart-drawer[data-state="closed"] > div {
    animation: st-slide-out 0.3s ease-in forwards;
}

.dialog[data-state="open"] {
    animation: st-fade-in 0.25s ease-out forwards;
}

.dialog[data-state="closed"] {
    animation: st-fade-out 0.2s ease-in forwards;
}

.dialog[data-state="open"] > div:not(.dialog-overlay) {
    animation: st-dialog-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dialog[data-state="closed"] > div:not(.dialog-overlay) {
    animation: st-dialog-out 0.2s ease-in forwards;
}

@keyframes st-dialog-in {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes st-dialog-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.6);
    }
}

@keyframes st-loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.reveal-fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0s);
}

.reveal-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Base scrollbar configuration for SellTrust templates */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgb(var(--primary) / 0.5);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--primary) / 0.85);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary) / 0.5) transparent;
}

#withdraw-pix-key-type {
    color: rgb(var(--foreground));
    background-color: rgb(var(--muted));
    color-scheme: light;
    -webkit-text-fill-color: rgb(var(--foreground));
}

#withdraw-pix-key-type option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-weight: 500;
}

#withdraw-pix-key-type option:checked {
    background-color: #2563eb !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Carta reativa 3D — cards de categoria */
@keyframes st-flash-sweep {
    0% {
        transform: skewX(-12deg) translateX(-100%);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: skewX(-12deg) translateX(300%);
        opacity: 0;
    }
}

.st-reactive-card {
    perspective: 1200px;
    width: 100%;
}

.st-reactive-card__face {
    --rx: 0deg;
    --ry: 0deg;
    --mouse-x: 50%;
    --mouse-y: 50%;
    transform-style: preserve-3d;
    transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1) translateY(0);
    transition:
        transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.3s,
        box-shadow 0.3s;
    will-change: transform;
}

.st-reactive-card__face.is-hovered {
    z-index: 30;
    border-color: rgb(56 189 248 / 0.85);
    box-shadow: 0 20px 50px rgb(37 99 235 / 0.4), 0 0 0 1px rgb(56 189 248 / 0.35);
    transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.06) translateY(-12px);
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

.st-reactive-card__glow {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        400px circle at var(--mouse-x) var(--mouse-y),
        rgb(var(--primary) / 0.3) 0%,
        transparent 80%
    );
    mix-blend-mode: screen;
    transition: opacity 0.3s;
}

.st-reactive-card__face.is-hovered .st-reactive-card__glow {
    opacity: 1;
}

.st-reactive-card__flash {
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
}

.st-reactive-card__flash-bar {
    position: absolute;
    top: 0;
    left: -50%;
    height: 100%;
    width: 50%;
    opacity: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.st-reactive-card__face.is-flashing .st-reactive-card__flash-bar {
    animation: st-flash-sweep 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.st-reactive-card__content {
    transform: translateZ(0);
    transition: transform 0.3s ease-out;
}

.st-reactive-card__face.is-hovered .st-reactive-card__content {
    transform: translateZ(40px);
}

.products-grid > *,
#related-carousel > * {
    position: relative;
    z-index: 0;
}

.products-grid > *:hover,
#related-carousel > *:hover {
    z-index: 40;
}

@media (prefers-reduced-motion: reduce) {
    .st-reactive-card__face,
    .st-reactive-card__face.is-hovered {
        transform: none !important;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

    .st-reactive-card__face.is-flashing .st-reactive-card__flash-bar {
        animation: none;
    }

    .st-reactive-card__content,
    .st-reactive-card__face.is-hovered .st-reactive-card__content {
        transform: none;
    }
}
