        :root {
            --bg-page: #f8fafc;
            --bg-panel: #ffffff;
            --border-dark: #e2e8f0;
            --border-light: #e2e8f0;
            --accent-main: #f97316;
            --accent-hover: #ea580c;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --success: #16a34a;
            --danger: #dc2626;
            --sidebar-bg: #ffffff;
            --specs-bg: #f8fafc;
            --specs-border: #e2e8f0;
            --icon-color: #3b82f6;
            --score-color: #8b5cf6;
        }

        * { 
            box-sizing: border-box; 
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
            -webkit-font-smoothing: antialiased; 
        }
        
        html, body { 
            margin: 0; 
            padding: 0; 
            background-color: var(--bg-page); 
            color: var(--text-main);             
            overflow-x: clip; 
            width: 100%; 
        }
        
        body.modal-open { 
            overflow: hidden; 
            padding-right: calc(100vw - 100%); 
        }

/* padding 20px ko 0px kar diya taaki top se chipka rahe */
        .container { max-width: 1350px; width: 100%; display: flex; flex-direction: column; padding: 0px 15px 120px 15px; margin: 0 auto; overflow-x: clip;}

    .global-header {
            margin-bottom: 0px; 
            margin-left: 0; 
            margin-right: 0; 
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
            background: var(--bg-panel);
            border-bottom: 2px solid var(--border-light);
            padding: 10px 20px;
            border-radius: 0; 
            box-shadow: 0 2px 10px rgba(0,0,0,0.02);
            position: sticky;
            top: 0;
            z-index: 950;
        }
        .global-header .logo-area h1 {
            font-size: 22px;                  /* permanently smaller logo */
        }
        .global-header .logo-area p {
            display: none;                    /* hide subtext permanently */
        }
        .global-header .search-input {
            padding: 8px 35px 8px 15px;       /* permanently compact search */
            font-size: 13px;
        }
        /* border-top: 5px hata diya gaya hai jisse sticky par gap feel na ho */
        .global-header.scrolled { padding: 10px 20px; border-radius: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-top: none; }
        .logo-area { cursor: pointer; user-select: none; }
        .logo-area h1 { margin: 0; font-size: 28px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--text-main); transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);}
        .logo-area h1 span { color: var(--accent-main); }
        
        .logo-area p { transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin 0.4s cubic-bezier(0.4, 0, 0.2, 1); opacity: 1; max-height: 50px; overflow: hidden; margin: 5px 0 0 0;}
        .global-header.scrolled .logo-area p { opacity: 0; max-height: 0; margin: 0; }
        .global-header.scrolled .logo-area h1 { font-size: 22px; }
        
        .header-controls { display: flex; align-items: center; gap: 15px; flex: 1; justify-content: flex-end; position: relative; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); max-height: 100px; opacity: 1;}
        .global-search-container { position: relative; max-width: 400px; width: 100%; }
        .search-input { width: 100%; padding: 12px 35px 12px 15px; background: var(--bg-page); border: 1px solid var(--border-light); color: var(--text-main); border-radius: 6px; font-size: 14px; outline: none; transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease-in-out;}
        .search-input:focus { border-color: var(--accent-main); }
        .global-header.scrolled .search-input { padding: 8px 35px 8px 15px; font-size: 13px; }

        .top-sections-wrapper { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; width: 100%; }
        .price-inputs { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 15px;}
        .price-inputs input { width: 100%; padding: 8px; background: var(--bg-page); border: 1px solid var(--border-light); border-radius: 6px; font-size: 13px; text-align: center; outline: none; font-weight: bold; color: var(--text-main);}
        .price-inputs input:focus { border-color: var(--accent-main); }
        .range-slider { position: relative; width: calc(100% - 20px); height: 6px; margin: 15px 10px; background: var(--border-light); border-radius: 5px; }
        .range-slider .progress { position: absolute; height: 100%; left: 0%; right: 0%; background: var(--accent-main); border-radius: 5px; }
        .range-slider input[type="range"] { position: absolute; width: calc(100% + 20px); left: -10px; height: 6px; top: -5px; -webkit-appearance: none; background: transparent; pointer-events: none; margin:0; padding:0; }
        .range-slider input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; background: #fff; border: 2px solid var(--accent-main); border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.2);}

        .smart-finder-banner { background: #ffffff; border: 1px solid var(--border-dark); border-top: 4px solid var(--accent-main); padding: 20px 25px; border-radius: 12px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
        .sf-top-bar { display: flex; justify-content: space-between; align-items: center; width: 100%; border-bottom: 1px solid var(--border-light); padding-bottom: 10px;}
        .sf-title-wrap { display: flex; flex-direction: column; gap: 2px; }
        .sf-main-title { font-size: 20px; font-weight: 900; color: var(--text-main); margin: 0; letter-spacing: -0.5px;}
        .sf-subtitle { font-size: 13px; color: var(--text-muted); font-weight: 600; }
        .sf-wizard-step { position: relative; padding: 15px 20px; border: 1px dashed var(--border-light); border-radius: 10px; background: #f8fafc; }
        .sf-step-badge { position: absolute; top: -12px; left: 20px; background: var(--text-main); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);}
        .sf-chips-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 5px; }
        .sf-chip-label { cursor: pointer; user-select: none; height: 100%; display: block;}
        .sf-chip-label input { display: none; }
        .sf-chip-box { border: 2px solid var(--border-light); border-radius: 8px; padding: 10px 8px; text-align: center; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); background: #ffffff; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
        .sf-chip-box:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.04);}
        .sf-chip-label input[type="radio"]:checked + .sf-chip-box { border-color: var(--accent-main); background: #fff7ed; box-shadow: 0 4px 15px rgba(249, 115, 22, 0.15); }
        .sf-chip-label input[type="checkbox"]:checked + .sf-chip-box { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15); }
        .sf-chip-icon { font-size: 20px; line-height: 1; margin-bottom: 2px; }
        .sf-chip-title { font-size: 16px; font-weight: 800; color: var(--text-main); line-height: 1.2; }
        .sf-chip-sub { font-size: 13px; font-weight: 600; color: var(--text-muted); line-height: 1.3; margin-top: 2px; padding: 0 2px;}
        .sf-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: -5px;}
        .sf-btn-outline { background: #fff; border: 2px solid var(--border-light); color: var(--text-muted); padding: 8px 20px; font-size: 12px; font-weight: 800; border-radius: 6px; cursor: pointer; transition: 0.2s; text-transform: uppercase;}
        .sf-btn-outline:hover { border-color: var(--text-main); color: var(--text-main); }
        .sf-btn-action { background: var(--text-main); color: #fff; border: none; padding: 8px 24px; font-size: 13px; font-weight: 800; border-radius: 6px; cursor: pointer; transition: 0.2s; text-transform: uppercase; letter-spacing: 0.5px;}
        .sf-btn-action:hover { background: var(--accent-main); box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3); }

        @media (max-width: 992px) { .sf-chips-grid { grid-template-columns: repeat(3, 1fr); } }
        @media (max-width: 576px) {
            .smart-finder-banner { padding: 15px; }
            .sf-chips-grid { grid-template-columns: repeat(2, 1fr); gap: 8px;}
            .sf-chip-box { padding: 10px 5px; }
            .sf-chip-icon { font-size: 18px; }
            .sf-actions { flex-direction: row; width: 100%; justify-content: space-between; margin-top: 0; }
            .sf-btn-outline, .sf-btn-action { flex: 1; text-align: center; padding: 10px 8px;}
        }

        .compare-strip { background: var(--bg-panel); border: 1px solid var(--border-dark); padding: 15px 20px; border-radius: 12px; }
        .compare-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;}
        .compare-slot { flex: 1; position: relative; width: 100%; }
        .compare-input { width: 100%; padding: 12px 30px 12px 15px; background: var(--bg-page); border: 1px solid var(--border-light); color: var(--text-main); border-radius: 6px; font-size: 13px; outline: none; transition: 0.2s;}
        .compare-input.locked { border-color: var(--success); font-weight: bold; background: #f0fdf4; }
        .vs-badge { background: var(--text-main); color: var(--bg-panel); font-size: 10px; font-weight: bold; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .clear-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--danger); cursor: pointer; display: none; font-size: 18px; padding: 0; font-weight: bold;}
        .action-btn { background: var(--text-main); color: #fff; border: none; border-radius: 6px; padding: 12px 25px; font-weight: 800; cursor: pointer; text-transform: uppercase; font-size: 14px;}

        .mobile-controls-bar { display: none; justify-content: space-between; align-items: center; background: var(--bg-panel); padding: 10px 15px; border-radius: 8px; border: 1px solid var(--border-dark); margin-bottom: 15px; position: sticky; top: 0; z-index: 940; box-shadow: 0 4px 10px rgba(0,0,0,0.08); transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
        .mobile-filter-btn { background: var(--bg-page); border: 1px solid var(--border-light); padding: 8px 15px; border-radius: 6px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-main);}
        .mobile-sort-select { padding: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-page); outline: none;}

        .sort-controls, .mobile-sort-select { appearance: none; -webkit-appearance: none; background-color: var(--bg-panel); background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; border: 1px solid var(--border-light); padding: 8px 30px 8px 12px; border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--text-main); outline: none; cursor: pointer; transition: 0.2s;}

        .layout-wrapper { display: flex; gap: 20px; align-items: flex-start; width: 100%; }
        
       /* top: 180px kar diya taaki dono filter rows ke theek niche se start ho, aur max-height adjust kar di taaki scroll perfect rahe */
        .sidebar { flex: 0 0 260px; background: var(--sidebar-bg); border: 1px solid var(--border-dark); border-radius: 12px; position: sticky; top: 180px; max-height: calc(100vh - 200px); display: flex; flex-direction: column; transition: top 0.3s ease, max-height 0.3s ease;}
        
        /* Naya class: Jab filters hide honge, toh sidebar auto gap fill karne upar aayega */
        .sidebar.shift-up {
            top: 75px !important; 
            max-height: calc(100vh - 95px) !important;
        }
        .sidebar-content { padding: 20px; overflow-y: auto; flex: 1; position: relative; scroll-behavior: smooth;}
        .sidebar-content::-webkit-scrollbar { width: 5px; }
        .sidebar-content::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
        
        .filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-dark); }
        .filter-header h3 { margin: 0; font-size: 20px; font-weight: 900; color: var(--text-main); }
        .clear-all-btn { background:transparent; border:none; color: var(--accent-main); font-size: 11px; font-weight:700; cursor:pointer; text-transform: uppercase;}
        
        .filter-group { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed var(--border-light); }
        .filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .filter-title { background: #fef4ea; padding: 8px 12px; border-radius: 6px; font-size: 14px; font-weight: 800; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; border-left: 4px solid var(--accent-main); letter-spacing: -0.2px;}
        
        .filter-search-box { width: 100%; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--border-light); border-radius: 4px; font-size: 12px; background: var(--bg-page); color: var(--text-main); outline: none;}
        .checkbox-container { max-height: 160px; overflow-y: auto; padding-right: 5px;}
        .checkbox-container::-webkit-scrollbar { width: 4px; }
        .checkbox-container::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
        .checkbox-list { display: flex; flex-direction: column; gap: 8px; }
        .checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; font-weight: 600; width: 100%;}
        .checkbox-label input[type="checkbox"] { accent-color: var(--accent-main); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0;}
        .filter-count { font-size: 11px; color: #94a3b8; font-weight: normal; margin-left: auto; padding-right: 5px; }
        .sub-options { margin-left: 23px; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; display: none; padding-left: 8px; border-left: 2px solid var(--border-light);}

        #sidebar-btt { position: absolute; bottom: 20px; right: 20px; background: var(--text-main); color: #fff; width: 35px; height: 35px; border-radius: 50%; border: none; font-weight: bold; cursor: pointer; display: none; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.3s; align-items: center; justify-content: center; }
        #sidebar-btt:hover { background: var(--accent-main); transform: translateY(-3px); }

        .mobile-filter-footer { display: none; padding: 15px; background: var(--bg-panel); border-top: 1px solid var(--border-dark); gap: 10px;}
        .mobile-filter-footer button { flex: 1; padding: 12px; border-radius: 6px; font-weight: 800; font-size: 14px; text-transform: uppercase; cursor: pointer; border: none;}
        .btn-cancel { background: var(--bg-page); color: var(--text-main); border: 1px solid var(--border-light) !important;}
        .btn-apply { background: var(--text-main); color: #fff; }

        .main-content { flex: 1; min-width: 0; }
        .top-bar-results { display: flex; justify-content: space-between; align-items: center; background: transparent; margin-bottom: 15px; position: relative; }
        .results-count { font-size: 15px; font-weight: 700; color: var(--text-main); }
        .controls-right { display: flex; align-items: center; gap: 15px; }

        .load-more-btn { display: block; margin: 30px auto; padding: 12px 40px; background: var(--text-main); color: #fff; border: none; border-radius: 8px; font-weight: 800; font-size: 14px; cursor: pointer; text-transform: uppercase; transition: 0.2s;}
        .load-more-btn:hover { background: var(--accent-main); }

        .results-grid { display: grid; gap: 15px; }
        .mobile-only { display: none !important; }

        .phone-card { 
            background: var(--bg-panel); 
            box-shadow: 0 4px 15px rgba(0,0,0,0.06); 
            border: 1px solid var(--accent-main);             
            border-radius: 12px; 
            display: flex; 
            flex-direction: row; 
            align-items: center; 
            padding: 24px 20px; 
            position: relative; 
            transition: 0.2s; 
        }
        .phone-card:hover { border-color: var(--accent-main); box-shadow: 0 8px 25px rgba(249, 115, 22, 0.15); }
        .phone-card.rank-1::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--success); border-radius: 12px 0 0 12px;}
        
        .top-3-container { display: grid; gap: 15px; margin-bottom: 30px; }
        .top-3-title { font-size: 22px; font-weight: 900; color: #d97706; margin: 0 0 15px 0; display: flex; align-items: center; gap: 8px; }
        .other-options-title { font-size: 20px; font-weight: 800; margin: 0 0 15px 0; color: var(--text-main); padding-bottom: 10px; border-bottom: 2px solid var(--border-light); }
        .phone-card.top-3-card { border-color: #fcd34d; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1); }
        .phone-card.top-3-card:hover { border-color: #f59e0b; box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2); transform: translateY(-2px); }

        .flags-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; width: 100%;}
        .flag-badge { font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 6px; display: flex; align-items: center; gap: 4px; line-height: 1.2; box-shadow: 0 1px 3px rgba(0,0,0,0.05);}
        .flag-red { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
        .flag-green { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

        .verdict-box { background: #f8fafc; border: 1px dashed #cbd5e1; padding: 15px; border-radius: 10px; font-size: 13px; color: #334155; text-align: left; line-height: 1.6; margin: 15px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
        .verdict-box-title { color: #0f172a; font-size: 15px; font-weight: 900; margin-bottom: 10px; border-bottom: 1px solid #e2e8f0; padding-bottom: 5px; }
        .verdict-box ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
        .verdict-box li { margin-bottom: 0; }
        .verdict-box b { color: #0f172a; font-weight: 800; }
        
        .rank-badge-img { display: inline-block; background: #fff; padding: 4px 12px; border-radius: 20px; font-weight: 900; font-size: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 2px solid; white-space: nowrap; margin-bottom: 10px;}
        .rank-1-badge { border-color: #fbbf24; color: #d97706; }
        .rank-2-badge { border-color: #94a3b8; color: #475569; }
        .rank-3-badge { border-color: #b45309; color: #78350f; }

        .card-img-col { width: 180px; border-right: 1px solid var(--border-light); padding-right: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;}
        .trending-badge { position: absolute; top: 25px; left: 0px; background: #6366f1; color: #fff; font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 4px; text-transform: uppercase; z-index: 2;}
        .card-img { width: 100%; height: 170px !important; object-fit: contain; display: block; margin: 0 auto; cursor: pointer;}
        
        .market-status-label { font-size: 12px; padding-top: 5px; padding-bottom: 8px; color: #4b5563; font-weight: 700; margin-bottom: 10px; text-align: center; width: 100%; }
        .in-stock { color: #16a34a; }
        .out-of-stock { color: #dc2626; }
        
        .col-price-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: 12px; gap: 6px; }
        .under-img-price { font-size: 22px; font-weight: 900; color: #000; text-align: center; line-height: 1;}
        .price-updated { font-size: 10px; font-weight: 600; color: var(--text-muted); text-align: center; margin-top: 0; line-height: 1.4;}
        
        .btn-price-history { background: transparent; border: none; color: #3b82f6; font-size: 13px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 5px; margin-top: 5px; text-decoration: underline; text-underline-offset: 3px; transition: 0.2s; }
        .btn-price-history:hover { color: #1d4ed8; text-decoration-thickness: 2px; }

        .card-compare-label { font-size: 12px; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 6px; cursor: pointer; justify-content: center;}
        .card-compare-label input { accent-color: var(--accent-main); width: 16px; height: 16px; cursor: pointer;}

        .card-info-col { flex: 1; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
        .card-title-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 5px; }
        .card-title { font-size: 20px; font-weight: 800; color: #1e3a8a; margin: 0; cursor: pointer; line-height: 1.2;}
        .score-badge { display: flex; align-items: center; gap: 5px; background: #f3e8ff; padding: 4px 8px; border-radius: 6px; border: 1px solid #ddd6fe;}
        .score-val { font-size: 16px; font-weight: 900; color: var(--score-color); line-height: 1;}
        .score-label { font-size: 9px; font-weight: 800; color: var(--score-color); text-transform: uppercase; line-height: 1.1;}

        .specs-box { background: transparent; border: 1px solid var(--specs-border); border-radius: 8px; display: flex; flex-direction: column; padding: 15px; gap: 12px;}
        .spec-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-main); font-weight: 600; line-height: 1.7; }
        .spec-icon { width: 18px; height: 18px; fill: none; stroke: var(--icon-color); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; background: #eff6ff; padding: 2px; border-radius: 4px; border: 1px solid #bfdbfe; }
        
        .view-specs-btn { background: var(--bg-panel); border: 2px solid var(--border-dark); color: var(--text-main); font-size: 13px; font-weight: 800; cursor: pointer; display: block; text-align: center; text-transform: uppercase; transition: 0.2s; text-decoration: none; padding: 10px; border-radius: 6px; margin-top: 8px;}
        .view-specs-btn:hover { border-color: var(--accent-main); color: var(--accent-main); background: #fff7ed; }

                .card-action-col {
            width: 300px;
            flex-shrink: 0;
            border-left: 1px dashed var(--border-light);
            padding-left: 15px;
            padding-top: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }
        
        .pricing-block { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center;}
        .save-banner { border: 1px dashed #22c55e; color: #22c55e; background: #f0fdf4; padding: 6px 8px; text-align: center; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; width: 100%; max-width: 200px; box-sizing: border-box; line-height: 1.2;}
        .save-banner-new { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; padding: 8px 12px; border-radius: 6px; font-size: 14px; font-weight: 900; text-align: center; width: 100%; max-width: 260px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; }
        .store-btn-large { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border-radius: 6px; font-size: 15px; font-weight: 800; text-decoration: none; border: none; cursor: pointer; width: 100%; max-width: 200px; line-height: 1; box-sizing: border-box; text-align: center;}
        .btn-amz-large { background: #f59e0b; color: #000; }
        .btn-flp-large { background: #0084ff; color: #fff; }
        .best-deal-badge { position: absolute; top: -10px; right: -5px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 4px; border: 1px solid #f87171;}
        .store-svg { height: 18px; fill: currentColor;}
        
        /* New Affiliate Buttons CSS for Cards */
        .store-row { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 100%; border: 1px solid var(--border-light); border-radius: 8px; padding: 8px; background: #fff; gap: 8px; box-sizing: border-box; }
        .store-logo-box { width: 36px; height: 36px; border: 1px solid var(--border-light); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff; }
        .store-price-box { display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; overflow: hidden; }
        .store-price-main { font-size: 17px; font-weight: 900; color: #0f172a; line-height: 1.1; white-space: nowrap; letter-spacing: -0.5px; }
        
        /* ── Offer / coupon / net‑price lines ── */
        .bank-offer-line,
        .coupon-line,
        .net-price-line {
            font-size: 11px;
            font-weight: 700;
            line-height: 1.3;
            margin-top: 3px;
        }
        .bank-offer-line {
            color: #0f766e;               /* teal */
        }
        .coupon-line {
            color: #a16207;               /* amber */
        }
        .net-price-line {
            font-size: 12px;
            font-weight: 800;
            color: #166534;               /* green */
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .net-price-line .best-deal-badge {
            position: static;              /* remove absolute so it sits inline */
            display: inline-block;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            background: #ef4444;
            color: #fff;
            font-weight: 800;
            white-space: nowrap;
        }
        
        /* Mobile tweaks for offer lines */
        @media (max-width: 768px) {
            .bank-offer-line,
            .coupon-line {
                font-size: 10px;
            }
            .net-price-line {
                font-size: 11px;
            }
        }
        .store-cta-btn { font-size: 11px; font-weight: 800; padding: 10px 4px; border-radius: 6px; text-transform: uppercase; text-decoration: none; color: #fff; display: flex; align-items: center; justify-content: center; gap: 4px; transition: 0.2s; border: none; cursor: pointer; width: 135px; flex-shrink: 0; text-align: center; box-sizing: border-box; }
        .store-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
        .amz-cta { background: #f97316; }
        .flp-cta { background: #0066ff; }
        .store-cta-btn.disabled { background: #cbd5e1; cursor: not-allowed; opacity: 0.7; color: #64748b; }

                    .share-btn {
            background: transparent;
            border: none;
            color: var(--accent-main);
            font-size: 11px;
            font-weight: 800;
            cursor: pointer;
            border-radius: 6px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: 0.2s;
            text-transform: uppercase;
        }
        .share-btn:hover {
            background: transparent;
            color: var(--accent-hover);
        }
        .share-btn-mobile {
            margin-bottom: 0px;
            width: fit-content;
            margin-left: 0;
        }
        .share-btn-desktop {
            margin-top: 20px;            
        }
        
        .sticky-compare-dock { position: fixed; bottom: -150px; left: 0; width: 100%; background: var(--bg-panel); border-top: 2px solid var(--accent-main); padding: 15px 20px; z-index: 1050; display: flex; justify-content: center; box-shadow: 0 -10px 40px rgba(0,0,0,0.15); transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .sticky-compare-dock.show { bottom: 0; }
        .dock-container { display: flex; align-items: center; justify-content: space-between; max-width: 1350px; width: 100%; gap: 20px;}
        .dock-phones { display: flex; gap: 15px; flex: 1; justify-content: center;}
        .dock-phone-slot { width: 100%; max-width: 250px; background: var(--bg-page); border: 1px solid var(--border-light); border-radius: 8px; padding: 12px 15px; display: flex; align-items: center; gap: 12px; position: relative; transition: 0.2s;}
        .dock-phone-slot img { width: 35px; height: 45px; object-fit: contain; }
        .dock-phone-title { font-size: 13px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;}
        .dock-phone-slot.empty { background: transparent; border: 1px dashed var(--border-light); justify-content: center; color: var(--text-muted); font-size: 12px; font-weight: bold; text-transform: uppercase;}
        .remove-dock-item { position: absolute; top: -10px; right: -10px; background: var(--danger); color: #fff; border-radius: 50%; width: 24px; height: 24px; font-size: 14px; font-weight: bold; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
        #dock-buttons { display: flex; gap: 10px; }

        .suggestions-box { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--bg-panel); border: 1px solid var(--border-dark); border-radius: 8px; max-height: 300px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
        .suggestion-item { padding: 10px 15px; display: flex; align-items: center; gap: 12px; cursor: pointer; border-bottom: 1px solid var(--border-light); }
        .suggestion-img { width: 25px; height: 35px; object-fit: contain; }
        .suggestion-text { color: var(--text-main); font-size: 13px; font-weight: 600; flex: 1;}

        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
        .modal-box { background: var(--bg-page); width: 100%; max-width: 1050px; max-height: 90vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 50px rgba(0,0,0,0.3); }
        .modal-box.large { max-width: 1300px; }
        .modal-header { padding: 15px 20px; border-bottom: 1px solid var(--border-dark); display: flex; justify-content: space-between; align-items: center; background: #fff; flex-shrink: 0;}
        .modal-header h2 { margin: 0; font-size: 18px; color: var(--text-main); font-weight: 800;}
        
        .modal-body { padding: 0; overflow-y: auto; flex: 1; background: var(--bg-panel); scroll-behavior: smooth;} 
        
        .mobile-back-btn { display: none; }

        .sp-top-section { display: flex; flex-direction: column; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-light); gap: 10px; background: #fff;}
        .sp-top-section img { max-height: 180px; object-fit: contain; }
        .specs-accordion-container { padding: 20px; background: var(--bg-page); }
        
        .spec-group { border: 1px solid var(--border-dark); margin-bottom: 15px; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.02);}
        .spec-group summary { list-style: none; outline: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: #f8fafc; border-bottom: 1px solid transparent; font-weight: 800; color: var(--text-main); text-transform: uppercase; font-size: 14px;}
        .spec-group summary::-webkit-details-marker { display: none; }
        .spec-group[open] summary { border-bottom: 1px solid var(--border-light); }
        .spec-group summary .sgh-title { display: flex; align-items: center; gap: 8px; }
        .spec-group summary .sgh-icon { transition: transform 0.3s; color: var(--text-muted); font-size: 12px;}
        .spec-group[open] summary .sgh-icon { transform: rotate(180deg); }
        
        .modal-spec-table { width: 100%; border-collapse: collapse; }
        .modal-spec-row { border-bottom: 1px solid var(--border-light); transition: background 0.15s;}
        .modal-spec-row:hover { background: #f8fafc; }
        .modal-spec-row:last-child { border-bottom: none; }
        .modal-spec-label { width: 35%; padding: 12px 20px; font-weight: 700; color: var(--text-muted); font-size: 13px; background: #fafafa; border-right: 1px solid var(--border-light); }
        .modal-spec-val { padding: 12px 20px; font-weight: 600; color: var(--text-main); font-size: 14px; }
        .highlight-spec { font-weight: 800 !important; color: #0f172a !important; }

        .sp-bottom-section { padding: 20px; background: #fff; border-top: 1px solid var(--border-dark); display: flex; justify-content: center; align-items: center; }
        .sp-bottom-section .pricing-block { max-width: 600px; flex-direction: column; align-items: center;}

        .comp-sticky-header { transition: padding 0.3s ease-in-out, min-height 0.3s ease-in-out, background 0.3s ease-in-out; }
        .comp-sticky-header.shrunk .hide-on-shrink { display: none !important; opacity: 0; max-height: 0; overflow: hidden; pointer-events: none; border: none; padding: 0 !important; margin: 0 !important; }
        .comp-sticky-header.shrunk .comp-title { font-size: 14px !important; margin-bottom: 0 !important; padding: 5px 0 !important; text-align: center; }
        .comp-sticky-header.shrunk .comp-header-inner { padding: 10px 5px !important; }
        .comp-sticky-header.shrunk .modal-remove-btn { top: 5px !important; right: 5px !important; transform: scale(0.85); display: flex !important; opacity: 1; max-height: 24px; }
        
        .comp-table-wrapper { width: 100%; }
        /* table-layout: fixed add kiya gaya hai jisse sabhi columns exactly barabar divide honge */
        .comp-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 13px; background: #fff; }
        .comp-table th, .comp-table td { padding: 12px 15px; border-bottom: 1px solid var(--border-dark); border-right: 1px solid var(--border-dark); vertical-align: middle; word-wrap: break-word; }
        
        .comp-table th.header-cell { background-color: #ffffff; position: sticky; top: 0; z-index: 50; border-bottom: 2px solid var(--border-light); box-shadow: 0 4px 6px -2px rgba(0,0,0,0.1); padding: 0; text-align: center; vertical-align: top;}
        
        .comp-header-inner { position: relative; width: 100%; height: 100%; padding: 25px 15px 15px 15px; }
        
        /* 150px ki jagah 170px width di hai pehle column ko taaki text theek se fit aaye */
        .comp-table th.top-left-cell { position: sticky; top: 0; left: 0; z-index: 60; background: #f8fafc; border-right: 1px solid var(--border-dark); text-align: center; vertical-align: middle; padding: 20px 10px; border-bottom: 2px solid var(--border-light); width: 170px; } .comp-table th.top-left-cell > div { display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; }
        .comp-table td.spec-name { font-weight: 800; color: var(--text-muted); background: #f8fafc; width: 170px; font-size: 12px; position: sticky; left: 0; z-index: 10; border-right: 1px solid var(--border-dark); }
        .comp-category-row td { position: sticky; left: 0; z-index: 11; background: #fef4ea; font-weight: 900; color: var(--text-main); font-size: 14px; text-transform: uppercase; padding: 12px 15px; border-top: 1px solid var(--border-dark); border-bottom: 1px solid var(--border-dark); }
        
        .comp-img-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 10px auto; }
        .comp-img { max-height: 100%; max-width: 100%; object-fit: contain; }
        .modal-remove-btn { position: absolute; background: var(--bg-page); color: var(--text-muted); border: 1px solid var(--border-dark); border-radius: 50%; width: 24px; height: 24px; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 12px; font-weight: bold;}
        .modal-remove-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger);}
        .comp-title { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 5px;}
        .comp-price { font-size: 20px; font-weight: 900; color: #000; margin-bottom: 5px;}
        .show-diff-only .all-same-row { display: none !important; }

        #back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--text-main); color: #fff; width: 45px; height: 45px; border-radius: 50%; border: none; font-size: 20px; font-weight: bold; cursor: pointer; display: none; z-index: 995; box-shadow: 0 4px 15px rgba(0,0,0,0.25); transition: 0.3s; align-items: center; justify-content: center;}
        #back-to-top:hover { background: var(--accent-main); transform: translateY(-3px);}

        .sp-top-upgraded { display: flex; width: 100%; background: #fff; border-bottom: 1px solid var(--border-dark); }
        .sp-left-col { flex: 0 0 300px; padding: 30px; display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--border-light); background: #f8fafc;}
        .sp-left-col img { max-height: 200px; object-fit: contain; margin-bottom: 15px;}
        .sp-left-col .sp-name { font-size: 22px; font-weight: 900; color: var(--text-main); text-align: center; margin: 0 0 10px 0; line-height: 1.2;}
        .sp-left-col .sp-price { font-size: 28px; font-weight: 900; color: #000; line-height: 1;}
        .sp-left-col .sp-date { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 5px;}
        
        .sp-right-col { flex: 1; padding: 30px; display: flex; flex-direction: column; gap: 20px; background: #fff; overflow-x: hidden;}
        
        .ph-tabs { display: flex; gap: 5px; background: #f1f5f9; padding: 5px; border-radius: 8px; width: fit-content;}
        .ph-tab-btn { padding: 8px 16px; border: none; background: transparent; border-radius: 6px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--text-muted); transition: 0.2s; display: flex; align-items: center; gap: 6px; }
        .ph-tab-btn.active.amz { background: #fff; color: #f59e0b; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .ph-tab-btn.active.flp { background: #fff; color: #0084ff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        
        .chart-container-wrap { width: 100%; height: 250px; position: relative; margin-top: 10px;}
        
        .timeline-controls-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
        .timeline-filters { display: flex; gap: 8px; }
        .time-btn { background: #fff; border: 1px solid var(--border-light); padding: 5px 15px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--text-muted); transition: 0.2s;}
        .time-btn.active { border-color: var(--text-main); color: var(--text-main); background: #fff7ed; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1);}
        .time-btn:hover { border-color: var(--text-main); color: var(--text-main); }

        .chart-actions { display: flex; flex-direction: column; align-items: stretch; margin-top: 20px; border-top: 1px solid var(--border-light); padding-top: 20px; gap: 15px;}
        .btn-alert { background: #ef4444; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);}
        .btn-alert:hover { background: #dc2626; transform: translateY(-2px);}

        .alert-setup-box { display: none; background: #fff7ed; border: 1px solid #fed7aa; padding: 15px; border-radius: 8px; margin-top: 5px; width: 100%; animation: fadeIn 0.3s ease-in-out; }
        .alert-input-group { display: flex; align-items: center; background: #fff; border: 1px solid #fdba74; border-radius: 8px; padding: 5px; margin-top: 10px; width: 100%; max-width: 350px; transition: 0.2s;}
        .alert-input-group:focus-within { border-color: var(--accent-main); box-shadow: 0 0 0 2px rgba(249,115,22,0.1); }
        .alert-input-group span { display: flex; align-items: center; justify-content: center; padding: 0 8px 0 12px; font-weight: 900; color: #c2410c; background: transparent; border: none; font-size: 16px;}
        .alert-input-group input { flex: 1; padding: 8px 0; border: none; outline: none; font-weight: 800; font-size: 16px; color: #000; background: transparent; -moz-appearance: textfield; min-width: 0;}
        .alert-input-group input::-webkit-outer-spin-button, .alert-input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .btn-confirm-alert { background: var(--success); color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 800; cursor: pointer; transition: 0.2s; font-size: 13px; white-space: nowrap !important;}
        .btn-confirm-alert:hover { background: #15803d; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

        @media (max-width: 768px) {
            .container { padding-top: 0px !important; }
            .global-header { 
                flex-direction: row; 
                flex-wrap: wrap; 
                justify-content: space-between; 
                align-items: center; 
                padding: 8px 15px; /* Padding thodi kam kar di taaki slim lage */
                gap: 0 !important; /* MAIN FIX: Desktop wale invisible gap ko 0 kar diya */
            }
            
            /* Search Icon ko force karke extreme right bhejne ke liye */
            #mob-search-btn { display: flex !important; margin-left: auto !important; }

/* Search bar dropdown fix - ab ye page ko push nahi karega, overlay bankar aayega */
            .header-controls { 
                position: absolute !important;
                top: 100%;
                left: 0;
                width: 100%;
                background: var(--bg-panel);
                border-radius: 0 0 12px 12px;
                box-shadow: 0 15px 25px rgba(0,0,0,0.06);
                transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out; 
                max-height: 0; 
                opacity: 0; 
                margin: 0; 
                padding: 0 15px; 
                overflow: hidden; 
                pointer-events: none; 
                z-index: 940;
            }
            
            /* Class toggled by Search Icon */
            .header-controls.show-mob-search { 
                max-height: 85px; 
                opacity: 1; 
                padding: 10px 15px 15px 15px; 
                margin: 0;
                pointer-events: auto; 
                overflow: visible; 
                border-bottom: 1px solid var(--border-light);
            }
            
            .global-header.hide-search .header-controls { max-height: 0 !important; opacity: 0 !important; margin: 0 !important; padding: 0 !important; pointer-events: none !important; overflow: hidden !important; }
            
            .compare-strip { margin-top: 5px !important; padding: 12px 10px; margin-bottom: 15px !important; margin-left: -15px; margin-right: -15px; border-radius: 0; border-left: none; border-right: none; border-top: none; background: #fff; border-bottom: 1px solid var(--border-light); }
            .compare-row { flex-direction: row; align-items: center; gap: 6px; }
            .compare-slot { flex: 1; min-width: 0; }
            .compare-input { padding: 10px 8px; font-size: 12px; text-align: center; }
            .compare-action-btns { width: auto; display: flex; gap: 0; margin-top: 0; }
            .compare-action-btns .action-btn { padding: 10px 14px !important; font-size: 13px; border-radius: 6px; }
            
            .top-bar-results { display: none; }
            .mobile-controls-bar { display: flex !important; position: sticky; z-index: 1050; width: 100%; background: white; border-radius: 0; border: 1px solid var(--border-dark); margin-bottom: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
            .sidebar { display: none; }
            
            /* Mobile Filter Sidebar Visibility Fix */
            .sidebar.mobile-active {
                display: flex !important;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                z-index: 1060;
                background: var(--bg-page);
                border-radius: 0;
                max-height: 100vh;
                margin: 0;
            }
            .mobile-filter-footer {
                display: flex;
                padding: 15px;
                background: var(--bg-panel);
                border-top: 1px solid var(--border-dark);
                gap: 10px;
                flex-shrink: 0;           /* never shrink */
            }
            .modal-overlay { padding: 0 !important; align-items: flex-start; }
            .modal-box { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 50px rgba(0,0,0,0.3); }
            .modal-header { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 5px rgba(0,0,0,0.05); padding: 12px 15px; border-radius: 0; }
            .modal-body { flex: 1; padding-bottom: 80px; }
            .sp-top-section img { max-height: 140px; }
            .mobile-back-btn { display: flex !important; align-items: center; gap: 5px; border: 1px solid var(--border-light); background: var(--bg-page); padding: 6px 12px; border-radius: 6px; font-weight: bold; color: var(--text-main); font-size: 13px; cursor: pointer; }
            .desktop-close-btn { display: none !important; }
            #modal-title { font-size: 15px !important; }
            .pricing-block { flex-direction: row !important; flex-wrap: wrap; justify-content: center; }
            .store-btn-large { flex: 1; min-width: 120px; max-width: none !important; padding: 10px 5px !important; font-size: 13px !important; }
            .save-banner { width: 100% !important; max-width: none !important; }
            .comp-table .pricing-block { flex-direction: column !important; }
            
            /* Mobile fixes for new Affiliate buttons */
            .store-row { flex-direction: row; padding: 4px 6px 4px 12px; gap: 6px; max-width: 100%; }
            .store-logo-box { width: 28px; height: 28px; }
            .store-logo-box svg { height: 12px !important; }
            .store-price-main { font-size: 14px; letter-spacing: -0.5px; }
            .store-cta-btn { width: 115px; flex-shrink: 0; flex: 0 0 auto; font-size: 10px; padding: 8px 4px; white-space: nowrap; }
            .save-banner-new { width: fit-content; margin: 0 0 6px auto; font-size: 9px; padding: 4px 8px; border-radius: 6px; }
            .card-compare-label { white-space: nowrap !important; flex-shrink: 0; }
            .desktop-only { display: none !important; }
            .mobile-only { display: flex !important; }

            .phone-card {
             display: grid !important; grid-template-columns: 110px 1fr;
             grid-template-areas: 
                 "mobheader mobheader" 
                 "img actions" 
                 "tools tools"
                 "specs specs";
             padding: 15px; gap: 12px; align-items: center;
            }
            .mobile-tools-row { grid-area: tools; display: flex !important; justify-content: space-between; align-items: center; width: 100%; }
            .mobile-tools-row .btn-price-history { margin-top: 0 !important; padding: 4px 0 !important; }
            .mobile-layout-header { grid-area: mobheader; display: flex; justify-content: space-between; width: 100%; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; margin-bottom: 5px; }
            .card-img-col { grid-area: img; width: 100%; padding: 0; border: none; align-self: flex-start; }
            .card-img-col .trending-badge { top: -5px; left: -5px; }
            .card-img { height: 130px !important; }
            .card-info-col { display: contents; }
            .mobile-price-compare-col { display: none !important; }
            
            .specs-box { grid-area: specs; margin-top: 5px; padding: 12px !important; gap: 8px !important; }
            .spec-line { font-size: 12px !important; line-height: 1.4 !important; }
            .view-specs-btn { padding: 10px !important; font-size: 13px !important; margin-top: 6px !important; }
            .flags-container { margin-top: 8px !important; gap: 6px !important; }
            .flag-badge { padding: 4px 8px !important; font-size: 10px !important; }
            
            .card-action-col { grid-area: actions; width: 100%; padding: 0; border: none; margin-top: 0px; align-self: flex-start; display: flex; flex-direction: column; align-items: center; justify-content: center;}
            .filter-row {
                justify-content: flex-start !important;   /* Fix for left side cut off */
                padding-left: 15px !important;
            }
            .filter-row::after {
                content: '';
                padding-right: 15px; /* Fix for right side extra scroll space */
            }
            #back-to-top { bottom: 90px; right: 20px; width: 40px; height: 40px; }
            #sidebar-btt { bottom: 80px; }
            
        .sticky-compare-dock { padding: 15px 10px; }
        .dock-container { display: flex; flex-direction: column !important; gap: 10px; width: 100%; }
        .dock-phones { display: flex; width: 100% !important; gap: 10px !important; justify-content: space-between; flex-wrap: nowrap; overflow: visible !important; }
        .dock-phone-slot { flex: 1; max-width: none; margin: 0; padding: 8px 4px; flex-direction: column; text-align: center;}
        .dock-phone-slot img { width: 25px; height: 35px;}
        .dock-phone-title { font-size: 12px; }
        .dock-phone-slot:nth-child(3) { display: none; }
        #dock-buttons { display: flex; width: 100%; gap: 10px; justify-content: center; }
        #dock-buttons button { flex: 1; padding: 12px; font-size: 13px; }
            .footer-container { grid-template-columns: 1fr; text-align: center; gap: 25px; }
            .modal-spec-label { width: 45%; } 

            .sp-top-upgraded { flex-direction: column; }
            .sp-left-col { flex: none; width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); padding: 20px;}
            .sp-right-col { padding: 20px; }
            .chart-actions .btn-alert, .chart-actions a { width: 100%; justify-content: center; }
            .alert-input-group { max-width: 100%; }
            .alert-setup-box { margin: 15px 40px 10px 40px !important; width: auto !important; }

            /* ── Mobile affiliate row layout fix ── */
            .card-action-col a.aff-row,
            .pricing-block a.aff-row,
            .aff-row {
                padding: 8px 10px !important;
                justify-content: space-between !important;
                align-items: center !important;
                max-width: 90% !important;
                margin-left: auto !important;
                margin-right: auto !important;
            }
            .aff-logo {
                width: 20px !important;
                height: 20px !important;
            }
            .aff-price {
                font-size: 15px !important;
            }
            .aff-savings {
                font-size: 12px !important;
            }
            .aff-oos {
                font-size: 12px !important;
            }
            .aff-discount-btn {
                font-size: 13px !important;
                padding: 8px 0 !important;
                width: 90% !important;
                margin-left: auto !important;
                margin-right: auto !important;
            }

            /* ── Compact compare modal on mobile ── */
            #compareModal .aff-row {
                padding: 6px 8px !important;
                max-width: 90% !important;
                margin-left: auto !important;
                margin-right: auto !important;
            }
            #compareModal .aff-logo {
                width: 18px !important;
                height: 18px !important;
            }
            #compareModal .aff-price {
                font-size: 13px !important;
            }
            #compareModal .aff-savings {
                font-size: 11px !important;
            }
            #compareModal .aff-oos {
                font-size: 11px !important;
            }
            #compareModal .aff-discount-btn {
                font-size: 11px !important;
                padding: 6px 0 !important;
                white-space: nowrap !important;
            }
            #compareModal .comp-title {
                margin-bottom: 8px !important;
            }
        }

        .site-footer { background: var(--bg-panel); border-top: 1px solid var(--border-dark); padding: 50px 15px; margin-top: 50px; }
        .footer-container { max-width: 1350px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
        .footer-col h4 { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0 0 15px 0; text-transform: uppercase; letter-spacing: 0.5px; }
        .footer-col p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0 0 10px 0; }
        .footer-col a { color: var(--accent-main); text-decoration: none; font-weight: 600; }
        .footer-col a:hover { text-decoration: underline; }
		
        .stretch-budget-section {
            margin-bottom: 15px;
            border: 1px solid #ffb38a;
            border-left: 4px solid var(--accent-main);
            border-radius: 12px;    
            background: linear-gradient(to bottom, #f56a33 25%, #ffffff 70%);
            box-shadow: 0 8px 25px rgba(249,115,22,0.12);
            padding: 20px;
        }

        .stretch-scroll-container {
            display: flex;
            overflow-x: auto;
            gap: 12px; 
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            box-sizing: border-box;
            
            /* 1. Parent ki 20px padding ko bypass karke container ko edge tak failane ke liye */
            margin-left: -20px;
            margin-right: -20px;
            width: auto; 
            
            /* 2. Andar wapas 20px ka gap banane ke liye (Jo aapko screenshot me chahiye) */
            padding-left: 20px; 
            padding-right: 20px;
            padding-top: 10px;
            padding-bottom: 10px;
            
            /* 3. SABSE MAIN FIX: Ye ensure karega ki card border se na chipke, hamesha 20px gap chhod kar hi ruke */
            scroll-padding-left: 20px;
            scroll-padding-right: 20px;
        }

        .stretch-scroll-container::-webkit-scrollbar {
            display: none; 
        }

        .stretch-scroll-container .phone-card {
            flex: 0 0 auto;
            width: 62%;
            min-width: 240px;
            max-width: 280px;
            scroll-snap-align: start;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            padding: 12px !important;
            box-sizing: border-box;
            
            /* Solid white background taaki scroll hote time blue gradient card ke upar se na dikhe */
            background-color: #ffffff; 
        }    


/* ── Filter strip (Budget + Primary Use) ── */
        .filter-strip {
            background: #ffffff;
            border-bottom: 1px solid var(--border-light);
            position: sticky;
            z-index: 940;
            transition: transform 0.25s ease;
            will-change: transform;
            margin-left: 0; 
            margin-right: 0; 
        }
        .filter-strip.hidden {
            transform: translateY(-100%);
        }
        .filter-row {
            display: flex;
            align-items: center;
            justify-content: center;      /* center the group */
            flex-wrap: nowrap;
            overflow-x: auto;
            gap: 10px;                   /* comfortable but not loose */
            padding: 6px 16px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .filter-row::-webkit-scrollbar {
            display: none;
        }
        .filter-row.budget-row {
            border-bottom: 1px solid var(--border-light);
        }
        .chip-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            padding: 6px 16px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            background: var(--bg-page);
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            user-select: none;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
            flex-shrink: 0;
            min-height: 32px;
        }
        .chip-label:hover {
            background: #fff7ed;
            border-color: var(--accent-main);
        }
        .chip-label.active {
            background: var(--accent-main);
            color: #fff;
            border-color: var(--accent-main);
        }
        .chip-label-clear {
            background: transparent;
            border: 1px solid var(--border-light);
            color: var(--text-muted);
            font-weight: 600;
        }
        .chip-label-clear:hover {
            background: #fee2e2;
            border-color: var(--danger);
            color: var(--danger);
        }

        .filter-row.has-clear {
            position: relative;
            padding-right: 80px;   /* reserve space for the absolute chip */
        }
        .chip-label-clear {
            /* on mobile it stays in the scrolling row */
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 16px;
            border-radius: 20px;
            border: 1px solid #fca5a5;
            background: #fee2e2;
            font-size: 13px;
            font-weight: 600;
            color: #991b1b;
            cursor: pointer;
            user-select: none;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
            white-space: nowrap;
            flex-shrink: 0;
            min-height: 34px;
            z-index: 5;
        }
        .chip-label-clear:hover {
            background: #fecaca;
            border-color: #f87171;
            color: #7f1d1d;
        }
           
        .sidebar-content::before {
                display: none; /* Faltu ka gray dash aur extra space permanently remove kar diya */
            }

@media (min-width: 769px) {
            .filter-row {
                justify-content: center; /* Desktop par hamesha center rahega */
            }
            .filter-row.use-row {
                position: relative;      /* anchor for the absolute Clear button */
                padding-right: 100px;    /* Clear button ke upar chips overlap na hon */
            }
            .chip-label-clear {
                position: absolute;
                right: 16px;
                top: 50%;
                transform: translateY(-50%);
                margin-left: 0;
            }
        }

        @media (max-width: 768px) {
            .filter-row {
                gap: 8px;
                padding: 8px 12px;
                justify-content: flex-start;   /* Mobile par chips left se start honge taaki scroll ho sake */
            }
            .filter-row.has-clear {
                padding-right: 70px;   /* leaves room for the absolute button */
            }
            .chip-label {
                padding: 6px 14px;
                font-size: 12px;
                border-radius: 18px;
                min-height: 32px;
            }
        }
      
        /* ── Bottom control bar (SORT + FILTER) ── */
        .bottom-control-bar {
            display: none;                /* hidden on desktop by default */
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background: var(--bg-panel);
            border-top: 1px solid var(--border-dark);
            padding: 10px 15px;
            gap: 12px;
            z-index: 1000;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.04);
        }
        .bottom-btn {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 10px;
            border-radius: 10px;
            border: 1px solid var(--border-light);
            background: var(--bg-page);
            font-size: 14px;
            font-weight: 700;
            color: var(--text-main);
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
            user-select: none;
        }
        .bottom-btn:hover {
            background: #fff7ed;
            border-color: var(--accent-main);
        }
        .bottom-btn:active {
            background: #ffedd5;
        }
        @media (max-width: 768px) {
            .bottom-control-bar {
                display: flex;           /* visible only on mobile */
            }
            body {
                padding-bottom: 80px;    /* make room for the fixed bar */
            }
        }

        .sort-picker {
            display: none;
            position: absolute;
            bottom: 100%;                 /* opens above the bar */
            left: 15px;
            right: 15px;
            background: #fff;
            border: 1px solid var(--border-light);
            border-radius: 12px;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
            z-index: 1010;
            overflow: hidden;
        }
        .sort-picker.show {
            display: block;
        }
        .sort-option {
            padding: 14px 16px;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            border-bottom: 1px solid var(--border-light);
            user-select: none;
        }
        .sort-option:last-child {
            border-bottom: none;
        }
        .sort-option:hover, .sort-option:active {
            background: #fff7ed;
        }

    .popular-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    @media (max-width: 768px) {
        .popular-grid {
            grid-template-columns: 1fr;
        }
    }

    /* ── Popular comparison card redesign ── */
    .pop-comp-card {
        background: #fff;
        border: 1px solid var(--border-light);
        border-radius: 14px;
        padding: 10px 12px;          /* reduced padding */
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;                     /* smaller gap */
        align-items: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        position: relative;
    }
    .pop-comp-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(249,115,22,0.15);
        border-color: var(--accent-main);
    }
    .pop-comp-card:active {
        transform: translateY(-1px);
    }

    .pop-left,
    .pop-right {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }
    .pop-right {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    .pop-img {
        height: 44px;                 /* smaller image */
        width: auto;
        object-fit: contain;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .pop-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    .pop-name {
        font-size: 13px;
        font-weight: 800;
        color: var(--text-main);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.2;
    }
    .pop-price {
        font-size: 11px;
        font-weight: 700;
        color: var(--accent-main);
    }

    .pop-vs-badge {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: linear-gradient(135deg, #f97316, #ea580c);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 900;
        font-size: 14px;
        box-shadow: 0 2px 10px rgba(249,115,22,0.35);
        flex-shrink: 0;
        margin: 0 auto;
    }

    .pop-arrow {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%) translateX(5px);
        font-size: 18px;
        color: var(--accent-main);
        opacity: 0;
        transition: all 0.25s ease;
        pointer-events: none;
    }
    .pop-comp-card:hover .pop-arrow {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    @media (max-width: 768px) {
        .pop-comp-card {
            padding: 8px 10px;
            gap: 6px;
        }
        .pop-img {
            height: 38px;
        }
        .pop-name {
            font-size: 12px;
        }
        .pop-price {
            font-size: 10px;
        }
    }
    /* Minimal loader ring wrapped around text */
    .loader-ring {
        width: 240px;
        height: 240px;
        border: 3px solid rgba(0, 0, 0, 0.05);
        border-top: 3px solid #ff0000;
        border-radius: 50%;
        animation: rgbColorSpin 1.5s linear infinite;
    }
    @keyframes rgbColorSpin {
        0% { transform: rotate(0deg); border-top-color: #ff0000; }
        33% { border-top-color: #00ff00; }
        66% { border-top-color: #0000ff; }
        100% { transform: rotate(360deg); border-top-color: #ff0000; }
    }

 /* ── Premium connected sheet (mobile & desktop) ── */
.offer-group {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.offer-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-main);
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-light);
}
.offer-group-header .group-icon {
    font-size: 16px;
}
.offer-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 16px;
    transition: background 0.1s;
}
.offer-row:last-child {
    border-bottom: none;
}
.offer-row:hover {
    background: #fafbff;
}
.offer-row-bank {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2 1 0;
    min-width: 180px;
}
.offer-row-bank-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.offer-row-bank-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.offer-row-bank-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.offer-row-condition {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offer-savings-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 90px;
    flex-shrink: 0;
}
.offer-savings-amount {
    font-size: 15px;
    font-weight: 800;
    color: #16a34a;
    white-space: nowrap;
}
.offer-effective-price {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}
.offer-row-cta {
    flex-shrink: 0;
    margin-left: 4px;
    min-width: 70px;
    text-align: right;
}
.offer-row-cta a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid;
    transition: 0.15s;
    white-space: nowrap;
    background: transparent;
}
.offer-row-cta a.amz {
    color: #f97316;
    border-color: #fed7aa;
}
.offer-row-cta a.flp {
    color: #2563eb;
    border-color: #bfdbfe;
}
.offer-row-cta a.amz:hover {
    background: #fff7ed;
}
.offer-row-cta a.flp:hover {
    background: #eff6ff;
}

/* ── Mobile specific refinements ── */
@media (max-width: 768px) {
    #offer-modal-body {
        padding: 12px 16px !important;
    }
    .offer-group {
        margin-bottom: 12px;
    }
    .offer-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .offer-row-bank {
        flex: 1 1 100%;
        min-width: 0;
    }
    .offer-savings-block {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .offer-row-cta {
        width: 100%;
        text-align: right;
        margin-left: 0;
    }
    #offer-modal-hero .mobile-only {
        display: block !important;
    }
    #offer-modal-hero .mobile-only:first-child {
        font-size: 16px;
        font-weight: 800;
        margin-bottom: 2px;
    }
    #offer-modal-hero .mobile-only:nth-child(2) {
        font-size: 24px;
        font-weight: 900;
        margin-bottom: 4px;
    }
    #offer-modal-sticky-footer {
        padding: 12px 16px;
    }
}

/* ── Desktop two‑column grid for sections ── */
@media (min-width: 769px) {
    #offer-modal-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px 20px !important;
        align-items: start;
    }
    .offer-group {
        break-inside: avoid;
    }
}

/* ── Desktop premium summary grid ── */
.offer-summary-grid {
    display: none;
}
@media (min-width: 769px) {
    .offer-summary-grid {
        display: grid;
        grid-template-columns: 1.2fr 1fr 1.4fr 1fr;
        gap: 16px;
        padding: 16px 20px;
        background: #fff;
        border-bottom: 1px solid var(--border-light);
    }
    .offer-summary-grid .summary-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .offer-summary-grid .summary-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-muted);
    }
    .offer-summary-grid .summary-value {
        font-size: 16px;
        font-weight: 900;
        color: #0f172a;
    }
    .offer-summary-grid .summary-value.savings {
        color: #16a34a;
    }
    .offer-summary-grid .summary-value.offer-detail {
        font-size: 13px;
        color: #0f172a;
    }
    .offer-summary-grid .summary-value.offer-source {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
    }
}

/* Fullscreen mobile offer sheet */
@media (max-width: 768px) {
    #platformOfferModal .modal-box {
        max-width: 100% !important;
        max-height: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    #platformOfferModal {
        padding: 0 !important;
    }
    #platformOfferModal .modal-header {
        border-radius: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        padding: 12px 15px;
    }
    .offer-modal-back {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-main);
        cursor: pointer;
        background: transparent;
        border: none;
        padding: 0;
    }
    #platformOfferModal .desktop-close-btn {
        display: none !important;
    }

    /* ── Mobile hero: image + phone name ── */
    #offer-modal-hero > div:first-child {
        padding: 12px 16px;
        gap: 12px;
    }
    #offer-modal-hero > div:first-child img {
        width: 40px;
        height: 40px;
    }

    /* Stacked summary grid on mobile */
    .offer-summary-grid {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-light);
        background: #fff;
    }
    .offer-summary-grid .summary-item {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    /* Best offer block stacked vertically */
    .offer-summary-grid .summary-item:nth-child(2) {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .offer-summary-grid .summary-item:nth-child(2) .summary-value.offer-detail {
        font-size: 15px;
        font-weight: 800;
        color: #16a34a;
    }
    .offer-summary-grid .summary-item:nth-child(2) .summary-value.offer-source {
        font-size: 12px;
        color: var(--text-muted);
        font-weight: 600;
    }
    .offer-summary-grid .summary-item:last-child .summary-value {
        font-size: 20px;
        font-weight: 900;
        color: #16a34a;
    }
    .offer-summary-grid .summary-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-muted);
        flex-shrink: 0;
        min-width: 90px;
    }
    .offer-summary-grid .summary-value {
        font-size: 16px;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.3;
        text-align: right;
    }

    /* Hide old mobile‑only fallback */
    #offer-modal-hero .mobile-only {
        display: none !important;
    }

    /* ── Three‑column offer row on mobile (CTA below) ── */
    .offer-row {
        display: grid !important;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        align-items: center;
        padding: 10px 16px;
    }
    .offer-row-bank {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
    .offer-savings-block {
        display: contents !important;
    }
    .offer-savings-amount {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        font-weight: 800;
        color: #16a34a;
        white-space: nowrap;
        text-align: right;
    }
    .offer-effective-price {
        grid-column: 3;
        grid-row: 1;
        font-size: 12px;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        text-align: right;
    }
    .offer-row-cta {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
        text-align: right;
    }
    .offer-row-cta a {
        font-size: 11px;
        padding: 5px 10px;
    }
    .offer-row-bank-name {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
    .offer-row-condition {
        font-size: 12px;
    }

    /* ── Sticky footer ── */
    #offer-modal-sticky-footer {
        padding: 12px 16px;
    }
}

/* Sticky footer button style (used outside offer rows) */
.offer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    transition: 0.2s;
}
.offer-cta.amz { background: #f97316; }
.offer-cta.flp { background: #2563eb; }
.offer-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

@media (max-width: 576px) {
    .offer-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .offer-row-bank {
        width: 100%;
        flex: 1 1 100% !important;
    }
    .offer-savings-block {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .offer-row-cta {
        width: 100%;
        text-align: right;
        margin-left: 0;
    }
}

/* Modal Filter Chips */
.offer-filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}
/* Inactive platform tabs – faded look */
.offer-filter-chip.amz:not(.active) {
    color: #f97316;
    border-color: #fed7aa;
    background: #fff7ed;
    opacity: 0.65;
}
.offer-filter-chip.flp:not(.active) {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
    opacity: 0.65;
}
/* Active platform tabs – vivid color, white text */
.offer-filter-chip.amz.active {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
    opacity: 1;
}
.offer-filter-chip.flp.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    opacity: 1;
}
/* Generic active (for other filter chips like “All Offers”) */
.offer-filter-chip.active:not(.amz):not(.flp) {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

/* ========================================= */
/* 🔥 FOMO Strategy CSS                      */
/* ========================================= */
.fomo-deal-tag {
    position: relative;
    background: #ecfdf5;
    border: 1px dashed #34d399;
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: help;
    width: fit-content;
    margin: 0 auto;
    transition: all 0.2s ease;
    z-index: 5;
}

.fomo-deal-tag:hover {
    background: #dcfce7;
    border-color: #10b981;
}

.fomo-fire {
    animation: flicker 1.5s infinite alternate;
}

/* Tooltip Reveal on Hover */
.fomo-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1e293b;
    color: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 10;
    pointer-events: none;
}

/* Little triangle pointer for tooltip */
.fomo-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -4px;
    border-width: 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.fomo-deal-tag:hover .fomo-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}