/* ─── Design System: The Best 7 ─────────────────────────────────────────── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2235;
    --bg-elevated: #1f2a40;
    --bg-glass: rgba(26, 34, 53, 0.95);
    --text-primary: #f0f4ff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-glow: rgba(16, 185, 129, 0.18);
    --accent-2: #6366f1;
    --accent-2-glow: rgba(99, 102, 241, 0.15);
    --gold: #f59e0b;
    --red: #ef4444;
    --border: rgba(148, 163, 184, 0.1);
    --border-active: rgba(148, 163, 184, 0.22);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
    --transition: 0.18s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --chat-width: 360px;
    --header-height: 52px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
select {
    font-family: inherit;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
}

.logo-text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.logo-text span {
    color: var(--accent);
}

.header-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP LAYOUT  (≥ 768px)  —  split: chat left, content right
   ═══════════════════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    height: 100vh;
    padding-top: var(--header-height);
    overflow: hidden;
}

/* ── LEFT: Chat Panel (sticky, full height) ── */
.chat-panel {
    width: var(--chat-width);
    min-width: var(--chat-width);
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.chat-panel-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.05));
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-panel-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.chat-panel-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.chat-panel-name {
    font-weight: 700;
    font-size: 0.92rem;
}

.chat-panel-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-online-dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 7px var(--accent);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* ── RIGHT: Content Panel (scrollable) ── */
.content-panel {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

.content-panel::-webkit-scrollbar {
    width: 5px;
}

.content-panel::-webkit-scrollbar-track {
    background: transparent;
}

.content-panel::-webkit-scrollbar-thumb {
    background: var(--border-active);
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT MESSAGES  (shared desktop + mobile)
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-active);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    animation: fadeSlideUp 0.22s ease;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.chat-message.user .chat-avatar {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
}

.chat-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    border-top-left-radius: 4px;
    max-width: 90%;
    color: var(--text-primary);
    font-size: 0.84rem;
    line-height: 1.55;
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, var(--accent), #059669);
    border: none;
    border-top-right-radius: 4px;
    border-top-left-radius: var(--radius);
    color: white;
}

.chat-bubble strong {
    color: var(--accent-hover);
}

.chat-message.user .chat-bubble strong {
    color: #d1fae5;
}

.chat-bubble p {
    margin: 0.25em 0;
}

.chat-bubble p:first-child {
    margin-top: 0;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble a {
    color: var(--accent-hover);
    text-decoration: underline;
    font-size: 0.82rem;
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 0.2rem 0;
}

.chat-typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: bounce 1.4s infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-suggestion {
    white-space: nowrap;
    padding: 0.3rem 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    transition: all var(--transition);
}

.chat-suggestion:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--text-primary);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.55rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.84rem;
    outline: none;
    transition: border var(--transition);
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: white;
    display: grid;
    place-items: center;
    transition: transform var(--transition), opacity var(--transition);
    flex-shrink: 0;
}

.chat-send:hover {
    transform: scale(1.06);
}

.chat-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ─── Chat Product Cards ─────────────────────────────────────────────────── */
.chat-product-card {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
    transition: border var(--transition), transform var(--transition);
    cursor: pointer;
}

.chat-product-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.chat-product-img-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.chat-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.chat-product-img-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--bg-elevated);
    font-size: 1.2rem;
}

.chat-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.chat-product-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent-hover);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.chat-product-price {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-product-buy {
    display: inline-block;
    align-self: flex-start;
    padding: 0.18rem 0.5rem;
    background: var(--accent);
    border-radius: 4px;
    color: white;
    font-size: 0.68rem;
    font-weight: 600;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.chat-product-buy:hover {
    opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT PANEL — CATEGORIES + PRODUCTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Categories (collapsible) ── */
.categories-section {
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.categories-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    gap: 1rem;
}

.categories-toggle:hover {
    background: var(--bg-elevated);
}

.categories-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.categories-toggle-arrow {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.categories-toggle.open .categories-toggle-arrow {
    transform: rotate(180deg);
}

.categories-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 1.5rem;
}

.categories-panel.open {
    max-height: 700px;
    padding: 0.65rem 1.5rem 1.1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.55rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
}

.category-card:hover {
    border-color: var(--border-active);
    background: var(--bg-elevated);
}

.category-card.expanded {
    border-color: var(--accent);
}

.category-card-header {
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.category-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-size: 0.66rem;
    color: var(--text-muted);
}

.category-expand {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.category-card.expanded .category-expand {
    transform: rotate(90deg);
}

.category-children {
    display: none;
    padding: 0 0.65rem 0.65rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.category-children.open {
    display: flex;
}

.subcategory-btn {
    padding: 0.22rem 0.55rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    gap: 0.28rem;
    transition: all var(--transition);
}

.subcategory-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-glow);
}

.subcategory-count {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.06rem 0.28rem;
    border-radius: 3px;
}

/* ── Products ── */
.products-section {
    padding: 1.25rem 1.5rem 2rem;
}

.products-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-wrapper-sm {
    position: relative;
}

.search-wrapper-sm .search-bar {
    padding: 0.48rem 0.85rem 0.48rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 185px;
    outline: none;
    transition: border var(--transition);
}

.search-wrapper-sm .search-bar:focus {
    border-color: var(--accent);
}

.search-wrapper-sm .search-bar::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    pointer-events: none;
}

.filter-select {
    padding: 0.48rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    transition: border var(--transition);
}

.filter-select:focus {
    border-color: var(--accent);
}

/* ── Product Grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
}

.product-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-elevated);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.product-body {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.product-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.4rem;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-hover);
}

.product-rrp {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-discount {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: var(--red);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.product-cta {
    display: block;
    text-align: center;
    margin: 0.5rem 0.75rem 0.75rem;
    padding: 0.45rem;
    background: linear-gradient(135deg, var(--accent), #059669);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    transition: opacity var(--transition);
}

.product-cta:hover {
    opacity: 0.88;
}

/* ── Loading / Pagination / Load More ── */
.loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-active);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    padding: 1.5rem 0 0;
}

.page-btn {
    padding: 0.4rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 1.25rem 0 0.5rem;
}

.load-more-btn {
    padding: 0.7rem 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-active);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition);
}

.load-more-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.load-more-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ─── Product Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.18s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    background: var(--bg-elevated);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--red);
    color: white;
}

.modal-product-image {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius);
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
}

.modal-product-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.modal-product-brand {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.modal-product-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.modal-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 1rem 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.offer-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
}

.offer-row.offer-best {
    border-color: var(--gold);
}

.offer-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}

.offer-merchant {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    min-width: 100px;
}

.offer-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-hover);
    white-space: nowrap;
}

.offer-link {
    padding: 0.3rem 0.75rem;
    background: var(--accent);
    border-radius: 6px;
    color: white;
    font-size: 0.76rem;
    font-weight: 600;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.offer-link:hover {
    opacity: 0.85;
}

.coupon-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
}

.coupon-code {
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.18);
    color: var(--gold);
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.coupon-desc {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 80px;
}

.coupon-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-hover);
    white-space: nowrap;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.footer-brand span {
    color: var(--accent);
}

.footer p {
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.5rem 0;
}

.footer-link {
    font-size: 0.74rem;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

.footer-link:hover {
    color: var(--text-secondary);
}

.footer-disclaimer {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Cookie Banner ──────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cookie-banner.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner-inner {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-active);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.cookie-banner-text {
    flex: 1;
    min-width: 140px;
}

.cookie-banner-text strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.88rem;
}

.cookie-banner-text p {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cookie-link {
    color: var(--accent-hover);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.55rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.cookie-btn:hover {
    opacity: 0.85;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.cookie-btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.55;
        transform: scale(0.82);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE LAYOUT  (< 768px)  —  chat-first, Claude-style
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ═══ STACKED LAYOUT ═══ */
    .app-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: visible;
        padding-top: var(--header-height);
    }

    /* ═══ CHAT — fills viewport like Claude / ChatGPT ═══
       Takes full screen height minus header. Messages grow to fill
       all space. Input bar pinned at bottom, always visible.
       User scrolls PAST the chat to see products below the fold.
    */
    .chat-panel {
        width: 100%;
        min-width: unset;
        height: calc(100dvh - var(--header-height));
        min-height: 420px;
        position: static;
        border-right: none;
        border-bottom: 2px solid var(--border-active);
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
    }

    /* Header — compact */
    .chat-panel-header {
        padding: 0.6rem 0.85rem;
    }

    .chat-panel-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .chat-panel-name {
        font-size: 0.84rem;
    }

    .chat-panel-sub {
        font-size: 0.64rem;
    }

    /* Messages — flex-grow fills all remaining space */
    .chat-messages {
        flex: 1;
        min-height: 0;
        max-height: none;
        padding: 0.7rem;
        gap: 0.65rem;
    }

    .chat-bubble {
        font-size: 0.82rem;
        padding: 0.55rem 0.75rem;
        max-width: 92%;
    }

    .chat-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.78rem;
    }

    /* Suggestions — horizontal scroll, no wrap */
    .chat-suggestions {
        padding: 0.3rem 0.7rem;
        gap: 0.25rem;
        flex-shrink: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .chat-suggestions::-webkit-scrollbar {
        display: none;
    }

    .chat-suggestion {
        font-size: 0.71rem;
        padding: 0.22rem 0.55rem;
        flex-shrink: 0;
    }

    /* Input bar — ALWAYS visible, never cut off */
    .chat-input-wrapper {
        padding: 0.5rem 0.7rem;
        flex-shrink: 0;
        gap: 0.45rem;
    }

    .chat-input {
        font-size: 16px;
        padding: 0.6rem 0.8rem;
        min-height: 44px;
    }

    .chat-send {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 10px;
    }

    /* ═══ BELOW THE FOLD ═══ */
    .content-panel {
        overflow-y: visible;
        height: auto;
    }

    /* Categories */
    .categories-toggle {
        padding: 0.75rem 1rem;
        font-size: 0.86rem;
    }

    .categories-panel {
        padding: 0 1rem;
    }

    .categories-panel.open {
        padding: 0.5rem 1rem 1rem;
        max-height: 800px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.4rem;
    }

    /* Products */
    .products-section {
        padding: 1rem 0.85rem 1.5rem;
    }

    .section-title {
        font-size: 1.05rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filters {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
    }

    .search-wrapper-sm {
        width: 100%;
    }

    .search-wrapper-sm .search-bar {
        width: 100%;
        font-size: 16px;
    }

    .filter-select {
        width: 100%;
        font-size: 16px;
        padding: 0.5rem 0.7rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .product-card {
        flex-direction: row;
        align-items: flex-start;
    }

    .product-image,
    .product-image-placeholder {
        width: 88px;
        min-width: 88px;
        height: 88px;
        aspect-ratio: unset;
        border-radius: 8px;
    }

    .product-body {
        padding: 0.5rem 0.6rem 0.5rem 0;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-desc {
        font-size: 0.72rem;
    }

    .product-cta {
        margin: 0.35rem 0 0;
        padding: 0.35rem;
        font-size: 0.74rem;
    }

    .pagination {
        display: none !important;
    }

    .load-more-wrap {
        display: flex !important;
    }

    .header-nav {
        display: none;
    }

    .header {
        padding: 0 0.85rem;
    }

    .cookie-banner-inner {
        padding: 0.5rem 0.85rem;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }

    .cookie-banner-text p {
        display: none;
    }

    .cookie-banner-text strong {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .cookie-btn {
        padding: 0.32rem 0.7rem;
        font-size: 0.74rem;
    }

    .modal-overlay {
        padding: 0.4rem;
    }

    .modal-content {
        max-height: 95vh;
        padding: 1rem;
        border-radius: var(--radius);
    }

    .footer {
        padding: 1.25rem 1rem;
    }
}
