﻿@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&amp;display=swap');

        #visitorMap {
        width: 100%;
        height: 400px; /* หรือใช้ h-96 ของ Tailwind */
        min-height: 300px;
        }



        /*  ==============================
            Google Font
            ============================== */
            
            * { font-family: 'Kanit', sans-serif; }
            :root {
                --niceshop-header-height: 0px;
                --niceshop-announcement-bar-height: 0px;
                --niceshop-header-top-offset: 0px;
            }

            #siteHeader {
                position: fixed;
                top: calc(var(--niceshop-header-top-offset, 0px) + env(safe-area-inset-top, 0px));
                left: 0;
                right: 0;
                z-index: 260;
                width: 100%;
                background: linear-gradient(135deg, rgba(102, 126, 234, 0.96) 0%, rgba(118, 75, 162, 0.96) 100%);
                backdrop-filter: blur(12px);
                isolation: isolate;
                border-bottom: 1px solid rgba(255, 255, 255, 0.25);
                box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
                transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
                will-change: top;
            }
            #siteHeader::before {
                content: '';
                position: absolute;
                inset: 0;
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0) 65%);
                pointer-events: none;
            }
            #siteHeader > * {
                position: relative;
            }
            html[data-platform="ios"] #siteHeader {
                top: calc(var(--niceshop-header-top-offset, 0px) + env(safe-area-inset-top, 0px));
            }
            #siteHeaderSpacer {
                height: var(--niceshop-header-height, 84px);
                min-height: 72px;
            }


            #announcementBar {
                position: sticky;
                top: calc(var(--niceshop-header-height, 84px) + env(safe-area-inset-top, 0px));
                z-index: 170;
                background: linear-gradient(180deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.9) 50%, rgba(29, 78, 216, 0.85) 100%);
                border-bottom: 1px solid rgba(147, 197, 253, 0.4);
                box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3), 0 0 30px rgba(59, 130, 246, 0.15);
                backdrop-filter: blur(16px) saturate(180%);
                transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, box-shadow 0.3s ease;
                will-change: transform, opacity;
            }
            /* บังคับแถบประกาศให้วิ่งเต็มหน้าจอ ไม่โดนบีบจาก container ภายนอก */
            #announcementBar #announcementContent {
                padding-left: 0 !important;
                padding-right: 0 !important;
            }
            #announcementBar #announcementText {
                display: block;
                width: 100%;
                margin: 0;
            }

            #announcementBar:hover {
                box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
            }

            #birthdayCelebrationBar {
                position: sticky;
                top: calc(var(--niceshop-header-height, 0px) + var(--niceshop-announcement-bar-height, 0px) + env(safe-area-inset-top, 0px));
                z-index: 120;
                background: linear-gradient(90deg, rgba(251, 191, 36, 0.95) 0%, rgba(245, 158, 11, 0.9) 50%, rgba(217, 119, 6, 0.85) 100%);
                box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4), 0 0 30px rgba(251, 191, 36, 0.2);
            }
            html.pre-route-loading body {
                background: #0f172a;
            }
            html.pre-route-loading #mainContent {
                visibility: hidden;
            }
            html.pre-route-loading #dynamicPageLoader {
                display: flex !important;
            }
            img, video, canvas, svg {
                max-width: 100%;
                height: auto;
            }
            .modal-content {
                max-height: calc(100dvh - 1.5rem);
                overflow-y: auto;
                overscroll-behavior: contain;
            }
            @media (max-width: 640px) {
                .modal-mobile-full {
                    width: calc(100vw - 1rem) !important;
                    max-height: calc(100dvh - 1rem) !important;
                    border-radius: 1rem !important;
                    margin-left: auto;
                    margin-right: auto;
                }
            }

            /* ==============================
               Responsive Header Navigation
               ============================== */
            .header-quick-nav {
                display: flex;
                flex-wrap: nowrap;
                gap: 0.45rem;
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                padding-bottom: 0.15rem;
            }
            .header-quick-nav::-webkit-scrollbar {
                display: none;
            }
            .header-quick-link {
                display: inline-flex;
                align-items: center;
                gap: 0.35rem;
                white-space: nowrap;
                border-radius: 0.85rem;
                border: 1px solid rgba(255, 255, 255, 0.24);
                background: rgba(255, 255, 255, 0.1);
                padding: 0.5rem 0.72rem;
                font-size: 0.72rem;
                font-weight: 800;
                letter-spacing: 0.01em;
                color: #fff;
                transition: all 0.2s ease;
            }
            .header-quick-link:hover {
                background: rgba(255, 255, 255, 0.2);
                border-color: rgba(255, 255, 255, 0.38);
            }
            .mobile-menu-trigger {
                width: 2.45rem;
                height: 2.45rem;
                border-radius: 0.9rem;
                border: 1px solid rgba(255, 255, 255, 0.32);
                background: rgba(15, 23, 42, 0.35);
                color: #fff;
                align-items: center;
                justify-content: center;
                transition: background 0.2s ease, transform 0.2s ease;
            }
            .mobile-menu-trigger:hover {
                background: rgba(15, 23, 42, 0.55);
            }
            #mobile-menu-overlay {
                position: fixed;
                inset: 0;
                z-index: 480;
                background: rgba(2, 6, 23, 0.56);
                backdrop-filter: blur(4px);
                opacity: 0;
                transition: opacity 0.22s ease;
            }
            #mobile-menu-overlay.is-open {
                opacity: 1;
            }
            #mobile-menu {
                position: absolute;
                top: 0;
                left: 0;
                bottom: 0;
                width: min(86vw, 22.5rem);
                max-width: calc(100vw - 1.1rem);
                background: linear-gradient(180deg, rgba(248, 250, 252, 0.985) 0%, rgba(241, 245, 249, 0.985) 100%);
                border-right: 1px solid rgba(148, 163, 184, 0.22);
                box-shadow: 0 22px 55px rgba(15, 23, 42, 0.3);
                transform: translate3d(-104%, 0, 0);
                transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
                will-change: transform;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                padding-bottom: 1.5rem;
            }
            #mobile-menu.is-open {
                transform: translate3d(0, 0, 0);
            }
            .mobile-menu-link {
                display: flex;
                align-items: center;
                gap: 0.6rem;
                width: 100%;
                border-radius: 0.9rem;
                padding: 0.78rem 0.9rem;
                font-size: 0.78rem;
                font-weight: 800;
                color: #1f2937;
                transition: background 0.16s ease, color 0.16s ease;
            }
            .mobile-menu-link:hover {
                background: #e2e8f0;
                color: #0f172a;
            }
            .mobile-menu-sublink {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                width: 100%;
                border-radius: 0.75rem;
                padding: 0.62rem 0.75rem;
                font-size: 0.74rem;
                font-weight: 700;
                color: #334155;
                transition: background 0.16s ease, color 0.16s ease;
            }
            .mobile-menu-sublink:hover {
                background: #fff;
                color: #0f172a;
            }
            html.mobile-menu-open,
            body.mobile-menu-open {
                overflow: hidden;
            }
            @media (min-width: 768px) {
                .header-quick-nav {
                    flex-wrap: wrap;
                    overflow: visible;
                }
                .header-quick-link {
                    font-size: 0.78rem;
                    padding: 0.55rem 0.82rem;
                }
            }
            @media (max-width: 767px) {
                #siteHeader .brand-title {
                    font-size: 0.95rem;
                    line-height: 1.05;
                    letter-spacing: -0.02em;
                }
                #siteHeader .brand-subtitle {
                    display: none;
                }
                #siteHeader #authButtons button {
                    font-size: 0.68rem;
                    padding: 0.52rem 0.64rem;
                }
                #siteHeader #userMenu {
                    padding: 0.3rem 0.4rem;
                    border-radius: 0.95rem;
                }
                #siteHeader #userMenuToggleBtn {
                    padding: 0.44rem 0.54rem;
                }
                #siteHeader .header-right-actions {
                    margin-left: auto;
                    flex-wrap: nowrap;
                    gap: 0.42rem;
                }
                #notificationBellContainer {
                    order: 99;
                    margin-right: 0;
                }
            }

        /* ==============================
            Background Gradients
            ============================== */
            .gradient-bg { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
            .gradient-bg-2 { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); }
            .gradient-bg-3 { background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%); }
            .gradient-bg-4 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }

            /* ==============================
            Card Hover & Product Card
            ============================== */
            .card-hover { transition: all 0.3s ease; }
            .card-hover:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

            .product-card {
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                position: relative;
                overflow: hidden;
            }
            .product-card::before {
                content: '';
                position: absolute;
                top: 0;
                left: -100%;
                width: 100%;
                height: 100%;
                background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
                transition: left 0.5s;
            }
            .product-card:hover::before { left: 100%; }
            .product-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px rgba(0,0,0,0.15); }

            /* ==============================
            Notifications
            ============================== */
            .notification { 
                position: fixed; top: 20px; right: 20px; z-index: 2147483647; 
                transform: translateX(400px); transition: transform 0.3s ease; 
            }
            .notification.show { transform: translateX(0); }
            .fade-in { animation: fadeIn 0.5s ease-out; }
            @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

            /* ==============================
            Animations
            ============================== */
            .animate-spin-slow { animation: spin 3s linear infinite; }
            .animate-float { animation: float 3s ease-in-out infinite; }
            .animate-glow { animation: glow 2s ease-in-out infinite alternate; }
            .animate-shake { animation: shake 0.5s ease-in-out; }
            .animate-zoom-in { animation: zoomIn 0.3s ease-out; }
            .animate-slide-up { animation: slideUp 0.4s ease-out; }

            @keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
            @keyframes glow { from { box-shadow: 0 0 5px rgba(59,130,246,0.5); } to { box-shadow: 0 0 20px rgba(59,130,246,0.8),0 0 30px rgba(59,130,246,0.6); } }
            @keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
            @keyframes zoomIn { from { transform: scale(0.8); opacity:0; } to { transform: scale(1); opacity:1; } }
            @keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }

            /* ==============================
            Loading Spinner
            ============================== */
            .loading-spinner {
                border: 3px solid #f3f3f3; border-top: 3px solid #3498db;
                border-radius: 50%; width: 30px; height: 30px;
                animation: spin 1s linear infinite; margin:0 auto;
            }
            @keyframes spin { 0%{transform:rotate(0deg);}100%{transform:rotate(360deg);} }

            /* ==============================
            Gradient Text
            ============================== */
            .gradient-text {
                background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
                -webkit-background-clip: text; -webkit-text-fill-color: transparent;
                background-clip: text;
            }

            /* ==============================
            Glass & Neon Effects
            ============================== */
            .glass-effect { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border:1px solid rgba(255,255,255,0.2); }
            .neon-glow { text-shadow:0 0 5px currentColor,0 0 10px currentColor,0 0 15px currentColor; }

            /* ==============================
            Particle Background
            ============================== */
            .particles { position:absolute;width:100%;height:100%;overflow:hidden;pointer-events:none; }
            .particle {
                position:absolute;width:4px;height:4px;background:rgba(255,255,255,0.3);border-radius:50%;
                animation: particle-float 6s infinite linear;
            }
            @keyframes particle-float {
                0% { transform:translateY(100vh) rotate(0deg); opacity:0; }
                10%,90% { opacity:1; }
                100% { transform:translateY(-10vh) rotate(360deg); opacity:0; }
            }

            /* ==============================
            Hover Lift
            ============================== */
            .hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
            .hover-lift:hover { transform: translateY(-5px); box-shadow:0 10px 25px rgba(0,0,0,0.15); }

            /* ==============================
            Status Indicator
            ============================== */
            .status-online { position: relative; }
            .status-online::after {
                content: ''; position:absolute; top:0; right:0; width:12px; height:12px; 
                background:#10b981; border-radius:50%; border:2px solid white; animation:pulse 2s infinite;
            }

            /* ==============================
            Search Highlight
            ============================== */
            .search-highlight { background: linear-gradient(120deg,#a8edea 0%,#fed6e3 100%); padding:2px 4px; border-radius:4px; font-weight:bold; }

            /* ==============================
            Announcement Animations
            ============================== */
            .announcement-pulse { animation: pulse 2s infinite; }
            .announcement-bounce { animation: bounce 1s infinite; }
            .announcement-slide-5 { animation: slideText 5s linear infinite; }
            .announcement-slide-8 { animation: slideText 8s linear infinite; }
            .announcement-slide-10 { animation: slideText 10s linear infinite; }
            .announcement-slide-15 { animation: slideText 15s linear infinite; }
            .announcement-slide-20 { animation: slideText 20s linear infinite; }
            .announcement-marquee {
                position: relative;
                display: block;
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
            }
            #announcementBar .announcement-marquee {
                width: 100vw;
                max-width: 100vw;
                margin-left: calc(50% - 50vw);
                margin-right: calc(50% - 50vw);
            }
            .announcement-marquee-track {
                display: inline-block;
                min-width: max-content;
                will-change: transform;
                transform: translate3d(0, 0, 0);
                backface-visibility: hidden;
            }
            .announcement-marquee-item {
                display: inline-block;
                white-space: nowrap;
            }
            .announcement-marquee-left .announcement-marquee-track {
                animation: announcement-marquee-left var(--marquee-duration, 20s) linear infinite;
            }
            .announcement-marquee-right .announcement-marquee-track {
                animation: announcement-marquee-right var(--marquee-duration, 20s) linear infinite;
            }
            @keyframes announcement-marquee-left {
                /* ลดช่วงที่ข้อความหายระหว่างวนรอบใหม่ */
                from { transform: translate3d(var(--marquee-start, 100%), 0, 0); }
                to { transform: translate3d(var(--marquee-end, -100%), 0, 0); }
            }
            @keyframes announcement-marquee-right {
                /* ลดช่วงที่ข้อความหายระหว่างวนรอบใหม่ */
                from { transform: translate3d(var(--marquee-start, -100%), 0, 0); }
                to { transform: translate3d(var(--marquee-end, 100%), 0, 0); }
            }
            .announcement-preview .announcement-marquee {
                width: 100%;
                max-width: 100%;
                margin-left: 0;
                margin-right: 0;
            }
            #announcementInlineWrap {
                position: sticky;
                top: calc(var(--niceshop-header-height, 84px) + var(--niceshop-announcement-bar-height, 0px) + env(safe-area-inset-top, 0px));
                z-index: 145;
                background:
                    radial-gradient(circle at 8% 30%, rgba(255, 255, 255, 0.08), transparent 45%),
                    linear-gradient(180deg, rgba(15, 23, 42, 0.86) 0%, rgba(15, 23, 42, 0.68) 100%);
                border-bottom: 1px solid rgba(148, 163, 184, 0.26);
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
                backdrop-filter: blur(18px) saturate(170%);
                transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
            }

            #announcementInlineCard {
                --inline-card-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.82) 100%);
                --inline-card-fg: #f8fafc;
                background: var(--inline-card-bg);
                color: var(--inline-card-fg);
                border: 1px solid rgba(255, 255, 255, 0.24);
                box-shadow: 0 16px 38px -18px rgba(2, 6, 23, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
                transition: transform 0.2s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease, color 0.24s ease;
            }

            #announcementInlineCard:hover {
                transform: translateY(-2px);
                box-shadow: 0 20px 44px -20px rgba(2, 6, 23, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
            }

            #announcementInlineBadgeType {
                background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
                border: 1px solid rgba(165, 180, 252, 0.4);
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            }

            #announcementInlineBadgeNew {
                background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.3) 100%);
                border: 1px solid rgba(52, 211, 153, 0.4);
                animation: badgePulse 2s ease-in-out infinite;
            }

            #announcementInlineBadgeImportant {
                background: linear-gradient(135deg, rgba(244, 63, 94, 0.3) 0%, rgba(225, 29, 72, 0.3) 100%);
                border: 1px solid rgba(251, 113, 133, 0.4);
                animation: importantPulse 1.5s ease-in-out infinite;
            }

            @keyframes badgePulse {
                0%, 100% { opacity: 1; transform: scale(1); }
                50% { opacity: 0.85; transform: scale(1.02); }
            }

            @keyframes importantPulse {
                0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
                50% { opacity: 0.9; transform: scale(1.03); box-shadow: 0 0 10px 2px rgba(244, 63, 94, 0.3); }
            }

            #announcementInlineTitle {
                font-weight: 800;
                letter-spacing: -0.02em;
                color: inherit;
                -webkit-text-fill-color: currentColor;
                text-shadow: 0 1px 2px rgba(2, 6, 23, 0.22);
            }

            #announcementInlineExcerpt {
                color: rgba(248, 250, 252, 0.92);
                line-height: 1.6;
                text-shadow: 0 1px 2px rgba(2, 6, 23, 0.18);
            }

            #announcementInlineReadMoreBtn {
                background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
                color: #0f172a !important;
                border: 1px solid rgba(148, 163, 184, 0.35) !important;
                font-weight: 900 !important;
                box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
                transition: all 0.2s ease !important;
            }

            #announcementInlineReadMoreBtn:hover {
                background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%) !important;
                transform: translateY(-2px) !important;
                box-shadow: 0 12px 24px rgba(15, 23, 42, 0.26), 0 1px 0 rgba(255, 255, 255, 0.72) inset !important;
            }

            #announcementInlineActionButtons {
                width: 100%;
            }

            #announcementInlineLinkBtn {
                white-space: nowrap;
            }

            html[data-device="mobile"] #announcementInlineCard {
                border-radius: 1.25rem;
                padding: 1.25rem;
            }

            html[data-screen="xs"] #announcementInlineLinkBtn {
                width: 100%;
            }

            html[data-screen="xs"] #announcementInlineReadMoreBtn {
                width: 100%;
            }

            html[data-screen="xs"] #announcementInlineReadMoreBtn {
                width: 100%;
            }

            @keyframes slideText { 0%{transform:translateX(100%);}100%{transform:translateX(-100%);} }

            /* ==============================
            Legacy / Extra Features from old CSS
            ============================== */
            /* Floating Icon (ถ้ายังไม่มาใน animate-float) */
            .floating { animation: float 3s ease-in-out infinite; }
            /* Sparkle Effect */
            .sparkle { position: relative; overflow: hidden; }
            .sparkle::before {
                content: ''; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
                background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
                animation: sparkle 2s infinite;
            }
            @keyframes sparkle { 0%{transform:translateX(-100%) translateY(-100%) rotate(45deg);}100%{transform:translateX(100%) translateY(100%) rotate(45deg);} }

            /* Rainbow Border */
            .rainbow-border { background: linear-gradient(45deg,#ff0000,#ff7f00,#ffff00,#00ff00,#0000ff,#4b0082,#9400d3); padding:2px; border-radius:12px; }
            .rainbow-border>div { background:white; border-radius:10px; }

            /* Pulse Animation */
            @keyframes pulse { 0%,100%{opacity:1;}50%{opacity:0.5;} }




             /* ตกแต่ง Scrollbar สำหรับ Body Modal */
            .custom-scrollbar::-webkit-scrollbar { width: 4px; }
            .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
            .custom-scrollbar::-webkit-scrollbar-thumb { background: #374151; border-radius: 10px; }
            .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* Styles moved from inline body block */
/* 💅 Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Styles moved from modal template block */
.admin-edit-input {
    width: 100% !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1.2rem !important;
    padding: 0.9rem 1.2rem;
    color: white !important;
    font-size: 0.875rem !important;
    outline: none !important;
    box-sizing: border-box !important;
}
.admin-edit-input:focus {
    background: rgba(30, 41, 59, 1) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}
.admin-edit-input option {
    background: #0f172a;
    color: white;
}
