/* Remove default focus outline for better mobile app feel */
button,
a,
[role="button"],
input,
select,
textarea,
.category-card,
.shop-card,
.btn,
.nav-link,
.theme-toggle,
.change-location-link,
.search-box input,
.search-box button {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}
/* Remove focus rings on active/focused elements */
*:focus,
*:active,
*:hover {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* 
   MOBILE FILTER DROPDOWN - FULL SCREEN NATIVE STYLE
    */

@media (max-width: 768px) {
    /* Create a fake header for the full-screen dropdown */
    body.filter-dropdown-open::before {
        content: attr(data-filter-label);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 16px 20px;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        border-bottom: 1px solid var(--border-color);
        z-index: 100000;
        text-align: center;
        backdrop-filter: blur(10px);
    }
    
    body.filter-dropdown-open::after {
        content: '✕';
        position: fixed;
        top: 12px;
        right: 20px;
        font-size: 1.3rem;
        color: var(--text-muted);
        z-index: 100000;
        cursor: pointer;
        background: var(--bg-secondary);
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
}

/* 
   ALTERNATIVE: BETTER CUSTOM DROPDOWN MODAL
    */
@media (max-width: 768px) {
    .location-search-input{
        padding: 10px;
    }
    /* Better approach - Custom dropdown modal */
    .filter-group {
        position: relative;
    }
    
    /* Hide native select, create custom trigger */
    .filter-select-hidden {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }
    
    .filter-select-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 14px;
        background: var(--bg-secondary);
        border-radius: 30px;
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--text-primary);
        cursor: pointer;
        white-space: nowrap;
        border: 1px solid var(--border-color);
    }
    
    /* Full-screen dropdown modal */
    .filter-dropdown-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        z-index: 100000;
        display: flex;
        flex-direction: column;
        animation: slideUp 0.3s ease;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .filter-dropdown-modal.open {
        opacity: 1;
        visibility: visible;
    }
    
    /* Modal Header */
    .filter-dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .filter-dropdown-header h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
    }
    
    .filter-dropdown-close {
        background: var(--bg-secondary);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.2rem;
        color: var(--text-muted);
    }
    
    /* Modal Search */
    .filter-dropdown-search {
        padding: 12px 16px;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
    }
    
    .filter-dropdown-search input {
        width: 100%;
        padding: 12px 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 30px;
        font-size: 0.9rem;
        color: var(--text-primary);
    }
    
    .filter-dropdown-search input:focus {
        outline: none;
        border-color: var(--primary);
    }
    
    /* Options List */
    .filter-dropdown-list {
        flex: 1;
        overflow-y: auto;
        padding: 8px 0;
    }
    
    .filter-dropdown-option {
        padding: 14px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--border-color);
        cursor: pointer;
        transition: background 0.2s;
    }
    
    .filter-dropdown-option:active {
        background: var(--bg-secondary);
    }
    
    .filter-dropdown-option span {
        font-size: 0.9rem;
        color: var(--text-primary);
    }
    
    .filter-dropdown-option .check-icon {
        color: var(--primary);
        font-size: 1rem;
        opacity: 0;
    }
    
    .filter-dropdown-option.selected .check-icon {
        opacity: 1;
    }
    
    .filter-dropdown-option.selected span {
        font-weight: 600;
        color: var(--primary);
    }
    
    /* Modal Footer */
    .filter-dropdown-footer {
        padding: 16px 20px;
        border-top: 1px solid var(--border-color);
        background: var(--card-bg);
        display: flex;
        gap: 12px;
    }
    
    .filter-dropdown-footer button {
        flex: 1;
        padding: 12px;
        border-radius: 30px;
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
    }
    
    .filter-dropdown-footer .btn-apply {
        background: var(--primary);
        color: white;
        border: none;
    }
    
    .filter-dropdown-footer .btn-cancel {
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
    }
    
    /* Animations */
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    @keyframes filterDropdownFadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
}

/* 
   SIMPLE SOLUTION - Just style native select better
    */
@media (max-width: 768px) {
    
    /* Simple but effective - make select open native picker */
    .filter-group .filter-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 24px 10px 14px;
        background: var(--bg-secondary);
        border-radius: 30px;
        border: 1px solid var(--border-color);
        cursor: pointer;
    }
    
    /* On click, native picker opens - works well on mobile */
    .filter-group .filter-select:active {
        background: var(--bg-tertiary);
    }
}

/* 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;
    }
}

/* ============================================
   MOBILE CATEGORIES - SMALLER & BETTER
   ============================================ */

@media (max-width: 768px) {
    /* Section header smaller */
    .section-header h2 {
        font-size: 1.1rem !important;
        margin-bottom: 2px !important;
    }
    
    .section-header p {
        font-size: 0.65rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Category cards - smaller */
    .categories-drag-scroll .category-card {
        width: 85px !important;
        padding: 10px 6px !important;
        border-radius: 10px !important;
    }
    
    .categories-drag-scroll .category-icon {
        font-size: 1.4rem !important;
        margin-bottom: 4px !important;
    }
    
    .categories-drag-scroll .category-card h4 {
        font-size: 0.6rem !important;
        font-weight: 600 !important;
    }
    
    .categories-drag-scroll {
        gap: 8px !important;
        padding: 6px 0 10px 0 !important;
    }
    
    /* Remove fade effect on mobile */
    .categories-fade-wrapper::before,
    .categories-fade-wrapper::after {
        display: none !important;
    }
}