@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary: #2563eb;
    --bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #f3f4f6;
    --pill-bg: rgba(255, 255, 255, 0.95);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Nav */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo { font-weight: 600; font-size: 1.25rem; color: var(--primary); text-decoration: none; }
nav a { text-decoration: none; color: var(--text); margin-left: 1.5rem; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
nav a:hover { color: var(--primary); }

/* Layout */
main { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 12rem 2rem; }
section { margin-bottom: 4rem; }
h1 { font-size: 3.5rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
p.subtitle { font-size: 1.25rem; color: var(--muted); margin-bottom: 3rem; max-width: 650px; }

/* Grid Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem; }
.card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: all 0.3s ease; background: white; }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.card img { width: 100%; height: 240px; object-fit: cover; }
.card-content { padding: 1.5rem; }
.card-price { font-weight: 600; color: var(--primary); margin-top: 0.5rem; font-size: 1.1rem; }

/* Floating Command Bar */
#command-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 650px;
    z-index: 1000;
}

.command-bar {
    background: var(--pill-bg);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 999px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.command-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 1.2rem;
    font-size: 1.05rem;
    outline: none;
    color: var(--text);
}

.btn-history, .btn-send {
    background: none;
    border: none;
    color: var(--muted);
    padding: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-radius: 50%;
}
.btn-send { color: var(--primary); background: rgba(37, 99, 235, 0.05); }
.btn-history:hover { color: var(--primary); background: rgba(0,0,0,0.03); }

/* Chat Overlay */
#chat-overlay {
    position: absolute;
    bottom: 5.5rem;
    left: 0;
    right: 0;
    background: var(--pill-bg);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 28px;
    max-height: 55vh;
    overflow-y: auto;
    display: none;
    padding: 1.8rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 1.2rem;
}

.msg { max-width: 80%; padding: 1rem 1.2rem; border-radius: 18px; font-size: 0.98rem; }
.msg.user { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: white; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }

/* Footer */
footer { text-align: center; padding: 6rem 2rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    nav { display: none; }
    #command-container { bottom: 1rem; width: 94%; }
}

/* Typing Indicator */
.typing { display: flex; gap: 4px; padding: 0.8rem 1rem !important; min-width: 60px; justify-content: center; }
.dot { width: 6px; height: 6px; background: #cbd5e1; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
