/* ========================================
   SKELETON LOADING ANIMATION
   ======================================== */
.skeleton {
    background: #f0f0f0;
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 480px;
    /* Approximate height of real card */
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-price {
    height: 32px;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.skeleton-btn {
    height: 40px;
    border-radius: 8px;
    flex: 1;
}

/* ========================================
   SMOOTH SCROLL (LENIS)
   ======================================== */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
    /* Disable native smooth scroll */
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* ========================================
   VIEW TRANSITIONS (Native API)
   ======================================== */
@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes slide-from-right {
    from {
        transform: translateX(30px);
    }
}

@keyframes slide-to-left {
    to {
        transform: translateX(-30px);
    }
}

::view-transition-old(root) {
    animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
        300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}

::view-transition-new(root) {
    animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
        300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

/* ========================================
   CUSTOM CURSOR (Micro-Interaction)
   ======================================== */
@media (pointer: fine) {
    body {
        cursor: none;
        /* Hide default cursor only on devices with mouse */
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary-500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, opacity 0.3s;
    mix-blend-mode: difference;
    opacity: 0;
    /* Hidden by default until moved */
}

.custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background-color: var(--secondary-500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.custom-cursor.visible,
.custom-cursor-dot.visible {
    opacity: 1;
}

.custom-cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 140, 66, 0.1);
    border-color: transparent;
}

/* ========================================
   BUTTON PHYSICS (Squishy Effect)
   ======================================== */
.btn-premium,
.nav-link-premium,
.product-card {
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.btn-premium:active,
.nav-link-premium:active {
    transform: scale(0.95);
}

/* ========================================
   3D HERO CONTAINER
   ======================================== */
#hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: all;
    /* Allow interaction with 3D */
    opacity: 0.6;
    /* Slight transparency to blend with gradient */
}

/* Ensure text stays on top */
.hero-content-premium {
    z-index: 2 !important;
    pointer-events: none;
    /* Let clicks pass through to 3D if needed, but text selectable? */
}

/* Re-enable pointer events for buttons inside hero */
.hero-cta-premium {
    pointer-events: auto;
}

/* ========================================
   PREMIUM PRELOADER
   ======================================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: var(--primary-900);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    width: 80px;
    margin-bottom: 20px;
    animation: loader-pulse 2s infinite;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    overflow: hidden;
}

.loader-text span {
    display: inline-block;
    transform: translateY(100%);
    animation: text-reveal-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

@keyframes text-reveal-up {
    to {
        transform: translateY(0);
    }
}

body.loaded #preloader {
    transform: translateY(-100%);
}

/* ========================================
   TEXT REVEAL ANIMATION (Splitting)
   ======================================== */
.reveal-text {
    opacity: 0;
    /* Hidden initially */
}

.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.char {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.visible,
.reveal-text.animate-in {
    opacity: 1;
}

.reveal-text.visible .char,
.reveal-text.animate-in .char {
    transform: translateY(0);
}

/* ========================================
   MODAL TRANSITION OVERRIDES
   ======================================== */
::view-transition-group(product-image-active) {
    animation-duration: 0.5s;
    z-index: 9999;
}