/* ============================================
   STORES INDEX VIEW - OPTIMIZED STYLES
   Modern, clean, and fully responsive
   ============================================ */

/* ---------- CSS VARIABLES (Design System) ---------- */
    :root {
        --accent-navy: #1F2D3D;
        --accent-navy-light: #2A3B4F;
        --accent-navy-dark: #141E2B;

        /* Gradients */
        --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
        --gradient-secondary: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-light) 100%);
        --gradient-accent: linear-gradient(135deg, var(--accent-navy-dark) 0%, var(--accent-navy-light) 100%);

        /* Shadows */
        --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
        --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
        --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.2);
        --primary-glow: 0 0 25px rgba(44, 166, 164, 0.5);
    }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ---------- PAGE HEADER ---------- */
.page-header {
    background: var(--gradient-accent);
    background-size: 200% 200%;
    animation: gradientFlow 12s ease infinite;
    padding: 4rem 0;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, var(--primary-lighter) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.95);
}

.floating-text {
    animation: float 4s ease-in-out infinite;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb-custom {
    background: linear-gradient(135deg, #fff 0%, var(--light-gray) 100%);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.breadcrumb-item a {
    color: var(--accent-navy);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.breadcrumb-item a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.breadcrumb-item.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--primary);
    font-weight: 400;
    content: "›";
    font-size: 1.2rem;
}

/* ---------- STATS BAR ---------- */
.stats-bar {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
    color: white;
    padding: 1rem 1.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ---------- SEARCH SECTION ---------- */
.store-search-section {
    margin-bottom: 2rem;
}

.store-search-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.store-search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.store-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
}

.store-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--light-gray);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: var(--primary-glow);
}

/* Alphabet Navigation */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.alphabet-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--light-gray);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.alphabet-letter:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.alphabet-letter.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--primary-glow);
}

.alphabet-all {
    width: auto;
    padding: 0 1rem;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-tag {
    background: var(--light-gray);
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.filter-tag i {
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition-fast);
}

.filter-tag i:hover {
    transform: scale(1.1);
    color: var(--secondary-dark);
}

/* Search Results Info */
.search-results-info .stats-bar {
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    animation: none;
    background: var(--gradient-primary);
}

/* ---------- STORE CARDS ---------- */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.5rem;
}

.store-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.store-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.store-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.store-card:hover::before {
    transform: scaleX(1);
}

.store-image-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-gray) 0%, #fff 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.store-image {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.store-card:hover .store-image {
    transform: scale(1.05);
}

.store-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.store-content {
    padding: 1rem;
    text-align: center;
    background: white;
}

.store-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card:hover .store-name {
    color: var(--primary);
}

.store-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.store-meta i {
    color: var(--primary);
    transition: var(--transition-fast);
}

.store-card:hover .store-meta i {
    transform: scale(1.1);
}

/* ---------- LETTER SECTIONS ---------- */
.letter-section {
    margin-bottom: 2.5rem;
}

.letter-header {
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.letter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-navy);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.letter-title i {
    color: var(--primary);
    font-size: 1.3rem;
}

.letter-count {
    background: var(--light-gray);
    color: var(--primary-dark);
    font-size: 0.8rem;
    padding: 0.125rem 0.5rem;
    border-radius: 2rem;
    font-weight: 500;
}

/* ---------- NO RESULTS STATE ---------- */
.no-results,
.no-stores-card {
    background: linear-gradient(135deg, #fff 0%, var(--light-gray) 100%);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.no-results-icon,
.no-stores-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.no-results h4,
.no-stores-card h4 {
    color: var(--accent-navy);
    margin-bottom: 0.75rem;
}

/* ---------- PAGINATION ---------- */
.pagination-custom {
    margin-top: 2rem;
}

.pagination-custom .page-link {
    border: none;
    color: var(--accent-navy);
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin: 0 0.25rem;
    transition: var(--transition-base);
    background: transparent;
    padding: 0.5rem 0.875rem;
}

.pagination-custom .page-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pagination-custom .page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--primary-glow);
}

.pagination-custom .page-item.disabled .page-link {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ---------- MOBILE OPTIMIZATIONS ---------- */
@media (max-width: 768px) {
    .page-header {
        padding: 2.5rem 1rem;
        border-radius: 0 0 1rem 1rem;
    }
    
    .breadcrumb-custom {
        padding: 0.75rem 1rem;
    }
    
    .stores-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .store-image-container {
        min-height: 100px;
        padding: 0.75rem;
    }
    
    .store-image {
        max-height: 80px;
    }
    
    .store-content {
        padding: 0.75rem;
    }
    
    .store-name {
        font-size: 0.85rem;
    }
    
    .stats-bar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alphabet-letter {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 0.8rem;
    }
    
    .letter-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .stores-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.875rem;
    }
    
    .store-image-container {
        min-height: 85px;
        padding: 0.625rem;
    }
    
    .store-image {
        max-height: 65px;
    }
    
    .store-name {
        font-size: 0.8rem;
    }
    
    .store-meta {
        font-size: 0.7rem;
    }
    
    .store-search-container {
        padding: 1rem;
    }
    
    .alphabet-nav {
        gap: 0.35rem;
    }
    
    .alphabet-letter {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
}

/* ---------- ACCESSIBILITY: REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .store-card:hover {
        transform: none !important;
    }
    
    .store-card:hover .store-image {
        transform: none !important;
    }
}

/* ---------- UTILITY CLASSES ---------- */
.text-decoration-none {
    text-decoration: none;
}

.text-primary {
    color: var(--primary) !important;
}

.text-dark {
    color: var(--accent-navy) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.bg-light {
    background: var(--light-gray) !important;
}

/* Loading Skeleton Animation */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
}