/* ===========================================================================
   fastkart — search_global/index.html
   ===========================================================================

   تا فاز ۶۶ این قاعده‌ها داخلِ خودِ قالب بودند، در یک `<style>`.

   سه هزینه داشت و هیچ‌کدام دیده نمی‌شد: مرورگر نمی‌توانست کشش کند
   (هر بار باز شدنِ صفحه، دوباره)، هیچ قالبِ دیگری نمی‌توانست
   بازنویسی‌اش کند، و یک Content-Security-Policyِ سخت‌گیر که
   `style-src 'unsafe-inline'` نداشته باشد کلِ صفحه را بی‌شکل
   می‌کرد.
   =========================================================================== */

        /* ============== Global Search Page ============== */

        /* ---------- Hero (مینیمال) ---------- */
        .gs-hero {
            background: linear-gradient(135deg, #3dcfff 0%, #189eca 100%);
            border-radius: 16px;
            padding: 18px 22px;
            margin-bottom: 18px;
            color: #fff;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            flex-wrap: wrap;
        }
        .gs-hero::after {
            content: "";
            position: absolute;
            left: -30px;
            top: -30px;
            width: 130px;
            height: 130px;
            border-radius: 50%;
            background: rgba(255,255,255,.08);
            pointer-events: none;
        }
        .gs-hero-text {
            position: relative;
            z-index: 2;
            min-width: 0;
            flex: 1;
        }
        .gs-hero h1 {
            font-size: 16px;
            font-weight: 700;
            margin: 0;
            line-height: 1.7;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .gs-hero h1 i {
            font-size: 14px;
            opacity: .85;
        }
        .gs-hero .gs-hero-term {
            background: rgba(255,255,255,.2);
            padding: 2px 11px;
            border-radius: 10px;
            font-weight: 700;
            font-size: 14px;
        }
        .gs-hero .gs-hero-total {
            background: #fff;
            color: #189eca;
            border-radius: 12px;
            padding: 7px 14px;
            font-weight: 700;
            font-size: 13px;
            white-space: nowrap;
            position: relative;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .gs-hero .gs-hero-total b {
            font-size: 14px;
        }

        /* ---------- Sidebar ---------- */
        .gs-sidebar {
            position: sticky;
            top: 90px;
            background: #fff;
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0px 2px 8px rgba(126, 142, 177, 0.12);
            border: 1px solid #eee;
        }
        .gs-sidebar h4 {
            font-size: 15px;
            font-weight: 700;
            color: #222;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px dashed #e7e7e7;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .gs-sidebar .gs-sidebar-close {
            display: none;
            background: #f4f6f9;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            color: #555;
            font-size: 14px;
            cursor: pointer;
        }
        .gs-nav-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .gs-nav-list li a {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            border-radius: 12px;
            color: #4a4a4a;
            font-size: 13.5px;
            text-decoration: none;
            margin-bottom: 5px;
            transition: .2s;
            border: 1px solid transparent;
        }
        .gs-nav-list li a:hover,
        .gs-nav-list li a.active {
            background: #ecfdf3;
            color: #0baf60;
            border-color: #cdebd9;
        }
        .gs-nav-list li a .gs-nav-label {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .gs-nav-list li a .gs-nav-label i {
            width: 22px;
            text-align: center;
        }
        .gs-nav-list li a .gs-nav-count {
            background: #f0f2f5;
            color: #666;
            border-radius: 10px;
            padding: 2px 9px;
            font-size: 11.5px;
            font-weight: 700;
            min-width: 30px;
            text-align: center;
        }
        .gs-nav-list li a:hover .gs-nav-count,
        .gs-nav-list li a.active .gs-nav-count {
            background: #0baf60;
            color: #fff;
        }
        .gs-nav-list li a.disabled {
            opacity: .45;
            pointer-events: none;
        }

        /* ---------- Section ---------- */
        .gs-section {
            background: #fff;
            border-radius: 18px;
            padding: 22px;
            box-shadow: 0px 2px 6px rgba(126, 142, 177, 0.08);
            border: 1px solid #f0f0f0;
            margin-bottom: 18px;
        }
        .gs-section-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
            padding-bottom: 14px;
            border-bottom: 1px solid #f2f2f2;
        }
        .gs-section-head .gs-title {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }
        .gs-section-head .gs-title .gs-icon {
            width: 38px;
            height: 38px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: #fff;
            flex-shrink: 0;
        }
        .gs-section-head h2 {
            font-size: 16px;
            font-weight: 700;
            margin: 0;
            color: #222;
        }
        .gs-section-head h2 .gs-count {
            color: #999;
            font-weight: 500;
            font-size: 12.5px;
            margin-right: 5px;
        }

        /* Section color variants */
        .gs-sec-products .gs-icon { background: linear-gradient(135deg, #0baf60, #08a155); }
        .gs-sec-categories .gs-icon { background: linear-gradient(135deg, #4e7bef, #345dd1); }
        .gs-sec-brands .gs-icon { background: linear-gradient(135deg, #ff9248, #ff7a1f); }
        .gs-sec-articles .gs-icon { background: linear-gradient(135deg, #b766e4, #9039ce); }
        .gs-sec-news .gs-icon { background: linear-gradient(135deg, #ef4d6b, #d62844); }
        .gs-sec-videos .gs-icon { background: linear-gradient(135deg, #ffb321, #ff9300); }

        /* ---------- Category chips ---------- */
        .gs-cat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 12px;
        }
        .gs-cat-chip {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px;
            border-radius: 14px;
            background: #fafbfc;
            border: 1px solid #eef0f3;
            text-decoration: none;
            color: #222;
            transition: .2s;
        }
        .gs-cat-chip:hover {
            background: #fff;
            border-color: #0baf60;
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(11,175,96,.12);
            color: #0baf60;
        }
        .gs-cat-chip img {
            width: 42px;
            height: 42px;
            object-fit: contain;
            border-radius: 10px;
            background: #fff;
            padding: 4px;
            flex-shrink: 0;
        }
        .gs-cat-chip .gs-cat-text {
            flex: 1;
            min-width: 0;
        }
        .gs-cat-chip .gs-cat-text strong {
            display: block;
            font-size: 14px;
            font-weight: 600;
            line-height: 1.6;
            word-break: break-word;
            white-space: normal;
        }
        .gs-cat-chip .gs-cat-text small {
            color: #888;
            font-size: 11px;
        }

        /* ---------- Brand chips ---------- */
        .gs-brand-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
        }
        .gs-brand-chip {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 16px 10px;
            border-radius: 14px;
            background: #fafbfc;
            border: 1px solid #eef0f3;
            text-decoration: none;
            color: #222;
            transition: .2s;
            min-height: 100px;
        }
        .gs-brand-chip:hover {
            background: #fff;
            border-color: #ff9248;
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(255,146,72,.15);
        }
        .gs-brand-chip img {
            max-width: 64px;
            max-height: 36px;
            object-fit: contain;
            margin-bottom: 6px;
        }
        .gs-brand-chip span {
            font-size: 13px;
            font-weight: 600;
            color: #333;
            text-align: center;
        }
        .gs-brand-chip small {
            color: #888;
            font-size: 11px;
            margin-top: 2px;
        }

        /* ---------- Article/News/Video cards ---------- */
        .gs-content-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 14px;
        }
        .gs-content-card {
            border-radius: 16px;
            overflow: hidden;
            background: #fff;
            border: 1px solid #eef0f3;
            text-decoration: none;
            color: #222;
            transition: .25s;
            display: flex;
            flex-direction: column;
        }
        .gs-content-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 24px rgba(0,0,0,.08);
            color: #222;
        }
        .gs-content-card .gs-thumb {
            position: relative;
            aspect-ratio: 16 / 10;
            overflow: hidden;
            background: #f3f4f6;
        }
        .gs-content-card .gs-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: .35s;
        }
        .gs-content-card:hover .gs-thumb img {
            transform: scale(1.05);
        }
        .gs-content-card .gs-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,.6);
            color: #fff;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 600;
            backdrop-filter: blur(4px);
        }
        .gs-content-card .gs-play {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .gs-content-card .gs-play i {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: rgba(255,255,255,.92);
            color: #d62844;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 17px;
            box-shadow: 0 4px 14px rgba(0,0,0,.25);
        }
        .gs-content-card .gs-body {
            padding: 13px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .gs-content-card h4 {
            font-size: 13.5px;
            font-weight: 700;
            line-height: 1.7;
            margin: 0 0 8px;
            color: #222;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .gs-content-card .gs-meta {
            margin-top: auto;
            font-size: 11px;
            color: #888;
            display: flex;
            align-items: center;
            gap: 12px;
            padding-top: 6px;
        }
        .gs-content-card .gs-meta i {
            margin-left: 4px;
        }

        /* ---------- Load more button ---------- */
        .gs-load-more-wrap {
            text-align: center;
            margin-top: 20px;
        }
        .gs-load-more {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: #fff;
            border: 1.5px dashed #0baf60;
            color: #0baf60;
            padding: 10px 26px;
            border-radius: 14px;
            font-size: 13.5px;
            font-weight: 600;
            cursor: pointer;
            transition: .2s;
        }
        .gs-load-more:hover {
            background: #0baf60;
            color: #fff;
        }
        .gs-load-more:disabled {
            opacity: .6;
            cursor: not-allowed;
        }
        .gs-load-more .spinner-icon {
            display: none;
            animation: gs-spin 1s linear infinite;
        }
        .gs-load-more.loading .spinner-icon { display: inline-block; }
        .gs-load-more.loading .label-icon { display: none; }
        @keyframes gs-spin { to { transform: rotate(360deg); } }

        /* ---------- No results ---------- */
        .gs-no-results {
            background: #fff;
            border-radius: 20px;
            padding: 50px 25px;
            text-align: center;
            box-shadow: 0px 2px 6px rgba(126, 142, 177, 0.08);
            border: 1px solid #f0f0f0;
        }
        .gs-no-results img {
            width: 120px;
            opacity: .85;
            margin-bottom: 18px;
        }
        .gs-no-results h3 {
            font-size: 18px;
            font-weight: 700;
            color: #222;
            margin-bottom: 10px;
        }
        .gs-no-results p {
            color: #777;
            font-size: 13.5px;
            max-width: 460px;
            margin: 0 auto;
        }

        /* ---------- Mobile sidebar FAB + Drawer ---------- */
        .gs-mobile-bar {
            display: none;
        }
        .gs-sidebar-drawer {
            display: none;
        }
        .gs-sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.45);
            z-index: 1040;
            opacity: 0;
            transition: opacity .25s;
        }
        .gs-sidebar-overlay.show {
            display: block;
            opacity: 1;
        }

        /* ============== MOBILE (≤ 767px) ============== */
        @media (max-width: 767px) {
            .gs-hero {
                padding: 14px 16px;
                border-radius: 14px;
                margin-bottom: 14px;
                gap: 10px;
            }
            .gs-hero h1 { font-size: 14px; }
            .gs-hero .gs-hero-term { font-size: 13px; padding: 1px 9px; }
            .gs-hero .gs-hero-total {
                display: none;
            }

            /* جمع‌و‌جور کردن sectionها */
            .gs-section {
                padding: 14px;
                border-radius: 14px;
                margin-bottom: 14px;
            }
            .gs-section-head {
                margin-bottom: 14px;
                padding-bottom: 10px;
            }
            .gs-section-head .gs-title .gs-icon {
                width: 32px;
                height: 32px;
                font-size: 14px;
                border-radius: 9px;
            }
            .gs-section-head h2 { font-size: 14.5px; }
            .gs-section-head h2 .gs-count { font-size: 11px; }

            .gs-cat-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 10px;
            }
            .gs-cat-chip { padding: 12px; gap: 10px; }
            .gs-cat-chip img { width: 38px; height: 38px; }
            .gs-cat-chip .gs-cat-text strong { font-size: 13px; }

            .gs-brand-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            .gs-brand-chip { min-height: 90px; padding: 12px 6px; }
            .gs-brand-chip img { max-width: 54px; max-height: 30px; }
            .gs-brand-chip span { font-size: 12px; }

            .gs-content-grid {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }
            .gs-content-card .gs-body { padding: 10px; }
            .gs-content-card h4 { font-size: 12.5px; line-height: 1.6; }

            .gs-load-more {
                font-size: 13px;
                padding: 9px 22px;
            }

            /* مخفی کردن سایدبار ستونی توی موبایل */
            .gs-sidebar-col { display: none; }

            /* نوار بالای محتوا توی موبایل */
            .gs-mobile-bar {
                display: flex;
                align-items: center;
                justify-content: space-between;
                background: #fff;
                border: 1px solid #eef0f3;
                border-radius: 14px;
                padding: 10px 14px;
                margin-bottom: 14px;
                box-shadow: 0 2px 6px rgba(126,142,177,.08);
            }
            .gs-mobile-bar .gs-mobile-count {
                font-size: 12.5px;
                color: #555;
            }
            .gs-mobile-bar .gs-mobile-count b {
                color: #189eca;
            }
            .gs-mobile-bar .gs-mobile-toggle {
                display: inline-flex;
                align-items: center;
                gap: 7px;
                background: linear-gradient(135deg, #0baf60, #08a155);
                color: #fff;
                border: none;
                padding: 8px 14px;
                border-radius: 10px;
                font-size: 12.5px;
                font-weight: 600;
                cursor: pointer;
                box-shadow: 0 3px 8px rgba(11,175,96,.25);
            }
            .gs-mobile-bar .gs-mobile-toggle i { font-size: 11px; }

            /* تبدیل سایدبار به Drawer */
            .gs-sidebar-drawer {
                display: block;
                position: fixed;
                top: 0;
                right: -100%;
                width: 86%;
                max-width: 340px;
                height: 100vh;
                background: #fff;
                z-index: 1050;
                overflow-y: auto;
                padding: 18px;
                box-shadow: -8px 0 24px rgba(0,0,0,.12);
                transition: right .3s ease;
            }
            .gs-sidebar-drawer.show {
                right: 0;
            }
            .gs-sidebar-drawer .gs-sidebar {
                position: static;
                box-shadow: none;
                border: none;
                padding: 0;
                border-radius: 0;
            }
            .gs-sidebar-drawer .gs-sidebar-close {
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            /* جلوگیری از اسکرول وقتی drawer بازه */
            body.gs-drawer-open {
                overflow: hidden;
            }
        }

        @media (max-width: 480px) {
            .gs-content-grid {
                grid-template-columns: 1fr;
            }
            .gs-brand-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .gs-hero {
                padding: 12px 14px;
            }
        }
    
