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

:root {
    --bg-dark: #0b0f19;
    --bg-surface: rgba(26, 31, 52, 0.75);
    --bg-surface-hover: rgba(36, 43, 71, 0.85);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-active: rgba(99, 102, 241, 0.5);
    
    --brand-orange: #ff5722;
    --brand-coral: #f43f5e;
    --brand-indigo: #6366f1;
    --brand-violet: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-gold: #f59e0b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-saffron: linear-gradient(135deg, #ff5722 0%, #f43f5e 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
}

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

body, button, input, select, textarea, optgroup {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Emoji & Icon Isolation for iOS Safari rendering */
.tab-icon, .emoji, .icon-emoji, .category-chip-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 50%, rgba(244, 63, 94, 0.08) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Premium Header */
header {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 1.1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
}

.logo-badge {
    background: var(--gradient-saffron);
    color: #fff;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.vendor-portal-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    background: linear-gradient(135deg, #ff5722 0%, #f43f5e 50%, #e11d48 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.45), 0 0 20px rgba(255, 87, 34, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.vendor-portal-link:hover {
    transform: translateY(-2px) scale(1.03);
    background: linear-gradient(135deg, #ff6b3d 0%, #ff4d6d 50%, #f43f5e 100%);
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(244, 63, 94, 0.65), 0 0 30px rgba(255, 87, 34, 0.45);
    border-color: rgba(255, 255, 255, 0.6);
}

.vendor-portal-link:active {
    transform: translateY(0) scale(0.98);
}

/* Container */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

/* Hero Welcome Banner */
.hero-banner {
    background: var(--gradient-hero);
    border-radius: 20px;
    padding: 2.25rem 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(129, 140, 248, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(30, 27, 75, 0.4);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1rem;
    color: #c7d2fe;
    max-width: 650px;
    line-height: 1.5;
}

/* Search Bar Card */
.search-bar-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.1rem;
    margin-bottom: 1.75rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.form-control {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-indigo {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-indigo:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Nav Pills */
.nav-pills {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.pill-btn {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    padding: 0.6rem 1.25rem;
    border-radius: 24px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.pill-btn:hover {
    border-color: var(--brand-indigo);
    color: #ffffff;
    background: var(--bg-surface-hover);
}

.pill-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Feed Title Header */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cards Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.item-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.2);
}

.item-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 185px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-card img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    transition: transform 0.4s ease;
}

.item-card:hover img {
    transform: scale(1.04);
}

.card-photo-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}

/* Modal Multi-Image Gallery Component */
.modal-gallery-wrapper {
    width: 100%;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.modal-main-img-container {
    width: 100%;
    height: 250px;
    max-height: 250px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    border: 1px solid var(--border-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
    transition: opacity 0.25s ease-in-out;
}

.modal-thumbs-row {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

.modal-thumb-btn {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #1e293b;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    outline: none;
}

.modal-thumb-btn:hover {
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.modal-thumb-btn.active {
    border-color: #6366f1;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.modal-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.badge-vertical {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-tag {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--accent-emerald);
}

/* Detail View Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 15, 25, 0.88);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #131b2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #ffffff;
    padding: 1.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.15);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 20;
}

.modal-close:hover {
    background: rgba(244, 63, 94, 0.8);
    border-color: transparent;
}

/* Helper Skeleton & State Banners */
.skeleton-card {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.4) 25%, rgba(51, 65, 85, 0.6) 50%, rgba(30, 41, 59, 0.4) 75%);
    background-size: 200% 100%;
    border-radius: 16px;
    height: 300px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.state-banner {
    text-align: center;
    padding: 3.5rem 1.5rem;
    grid-column: 1 / -1;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-muted);
}

.state-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Favorite Button Styling */
.btn-fav {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-fav:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: #f43f5e;
}

.btn-fav.active {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.5);
    color: #f43f5e;
}

/* Google Places Autocomplete Dark Glassmorphism Styling */
.pac-container {
    background-color: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65) !important;
    font-family: 'Outfit', sans-serif !important;
    margin-top: 6px !important;
    z-index: 999999 !important;
    backdrop-filter: blur(16px) !important;
    overflow: hidden !important;
}

.pac-item {
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.pac-item:hover, .pac-item-selected {
    background-color: rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
}

.pac-item-query {
    font-size: 0.95rem !important;
    color: #f8fafc !important;
    font-weight: 600 !important;
}

.pac-matched {
    color: #818cf8 !important;
    font-weight: 700 !important;
}

.pac-icon {
    filter: invert(1) brightness(1.5) !important;
}

.hdpi .pac-icon {
    filter: invert(1) brightness(1.5) !important;
}

.pac-container:empty {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Mobile Responsive Design Enhancements */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    header > div {
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
    }

    .vendor-portal-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .hero-banner {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .search-bar-card {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.6rem;
        padding: 1rem !important;
    }

    .search-bar-card select {
        max-width: 100% !important;
        width: 100% !important;
    }

    .nav-pills {
        gap: 0.4rem;
        padding: 0.4rem;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .pill-btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }

    .feed-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .modal-dialog {
        width: 95% !important;
        max-width: 95% !important;
        padding: 1.25rem !important;
        max-height: 92vh !important;
    }

    .form-control, input, select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.2rem;
    }

    .item-card-body {
        padding: 1rem;
    }

    .item-card-title {
        font-size: 1.05rem;
    }
}

/* Calendar & Date Picker White Icon */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1);
    cursor: pointer;
}


