:root {
    /* Brand Colors - Royal Blue (High Contrast) */
    --color-brand: #2563eb;
    /* Blue 600 */
    --color-brand-glow: #60a5fa;
    /* Blue 400 */
    --color-brand-rgb: 37, 99, 235;

    /* Secondary Accents */
    --color-accent-1: #4f46e5;
    /* Indigo 600 */
    --color-accent-2: #0284c7;
    /* Sky 600 */

    /* Backgrounds (Dark Theme) */
    --bg-dark: #0f172a;
    /* Slate 900 - Midnight */
    --bg-darker: #020617;
    /* Slate 950 - Deepest */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 - Glass */
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    /* Slate 700 */

    /* Text - Dark Mode */
    --text-main: #f8fafc;
    /* Slate 50 - White */
    --text-muted: #94a3b8;
    /* Slate 400 - Light Grey */

    /* UI Elements */
    --glass-border: rgba(148, 163, 184, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Background Glow Effects */
.bg-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    filter: blur(60px);
    z-index: -1;
    animation: blob 20s infinite alternate;
}

.bg-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    filter: blur(60px);
    z-index: -1;
    animation: blob 20s infinite alternate-reverse;
}

.glass-nav {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--color-brand);
    box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #0f766e 0%, #2563eb 50%, #9333ea 100%);
    /* Darker gradient for white bg */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradient 5s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-brand);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    animation: float 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px;
        /* Clear the bottom nav */
        right: 20px;
    }
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: rgba(13, 148, 136, 0.95);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 120;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 15px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
    backdrop-filter: blur(5px);
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Stylish Spinner */
.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    background: transparent;
    border: 3px solid rgba(45, 212, 191, 0.2);
}

.spinner::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #0d9488;
    border-bottom-color: #9333ea;
    animation: spin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.2);
}

.spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-left-color: #2563eb;
    border-right-color: #0d9488;
    animation: spin-reverse 2s linear infinite;
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.05em;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* --- Search Bar Styles --- */
.search-container {
    position: relative;
    width: 100%;
    transition: all 0.3s ease;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-left {
    position: absolute;
    left: 1.5rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-glass {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Home Page Big Search */
.search-input-lg {
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.125rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.search-input-lg:focus {
    background: var(--bg-card-hover);
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    outline: none;
}

.search-input-lg:focus+.search-icon-left {
    color: #0d9488;
}

/* Header Compact Search */
.search-input-sm {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.875rem;
    border-radius: 9999px;
}

.search-nav-wrapper .search-icon-left {
    left: 1rem;
    font-size: 0.875rem;
}

.search-input-sm:focus {
    background: var(--bg-darker);
    border-color: var(--color-brand);
    outline: none;
    width: 250px;
    color: var(--text-main);
}

/* Placeholder Styling */
::placeholder {
    color: var(--text-muted);
}

/* Search Input Reset */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-suggestions.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--bg-card);
    /* Lighter than hover card */
}

.suggestion-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    margin-right: 12px;
    border: 1px solid var(--glass-border);
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.suggestion-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-price {
    color: var(--color-brand);
    font-weight: 700;
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* --- MODERN UI ADDITIONS ( appended ) --- */
:root {
    --bottom-nav-height: 70px;
}

body {
    padding-bottom: var(--bottom-nav-height);
}

/* --- Mobile Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 100%;
    background: transparent;
    border: none;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.bottom-nav-item.active {
    color: #3b82f6;
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.bottom-nav-fab {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-25px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
    border: 4px solid #0f172a;
    color: white !important;
    font-size: 24px;
}

/* --- New Product Card (Minimalist) --- */
.product-card-modern {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card-modern:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #3b82f6;
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.25);
}

.card-image-container {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 70%);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    position: relative;
}

.card-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    transition: transform 0.5s ease;
}

.product-card-modern:hover .card-image {
    transform: scale(1.15) rotate(2deg);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 20;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-category {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-price {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.card-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-btn:hover {
    background: #3b82f6;
    color: #fff;
    transform: scale(1.1);
}

/* --- Card Select and Action Buttons --- */
.card-select {
    width: 100%;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.card-select:hover {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
}

.action-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-buy-now {
    flex: 1;
    background: #3b82f6;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-buy-now:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-add-cart {
    width: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: #3b82f6;
    color: white;
}