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

:root {
    --font-primary: 'Outfit', sans-serif;
    
    /* Premium Blinkit / Instamart HSL Colors */
    --bg-base: #f7fafc;
    --bg-surface: rgba(255, 255, 255, 0.75);
    --bg-card: #ffffff;
    --border-glass: rgba(226, 232, 240, 0.8);
    
    --color-text-primary: #0f172a;     /* Slate 900 */
    --color-text-secondary: #475569;   /* Slate 600 */
    --color-text-muted: #94a3b8;       /* Slate 400 */
    
    /* Vibrant Accent Green */
    --primary: #00c853;
    --primary-hover: #00a03c;
    --primary-glow: rgba(0, 200, 83, 0.12);
    
    --success: #10b981;
    --warning: #ffb300;
    --danger: #ff3d00;
    --info: #06b6d4;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
    /* Sleek Carbon Dark Palette */
    --bg-base: #060913;
    --bg-surface: rgba(15, 23, 42, 0.75);
    --bg-card: #0f172a;
    --border-glass: rgba(255, 255, 255, 0.06);
    
    --color-text-primary: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #64748b;
    
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 25px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 45px rgba(0,0,0,0.5);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-base);
    color: var(--color-text-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* Glassmorphism */
.glass-effect {
    background: var(--bg-surface);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid var(--border-glass);
}

/* Global Sticky Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 0.75rem 3rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), #84cc16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container img {
    height: 38px;
    width: 38px;
    object-fit: contain;
}

/* Location selectors */
.location-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border-glass);
}
.dark-theme .location-selector {
    background: rgba(255,255,255,0.02);
}
.loc-pin {
    font-size: 1.1rem;
    color: var(--primary);
}
.loc-dropdown-wrap {
    display: flex;
    flex-direction: column;
}
.loc-deliver-to {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
}
.loc-select-node {
    background: transparent;
    border: none;
    font-weight: 800;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 0.88rem;
}

/* Autocomplete live Search */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}
.search-icon-glass {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.02);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}
.dark-theme .search-input {
    background: rgba(255,255,255,0.02);
}
.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 250;
    max-height: 280px;
    overflow-y: auto;
}
.suggestion-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}
.suggestion-item:hover {
    background: rgba(0,0,0,0.03);
    color: var(--primary);
}
.dark-theme .suggestion-item:hover {
    background: rgba(255,255,255,0.03);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}
.nav-item {
    font-weight: 600;
    color: var(--color-text-secondary);
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.nav-item:hover, .nav-item.active {
    color: var(--primary);
}
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-fast);
}
.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: rgba(0,0,0,0.03);
    color: var(--color-text-primary);
    border: 1px solid var(--border-glass);
}
.dark-theme .btn-secondary {
    background-color: rgba(255,255,255,0.03);
}
.btn-secondary:hover {
    background-color: rgba(0,0,0,0.06);
}
.dark-theme .btn-secondary:hover {
    background-color: rgba(255,255,255,0.06);
}

/* Badges count */
.badge-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    font-size: 1.15rem;
}
.badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Hero Section */
.hero-container {
    width: 100%;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.08) 0%, rgba(132, 204, 22, 0.03) 100%);
    border: 1px solid var(--border-glass);
    padding: 3rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}
.hero-content {
    max-width: 550px;
}
.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}
.hero-title span {
    background: linear-gradient(135deg, var(--primary), #84cc16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.category-shortcuts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}
.cat-shortcut-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}
.cat-shortcut-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.cat-shortcut-card span {
    font-size: 2.6rem;
    display: block;
}
.cat-shortcut-card h4 {
    font-weight: 700;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Premium Blinkit style Product Cards */
.product-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 200, 83, 0.2);
}
.product-image-wrap {
    width: 100%;
    position: relative;
    padding-top: 100%;
    background: rgba(0,0,0,0.01);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.product-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform var(--transition-normal);
}
.product-card:hover .product-image-wrap img {
    transform: scale(1.04);
}

.product-card-body {
    padding: 0.75rem 0.25rem 0.25rem 0.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-shop-link {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0.25rem;
}
.product-shop-link:hover {
    text-decoration: underline;
}

.product-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.35;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
}

/* Outline ADD button */
.btn-add-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.4rem 1.1rem;
    font-weight: 800;
    font-size: 0.82rem;
    transition: all var(--transition-fast);
}
.btn-add-outline:hover {
    background-color: var(--primary);
    color: white;
}
.btn-add-outline:disabled {
    border-color: var(--color-text-muted);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* Grid & scroll system */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.horizontal-scroll-wrap {
    margin-bottom: 3.5rem;
}
.horizontal-scroll-list {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem 0.25rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}
.horizontal-scroll-list::-webkit-scrollbar {
    height: 6px;
}
.horizontal-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
    border-radius: 3px;
}
.dark-theme .horizontal-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
}
.horizontal-scroll-list .product-card {
    min-width: 220px;
    flex-shrink: 0;
}

/* Modals Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Toast System */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}
.toast {
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: toast-slide var(--transition-normal) forwards;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

@keyframes toast-slide {
    0% { transform: translateY(-40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Skeletons */
.skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.07) 37%, rgba(0,0,0,0.03) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
.dark-theme .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 37%, rgba(255,255,255,0.03) 63%);
}
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Footer */
.main-footer {
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border-glass);
    padding: 4rem 2rem 2rem 2rem;
    margin-top: auto;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
}
.footer-section h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 800;
}
.footer-section p, .footer-section ul {
    color: var(--color-text-secondary);
    list-style: none;
    font-size: 0.9rem;
}
.footer-section ul li {
    margin-bottom: 0.65rem;
}
.footer-section ul li a:hover {
    color: var(--primary);
}
.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    text-align: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Badges details */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
}
.status-pending { background: #fee2e2; color: #ef4444; }
.status-payment-verification { background: #fef3c7; color: #d97706; }
.status-accepted { background: #d1fae5; color: #059669; }
.status-preparing { background: #e0e7ff; color: #4f46e5; }
.status-out-for-delivery { background: #e0f2fe; color: #0284c7; }
.status-delivered { background: #d1fae5; color: #059669; }
.status-cancelled, .status-rejected { background: #f1f5f9; color: #64748b; }
.status-busy { background: #fffbeb; color: #d97706; }
.status-closed { background: #fef2f2; color: #ef4444; }
.status-open { background: #ecfdf5; color: #059669; }
.status-in_stock { background: #ecfdf5; color: #059669; }
.status-out_of_stock { background: #fef2f2; color: #ef4444; }

.body-spacer {
    display: none;
    height: 70px;
}
.mobile-bottom-nav {
    display: none;
}
.btn-mobile-search-toggle {
    display: none;
}
.mobile-search-overlay-bar {
    display: none;
}
.nav-signup-desktop {
    display: inline-flex;
}
