/* Index page loading spinner */
.loading-spinner {
    text-align: center;
    padding: 50px;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Location icon and link styles */
.location-icon {
    margin-right: 6px;
}

.change-location-link {
    margin-left: auto;
    font-size: 0.875rem;
}

/* View All Shops Button - Centered with spacing from shops and footer */
.view-all-container {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 20px 0;
    width: 100%;
    clear: both;
}

.view-all-container .btn {
    display: inline-block;
}

/* ============================================
   FORCE DROPDOWN ABOVE CATEGORIES
   ============================================ */

/* Add this to body when dropdown is open */
body.search-dropdown-open .categories-drag-container,
body.search-dropdown-open .categories-drag-scroll,
body.search-dropdown-open .category-card {
    pointer-events: none !important;
}

.super-search-container {
    position: relative;
    z-index: 10000 !important;
}

.super-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    z-index: 100000 !important;
    overflow-y: auto;
    pointer-events: auto !important;
}

/* Make dropdown items clickable */
.super-search-dropdown .search-result-item {
    pointer-events: auto !important;
    cursor: pointer;
}
/* Force center alignment for search */
.hero .container {
    display: flex;
    justify-content: center;
}

.hero-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-section {
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10000 !important;
}

.search-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
     z-index: 10000 !important;
}

.super-search-container {
    width: 100%;
     z-index: 10000 !important;
}

.super-search-wrapper {
    width: 100%;
}
/* Lower categories z-index significantly */
#categories {
    position: relative;
    z-index: 1 !important;
}

.categories-fade-wrapper,
.categories-drag-container,
.categories-drag-scroll {
    position: relative;
    z-index: 1 !important;
}

/* Also fix for explore page */
.categories-section {
    position: relative;
    z-index: 1 !important;
}

/* Ensure no overlay from hero section */
.hero {
    position: relative;
    z-index: 2;
}
/* ============================================
   CTA LINK - MOBILE ONLY
   ============================================ */

.cta-buttons-container {
    display: none;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .cta-buttons-container {
        display: flex;
    }
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.cta-link i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.cta-link:active i {
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .cta-link {
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .cta-link i {
        font-size: 0.75rem;
    }
}

/* Category Drag Scroll */
#categories,
.categories-fade-wrapper,
.categories-drag-container,
.categories-drag-scroll {
    position: relative;
    z-index: 1 !important;
    text-align: center;
}
.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-primary);
}
.section-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}
.categories-fade-wrapper { position: relative; margin: 0 0 15px 0; }
.categories-fade-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 10;
    border-radius: 12px 0 0 12px;
}
.categories-fade-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to left, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 10;
    border-radius: 0 12px 12px 0;
}
[data-theme="dark"] .categories-fade-wrapper::before { background: linear-gradient(to right, var(--bg-primary), transparent); }
[data-theme="dark"] .categories-fade-wrapper::after { background: linear-gradient(to left, var(--bg-primary), transparent); }

.categories-drag-container {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    scrollbar-width: none;
    padding: 4px 0;
    position: relative;
    z-index: 1;
}
.categories-drag-container::-webkit-scrollbar { display: none; }
.categories-drag-container:active { cursor: grabbing; }
.categories-drag-scroll {
    display: flex;
    gap: 18px;
    padding: 12px 0 20px 0;
    width: max-content;
    position: relative;
    z-index: 1;
}
.categories-drag-container img,
.categories-drag-container i,
.categories-drag-container .category-card,
.categories-drag-container a {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 1;
}

/* Also add to the wrapper */
.categories-fade-wrapper {
    position: relative;
    z-index: 1;
}

/* Ensure categories section doesn't overlap */
#categories {
    position: relative;
    z-index: 1;
}

/* Category Card */
.categories-drag-scroll .category-card {
    flex-shrink: 0;
    width: 140px;
    background: var(--card-bg);
    padding: 20px 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    position: relative;
    z-index: 1;
}
.categories-drag-scroll .category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
    background: var(--primary-light);
}
.categories-drag-scroll .category-card:active {
    cursor: grabbing;
    transform: translateY(-2px);
}
.categories-drag-scroll .category-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    pointer-events: none;
    transition: transform 0.2s ease;
    display: inline-block;
    color: var(--primary);
}
.categories-drag-scroll .category-card:hover .category-icon { transform: scale(1.05); }
.categories-drag-scroll .category-card h4 {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    pointer-events: none;
    letter-spacing: -0.2px;
}
/* Prevent vertical scroll interference on categories drag area */
.categories-fade-wrapper {
    touch-action: pan-y pinch-zoom !important;
}

.categories-drag-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

.categories-drag-scroll {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Center the location editor */
.search-container .location-editor {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* OR if that doesn't work, use this */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-container .location-editor {
    align-self: center;
}