/* Grobofood - Premium Design System */
/* Colors extracted from logo: green theme */

:root {
    /* Warmer Theme Palette */
    --primary-50: #f4fce3;
    --primary-100: #e9fac8;
    --primary-200: #d3f392;
    --primary-300: #b5ea58;
    --primary-400: #93da2d;
    --primary-500: #6abf10;
    /* Warmer green */
    --primary-600: #519808;
    --primary-700: #3e750b;
    --primary-800: #335d0e;
    --primary-900: #2b4d11;

    /* Warm/Earthy Neutrals */
    --warm-50: #fffaf5;
    /* Cream background */
    --warm-100: #fff1e3;
    --warm-200: #ffe0bf;
    --gray-50: #fffaf5;
    /* Override default BG */
    --gray-100: #f3eee8;
    --gray-200: #e2dbd3;
    --gray-300: #cac4bd;
    --gray-400: #a8a29b;
    --gray-500: #8a847f;
    --gray-600: #6e6964;
    --gray-700: #55504c;
    --gray-800: #403c39;
    --gray-900: #2d2a28;

    /* Accents */
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-gold: #fbbf24;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Layout */
    --header-height: 60px;
    --nav-height: 70px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(92, 184, 92, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    position: relative;
    box-shadow: var(--shadow-xl);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-100);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-grobo {
    color: var(--gray-800);
}

.logo-food {
    color: var(--primary-500);
}

/* Location Dropdown */
.location-dropdown-btn {
    width: fit-content;
    min-width: 120px;
    margin: 0 12px;
    height: 36px;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
}

.location-dropdown-btn:hover {
    background: white;
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.location-dropdown-btn svg:first-child {
    width: 12px;
    height: 12px;
    color: var(--primary-500);
    flex-shrink: 0;
}

.location-text {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    color: var(--gray-500);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.location-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.location-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.location-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 140;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.location-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.location-dropdown-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-200);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.location-menu-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.location-menu-header .header-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.location-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-50);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: all var(--transition-fast);
}

.location-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.location-close svg {
    width: 18px;
    height: 18px;
}

.location-menu-header p {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.location-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-search svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.location-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: transparent;
}

.location-search input::placeholder {
    color: var(--gray-400);
}

.location-options {
    overflow-y: auto;
    max-height: 280px;
}

.location-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.location-option:hover {
    background: var(--gray-50);
}

.location-option svg {
    width: 20px;
    height: 20px;
    color: var(--primary-500);
    flex-shrink: 0;
}

.location-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-option-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.location-option-type {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.location-option.selected {
    background: var(--primary-50);
}

.location-option.selected .location-option-name {
    color: var(--primary-600);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-700);
}

.icon-btn:hover {
    background: var(--gray-200);
    transform: scale(1.05);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: var(--primary-500);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

.cart-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* Settings Menu Dropdown */
.settings-menu-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    right: 16px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    min-width: 200px;
    overflow: hidden;
}

.settings-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-section {
    padding: 8px;
}

.menu-section.hidden {
    display: none;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary-500);
}

.menu-item span {
    flex: 1;
}

.menu-item:active {
    transform: scale(0.98);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    height: 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--gray-50);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white;
    box-shadow: var(--shadow-glow);
}

.search-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
}

.search-close svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.app-main {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 20px);
    min-height: 100vh;
}

/* Views */
.view {
    display: none;
    padding: 20px 16px;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
.section-header {
    margin-bottom: 24px;
}

.section-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

/* Market Search Container */
.market-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 0 14px;
    transition: all var(--transition-fast);
}

.market-search-bar:focus-within {
    border-color: var(--primary-400);
    background: white;
    box-shadow: 0 0 0 3px rgba(106, 191, 16, 0.1);
}

.market-search-bar svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.market-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: transparent;
    font-family: inherit;
}

.market-search-bar input::placeholder {
    color: var(--gray-400);
}

/* Section Header */
.section-header {
    margin-bottom: 24px;
}

.section-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header-text {
    flex: 1;
    min-width: 0;
    /* Allow text to shrink */
}

.section-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments for section header */
@media (max-width: 480px) {
    .section-header h1 {
        font-size: 1.3rem;
    }

    .section-header p {
        font-size: 0.8rem;
    }

    .section-header-content {
        gap: 12px;
    }
}

@media (max-width: 380px) {
    .section-header h1 {
        font-size: 1.15rem;
    }

    .section-header p {
        font-size: 0.75rem;
    }

    .section-header-content {
        gap: 8px;
    }
}


/* Header Icon Group */
.header-icon-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.icon-action-btn {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.icon-action-btn svg {
    width: 18px;
    height: 18px;
    color: var(--gray-600);
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
}

.icon-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-50);
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.icon-action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.icon-action-btn:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.icon-action-btn:hover svg {
    color: var(--primary-600);
    transform: scale(1.1);
}

.icon-action-btn:active {
    transform: scale(0.95);
}

/* Assistant Panel - Clean & Simple */
.assistant-panel {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    animation: fadeSlideDown 0.2s ease-out;
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.assistant-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.assistant-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-500);
}

.assistant-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.assistant-close svg {
    width: 16px;
    height: 16px;
}

.assistant-messages {
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.assistant-message {
    display: flex;
    animation: messageAppear 0.2s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-message.user-message {
    justify-content: flex-end;
}

.message-text {
    max-width: 85%;
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-800);
}

.user-message .message-text {
    background: var(--primary-500);
    color: white;
}

/* Assistant Input Container */
.assistant-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.assistant-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
    transition: all var(--transition-fast);
}

.assistant-input:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.assistant-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-500);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.assistant-send-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.assistant-send-btn:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.assistant-send-btn:active {
    transform: translateY(0);
}


/* Quick Action Buttons */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-action-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.quick-action-btn:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
    transform: translateY(-1px);
}

.section-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header-text {
    flex: 1;
}

.section-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.map-view-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.map-view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.map-view-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-300);
}

.map-view-btn:hover::before {
    opacity: 1;
}

.map-view-btn:active {
    transform: translateY(0);
}

.map-view-btn svg {
    width: 20px;
    height: 20px;
    color: var(--primary-600);
    position: relative;
    z-index: 1;
    transition: color var(--transition-fast);
}

.map-view-btn:hover svg {
    color: var(--primary-700);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 16px;
}

.section-title h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.see-all {
    color: var(--primary-500);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.see-all:hover {
    color: var(--primary-600);
}

/* Categories */
.categories-nav-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}


.category-chip {
    flex-shrink: 0;
    padding: 10px 18px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-chip:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

/* Category shine animation */
@keyframes shine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

/* Category-specific border colors with shine effect */
.category-chip[data-category] {
    position: relative;
    overflow: hidden;
    background: white;
}

.category-chip[data-category]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shine 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Ensure text is above shine effect */
.category-chip[data-category] {
    z-index: 1;
}

.category-chip[data-category="grocery"] {
    border-color: #38bdf8;
}

.category-chip[data-category="prep"] {
    border-color: #4ade80;
}

.category-chip[data-category="ready"] {
    border-color: #fb923c;
}

.category-chip[data-category="sweets"] {
    border-color: #f472b6;
}

.category-chip[data-category="pizza"] {
    border-color: #f87171;
}

.category-chip[data-category="pantry"] {
    border-color: #fbbf24;
}

.category-chip[data-category="butcher"] {
    border-color: #ef4444;
}

.category-chip[data-category="brews"] {
    border-color: #a8805c;
}

.category-chip[data-category="snacks"] {
    border-color: #c9a66b;
}

.category-chip[data-category="all"] {
    border-color: #9ca3af;
}

/* Farmers Scroll */
.farmers-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
}

.farmers-scroll::-webkit-scrollbar {
    display: none;
}

.farmer-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.farmer-avatar {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
    border: 3px solid white;
    background: var(--gray-100);
}

.farmer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.farmer-card:hover .farmer-avatar {
    transform: scale(1.08);
}

.farmer-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Products Scroll (Horizontal) */
.products-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 16px 4px;
    /* Bottom padding for shadow/hover space */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

.products-scroll .product-card {
    min-width: 160px;
    /* Specific width for horizontal scroll items */
    width: 160px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 140px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image.has-photo {
    /* Remove center alignment for photos so they fill the container */
    display: block;
}

.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-photo {
    transform: scale(1.1);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: var(--primary-500);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.product-badge.organic {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.product-badge.sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.product-badge.top-seller,
.product-badge.top\ seller {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.product-badge.popular {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.product-badge.new {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-farmer {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-600);
}

.add-to-cart {
    width: 32px;
    height: 32px;
    border: none;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-full);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.add-to-cart:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.add-to-cart svg {
    width: 16px;
    height: 16px;
}

/* Social Feed */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 14px;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.post-location {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.post-more {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-more svg {
    width: 20px;
    height: 20px;
}

.post-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-100);
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calorie-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.calorie-tag svg {
    width: 14px;
    height: 14px;
    stroke: #f59e0b;
}

.post-actions {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    gap: 16px;
}

.action-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.action-btn svg {
    width: 24px;
    height: 24px;
}

.action-btn:hover {
    color: var(--primary-500);
}

.action-btn.liked {
    color: var(--accent-red);
}

.action-btn.liked svg {
    fill: var(--accent-red);
}

.post-content {
    padding: 0 14px 14px;
}

.post-likes {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.post-caption {
    font-size: 0.9rem;
    color: var(--gray-800);
    line-height: 1.4;
}

.post-caption strong {
    font-weight: 600;
}

.post-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 8px;
    text-transform: uppercase;
}

/* Camera View */
.camera-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - var(--nav-height) - 40px);
    padding: 0;
    margin: -20px -16px;
}

.camera-preview {
    flex: 1;
    background: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.camera-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.camera-preview video.active {
    display: block;
}

.camera-preview canvas {
    display: none;
}

.captured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.captured-image.visible {
    display: block;
}

.camera-placeholder {
    color: var(--gray-400);
    text-align: center;
    cursor: pointer;
    padding: 40px;
}

.camera-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.camera-placeholder p {
    font-size: 1rem;
}

.camera-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: var(--gray-900);
}

.camera-btn {
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.camera-btn.secondary {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.camera-btn.secondary svg {
    width: 22px;
    height: 22px;
}

.camera-btn.capture {
    width: 72px;
    height: 72px;
    background: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.camera-btn.capture:hover {
    transform: scale(1.05);
}

.capture-ring {
    width: 58px;
    height: 58px;
    border: 4px solid var(--gray-900);
    border-radius: var(--radius-full);
}

/* Post Form */
.post-form {
    display: none;
    padding: 20px;
    background: white;
}

.post-form.visible {
    display: block;
}

.post-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.back-btn {
    border: none;
    background: transparent;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.post-form-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.post-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.post-form .post-caption {
    width: 100%;
    min-height: 100px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    margin-bottom: 20px;
    transition: border-color var(--transition-fast);
}

.post-form .post-caption:focus {
    outline: none;
    border-color: var(--primary-500);
}

.calorie-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-icon {
    font-size: 1.5rem;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    display: block;
}

.toggle-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

/* Calorie Input */
.calorie-input-container {
    display: none;
    animation: slideDown 0.3s ease;
}

.calorie-input-container.visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calorie-input-container label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: block;
}

.calorie-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: border-color var(--transition-fast);
}

.calorie-input-wrapper:focus-within {
    border-color: var(--primary-500);
}

.calorie-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--gray-900);
}

.calorie-input-wrapper input:focus {
    outline: none;
}

.calorie-unit {
    padding: 8px 14px;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Profile View */
.profile-header {
    margin: -20px -16px 0;
}

.profile-cover {
    height: 180px;
    /* Taller cover */
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600), var(--primary-700));
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    /* Slanted dynamic edge */
}

.profile-info {
    text-align: center;
    padding: 0 20px 20px;
    margin-top: -60px;
    /* Stronger overlap */
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

.profile-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.profile-info>p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.edit-profile-btn {
    padding: 10px 28px;
    border: 2px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.edit-profile-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin: 0 -16px;
}

.profile-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: center;
}

.profile-tab svg {
    width: 22px;
    height: 22px;
}

.profile-tab.active {
    color: var(--primary-500);
    border-bottom: 2px solid var(--primary-500);
    margin-bottom: -1px;
}

.profile-content {
    padding: 24px 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}

.empty-state svg {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 0.85rem;
}

/* Bottom Navigation */
/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

.nav-item.active {
    color: var(--primary-500);
}

.nav-item.active svg {
    stroke-width: 2.2;
}

.nav-item.camera-nav {
    flex: 0;
    padding: 0;
    margin-top: -20px;
}

.camera-nav-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-400), #e5e7eb, var(--primary-500), var(--primary-400));
    background-size: 300% 300%;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(92, 184, 92, 0.4);
    transition: all var(--transition-fast);
    animation: ai-gradient-flow 4s ease infinite;
}

@keyframes ai-gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.camera-nav-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.nav-item.camera-nav:hover .camera-nav-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(92, 184, 92, 0.5);
}

.nav-item.camera-nav:active .camera-nav-icon {
    transform: scale(0.95);
}

.nav-item.camera-nav.active .camera-nav-icon {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}


/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 150;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 360px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.cart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.close-cart {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
}

.close-cart svg {
    width: 18px;
    height: 18px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-cart svg {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-cart p {
    font-weight: 500;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.cart-item-image {
    width: 64px;
    height: 64px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.cart-item-qty {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.125rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Responsive adjustments */
@media (min-width: 480px) {

    .app-header,
    .bottom-nav {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .bottom-nav {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

/* Animation classes */
.animate-bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 300;
}

.toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

/* =========================================
   Phase 2 Enhancements Styles
   ========================================= */

/* --- Community Search Bar --- */
.feed-search-container {
    margin: 12px 0 16px;
    padding: 0 4px;
}

.feed-search-bar {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    gap: 12px;
    transition: all var(--transition-fast);
}

.feed-search-bar:focus-within {
    border-color: var(--primary-500);
    background: white;
    box-shadow: var(--shadow-sm);
}

.feed-search-bar svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.feed-search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.feed-search-bar input:focus {
    outline: none;
}

/* --- Social Feed Grid Redesign --- */
.feed-tabs {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    margin-top: 12px;
    padding: 0 4px 8px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

.feed-tabs::-webkit-scrollbar {
    display: none;
}

.feed-tab {
    flex-shrink: 0;
    white-space: nowrap;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-400);
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.feed-tab.active {
    color: var(--gray-900);
}

.feed-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
}

.feed-tab.add-btn {
    font-size: 1.5rem;
    color: var(--primary-500);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    border-radius: var(--radius-sm);
    margin-left: 8px;
    padding: 0;
    line-height: 1;
}

.feed-tab.add-btn:hover {
    background: var(--primary-100);
    transform: scale(1.1);
}

/* --- Feed Map View --- */
.feed-map {
    width: 100%;
    height: 65vh;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 4px;
    background: #e5e7eb;
}

.map-overlay-info {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid var(--gray-200);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
}

.feed-grid.layout-full {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
}

.grid-post {
    position: relative;
    aspect-ratio: 1;
    /* Square grid items */
    background: var(--gray-200);
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.grid-post img,
.grid-post video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-post:hover img {
    transform: scale(1.05);
}

.grid-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.grid-post:hover .grid-post-overlay {
    opacity: 1;
}

.grid-stat {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.grid-stat svg {
    width: 14px;
    height: 14px;
}

.media-type-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.media-type-icon svg {
    width: 18px;
    height: 18px;
}

/* Post Detail Modal */
.post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.post-modal.active {
    opacity: 1;
    visibility: visible;
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-wrapper {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-media {
    width: 100%;
    aspect-ratio: 1;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-media img,
.modal-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 16px;
    overflow-y: auto;
}

/* --- Camera AI & Video Enhancements --- */
.camera-mode-switcher {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.ai-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ai-scanner {
    width: 80%;
    height: 60%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.ai-scanner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold);
    animation: scan 2s infinite linear;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.ai-suggestion {
    position: absolute;
    bottom: 20%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    animation: bounce 1s infinite alternate;
}

/* --- Vendor Profile Styles --- */
.back-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 90;
}

.back-nav-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray-800);
}

.back-nav-btn:hover {
    background: var(--gray-100);
}

.icon-btn-ghost {
    background: transparent;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
}

.vendor-hero {
    background: var(--warm-50);
    padding: 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.vendor-avatar-large {
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.vendor-info-large h1 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.rating-badge {
    display: inline-block;
    background: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.vendor-bio {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.vendor-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.primary-btn {
    background: var(--primary-500);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.secondary-btn {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
}

.vendor-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.vendor-tabs .tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
}

.vendor-tabs .tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}

.vendor-products {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* --- Dashboard Styles --- */
.dashboard-content {
    padding: 20px;
}

.metric-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.metric-card h3 {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.metric-trend {
    font-size: 0.85rem;
    margin-top: 4px;
}

.metric-trend.positive {
    color: var(--success);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-mockup {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    height: 240px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 20px;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.chart-bars .bar {
    width: 12%;
    background: var(--primary-200);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

.chart-bars .bar:hover {
    background: var(--primary-400);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--gray-400);
    font-size: 0.75rem;
    font-weight: 600;
}

.order-list {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.order-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
}

.order-icon {
    width: 40px;
    height: 40px;
    background: var(--warm-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.order-details {
    flex: 1;
}

.order-id {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.order-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.order-amount {
    font-weight: 700;
    color: var(--primary-700);
}

/* --- Checkout Styles --- */
.checkout-content {
    padding: 20px;
}

.checkout-summary {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.checkout-summary h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--gray-600);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--gray-300);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.payment-section h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: white;
}

.payment-option.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.card-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-info span {
    font-weight: 600;
    font-size: 0.95rem;
}


.card-info small {
    color: var(--gray-500);
}


.check-mark {
    color: var(--primary-500);
    font-weight: 900;
    display: none;
}

.payment-option.selected .check-mark {
    display: block;
}

.pay-btn {
    width: 100%;
    padding: 16px;
    background: var(--gray-900);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast);
}

.pay-btn:hover {
    transform: translateY(-2px);
    background: black;
}

.dashboard-btn {
    padding: 8px 16px;
    background: var(--warm-100);
    color: var(--accent-orange);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--warm-200);
}

.dashboard-btn:hover {
    background: var(--warm-200);
}

/* Auth & Landing Styles */
.hidden {
    display: none !important;
}

/* --- Signup Carousel --- */
.signup-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 240px;
    box-shadow: var(--shadow-md);
}

.carousel-track {
    display: flex;
    width: 300%;
    /* 3 slides */
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: 33.333%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.community-slide {
    background-image: url('community_market.jpg');
}

.community-slide .slide-content {
    color: white;
}

.community-slide .slide-content h1,
.community-slide .slide-content p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    opacity: 1;
}


.farmer-slide {
    background-image: url('farmers_vibrant.png');
}

.artisan-slide {
    background-image: url('artisans_vibrant.png');
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.slide-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.carousel-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    background: white !important;
    color: var(--primary-600) !important;
    border-radius: var(--radius-full) !important;
}

.carousel-btn:hover {
    background: var(--primary-50) !important;
    transform: scale(1.05);
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.form-container {
    padding: 24px 0;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.form-container h1 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-container .subtitle {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    border: none;
}

.btn.primary {
    background: var(--primary-500);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn.primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-600);
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
}

.btn-link:hover {
    text-decoration: underline;
}

.icon-btn-ghost {
    background: transparent;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px;
}

/* ============ Food Log & Calendar ============ */
.log-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.view-switcher {
    display: flex;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-full);
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: white;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* Daily View */
.daily-summary-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--gray-100);
}

.daily-summary-card h3 {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.summary-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid var(--primary-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-num {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.macros-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.macro-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.macro-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.macro-pill.p .dot {
    background: #3b82f6;
}

/* Protein Blue */
.macro-pill.c .dot {
    background: #eab308;
}

/* Carbs Yellow */
.macro-pill.f .dot {
    background: #ef4444;
}

/* Fat Red */

.log-section-title {
    font-size: 0.9rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.log-card {
    background: white;
    padding: 14px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-500);
    display: flex;
    gap: 12px;
}

.log-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    min-width: 60px;
}

.log-info {
    flex: 1;
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.log-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.log-cal {
    font-weight: 700;
    color: var(--primary-600);
    font-size: 0.9rem;
}

.log-macros {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Weekly View */
.weekly-chart-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.weekly-chart-card h3 {
    margin-bottom: 24px;
    font-size: 1rem;
    color: var(--gray-800);
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
}

.chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar {
    width: 24px;
    background: var(--primary-200);
    border-radius: 4px;
    transition: height 0.5s ease;
}

.chart-col:hover .bar {
    background: var(--primary-500);
}

.label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Monthly is largely reused from previous calendar styles, ensuring compatibility */
.calendar-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    border: 1px solid var(--gray-100);
}

/* ============ Profile Content Styling ============ */

/* Profile Header Background */
.profile-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Profile Posts Grid */
.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.profile-post {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--gray-100);
}

.profile-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.profile-post:hover img {
    transform: scale(1.1);
}

.profile-post .post-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.profile-post:hover .post-overlay {
    opacity: 1;
}

.profile-post .post-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-post .post-stat svg {
    width: 20px;
    height: 20px;
}

/* Orders Cards */
.order-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-fast);
}

.order-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.order-id {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.order-vendor {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 2px;
}

.order-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.delivered {
    background: var(--primary-100);
    color: var(--primary-700);
}

.order-status.pending {
    background: var(--warm-100);
    color: var(--accent-orange);
}

.order-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.order-item-tag {
    padding: 4px 10px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--gray-700);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.order-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.order-total {
    font-weight: 700;
    color: var(--primary-600);
    font-size: 1rem;
}

/* Saved Items Grid */
.saved-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.saved-item {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--gray-100);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.saved-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.saved-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 16px 12px;
}

.saved-info {
    color: white;
}

.saved-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    line-height: 1.3;
}

.saved-source {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Empty State for Tabs */
.tab-content .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.tab-content .empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* AI Search Badge */
.ai-search-btn {
    position: relative;
    overflow: visible;
}

.ai-sparkle {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    /* Color is handled by SVG gradient */
    filter: drop-shadow(0 0 2px rgba(74, 222, 128, 0.6)) drop-shadow(0 0 5px rgba(34, 197, 94, 0.4));
    animation: ai-sparkle-shine 3s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}


.ai-sparkle svg {
    width: 100%;
    height: 100%;
}

.ai-search-btn .search-icon {
    position: relative;
    z-index: 1;
}

@keyframes ai-sparkle-shine {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(74, 222, 128, 0.6)) drop-shadow(0 0 5px rgba(34, 197, 94, 0.4));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.9)) drop-shadow(0 0 10px rgba(34, 197, 94, 0.6));
        transform: scale(1.1);
    }
}

/* --- Social Feed Overlay --- */
.grid-post {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    isolation: isolate;
}

.post-media-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

/* Hide original overlay override */
.grid-post .grid-post-overlay {
    display: none !important;
}


/* Post Card Footer specific styles */
.post-grid-footer {
    background: white;
    padding: 12px;
    border-top: 1px solid var(--gray-100);
}

.post-caption-preview {
    font-size: 0.85rem;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-footer-actions {
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between */
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    /* Spacing below buttons */
}

.footer-action-btn {
    background: var(--primary-100);
    /* Light green button */
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary-800);
    /* Darker green text */
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.footer-action-btn:hover {
    background: var(--primary-200);
    color: var(--primary-900);
    transform: translateY(-1px);
}

.like-wrapper {
    position: relative;
}

/* Emoji Popover - Click to Show */
.emoji-popover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 6px 10px;
    display: flex;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    margin-bottom: 8px;
    z-index: 20;
    white-space: nowrap;
}

.emoji-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.emoji-popover span {
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-popover span:hover {
    transform: scale(1.3);
}

/* Ensure grid items have white bg */
.grid-post {
    background: white;
}

/* Gallery View (Non-Home) Special Styling */
.grid-post.gallery-view {
    background: transparent;
    /* rounded corners kept */
}

.grid-post.gallery-view .post-media-wrapper {
    /* rounded corners kept */
    height: 100%;
    /* Ensure full height usage if container varies */
}

/* All Categories Modal Styles */
.categories-modal-content {
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.all-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 10px 0;
    margin-top: 10px;
}

.category-chip-large {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    box-shadow: var(--shadow-sm);
}

.category-chip-large:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 4px;
}

/* Adjust AI Sparkle Position */
.ai-sparkle {
    position: absolute;
    top: -6px !important;
    /* Slightly touching outline */
    left: -6px !important;
    z-index: 5;
    pointer-events: none;
    transform: scale(1.1);
}

/* Ensure helper relative positioning on the button parent */
.ai-search-btn {
    position: relative;
    overflow: visible !important;
    /* Allow star to hang outside */
}