/* ============================================================
   ShopCompare AI — Stylesheet
   Conversational AI shopping assistant
   ============================================================ */

:root {
    --clr-bg: #f0f2f5;
    --clr-surface: #ffffff;
    --clr-primary: #4f46e5;
    --clr-primary-hover: #4338ca;
    --clr-accent: #f59e0b;
    --clr-accent-hover: #d97706;
    --clr-text: #1e293b;
    --clr-muted: #64748b;
    --clr-border: #e2e8f0;
    --clr-flipkart: #2874f0;
    --clr-amazon: #ff9900;
    --clr-myntra: #ff3e6c;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 14px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--clr-bg);
    color: var(--clr-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* ---- NAV BAR ---- */
.navbar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-brand { font-size: 1.3rem; font-weight: 800; color: var(--clr-primary); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nav-logo { height: 34px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-contact-link {
    color: var(--clr-muted);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: color .2s;
}
.nav-contact-link:hover { color: var(--clr-primary); }
.btn-new-chat {
    background: #f0eeff;
    color: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-new-chat:hover { background: #e0ddff; }
.nav-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-pill {
    background: var(--clr-bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .75rem;
    white-space: nowrap;
    color: var(--clr-muted);
}
.nav-pill strong { color: var(--clr-text); }
.pill-flipkart { color: var(--clr-flipkart); font-weight: 600; }
.pill-amazon { color: var(--clr-amazon); font-weight: 600; }
.pill-myntra { color: var(--clr-myntra); font-weight: 600; }

/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    color: #fff;
    text-align: center;
    padding: 70px 0 50px;
    transition: padding .4s ease;
    overflow: hidden;
}
.hero-compact { padding: 24px 0 18px; }
.hero-compact .hero-title { font-size: 1.2rem; margin-bottom: 0; }
.hero-compact .hero-sub,
.hero-compact .example-chips { display: none; }

.hero-title { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.hero-title .highlight { color: #fbbf24; }
.hero-sub { font-size: 1.05rem; opacity: .9; margin-bottom: 24px; }

/* Example chips */
.example-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}
.chip {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: .85rem;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}
.chip:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); }

/* ---- CHAT THREAD ---- */
.chat-thread {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    scroll-behavior: smooth;
}

/* Individual chat bubble row */
.chat-bubble {
    max-width: 82%;
    animation: fadeUp .3s cubic-bezier(.22,1,.36,1);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-ai, .chat-ai-thinking { align-self: flex-start; }

/* Avatar circles */
.bubble-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.chat-user .bubble-avatar {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}
.chat-ai .bubble-avatar,
.chat-ai-thinking .bubble-avatar {
    background: linear-gradient(135deg, #f0f9ff, #e0e7ff);
    color: var(--clr-primary);
    border: 1.5px solid var(--clr-border);
}

/* Bubble wrapper (content + timestamp) */
.bubble-wrap { min-width: 0; flex: 1; }

/* Bubble content */
.bubble-content {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: .92rem;
    line-height: 1.6;
    word-break: break-word;
}
.chat-user .bubble-content {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(79,70,229,.2);
}
.chat-ai .bubble-content {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
}
.chat-ai-thinking .bubble-content {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-bottom-left-radius: 6px;
    color: var(--clr-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sender name label */
.bubble-sender {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
    opacity: .85;
}
.chat-user .bubble-sender { color: rgba(255,255,255,.8); }
.chat-ai .bubble-sender { color: var(--clr-primary); }

/* Timestamp */
.bubble-time {
    display: block;
    font-size: .68rem;
    color: #94a3b8;
    margin-top: 5px;
    letter-spacing: .02em;
}
.chat-user .bubble-time { text-align: right; }

/* Typing indicator dots */
.typing-dots { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dots span {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* AI response sub-elements */
.rec-highlights {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rec-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--clr-primary);
    transition: background .2s, transform .15s;
}
.rec-item:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e8ecff 100%);
    transform: translateX(3px);
}
.rec-rank {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(79,70,229,.25);
}
.rec-info { flex: 1; min-width: 0; }
.rec-name { font-weight: 600; font-size: .88rem; margin-bottom: 4px; color: var(--clr-text); }
.rec-reason { font-size: .82rem; color: var(--clr-muted); margin-bottom: 6px; line-height: 1.5; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rec-tag {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 3px 10px;
    border-radius: 20px;
}
.tag-top-pick { background: #fef3c7; color: #92400e; }
.tag-best-value { background: #d1fae5; color: #065f46; }
.tag-budget-friendly { background: #e0e7ff; color: #3730a3; }
.tag-premium { background: #fce7f3; color: #9d174d; }
.tag-highly-rated, .tag-top-rated { background: #fef9c3; color: #854d0e; }
.tag-great-deal { background: #dcfce7; color: #166534; }
.rec-score {
    font-size: .72rem;
    color: var(--clr-muted);
    font-weight: 500;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
}

.ai-tip {
    margin-top: 14px;
    font-size: .84rem;
    color: var(--clr-muted);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--clr-accent);
    line-height: 1.55;
}
.ai-mode-note {
    margin-top: 10px;
    font-size: .78rem;
    background: #eff6ff;
    color: #1e40af;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid #3b82f6;
}
.ai-mode-note code { background: #dbeafe; padding: 1px 5px; border-radius: 3px; font-size: .76rem; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- CHAT WELCOME ---- */
.chat-welcome {
    text-align: center;
    padding: 32px 20px;
    animation: fadeUp .4s ease;
}
.chat-welcome-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: block;
}
.chat-welcome h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 6px;
}
.chat-welcome p {
    font-size: .85rem;
    color: var(--clr-muted);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.55;
}

/* Quick action buttons inside chat */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}
.chat-quick-btn {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: .82rem;
    color: var(--clr-text);
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.chat-quick-btn:hover {
    background: var(--clr-primary);
    color: #fff;
    border-color: var(--clr-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79,70,229,.2);
}

/* ---- STICKY CHAT INPUT ---- */
.chat-input-bar {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--clr-surface) 80%, transparent);
    padding: 16px 0 20px;
    z-index: 80;
}
.chat-form {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 8px 8px 22px;
    background: var(--clr-surface);
    border: 1.5px solid var(--clr-border);
    border-radius: 60px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
    transition: border-color .25s, box-shadow .25s;
}
.chat-form:focus-within {
    border-color: var(--clr-primary);
    box-shadow: 0 4px 24px rgba(79,70,229,.12), 0 0 0 3px rgba(79,70,229,.08);
}
.chat-form input {
    flex: 1;
    border: none;
    padding: 14px 4px;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    outline: none;
    color: var(--clr-text);
    letter-spacing: -.01em;
}
.chat-form input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.send-btn {
    background: var(--clr-primary);
    color: #fff;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s, box-shadow .2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.send-btn:hover { background: var(--clr-primary-hover); transform: scale(1.06); box-shadow: 0 4px 14px rgba(79,70,229,.35); }
.send-btn:active { transform: scale(.96); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.send-btn svg { width: 20px; height: 20px; }

/* Mic button */
.mic-btn {
    background: transparent;
    color: #64748b;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, transform .15s;
    flex-shrink: 0;
    position: relative;
}
.mic-btn:hover { background: #f1f5f9; color: var(--clr-primary); transform: scale(1.06); }
.mic-btn svg { width: 20px; height: 20px; }
.mic-btn .hidden { display: none; }
.mic-btn.recording {
    color: #ef4444;
    background: rgba(239,68,68,.08);
    animation: mic-pulse 1.2s ease-in-out infinite;
}
.mic-btn.recording .mic-icon { display: none; }
.mic-btn.recording .mic-stop-icon { display: block; }
@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.3); }
    50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}
.mic-btn.unsupported { display: none; }
.mic-lang-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: .55rem;
    background: var(--clr-primary);
    color: #fff;
    padding: 1px 4px;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.3;
    pointer-events: none;
}
.input-hint {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: .74rem;
    color: #94a3b8;
    letter-spacing: .01em;
}
.input-hint span { display: flex; align-items: center; gap: 4px; }
.input-hint kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: .7rem;
}

/* ---- FILTERS BAR ---- */
.filters-bar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0;
    position: sticky;
    top: 52px;
    z-index: 90;
}
.filters-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label { font-size: .82rem; color: var(--clr-muted); font-weight: 500; }
.filter-group select {
    padding: 7px 10px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    background: #fff;
    cursor: pointer;
}
.filter-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.results-count { font-size: .85rem; color: var(--clr-muted); white-space: nowrap; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-accent { background: var(--clr-accent); color: #fff; }
.btn-accent:hover { background: var(--clr-accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- PRODUCT GRID ---- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    padding: 24px 0 40px;
}

/* ---- PRODUCT CARD ---- */
.product-card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .15s;
    position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card.selected { outline: 3px solid var(--clr-primary); }
.product-card.recommended { outline: 2px solid #a78bfa; }

.card-select {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    accent-color: var(--clr-primary);
    cursor: pointer;
    z-index: 2;
}

.card-site {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    z-index: 2;
}
.site-flipkart { background: var(--clr-flipkart); }
.site-amazon { background: var(--clr-amazon); }
.site-myntra { background: var(--clr-myntra); }

.card-rec-badge {
    position: absolute;
    top: 38px;
    right: 10px;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    z-index: 2;
}

.card-img-wrap {
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; padding: 8px; }
.card-img-wrap .no-img { color: var(--clr-muted); font-size: .85rem; }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-name {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-price { font-size: 1.15rem; font-weight: 700; color: var(--clr-primary); }
.card-original { font-size: .82rem; color: var(--clr-muted); text-decoration: line-through; }
.card-discount { font-size: .8rem; color: #16a34a; font-weight: 600; }
.card-rating { font-size: .8rem; color: var(--clr-accent); }
.card-rec-reason {
    font-size: .78rem;
    color: #6d28d9;
    background: #f5f3ff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    line-height: 1.4;
}

.card-cta {
    display: block;
    text-align: center;
    padding: 12px 14px;
    background: var(--clr-primary);
    color: #fff;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: background .2s;
}
.card-cta:hover { background: var(--clr-primary-hover); }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--clr-muted); font-size: .95rem; }

/* ---- MODAL (Compare) ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal {
    background: var(--clr-surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--clr-border);
}
.modal-header h2 { font-size: 1.1rem; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--clr-muted);
    line-height: 1;
}
.modal-body { overflow: auto; padding: 16px 24px 24px; }

/* ---- COMPARE TABLE ---- */
.compare-table-wrap { overflow-x: auto; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.compare-table th, .compare-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--clr-border);
    vertical-align: top;
    min-width: 160px;
}
.compare-table th.attr-col { width: 100px; min-width: 100px; position: sticky; left: 0; background: var(--clr-surface); z-index: 1; }
.compare-table td img { max-height: 80px; border-radius: 6px; }
.compare-table .best-price { background: #ecfdf5; font-weight: 700; color: #065f46; padding: 4px 8px; border-radius: 4px; }
.cta-link { color: var(--clr-primary); font-weight: 600; text-decoration: none; }
.cta-link:hover { text-decoration: underline; }

/* ---- INDEXING BANNER ---- */
.indexing-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #eff6ff;
    color: #1e40af;
    text-align: center;
    padding: 10px 20px;
    font-size: .85rem;
    border-top: 1px solid #bfdbfe;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ---- FOOTER ---- */
/* ---- FOOTER / AFFILIATE DISCLOSURE ---- */
.footer { margin-top: auto; padding: 20px 0; text-align: center; color: var(--clr-muted); font-size: .8rem; }
.affiliate-footer {
    margin-top: auto;
    padding: 24px 0 100px;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    background: #f8fafc;
    position: relative;
    z-index: 90;
}
.affiliate-disclosure {
    font-size: .78rem;
    color: var(--clr-muted);
    max-width: 700px;
    margin: 0 auto 8px;
    line-height: 1.6;
}
.affiliate-disclosure strong { color: var(--clr-text); }
.footer-copy { font-size: .75rem; color: #94a3b8; }
.footer-links { margin-top: 8px; font-size: .85rem; }
.footer-links .nav-contact-link { color: #818cf8; text-decoration: none; }
.footer-links .nav-contact-link:hover { text-decoration: underline; }

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.error-msg { color: #dc2626; padding: 20px; text-align: center; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid #bfdbfe;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- WISHLIST HEART BUTTON ---- */
.card-wishlist {
    position: absolute;
    top: 10px;
    left: 38px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255,255,255,.85);
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform .2s, background .2s;
    filter: grayscale(1);
    opacity: .6;
}
.card-wishlist:hover { transform: scale(1.2); opacity: 1; filter: none; }
.card-wishlist.wishlisted { filter: none; opacity: 1; background: rgba(255,255,255,.95); }
.btn-wishlist-nav {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ---- CARD ACTIONS ROW ---- */
.card-actions {
    display: flex;
    align-items: stretch;
}
.card-actions .card-cta {
    flex: 1;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-share {
    width: 46px;
    border: none;
    background: var(--clr-primary-hover);
    color: #fff;
    cursor: pointer;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.card-share:hover { background: #3730a3; }

/* ---- SHARE MENU ---- */
.share-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.share-menu {
    background: var(--clr-surface);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.share-menu h3 { font-size: 1.1rem; margin-bottom: 16px; }
.share-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.share-opt {
    padding: 12px 16px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: var(--clr-bg);
    cursor: pointer;
    font-size: .9rem;
    font-family: inherit;
    transition: background .2s;
}
.share-opt:hover { background: #e0e7ff; }
.share-menu-close {
    background: none;
    border: none;
    color: var(--clr-muted);
    font-size: .85rem;
    cursor: pointer;
    font-family: inherit;
}

/* ---- AI FEEDBACK ---- */
.ai-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--clr-border);
}
.feedback-label { font-size: .76rem; color: var(--clr-muted); }
.feedback-btn {
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: .85rem;
    transition: background .2s, transform .15s;
}
.feedback-btn:hover { background: #f0f4ff; transform: scale(1.1); }
.feedback-btn.voted { background: #e0e7ff; border-color: var(--clr-primary); }
.feedback-btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ---- RECENT SEARCHES ---- */
.recent-searches {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.recent-label { font-size: .78rem; color: rgba(255,255,255,.7); margin: 0; white-space: nowrap; }
.recent-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip-recent {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
    font-size: .76rem;
    padding: 5px 12px;
}

/* ---- DAILY DEALS ---- */
.deals-section {
    padding: 24px 0;
}
.deals-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--clr-text);
}
.deals-site-groups {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.deals-site-group {
    background: var(--clr-surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--clr-border);
}
.deals-site-flipkart { border-left-color: var(--clr-flipkart); }
.deals-site-amazon   { border-left-color: var(--clr-amazon); }
.deals-site-myntra   { border-left-color: var(--clr-myntra); }
.deals-site-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.deals-site-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.deals-site-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}
.deals-site-count {
    margin-left: auto;
    font-size: .75rem;
    color: var(--clr-muted);
    font-weight: 500;
    background: var(--clr-bg);
    padding: 2px 10px;
    border-radius: 20px;
}
.deals-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* Flipkart Affiliate Widgets */
.fk-affiliate-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--clr-border);
}
.fk-affiliate-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--clr-flipkart);
    margin: 0 0 12px 0;
}
.fk-affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.fk-affiliate-grid > div {
    min-height: 250px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f8fafc;
}
.deal-card {
    min-width: 200px;
    max-width: 220px;
    background: var(--clr-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .15s, box-shadow .2s;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.deal-img {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
}
.deal-img img { max-height: 100%; max-width: 100%; object-fit: contain; padding: 6px; }
.deal-info { padding: 10px; flex: 1; }
.deal-name { font-size: .8rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.deal-price { font-size: .95rem; font-weight: 700; color: var(--clr-primary); }
.deal-original { font-size: .75rem; color: var(--clr-muted); text-decoration: line-through; margin-left: 4px; }
.deal-cta {
    display: block;
    text-align: center;
    padding: 8px;
    background: var(--clr-primary);
    color: #fff;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    transition: background .2s;
}
.deal-cta:hover { background: var(--clr-primary-hover); }
.deal-cta-flipkart { background: var(--clr-flipkart); }
.deal-cta-flipkart:hover { background: #1a5dc7; }
.deal-cta-amazon { background: var(--clr-amazon); color: #111; }
.deal-cta-amazon:hover { background: #e68a00; }
.deal-cta-myntra { background: var(--clr-myntra); }
.deal-cta-myntra:hover { background: #e0345c; }

/* ---- COMPARE SUMMARY ---- */
.compare-summary {
    padding: 14px 24px;
    border-bottom: 1px solid var(--clr-border);
}
.compare-summary-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85rem;
    color: var(--clr-muted);
}
.compare-summary-text {
    font-size: .88rem;
    line-height: 1.6;
    color: var(--clr-text);
}

/* ---- RESPONSIVE ---- */

/* Tablet & small desktop */
@media (max-width: 1024px) {
    .container { padding: 0 16px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
    .hero { padding: 50px 0 36px; }
    .hero-title { font-size: 2.2rem; }
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 12px; }

    /* Nav */
    .nav-inner { flex-direction: column; text-align: center; gap: 8px; }
    .nav-actions { flex-wrap: wrap; justify-content: center; }
    .nav-stats { justify-content: center; }
    .nav-pill { font-size: .7rem; padding: 3px 8px; }
    .nav-logo { height: 28px; }

    /* Hero */
    .hero { padding: 40px 0 30px; }
    .hero-title { font-size: 1.7rem; }
    .hero-sub { font-size: .9rem; margin-bottom: 18px; padding: 0 8px; }
    .hero-compact { padding: 16px 0 12px; }
    .hero-compact .hero-title { font-size: 1rem; }

    /* Example chips */
    .example-chips {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 8px;
        padding: 0 16px 10px;
        margin: 0 -12px;
        max-width: none;
        width: calc(100% + 24px);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .example-chips::-webkit-scrollbar { display: none; }
    .chip {
        padding: 7px 14px;
        font-size: .8rem;
        flex-shrink: 0;
    }
    .chip:hover { transform: none; }

    /* Chat input */
    .chat-form { padding: 6px 6px 6px 14px; margin: 0 4px; gap: 6px; }
    .chat-form input {
        padding: 10px 2px;
        font-size: .88rem;
        min-width: 0;
        text-overflow: ellipsis;
    }
    .chat-form input::placeholder {
        font-size: .76rem;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }
    .send-btn { width: 40px; height: 40px; }
    .send-btn svg { width: 18px; height: 18px; }
    .mic-btn { width: 36px; height: 36px; }
    .mic-btn svg { width: 18px; height: 18px; }
    .input-hint {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
        font-size: .65rem;
        justify-content: center;
        margin-top: 6px;
    }
    .input-hint .mic-hint {
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .input-hint kbd { font-size: .6rem; padding: 0 4px; }
    .chat-input-bar { padding: 10px 0 14px; }

    /* Chat thread */
    .chat-thread { padding: 16px 8px 8px; gap: 14px; }
    .chat-bubble { max-width: 96%; }
    .bubble-avatar { width: 28px; height: 28px; font-size: .72rem; }
    .bubble-content { padding: 10px 12px; font-size: .85rem; line-height: 1.5; }
    .rec-item { padding: 10px 10px; flex-direction: column; gap: 8px; }
    .rec-item:hover { transform: none; }
    .rec-rank { width: 26px; height: 26px; font-size: .7rem; }
    .rec-name { font-size: .84rem; }
    .rec-reason { font-size: .78rem; }
    .rec-tags { gap: 4px; }
    .rec-tag { font-size: .64rem; padding: 2px 8px; }
    .ai-tip { font-size: .8rem; padding: 8px 12px; }
    .ai-mode-note { font-size: .74rem; padding: 8px 12px; }
    .chat-quick-btn { padding: 6px 12px; font-size: .78rem; }

    /* Filters */
    .filters-bar { padding: 10px 0; top: auto; position: relative; }
    .filters-inner { flex-direction: column; align-items: stretch; gap: 10px; }
    .filter-group { width: 100%; }
    .filter-group select { flex: 1; width: 100%; }
    .filter-right { margin-left: 0; justify-content: space-between; }

    /* Product grid */
    .product-grid { grid-template-columns: 1fr; gap: 12px; padding: 16px 0 30px; }
    .card-img-wrap { height: 180px; }
    .card-body { padding: 12px; }
    .card-name { font-size: .85rem; }
    .card-price { font-size: 1.05rem; }
    .card-cta { padding: 10px 12px; font-size: .84rem; }

    /* Compare modal */
    .modal-overlay { padding: 8px; }
    .modal { max-width: 100%; max-height: 95vh; border-radius: 10px; }
    .modal-header { padding: 14px 16px; }
    .modal-header h2 { font-size: 1rem; }
    .modal-body { padding: 12px 14px 18px; }
    .compare-table th, .compare-table td { padding: 8px 10px; min-width: 130px; font-size: .8rem; }

    /* Footer */
    .affiliate-footer { padding: 18px 0 110px; }
    .affiliate-disclosure { font-size: .72rem; padding: 0 8px; }
    .footer-copy { font-size: .72rem; }

    /* Deals */
    .deals-carousel { gap: 10px; }
    .deal-card { min-width: 160px; max-width: 180px; }
    .deal-img { height: 90px; }
    .deal-name { font-size: .72rem; }
    .deal-price { font-size: .85rem; }

    /* Share menu */
    .share-menu { padding: 18px; }

    /* Wishlist */
    .card-wishlist { left: 34px; width: 26px; height: 26px; font-size: .75rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .hero { padding: 30px 0 22px; }
    .hero-title { font-size: 1.4rem; }
    .hero-sub { font-size: .84rem; }

    .nav-stats { display: flex; gap: 4px; justify-content: center; }
    .nav-pill { font-size: .65rem; padding: 2px 6px; }
    .nav-inner { flex-direction: row; }
    .nav-logo { height: 26px; }

    .chat-form { border-radius: 28px; }
    .chat-form input::placeholder { font-size: .72rem; }
    .send-btn { width: 38px; height: 38px; }
    .mic-btn { width: 34px; height: 34px; }

    .product-grid { gap: 10px; padding: 12px 0 24px; }
    .card-img-wrap { height: 160px; }
    .card-rec-badge { font-size: .62rem; top: 34px; }

    .bubble-content { padding: 8px 10px; font-size: .82rem; }
    .rec-item { padding: 8px; }

    .chat-welcome h3 { font-size: .95rem; }
    .chat-welcome p { font-size: .8rem; }
    .chat-welcome-icon { font-size: 1.8rem; }

    .example-chips {
        gap: 6px;
        padding: 0 12px 8px;
        margin: 0 -10px;
        width: calc(100% + 20px);
    }
    .chip {
        padding: 6px 12px;
        font-size: .74rem;
    }

    .input-hint .mic-hint { max-width: 180px; }
    .input-hint { font-size: .6rem; gap: 4px 8px; }
}
