
/* 1. GLOBAL RESET & VARIABLES */
/* Remove default focus outline for better mobile app feel */
/* ============================================
   REMOVE/DELETE BUTTONS - SIMPLE RED
   ============================================ */

.action-remove-btn,
.remove-saved-btn,
.remove-marketplace-btn,
.btn-danger-outline,
.btn-delete,
.delete-btn,
.remove-btn {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-remove-btn:hover,
.remove-saved-btn:hover,
.remove-marketplace-btn:hover,
.btn-danger-outline:hover,
.btn-delete:hover,
.delete-btn:hover,
.remove-btn:hover {
    background: #b91c1c !important;
    color: white !important;
}

.action-remove-btn:disabled,
.remove-saved-btn:disabled,
.remove-marketplace-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="dark"] .action-remove-btn,
[data-theme="dark"] .remove-saved-btn,
[data-theme="dark"] .remove-marketplace-btn,
[data-theme="dark"] .btn-danger-outline {
    background: #dc2626 !important;
    color: white !important;
}

[data-theme="dark"] .action-remove-btn:hover,
[data-theme="dark"] .remove-saved-btn:hover,
[data-theme="dark"] .remove-marketplace-btn:hover,
[data-theme="dark"] .btn-danger-outline:hover {
    background: #b91c1c !important;
    color: white !important;
}

button:focus,
a:focus,
[role="button"]:focus,
input:focus,
select:focus,
textarea:focus,
.marketplace-tab:focus,
.btn:focus,
.action-save-btn:focus,
.action-remove-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

:root {
    --bg-primary: #f7f7f7;
    --bg-secondary: #e9edf3;
    --bg-tertiary: #dde3ec;
    --card-bg: #f7f9fc;
    --card-bg-hover: #ebebeb;
    --card-alt-bg: #eef2f7;
    --header-bg: rgba(241, 243, 246, 0.85);
    --footer-bg: #e5eaf1;
    --text-primary: #313131;
    --text-secondary: #5d6269;
    --text-muted: #64748b;
    --border-color: #becad6;
    --card-shadow: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.10), 0 8px 16px rgba(15, 23, 42, 0.06);
    --primary: #2563EB;
    --primary-dark: #1e40af;
    --primary-light: #e6edff;
    --accent: #f97316;
    --accent-light: #fff4ec;
    --success: #066328;
    --success-light: #00c943;
    --warning: #f59e0b;
    --warning-light: #fff6e6;
    --danger: #dc2626;
    --danger-light: #fdecec;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
    --space-11: 80px;
    --space-12: 96px;
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    --container-width: 1280px;
    --header-height: 72px;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    --font-6xl: 3.75rem;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --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);
}

[data-theme="dark"] {
    --bg-primary: #0c0c0c;
    --bg-secondary: #0d0d0d;
    --bg-tertiary: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-muted: #8e8e93;
    --border-color: #2c2c2e;
    --card-bg: #1c1c1e;
    --card-bg-hover: #2c2c2e;
    --card-alt-bg: #141416;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(0, 0, 0, 0.85);
    --footer-bg: #0d0d0d;
    --primary-light: #1e293b;
    --accent-light: #5a2d00;
    --warning-light: #5a2d00;
    --danger-light: #5c1e1a;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: var(--weight-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color var(--transition-base), color var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    width: 100%;
}

/* 
   2. TYPOGRAPHY & UTILITIES
    */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-bold);
    line-height: 1.1;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
h1 { font-size: var(--font-6xl); font-weight: var(--weight-extrabold); letter-spacing: -0.03em; }
h2 { font-size: var(--font-4xl); font-weight: var(--weight-bold); letter-spacing: -0.02em; }
h3 { font-size: var(--font-2xl); font-weight: var(--weight-semibold); }
h4 { font-size: var(--font-xl); font-weight: var(--weight-semibold); }
h5 { font-size: var(--font-lg); font-weight: var(--weight-semibold); }
h6 { font-size: var(--font-base); font-weight: var(--weight-semibold); }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    font-size: var(--font-base);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--weight-medium);
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-dark); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background: var(--primary) !important; }
.bg-success { background: var(--success) !important; }
.bg-warning { background: var(--warning) !important; }
.bg-danger { background: var(--danger) !important; }
.bg-soft-primary { background: var(--primary-light) !important; }

.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-3); }
.mt-3 { margin-top: var(--space-4); }
.mt-4 { margin-top: var(--space-5); }
.mt-5 { margin-top: var(--space-6); }
.mt-6 { margin-top: var(--space-7); }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-3); }
.mb-3 { margin-bottom: var(--space-4); }
.mb-4 { margin-bottom: var(--space-5); }
.mb-5 { margin-bottom: var(--space-6); }
.mb-6 { margin-bottom: var(--space-7); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-2); }
.gap-2 { gap: var(--space-3); }
.gap-3 { gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.w-100 { width: 100%; }
.cursor-pointer { cursor: pointer; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s var(--transition-base) forwards; }

/* 
   3. BUTTONS
    */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px !important;
    border-radius: var(--radius-full) !important;
    font-weight: var(--weight-semibold);
    font-size: var(--font-sm);
    cursor: pointer;
    gap: 6px;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
    border: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    font-weight: var(--weight-medium);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #0e7a3e;
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-sm { padding: 8px 18px !important; font-size: var(--font-xs); }
.btn-lg { padding: 16px 36px !important; font-size: var(--font-base); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 
   4. HEADER & NAVIGATION
    */

.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-6);
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-3xl);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.logo-main {
    font-weight: 800;
    color: var(--text-primary);
}
.logo-sub {
    font-weight: 600;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-7);
    margin-left: auto;
}
/* Mobile version - Add to your existing CSS */
@media (max-width: 768px) {
    .logo {
        font-size: 1.3rem;
        letter-spacing: -0.02em;
    }
    
    .logo-main {
        font-weight: 800;
    }
    
    .logo-sub {
        font-weight: 600;
    }
    
    .nav-menu {
        display: none !important;
    }
}
.nav-link {
    display: flex;
    align-items: left;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
    padding: var(--space-2) 0;
    transition: all var(--transition-fast);
    font-size: var(--font-sm);
    text-decoration: none;
}
.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Force header height BEFORE topbar loads */
.header { min-height: 42px; }
@media (max-width: 768px) { .header { min-height: 26px; } }

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    width: 40px;
    min-height: 28px;
    min-width: 40px;
}
.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--primary);
}
[data-theme="light"] .moon-icon { display: none !important; }
[data-theme="light"] .sun-icon { display: inline-block !important; }
[data-theme="dark"] .sun-icon { display: none !important; }
[data-theme="dark"] .moon-icon { display: inline-block !important; }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav-menu {
        display: none !important;
    }
}

/* 
   5. FOOTER
    */

.footer {
    background: var(--footer-bg);
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}
.footer-logo-main { font-weight: 700; color: var(--text-secondary); }
.footer-logo-sub { font-weight: 600; color: var(--text-secondary); }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.footer-logo-sub:hover { font-weight: 600; color: var(--primary); }

@media (max-width: 768px) {
    .footer { padding: 32px 0 20px 0; }
    .footer-content { flex-direction: column; text-align: center; gap: 16px; }
    .footer-links { justify-content: center; gap: 20px; }
}

/* 
   6. HERO SECTION (INDEX PAGE)
    */

.hero {
    padding: var(--space-10) 0 var(--space-8);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.hero-content { max-width: 900px; margin: 0 auto; }
.hero-highlight { 
    color: var(--primary); 
}

/* 
   8. PAGINATION
    */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.page-btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* 
   9. LOADING STATES
    */

.loading-spinner { text-align: center; padding: 50px; }
.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 
   10. FORMS
    */

.form-group { margin-bottom: var(--space-5); }
.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    font-size: var(--font-sm);
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: all var(--transition-fast);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.form-hint { font-size: var(--font-xs); color: var(--text-muted); margin-top: var(--space-1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* 
   11. MODAL SYSTEM
    */

.modal-overlay, .custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-container, .custom-modal-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.2s ease;
    box-shadow: var(--card-shadow-hover);
    border: 1px solid var(--border-color);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header, .custom-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 24px !important;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.modal-header h3, .custom-modal-header h3 {
    margin: 0 !important;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.modal-close, .modal-close-btn {
    background: none !important;
    border: none !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    color: var(--text-muted) !important;
}
.modal-body, .custom-modal-body { padding: 24px; color: var(--text-secondary); }
.modal-footer, .custom-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 
   12. DASHBOARD LAYOUT
    */

.dashboard { padding: var(--space-7) 0; flex: 1; background: var(--bg-secondary); }
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-6);
}
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

.sidebar {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: var(--space-5);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-5);
}
.sidebar-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--weight-bold);
    font-size: var(--font-xl);
    overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-info h4 { margin-bottom: 2px; font-size: var(--font-base); }
.sidebar-info p { font-size: var(--font-xs); color: var(--text-muted); }
.sidebar-menu { list-style: none; }
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 12px var(--space-4);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-weight: var(--weight-medium);
    font-size: var(--font-sm);
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}
[data-theme="dark"] .sidebar-menu a:hover,
[data-theme="dark"] .sidebar-menu a.active { color: #ffffff !important; }

.dashboard-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: var(--space-6);
}
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: var(--space-6);
}
.content-header h2 { margin: 0; font-size: 1.75rem; }

/* 
   13. STATS CARDS
    */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}
.stat-card {
    background: var(--bg-primary);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    text-align: center;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}
.stat-value {
    font-size: var(--font-4xl);
    font-weight: var(--weight-extrabold);
    color: var(--primary);
    margin-bottom: 4px;
    line-height: 1.2;
}
.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* 
   14. TOGGLE SWITCH
    */

.toggle-switch {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}
.toggle-label {
    font-weight: var(--weight-semibold);
    font-size: var(--font-sm);
}
.toggle-input { display: none; }
.toggle-slider {
    width: 52px;
    height: 28px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform var(--transition-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.toggle-input:checked + .toggle-slider { background: var(--success); }
.toggle-input:checked + .toggle-slider::before { transform: translateX(24px); }

/* 
   15. BADGE ANIMATIONS
    */

@keyframes badgePulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.92; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes badgeColorTransition {
    0% { background-color: #ef4444; }
    50% { background-color: #f59e0b; }
    100% { background-color: #10b981; }
}
@keyframes badgeColorTransitionReverse {
    0% { background-color: #10b981; }
    50% { background-color: #f59e0b; }
    100% { background-color: #ef4444; }
}
.shop-badge.animate-open {
    animation: badgePulse 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), badgeColorTransition 0.4s ease-out;
}
.shop-badge.animate-close {
    animation: badgePulse 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), badgeColorTransitionReverse 0.4s ease-out;
}

/* 
   16. PRODUCT NEEDS PANEL
    */

.product-needs-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-needs-panel.open { transform: translateX(-50%) translateY(0); }
body.needs-panel-open { overflow: hidden !important; }

.product-needs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
}
.product-needs-header h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.product-needs-content { overflow-y: auto; padding: 18px; flex: 1; }

.need-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
}
.need-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.need-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.need-expiry { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.need-expiry.warning { color: var(--danger); }
.need-description { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; padding: 6px 0; }
.need-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}
.need-quantity {
    background: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
}
.add-to-marketplace-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.add-to-marketplace-btn.added { background: #16a34a; }
.needs-badge {
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.7rem;
    margin-left: 8px;
}

/* 
   17. MAP & ROUTE OVERLAY
    */

.map-container-leaflet {
    height: 400px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    overflow: hidden;
    z-index: 1;
    display: none;
}
.map-container-leaflet.show { display: block; }
.map-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}
.map-loading-spinner.hide { opacity: 0; visibility: hidden; }

.custom-marker {
    background: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary);
    overflow: hidden;
}
.custom-marker img { width: 100%; height: 100%; object-fit: cover; }
.custom-marker span {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background: var(--primary);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-overlay {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--card-bg);
    border-radius: 10px;
    padding: 8px 16px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    border: 1px solid var(--border-color);
}
.route-overlay.show {
    bottom: 8px;
    transform: translateX(-50%) translateY(0);
}
.route-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.route-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 30px;
}
.route-clear-btn {
    background: #fee2e2;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
}
.route-clear-btn:hover { background: #dc2626; color: white; }
[data-theme="dark"] .route-clear-btn { background: #441a1a; color: var(--text-primary); }
[data-theme="dark"] .route-clear-btn:hover { background: #ef4444; color: white; }

/* 
   18. REVIEW MODAL & CARDS
    */

.review-modal-container {
    background: var(--card-bg);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    overflow: hidden;
}
.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.star-rating-large {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.star-rating-large i {
    font-size: 2rem;
    cursor: pointer;
    color: #cbd5e1;
}
.star-rating-large i:hover, .star-rating-large i.active { color: var(--warning); }

.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.reviewer-name { font-size: 0.95rem; font-weight: 600; }
.review-stars { color: #f59e0b; margin-top: 4px; font-size: 0.85rem; }
.review-date { color: var(--text-muted); font-size: 0.7rem; }
.review-content { color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; }
.review-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.review-action-btn {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
}
.review-action-btn:hover { background: var(--primary-light); }

.reply-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
}
.reply-content { color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.reply-date {
    color: var(--text-muted);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.reply-action-btn {
    background: none;
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
}
.reply-action-btn:hover { background: var(--bg-tertiary); }

.reply-input-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.reply-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}
.reply-input:focus {
    outline: none;
    border-color: var(--primary);
}
.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}
.reply-edit-container { margin-top: 12px; }

/* 
   19. NOTIFICATION TOAST
    */

.notification-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 280px;
    max-width: 90%;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: notificationSlideDown 0.3s ease;
}
.notification-toast i { font-size: 1.1rem; }
.notification-toast span { font-weight: 500; }
.notification-success { background: var(--success-light); color: var(--success); border-left: 4px solid var(--success); }
.notification-error { background: var(--danger-light); color: var(--danger); border-left: 4px solid var(--danger); }
.notification-warning { background: var(--warning-light); color: var(--warning); border-left: 4px solid var(--warning); }
.notification-info { background: var(--primary-light); color: var(--primary); border-left: 4px solid var(--primary); }

@keyframes notificationSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 
   20. PAYMENT METHODS
    */

.payment-methods-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}
.payment-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.payment-suggestion-chip {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.75rem;
    cursor: pointer;
}
.payment-suggestion-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
.selected-payments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.payment-chip {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 30px;
    padding: 6px 12px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}
.payment-chip .remove-payment { cursor: pointer; color: var(--danger); }

/* 
   21. INFO CARDS
    */

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.info-card h3 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.payment-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.payment-option {
    background: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
[data-theme="dark"] .payment-option { background: var(--bg-tertiary); }

/* 
   22. BUSINESS HOURS CARD
    */

.business-hours-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.business-hours-grid { display: flex; flex-direction: column; gap: 10px; }
.business-hour-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}
.business-hour-row.today { background: var(--primary-light); margin: 0 -20px; padding: 8px 20px; border-radius: 8px; }
.business-day { font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* 
   23. UPLOAD AREA & PHOTO GALLERY
    */

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-area.drag-over {
    border-color: var(--success);
    background: var(--success-light);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
}
.photo-item:hover .photo-overlay { opacity: 1; }

/* 
   24. PROFILE AVATAR SECTION
    */

.profile-avatar-section { flex-shrink: 0; text-align: center; }
.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}
.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}
.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
}
.avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.7rem;
    border-radius: 0 0 70px 70px;
    opacity: 0;
    transition: opacity 0.2s;
}
.avatar-wrapper:hover .avatar-overlay { opacity: 1; }

/* 
   25. IMAGE GALLERY MODAL
    */

.image-gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}
.gallery-prev { left: 30px; }
.gallery-next { right: 30px; }
.gallery-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
}

/* 
   26. SHOP VIEWS COUNTER
    */

.shop-views {
    color: var(--text-muted);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.shop-views i {
    color: var(--primary);
    font-size: 0.65rem;
}
.shop-views-badge {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.shop-views-badge i { color: #60a5fa; }
[data-theme="dark"] .shop-views-badge { background: rgba(0, 0, 0, 0.8); }
[data-theme="dark"] .shop-views { color: var(--text-secondary); }

/* 
   27. DANGER ZONE
    */

.danger-zone {
    background: var(--danger-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
.danger-zone h4 { color: var(--danger); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* 
   28. EMPTY STATE
    */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 16px;
}

/* 
   29. MARKETPLACE TABLE
    */

.marketplace-wrapper { overflow-x: auto; }
.marketplace-table {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.marketplace-row-saved { cursor: pointer; }
.marketplace-row {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 1.3fr 0.9fr 1.4fr 0.7fr 0.8fr;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    cursor: pointer;
}
.shop-name-link { color: var(--primary); font-weight: 600; cursor: pointer; }
.action-save-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.action-save-btn.btn-primary { background: var(--primary); color: white; border: none; }
.action-remove-btn {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.delete-all-saved-btn {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.delete-all-saved-btn:hover { background: var(--danger); color: white; }

/* 
   30. CATEGORY SUGGESTIONS
    */

.category-suggestions {
    position: fixed;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}
.suggestion-item:hover { background: var(--primary-light); }

/* 
   31. QUILL EDITOR
    */

.quill-editor-wrapper .ql-container { min-height: 140px; border-radius: 0 0 8px 8px; }
.quill-editor-wrapper .ql-toolbar {
    border-radius: 8px 8px 0 0;
    background: var(--bg-secondary);
}

/* 
   32. RESPONSIVE BREAKPOINTS
    */

@media (max-width: 768px) {
    .container { padding: 0 var(--space-4); }
    h1 { font-size: var(--font-4xl); }
    h2 { font-size: var(--font-3xl); }
    .shops-grid, .featured-shops-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .nav-menu { display: none; }
    button, .btn, .tab-btn, .sidebar-menu a { min-height: 24px !important; }
    input, select, textarea { font-size: 16px; }
    .footer { display: none !important; }
}
@media (max-width: 480px) {
    .shops-grid, .featured-shops-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .upgrade-grid { grid-template-columns: 1fr; }
    .password-grid { grid-template-columns: 1fr; }
    .otp-digit { width: 45px; height: 55px; font-size: 1.4rem; }
}

/* 
   33. SKELETON LOADING
    */

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 
   34. CUSTOMER DASHBOARD PROFILE LAYOUT
    */

.profile-layout {
    display: flex;
    gap: 40px;
    padding: 40px;
}
@media (max-width: 768px) { .profile-layout { flex-direction: column; padding: 24px; } }
.form-grid { display: grid; gap: 20px; margin-bottom: 32px; }
.upgrade-section {
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0;
}
.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) { .upgrade-grid { grid-template-columns: 1fr; } }
.upgrade-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}
.upgrade-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.upgrade-icon i { font-size: 1.5rem; color: var(--primary); }
.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
}
.password-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0;
}
.password-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 768px) { .password-grid { grid-template-columns: 1fr; } }
.danger-zone {
    margin-top: 32px;
    padding: 20px;
    background: var(--danger-light);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.danger-zone h4 {
    font-size: 0.9rem;
    color: var(--danger);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.danger-zone p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* 
   35. SAVED SHOPS
    */

.shops-grid-list { display: flex; flex-direction: column; gap: 12px; }
.saved-shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.saved-shop-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.shop-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}
.shop-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}
.shop-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.shop-details p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0;
}
.shop-actions { display: flex; gap: 8px; }

/* 
   36. GENERIC MODAL OVERLAY
    */

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-modal-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.2s ease;
}
.custom-modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.custom-modal-header h3 { margin: 0; font-size: 1.1rem; }
.custom-modal-body { padding: 24px; }
.custom-modal-body p { margin-bottom: 16px; }
.custom-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 
   37. SET PASSWORD MODAL
    */

.set-password-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.set-password-container {
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--card-shadow-hover);
    border: 1px solid var(--border-color);
}
.set-password-header {
    padding: 24px 24px 0 24px;
    text-align: center;
}
.set-password-header .icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.set-password-header .icon i { font-size: 28px; color: var(--primary); }
.set-password-header h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
}
.set-password-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.set-password-body { padding: 24px; }
.set-password-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.set-password-footer .btn { min-width: 120px; justify-content: center; }

/* 
   38. IMAGE PREVIEW MODAL
    */

.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}
.image-preview-content {
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.2s ease;
}
.image-preview-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.shop-cover, .shop-cover-fallback, .shop-avatar-main { cursor: pointer; transition: opacity 0.2s ease; }
.shop-cover:hover, .shop-cover-fallback:hover, .shop-avatar-main:hover { opacity: 0.9; }
body.modal-open { overflow: hidden; }

button.voice-btn,
    .voice-search-btn,
    [id*="voiceBtn"],
    [class*="voice-btn"] {
        width: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
        background-color: transparent;
    }
    
    button.voice-btn i,
    .voice-search-btn i {
        font-size: 1rem !important;
    }
    
/*search type button*/
@media (max-width: 768px) {
    .search-type-dropdown {
        padding: px 8px !important;
        min-height: 34px !important;
        height: auto !important;
    }
    
    .search-type-dropdown span {
        font-size: 0.7rem !important;
    }
    
    .search-type-dropdown i {
        font-size: 0.55rem !important;
    }
    .location-editor{
        z-index: 1 !important;
    }
    /* 
   FILTER BAR - MOBILE HORIZONTAL ROW
    */
@media (max-width: 768px) {
    .filter-bar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 0 16px 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    /* First row - 3 filter dropdowns */
    .filter-bar .filter-group {
        display: inline-flex !important;
        flex: 1 !important;
        min-width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    .filter-bar .filter-group select {
        width: 100% !important;
        padding: 8px 24px 8px 12px !important;
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        border-radius: 30px !important;
        background: var(--bg-primary) !important;
        border: 1px solid var(--border-color) !important;
        cursor: pointer !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 10px center !important;
        background-size: 12px !important;
        color: var(--text-primary) !important;
    }
    
    /* Second row - 3 action buttons - SAME SIZE AS DROPDOWNS */
    .filter-bar > div:last-child {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    .filter-bar .btn-outline {
        flex: 1 !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px 12px !important;
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        border-radius: 30px !important;
        white-space: nowrap !important;
        background: var(--bg-primary) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        display: inline-flex !important;
        gap: 6px !important;
    }
    
    .filter-bar .btn-outline i {
        font-size: 0.65rem !important;
    }
}
}
/* 
   40. EXPLORE PAGE LOCATION EDITOR
    */

.explore-container .location-editor {
    background: var(--bg-secondary);
    border-radius: 40px;
    border: 1px solid var(--border-color);
    padding: 0;
    width: 36%;
    max-width: 480px;
    transition: none;
    position: relative;
    contain: layout style;
    z-index: 999;
}
.explore-container .location-display-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 16px;
    min-height: 42px;
    height: 42px;
    box-sizing: border-box;
}
.explore-container .location-display-mode i {
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.explore-container .location-address {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    min-width: 0;
}
.explore-container .location-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.explore-container .location-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 0.8rem;
}
.explore-container .location-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}
.explore-container .location-edit-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 16px;
    min-height: 42px;
    height: 42px;
    width: 100%;
    box-sizing: border-box;
}
.explore-container .location-edit-mode i {
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.explore-container .location-search-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}
.explore-container .location-search-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: 34px;
}
.explore-container .location-cancel-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.explore-container .location-cancel-btn:hover {
    opacity: 0.7;
    background: var(--bg-tertiary);
}
.explore-container .location-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: none;
}
.explore-container .location-suggestions-dropdown.show { display: block; }
.explore-container .location-suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.explore-container .location-suggestion-item:last-child { border-bottom: none; }
.explore-container .location-suggestion-item:hover,
.explore-container .location-suggestion-item.selected { background: var(--primary-light); }
.explore-container .suggestion-main {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    text-align: left;
}
.explore-container .suggestion-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: left;
}
.explore-container .location-suggestions-dropdown .no-results,
.explore-container .location-suggestions-dropdown .loading-results {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}
@media (max-width: 768px) {
    .explore-container .location-editor { min-width: 100%; }
    .explore-container .location-display-mode, .explore-container .location-edit-mode {
        padding: 6px 12px;
        min-height: 28px;
        height: 28px;
    }
    .explore-container .location-address { font-size: 0.7rem; }
    .explore-container .location-action-btn, .explore-container .location-cancel-btn { width: 26px; height: 26px; font-size: 0.7rem; }
    .explore-container .location-search-input { padding: 5px 10px; font-size: 12px; height: 30px; }
    .explore-container .suggestion-main { font-size: 0.7rem; }
    .explore-container .suggestion-sub { font-size: 0.55rem; }
}
[data-theme="dark"] .explore-container .location-suggestions-dropdown {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .explore-container .location-suggestion-item:hover,
[data-theme="dark"] .explore-container .location-suggestion-item.selected {
    background: rgba(37, 99, 235, 0.2);
}

/* 
   42. OTP INPUT (LOGIN PAGE)
    */

.otp-container {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}
.otp-input {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: var(--font-2xl);
    font-weight: var(--weight-bold);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* 
   43. PROFILE MENU (POPUP)
    */

.profile-menu {
    position: absolute;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    border: 1px solid var(--border-color);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease;
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.profile-menu-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.profile-menu-item i {
    width: 20px;
    color: var(--primary);
    font-size: 1rem;
}
.profile-menu-item:hover { background: var(--primary-light); }
.profile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* 
   44. PREVIEW MODAL
    */

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.preview-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.2s ease;
}
.preview-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--primary);
}
.preview-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.preview-close:hover { background: var(--danger); }

.success-message {
    background: var(--success-light);
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}
.error-message {
    background: var(--danger-light);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}
/* Chat Menu Styles */
.conversation-last-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.conversation-menu span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.conversation-item:hover .chat-menu-btn {
    opacity: 1;
}

.chat-menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.chat-menu-item:hover {
    background: var(--bg-secondary);
}

.chat-menu-item i {
    width: 20px;
    color: var(--primary);
}

/* Recording Actions */
.recording-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

.voice-recording {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Deleted message style */
.deleted-message {
    color: var(--text-muted);
    font-style: italic;
}

.deleted-message i {
    margin-right: 6px;
}

/* Uploading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.message:has(.message-text:contains("Uploading")) .message-bubble {
    animation: pulse 1s infinite;
}

/* Smooth scroll behavior */
.messages-area {
    scroll-behavior: smooth;
}

/* Message options button */
.message-options-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.6rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.message:hover .message-options-btn {
    opacity: 1;
}
/* Document link styles */
.document-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.document-link:hover {
    background: var(--bg-tertiary);
}

.document-link i {
    font-size: 1.2rem;
}

.document-link i:first-child {
    color: var(--primary);
}

.document-link i:last-child {
    margin-left: auto;
    opacity: 0.5;
}

.document-link:hover i:last-child {
    opacity: 1;
}

/* Recording actions */
.recording-actions {
    display: flex;
    gap: 10px;
    margin-left: 10px;
}

/* Temp message style */
.temp-message .message-bubble {
    opacity: 0.7;
}

.temp-message .message-bubble::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Fix for bottom navbar overlapping content on mobile */

@media (max-width: 768px) {
    main {
        padding-bottom: 85px !important;
    }
    
    /* Add extra space at the bottom of shop content */
    .shop-grid-2col {
        margin-bottom: 20px !important;
    }
    
    /* Ensure footer doesn't get hidden */
    .footer {
        margin-bottom: 70px !important;
    }
}
