/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Header Container */
.header-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Top Fixed Bar */
.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    position: relative;
    min-height: 60px;
}

/* Title */
.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1;
}

.header-subtitle-mobile {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
    display: block;
}

/* Mobile Dropdown Button */
.mobile-dropdown-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin-right: 8px;
    z-index: 101;
}

.mobile-dropdown-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.mobile-dropdown-btn i {
    font-size: 16px;
}

/* Mobile Dropdown Menu */
.mobile-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 99;
    display: none;
    animation: slideDown 0.3s ease;
    border-top: 1px solid #f1f5f9;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-dropdown-menu.show {
    display: block;
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-dropdown-content {
    padding: 16px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 10px;
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    text-align: left;
    position: relative;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1f2937;
}

.dropdown-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-badge {
    position: absolute;
    right: 16px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 12px 0;
}

/* Expand/Collapse Button */
.expand-collapse-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    border: none;
    border-radius: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.expand-collapse-btn:hover {
    background: #2563eb;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.expand-collapse-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.expand-collapse-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.expand-collapse-btn.expanded i {
    transform: rotate(180deg);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Action Buttons */
.header-action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    position: relative;
}

.header-action-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.header-action-btn i {
    font-size: 16px;
}

/* Filter Badge */
.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.filter-badge.active {
    display: flex;
}

/* Expandable Content Area */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-top: 1px solid #f1f5f9;
    opacity: 0;
    visibility: hidden;
}

.expandable-content.expanded {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    border-top: 1px solid #e5e7eb;
}

/* Desktop Search */
.desktop-search {
    padding: 20px 16px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-box i {
    color: #94a3b8;
    font-size: 16px;
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* Filter Section */
.filter-section {
    padding: 16px;
    display: block !important;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group span {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    background: #f8fafc;
    color: #475569;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.filter-chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.filter-chip.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.result-count {
    color: #64748b;
    font-size: 13px;
    text-align: right;
    font-weight: 500;
}

/* Sidebar Filter */
.sidebar-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.sidebar-filter-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sidebar-filter {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar-filter.show {
    transform: translateX(-320px);
}

.sidebar-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    flex-shrink: 0;
}

.sidebar-filter-header h3 {
    font-size: 18px;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-filter-header h3 i {
    color: #3b82f6;
}

.close-sidebar-filter {
    background: none;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.close-sidebar-filter:hover {
    color: #1f2937;
}

.sidebar-filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 80px; /* Space for footer */
}

.filter-section-sidebar {
    margin-bottom: 32px;
    padding: 0;
}

.filter-section-sidebar h4 {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section-sidebar h4 i {
    color: #64748b;
    font-size: 14px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option-sidebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border: none;
    width: 100%;
    text-align: left;
}

.filter-option-sidebar:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.filter-option-sidebar.active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.filter-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-option-content i {
    color: #64748b;
    font-size: 16px;
    width: 20px;
}

.filter-option-sidebar.active .filter-option-content i {
    color: #3b82f6;
}

.filter-option-content span {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
}

.check-icon {
    color: transparent;
    font-size: 14px;
}

.filter-option-sidebar.active .check-icon {
    color: #3b82f6;
}

.sidebar-filter-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: white;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.clear-filter-btn {
    flex: 1;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clear-filter-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.apply-filter-btn {
    flex: 2;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-filter-btn:hover {
    background: #2563eb;
}

.apply-filter-btn span {
    background: white;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    flex-direction: column;
}

.mobile-search-overlay.show {
    display: flex;
}

.mobile-search-header {
    padding: 60px 16px 16px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.mobile-search-box:focus-within {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.mobile-search-box i {
    color: #94a3b8;
    font-size: 16px;
    margin-right: 12px;
}

.mobile-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
}

.close-search {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Mobile Search Results */
.empty-search {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 16px;
}

.mobile-search-result {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-search-result:hover {
    background: #f8fafc;
}

.result-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-image .placeholder {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.result-image .placeholder i {
    font-size: 20px;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-info p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-category.food-category {
    background-color: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.result-category.retail-category {
    background-color: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

.result-category.service-category {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.result-category.entertainment-category {
    background-color: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
}

.mobile-search-result .fa-chevron-right {
    color: #cbd5e1;
    font-size: 14px;
    margin-left: 12px;
}

/* Main Content */
.main-content {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 24px;
    padding: 24px 32px;
}

/* Card Styles */
.card-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    height: 380px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease forwards;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-item:hover .card-image img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    color: #0c4a6e;
    font-weight: 600;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    line-height: 1.3;
    flex: 1;
    margin-right: 12px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.food-category {
    background-color: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.retail-category {
    background-color: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

.service-category {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.entertainment-category {
    background-color: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    flex: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 14px;
}

.detail-item i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
    font-size: 16px;
}

.area-icon {
    color: #3b82f6;
}

.shop-icon {
    color: #10b981;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.click-hint {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.external-icon {
    color: #d1d5db;
    font-size: 14px;
}

/* No Results */
.no-results {
    display: none;
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 24px 32px;
}

.no-results.show {
    display: block;
}

.no-results i {
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
}

.no-results p {
    color: #9ca3af;
    font-size: 16px;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 20px;
    color: #6b7280;
    font-size: 14px;
    border-top: 1px solid #f3f4f6;
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive Grid Layout */
/* Ultra-wide screens (2560px+) - 6 columns */
@media (min-width: 2560px) {
    .cards-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 28px;
    }
}

/* Large desktop screens (1920px-2559px) - 5 columns */
@media (min-width: 1920px) and (max-width: 2559px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 26px;
    }
}

/* Standard desktop screens (1440px-1919px) - 4 columns */
@media (min-width: 1440px) and (max-width: 1919px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Laptop screens (1024px-1439px) - 3 columns */
@media (min-width: 1024px) and (max-width: 1439px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

/* Tablet screens (768px-1023px) - 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile screens (640px-767px) - 2 columns */
@media (min-width: 640px) and (max-width: 767px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 20px 16px;
    }
}

/* Small mobile screens (under 640px) - 1 column */
@media (max-width: 639px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px;
    }
}

/* Responsive Header */
@media (max-width: 767px) {
    .header-top-bar {
        padding: 10px 16px;
        min-height: 56px;
    }
    
    .header-title h1 {
        font-size: 18px;
    }
    
    .header-subtitle-mobile {
        font-size: 11px;
    }
    
    .expand-collapse-btn {
        display: none;
    }
    
    .mobile-dropdown-btn {
        display: flex;
    }
    
    .header-action-btn {
        width: 36px;
        height: 36px;
    }
    
    .desktop-search,
    .filter-section {
        display: none !important;
    }
    
    .expandable-content {
        display: none !important;
    }
    
    .mobile-search-header {
        padding: 70px 16px 16px;
    }
}

@media (min-width: 768px) {
    .header-subtitle-mobile {
        display: none;
    }
    
    .header-action-btn,
    .mobile-dropdown-btn {
        display: none;
    }
    
    .mobile-search-overlay,
    .sidebar-filter,
    .sidebar-filter-overlay,
    .mobile-dropdown-menu {
        display: none !important;
    }
    
    .header-top-bar {
        padding: 16px 32px;
        min-height: 64px;
    }
    
    .header-title h1 {
        font-size: 24px;
    }
    
    .expand-collapse-btn {
        display: flex;
        width: 44px;
        height: 44px;
    }
    
    .expand-collapse-btn i {
        font-size: 16px;
    }
    
    .desktop-search,
    .filter-section {
        display: block !important;
    }
    
    .expandable-content {
        display: block !important;
    }
    
    .filter-controls {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-group {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .desktop-search,
    .filter-section {
        padding-left: 32px;
        padding-right: 32px;
    }
    
    .cards-grid {
        padding: 32px;
    }
}
