/* ============================================================
   Mobile Shop Styles - Ported from 小程序商城 Taiwind Design
   Only active on mobile (max-width: 767px)
   ============================================================ */

/* Desktop: hide mobile shop */
#mobileShop { display: none !important; }

@media (max-width: 767.98px) {
    /* Hide desktop content on mobile */
    .page-wrapper { min-height: 0 !important; }
    .page-wrapper > .site-header,
    .page-wrapper > .page-main,
    .page-wrapper > .site-footer,
    .page-wrapper > .back-to-top,
    .page-wrapper > .mobile-bottom-nav { display: none !important; }

    /* Show mobile shop */
    #mobileShop {
        display: block !important;
        min-height: 100vh;
        overflow-x: hidden;
    }
}

/* Bottom Nav button states */
#mobileShop .ms-nav-btn { opacity: 0.4; color: #a3a3a3; }
#mobileShop .ms-nav-btn.active { opacity: 1; color: #8c7654; }

/* Favorite active color */
#mobileShop .text-red-500 { color: #ef4444; }

/* Hide scrollbar */
#mobileShop .hide-scrollbar::-webkit-scrollbar { display: none; }
#mobileShop .hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations */
@keyframes msFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
#mobileShop .ms-animate-fade-in {
    animation: msFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
#mobileShop .ms-animate-slide-down {
    animation: msSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msViewerFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
#mobileShop .ms-animate-viewer-fade {
    animation: msViewerFade 0.3s ease-out forwards;
}

@keyframes msViewerScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
#mobileShop .ms-animate-viewer-scale {
    animation: msViewerScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msScrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}
#mobileShop .ms-animate-scroll-indicator {
    animation: msScrollIndicator 2.5s infinite linear;
}

/* Page transitions */
#mobileShop .ms-page {
    display: none;
}
#mobileShop .ms-page.active {
    display: block;
}

/* Bottom Nav safe area */
#mobileShop .ms-safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Hero carousel */
#mobileShop .ms-hero-slide {
    position: absolute;
    inset: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Brand guarantee sticky nav indicator */
#mobileShop .ms-brand-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2.5px;
    background: #b59b6d;
    border-radius: 9999px;
}

/* Product swiper snap */
#mobileShop .ms-snap-x { scroll-snap-type: x mandatory; }
#mobileShop .ms-snap-center { scroll-snap-align: center; }
#mobileShop .ms-snap-start { scroll-snap-align: start; }

/* Line clamp */
#mobileShop .ms-line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#mobileShop .ms-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mix blend mode */
#mobileShop .ms-mix-blend-multiply { mix-blend-mode: multiply; }

/* Filter drawer */
#mobileShop .ms-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

/* Fullscreen media viewer */
#mobileShop .ms-fullscreen-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(4px);
}

/* Sticky top bar for product detail */
#mobileShop .ms-detail-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}
