@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');
@import 'apple-animations.css';


:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Light Theme (Default) - Apple macOS Ventura/Sonoma Light */
    --bg-body: #f5f5f7;
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-nav: rgba(255, 255, 255, 0.7);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --border-glass: rgba(255, 255, 255, 0.4);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.04);
    --glass-blur: 20px;
}

[data-theme='dark'] {
    /* Dark Theme - Apple macOS Dark Mode */
    --bg-body: #000000;
    /* Deep black for seamless 3D blend */
    --bg-card: rgba(28, 28, 30, 0.6);
    --bg-nav: rgba(28, 28, 30, 0.7);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent-color: #2997ff;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-blur: 24px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    padding-bottom: 0;
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

/* Typography Refinements */
h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Glassmorphism Utilities - Apple Style */
/* Glassmorphism Utilities - Adaptive */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border: 1px solid var(--border-glass);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(60, 60, 65, 0.7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Apple Icon Container */
/* Apple Icon Container - Enhanced Visibility */
.apple-icon-container {
    width: 64px;
    height: 64px;
    /* Adaptive Background: Darker in light mode for contrast, lighter in dark mode */
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 22px;
    /* Smooth Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: var(--shadow-glass);
}

.apple-icon-container:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(var(--accent-color), 0.1);
    /* Subtle tint on hover */
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Category Circle Hover Effect */
.category-circle-premium {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.group:hover .category-circle-premium {
    transform: scale(1.12) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: currentColor; /* Inherits the hover border color from parent if set */
}


/* General Small Glass Icon Button (Header etc) */
.icon-glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    /* Squircle for small icons */
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.icon-glass-btn:hover {
    background: var(--text-primary);
    color: var(--bg-body);
    /* Invert colors on hover for premium feel */
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Three.js Canvas */
#canvas-container {
    position: fixed;
    /* Fixed to cover screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Buttons (Apple Style Refined) */
.btn-primary {
    background: #0071e3;
    color: white;
    border-radius: 980px;
    /* Pill */
    padding: 14px 28px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.btn-primary:hover {
    background: #0077ed;
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.45);
}

/* --- ANIMATIONS START --- */

/* 1. Open Now Blinking Dot */
.blink-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    /* Green-500 */
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 10px #22c55e;
}

.blink-dot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: #22c55e;
    border-radius: 50%;
    opacity: 0.7;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* 2. Trusted Since 1985 (Simple Fade/Pulse) */
.trusted-text {
    animation: opacityPulse 4s ease-in-out infinite;
}

@keyframes opacityPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    }
}

/* 3. Apple-Style Gradient Text (Neighborhood Store) */
.gradient-text-anim {
    background: linear-gradient(90deg, #A78BFA, #3B82F6, #EC4899, #A78BFA);
    /* Soft Purple, Blue, Pink */
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 5s linear infinite;
    display: inline-block;
    /* Helps with background-clip */
}

@keyframes gradientFlow {
    to {
        background-position: 200% center;
    }
}

/* 4. Floating 'Start Shopping' Button */
.float-btn {
    animation: floatY 4s ease-in-out infinite;
    background-color: #2563EB !important;
    /* Blue-600 */
    position: relative;
    z-index: 10;
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(37, 99, 235, 0.5);
    }
}

/* 5. WhatsApp Button Green */
.btn-whatsapp {
    background-color: #25D366 !important;
    /* Official WhatsApp Green */
    border: 1px solid #25D366 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #128C7E !important;
    border-color: #128C7E !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* 6. Directions Button Blue */
.btn-directions {
    background-color: #2563EB !important;
    color: white !important;
    transition: all 0.3s;
    border: none !important;
}

.btn-directions:hover {
    background-color: #1D4ED8 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* 7. Cursor Trailer - Adaptive */
.cursor-trail {
    position: fixed;
    width: 24px;
    height: 24px;
    /* Light Mode Default: Dark Ring */
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.05s linear, width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
    backdrop-filter: blur(2px);
}

[data-theme='dark'] .cursor-trail {
    /* Dark Mode: Original White Glow */
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    mix-blend-mode: screen;
}

/* Glassmorphism Refinement */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
}

/* --- ANIMATIONS END --- */

/* GLOBAL INPUT CONTRAST FIX - Ensure visibility across all themes */
input,
textarea,
select {
    color: var(--text-primary) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    transition: all 0.3s ease;
}

[data-theme='dark'] input::placeholder,
[data-theme='dark'] textarea::placeholder {
    color: rgba(245, 245, 247, 0.5) !important;
}

[data-theme='dark'] select option {
    background-color: #1c1c1e !important;
    color: #f5f5f7 !important;
}

/* Chatbot Input Specific Fix (Always Black) */
#nex-input {
    color: #000000 !important;
}

/* --- SEARCH AUTOCOMPLETE STYLES --- */
#autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    margin-top: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    padding: 8px;
    animation: slideDownFade 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.suggestion-item:hover, .suggestion-item.selected {
    background: rgba(var(--accent-color), 0.1);
    background: var(--accent-color);
    color: white;
}

.suggestion-item .item-emoji {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.suggestion-item .item-details {
    display: flex;
    flex-direction: column;
}

.suggestion-item .item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.suggestion-item .item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary); /* Use standardized secondary color */
    opacity: 0.9; /* Higher opacity for readability */
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for Dropdown */
#autocomplete-results::-webkit-scrollbar {
    width: 6px;
}
#autocomplete-results::-webkit-scrollbar-track {
    background: transparent;
}
#autocomplete-results::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 10px;
}