/* ================================================
   AGRI AI — REBUILT DESIGN SYSTEM
   Anti-gravity Glassmorphism & High-end Aesthetics
   ================================================ */

:root {
    /* Primary Color Palette (Deep Greens) */
    --g-950: #071a0d;
    --g-900: #0a2614;
    --g-800: #164a28;
    --g-700: #1e6b38;
    --g-600: #2a8a4a;
    --g-500: #3eaf60;
    --g-400: #5ecc7e;
    --g-300: #8ae0a0;
    --g-200: #b8f0c8;
    --g-100: #d8f8e4;
    --g-50: #eefdf3;

    /* Semantic Accents */
    --accent-amber: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-rose: #f43f5e;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;

    /* Neutrals */
    --n-900: #0b1117;
    --n-800: #141e28;
    --n-700: #253545;
    --n-600: #3a5060;
    --n-500: #5a7080;
    --n-400: #7a90a0;
    --n-300: #a0b4c4;
    --n-200: #c4d2dc;
    --n-100: #e2eaf0;
    --white: #ffffff;

    /* Glass System Controls - More White Mixture */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-border-hi: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(24px) saturate(200%);
    --glass-blur-sm: blur(14px) saturate(180%);

    /* Shadows & Effects */
    --sh-float: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    --sh-glow-green: 0 0 30px rgba(62, 175, 96, 0.2);
    
    /* Typography & Transitions */
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --nav-h: 70px;
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--n-900);
    color: var(--white);
    font-family: var(--font);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* --- Animated Cosmos Background --- */
.ag-cosmos {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(160deg, #0a1f12 0%, #07140b 100%);
}

.ag-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
}

.ag-orb-1 { width: 50vw; height: 50vw; background: radial-gradient(circle, var(--g-600), transparent 70%); top: -10%; left: -10%; animation: drift 25s ease-in-out infinite; }
.ag-orb-2 { width: 40vw; height: 40vw; background: radial-gradient(circle, var(--accent-blue), transparent 70%); bottom: -5%; right: -5%; animation: drift 30s ease-in-out infinite reverse; }
.ag-orb-3 { width: 30vw; height: 30vw; background: radial-gradient(circle, var(--accent-purple), transparent 70%); top: 40%; left: 30%; animation: drift 20s ease-in-out infinite 2s; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 40px) scale(1.1); }
}

.ag-grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Hero Background Layer --- */
.hero-bg-layer {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 85vh;
    background: url('hero.png') center/cover no-repeat;
    background-blend-mode: overlay;
    mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%),
                linear-gradient(to bottom, black 50%, transparent);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 85%),
                        linear-gradient(to bottom, black 60%, transparent);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    opacity: 0.35;
    z-index: -1;
    filter: saturate(1.2) brightness(1.1);
    border-bottom-left-radius: 50% 80px; /* Added curve */
    border-bottom-right-radius: 50% 80px; /* Added curve */
}

/* --- Glass Utilities --- */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-sm {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1rem;
}

.float-card {
    transition: transform 0.4s var(--easing-spring), box-shadow 0.4s var(--easing);
}

.float-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--sh-float);
    border-color: var(--glass-border-hi);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 1.5rem; left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    height: 60px;
    width: 90%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    background: rgba(10, 31, 18, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px; /* Highly curved */
    transition: all 0.4s var(--easing-spring);
}

.navbar.scrolled {
    background: rgba(10, 31, 18, 0.8);
    top: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--white);
}

.nav-logo { font-size: 1.75rem; }

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--n-300);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--g-300);
    background: rgba(62, 175, 96, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-float {
    position: relative;
    display: flex;
    align-items: center;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    border-radius: 50px;
}

#langDropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 160px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 2000;
}

#langDropdown.show { display: flex; }

.lang-opt {
    text-align: left;
    background: none;
    border: none;
    color: white;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.lang-opt:hover { background: rgba(255,255,255,0.1); }
.lang-opt.active { color: var(--g-300); font-weight: 700; }

.nav-cta {
    background: linear-gradient(135deg, var(--g-500), var(--g-700));
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(62, 175, 96, 0.3);
    transition: 0.3s var(--easing-spring);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 175, 96, 0.4);
}

/* Mobile Menu Button */
.nav-burger {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px; height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 12px;
}

.nav-burger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--n-200);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Screens --- */
.screen {
    display: none;
    min-height: 100vh;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 4rem;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-image-wrap {
    display: none;
}

.hero-glow {
    background: linear-gradient(to bottom, #fff, var(--g-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: var(--n-300);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.btn-glow {
    background: var(--g-500);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 0 20px rgba(62, 175, 96, 0.4);
    transition: 0.3s;
}

.btn-glow:hover {
    transform: scale(1.05);
    background: var(--g-400);
    box-shadow: 0 0 30px rgba(62, 175, 96, 0.6);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat strong { font-size: 1.75rem; color: var(--g-300); }
.hero-stat span { font-size: 0.8rem; color: var(--n-400); text-transform: uppercase; letter-spacing: 1px; }

/* --- Features Grid --- */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feat-card {
    padding: 2.5rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.feat-icon-wrap {
    width: 60px; height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.feat-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.feat-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.feat-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.feat-rose { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }

.feat-card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }
.feat-card p { color: var(--n-400); font-size: 0.95rem; }

/* --- Metric Dashboard --- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.metric-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.metric-icon { font-size: 1.5rem; }
.metric-data { display: flex; flex-direction: column; }
.metric-label { font-size: 0.75rem; color: var(--n-400); }
.metric-val { font-size: 1.25rem; font-weight: 800; color: var(--white); }

/* --- Forms --- */
.form-glass {
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--n-200);
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--g-400);
    box-shadow: 0 0 15px rgba(94, 204, 126, 0.2);
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' 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 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

.form-select option {
    background-color: #1a2a1f; /* Dark forest green/black */
    color: white;
    padding: 12px;
}

/* Range Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--g-400);
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 0 10px rgba(62, 175, 96, 0.4);
}

/* --- Camera Screen --- */
.detect-grid {
    display: grid;
    grid-template-columns: minmax(0, 480px) 300px;
    gap: 2rem;
    align-items: start;
    justify-content: center;
}

.camera-area,
.upload-drop-zone {
    position: relative;
    aspect-ratio: 4/3;
    width: 100%;
    max-width: 480px;
    background: rgba(0,0,0,0.3);
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    margin: 0 auto;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.upload-drop-zone:hover {
    border-color: var(--g-400);
    background: rgba(62, 175, 96, 0.06);
}

.cam-video, .cam-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}

.camera-ph {
    text-align: center;
    color: var(--n-500);
}

.camera-ph-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; }

.cam-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin-top: 2rem;
}

.cam-shutter {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: white;
    border: 6px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: 0.2s;
}

.cam-shutter:hover { transform: scale(1.1); }
.cam-shutter:active { transform: scale(0.9); }

.cam-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Result Screen --- */
.result-wrap { max-width: 800px; margin: 0 auto; }

.result-hero {
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.result-success { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.2)); border: 1px solid rgba(16, 185, 129, 0.3); }
.result-danger { background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(159, 18, 57, 0.2)); border: 1px solid rgba(244, 63, 94, 0.3); }

.result-emoji { font-size: 5rem; margin-bottom: 1rem; }
.result-name { font-size: 2.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.result-confidence { font-weight: 700; font-size: 1.1rem; opacity: 0.8; }

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1rem;
    text-align: left;
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--g-300);
}

.result-card-body ul { padding-left: 1.25rem; list-style: disc; }
.result-card-body li { margin-bottom: 0.5rem; }

/* --- Farm Guide --- */
.guide-wrap { margin-top: 1rem; }

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.search-box input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    font-size: 1.1rem;
    outline: none;
}

.guide-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.g-tab {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: white;
    font-weight: 700;
    transition: 0.3s;
}

.g-tab.active {
    background: var(--g-500);
    border-color: var(--g-500);
    box-shadow: 0 4px 15px rgba(62, 175, 96, 0.3);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    cursor: pointer;
    transition: 0.3s;
}

.info-card:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--g-500); transform: translateX(10px); }

.info-card-emoji {
    width: 60px; height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.crop-bg { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.disease-bg { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }

.info-card-text h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.info-card-text p { font-size: 0.85rem; color: var(--n-400); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Mobile / PWA Specifics --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    
    .hero-title { font-size: 3rem; }
    .hero-btns { flex-direction: column; }
    
    .detect-grid { grid-template-columns: 1fr; }
    .camera-area { aspect-ratio: 4/3; max-width: 100%; }
    
    .hero-stats { gap: 1.5rem; }
}

/* Modals & Popups */
.hidden { display: none !important; }

#langDropdown {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.3s var(--easing-spring);
    pointer-events: none;
}

#langDropdown.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Voice Assistant Styles */
.voice-assistant-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: var(--glass-blur);
}

.voice-header {
    text-align: center;
    margin-bottom: 2rem;
}

.voice-avatar {
    margin-bottom: 1rem;
}

.voice-anim {
    font-size: 4rem;
    animation: pulse 2s infinite;
}

.voice-anim.listening {
    animation: bounce 1s infinite;
    color: var(--accent-green);
}

.voice-status {
    font-size: 1.1rem;
    color: var(--n-300);
    margin-bottom: 1rem;
}

.voice-language {
    display: flex;
    justify-content: center;
}

.voice-language select {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
}

.voice-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.voice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.voice-btn:hover {
    border-color: var(--g-400);
    transform: scale(1.05);
}

.voice-btn.listening {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
    animation: pulse 1s infinite;
}

.voice-btn #voiceBtnIcon {
    font-size: 2rem;
}

.voice-btn #voiceBtnText {
    font-size: 0.8rem;
    text-align: center;
}

.voice-transcript, .voice-response {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.transcript-header, .response-header {
    font-weight: 600;
    color: var(--g-300);
    margin-bottom: 0.5rem;
}

.transcript-text, .response-text {
    color: var(--n-200);
    line-height: 1.5;
    min-height: 2rem;
}

.voice-suggestions {
    margin-top: 2rem;
}

.suggestions-header {
    font-weight: 600;
    color: var(--g-300);
    margin-bottom: 1rem;
    text-align: center;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.suggestion-btn {
    padding: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-align: center;
}

.suggestion-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--g-400);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

#langChev.rotate {
    transform: rotate(180deg);
}

.voice-overlay, .loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-card {
    padding: 3rem;
    text-align: center;
}

.voice-anim {
    width: 100px; height: 100px;
    background: var(--g-500);
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

.voice-anim::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--g-500);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ================================================
   E-COMMERCE STYLES
   ================================================ */

/* Shop Categories */
.shop-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.shop-tab {
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur-sm);
}

.shop-tab:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hi);
    transform: translateY(-2px);
}

.shop-tab.active {
    background: var(--g-500);
    border-color: var(--g-400);
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hi);
    box-shadow: var(--sh-float);
}

.product-image {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.product-desc {
    color: var(--n-300);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--g-300);
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-stars {
    color: var(--accent-amber);
    font-size: 1rem;
}

.product-reviews {
    color: var(--n-400);
    font-size: 0.8rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--g-500);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--g-400);
    transform: translateY(-1px);
}

.add-to-cart-btn.added {
    background: var(--accent-green);
}

/* Cart Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: var(--glass-blur);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cart-items {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--g-300);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quantity-btn:hover {
    background: var(--glass-bg-hover);
}

.cart-item-remove {
    color: var(--accent-rose);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.cart-total span {
    color: var(--g-300);
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-categories {
        padding: 0 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* ================================================
   FLOATING CHATBOT WIDGET
   ================================================ */
.chat-sugg {
    background: rgba(62, 175, 96, 0.12);
    border: 1px solid rgba(62, 175, 96, 0.25);
    color: #a7f3c0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.chat-sugg:hover {
    background: rgba(62, 175, 96, 0.25);
    border-color: rgba(62, 175, 96, 0.5);
    color: #d1fae5;
}

#chatMessages::-webkit-scrollbar {
    width: 4px;
}

#chatMessages::-webkit-scrollbar-track {
    background: transparent;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(62, 175, 96, 0.3);
    border-radius: 10px;
}

#chatPanel {
    display: flex !important;
}

#chatPanel.chat-hidden {
    display: none !important;
}

@media (max-width: 480px) {
    #chatPanel {
        width: calc(100vw - 48px) !important;
    }
}

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}
