/**
 * Shine GPL - Brands & Niches Directory Pages CSS
 * Engineered to 120Hz Ultra-Smooth Refresh Rate Performance Standard
 * Strictly Dynamic CSS Variables (Shine GPL Settings)
 */

/* 1. Main Directory Container */
.shine-directory-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 20px 80px;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--shine-text, #334155);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 2. Hero Header Section */
.shine-directory-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shine-directory-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: var(--shine-primary-8, rgba(16, 185, 129, 0.08));
    border: 1px solid var(--shine-primary-20, rgba(16, 185, 129, 0.20));
    color: var(--shine-primary, #10B981);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--shine-primary-10, rgba(16, 185, 129, 0.10));
}

.shine-badge-niche {
    background: var(--shine-primary-10, rgba(16, 185, 129, 0.10));
}

.shine-directory-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--shine-black, #0F172A);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.shine-directory-subtitle {
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.6;
    color: var(--shine-secondary, #64748B);
    margin: 0 0 24px;
}

/* 3. Metrics Pills Bar */
.shine-directory-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.shine-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--shine-white, #FFFFFF);
    border: 1px solid var(--shine-primary-15, rgba(16, 185, 129, 0.15));
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    font-size: 13px;
}

.shine-stat-number {
    font-weight: 800;
    color: var(--shine-primary, #10B981);
}

.shine-stat-label {
    color: var(--shine-secondary, #64748B);
    font-weight: 500;
}

.shine-stat-live {
    border-color: var(--shine-primary-25, rgba(16, 185, 129, 0.25));
    background: var(--shine-primary-5, rgba(16, 185, 129, 0.05));
}

.shine-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--shine-primary, #10B981);
    box-shadow: 0 0 0 3px var(--shine-primary-25, rgba(16, 185, 129, 0.25));
    animation: shinePulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes shinePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--shine-primary-40, rgba(16, 185, 129, 0.40)); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 4. Live Search Input Box */
.shine-directory-search-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.shine-directory-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--shine-white, #FFFFFF);
    border: 1.5px solid var(--shine-primary-20, rgba(16, 185, 129, 0.20));
    border-radius: 14px;
    padding: 4px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shine-directory-search-box:focus-within {
    border-color: var(--shine-primary, #10B981);
    box-shadow: 0 6px 24px var(--shine-primary-20, rgba(16, 185, 129, 0.20)), 0 0 0 3px var(--shine-primary-10, rgba(16, 185, 129, 0.10));
}

.shine-search-icon {
    display: flex;
    align-items: center;
    color: var(--shine-primary, #10B981);
    margin-right: 12px;
}

.shine-directory-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--shine-black, #0F172A);
    padding: 12px 0;
    width: 100%;
}

.shine-directory-input::placeholder {
    color: var(--shine-secondary, #94A3B8);
}

.shine-search-clear-btn {
    border: none;
    background: var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    color: var(--shine-secondary, #64748B);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, color 0.2s;
}

.shine-search-clear-btn:hover {
    background: var(--shine-primary, #10B981);
    color: #FFFFFF;
}

/* 5. Toolbar (A-Z Jump + Sort) */
.shine-directory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    border-bottom: 1px solid var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.shine-az-nav {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.shine-az-scroll-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.shine-az-btn {
    border: 1px solid var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    background: var(--shine-white, #FFFFFF);
    color: var(--shine-secondary, #64748B);
    font-size: 13px;
    font-weight: 700;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.shine-az-btn[data-letter="ALL"] {
    min-width: 48px;
    padding: 0 12px;
}

.shine-az-btn:hover:not(:disabled) {
    background: var(--shine-primary-8, rgba(16, 185, 129, 0.08));
    border-color: var(--shine-primary-30, rgba(16, 185, 129, 0.30));
    color: var(--shine-primary, #10B981);
    transform: translateY(-1px);
}

.shine-az-btn.active {
    background: var(--shine-primary, #10B981);
    border-color: var(--shine-primary, #10B981);
    color: #FFFFFF;
    box-shadow: 0 3px 10px var(--shine-primary-30, rgba(16, 185, 129, 0.30));
}

.shine-az-btn:disabled {
    opacity: 0.25;
    background: transparent;
    border-color: transparent;
    cursor: not-allowed;
}

.shine-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shine-sort-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--shine-secondary, #64748B);
    white-space: nowrap;
}

.shine-sort-select {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--shine-primary-20, rgba(16, 185, 129, 0.20));
    background: var(--shine-white, #FFFFFF);
    color: var(--shine-black, #0F172A);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.2s;
}

.shine-sort-select:focus {
    border-color: var(--shine-primary, #10B981);
}

/* 6. Directory Grid & Cards */
.shine-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    transform: translateZ(0);
}

.shine-directory-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--shine-white, #FFFFFF);
    border: 1px solid var(--shine-primary-15, rgba(16, 185, 129, 0.15));
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.shine-directory-card:hover {
    transform: translateY(-3px) translateZ(0);
    border-color: var(--shine-primary, #10B981);
    box-shadow: 0 8px 24px var(--shine-primary-15, rgba(16, 185, 129, 0.15)), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Card Avatar */
.shine-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    border: 1px solid var(--shine-primary-20, rgba(16, 185, 129, 0.20));
    color: var(--shine-primary, #10B981);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shine-directory-card:hover .shine-card-avatar {
    background: var(--shine-primary, #10B981);
    color: #FFFFFF;
}

.shine-avatar-niche {
    background: var(--shine-primary-8, rgba(16, 185, 129, 0.08));
    font-size: 16px;
    font-weight: 700;
}

/* Card Info */
.shine-card-info {
    flex: 1;
    min-width: 0;
}

.shine-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--shine-black, #0F172A);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.shine-directory-card:hover .shine-card-title {
    color: var(--shine-primary, #10B981);
}

.shine-card-meta {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--shine-secondary, #94A3B8);
}

/* Card Count Badge & Arrow */
.shine-card-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.shine-card-count-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    padding: 4px 8px;
    background: var(--shine-primary-8, rgba(16, 185, 129, 0.08));
    border: 1px solid var(--shine-primary-15, rgba(16, 185, 129, 0.15));
    border-radius: 6px;
    color: var(--shine-primary, #10B981);
    font-size: 11px;
}

.shine-card-count-badge strong {
    font-size: 13px;
    font-weight: 800;
}

.shine-card-count-badge small {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.85;
}

.shine-card-arrow-icon {
    display: flex;
    align-items: center;
    color: var(--shine-secondary, #94A3B8);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
}

.shine-directory-card:hover .shine-card-arrow-icon {
    transform: translateX(4px);
    color: var(--shine-primary, #10B981);
}

/* 7. Empty Search State */
.shine-directory-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--shine-white, #FFFFFF);
    border: 1px dashed var(--shine-primary-25, rgba(16, 185, 129, 0.25));
    border-radius: 16px;
    margin-top: 20px;
}

.shine-empty-icon {
    display: inline-flex;
    padding: 16px;
    border-radius: 50%;
    background: var(--shine-primary-10, rgba(16, 185, 129, 0.10));
    color: var(--shine-primary, #10B981);
    margin-bottom: 16px;
}

.shine-directory-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--shine-black, #0F172A);
    margin: 0 0 8px;
}

.shine-directory-empty p {
    font-size: 14px;
    color: var(--shine-secondary, #64748B);
    margin: 0 0 18px;
}

.shine-reset-search-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: var(--shine-primary, #10B981);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s;
    box-shadow: 0 2px 8px var(--shine-primary-30, rgba(16, 185, 129, 0.30));
}

.shine-reset-search-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* 8. Mobile Responsiveness */
@media (max-width: 768px) {
    .shine-directory-wrapper {
        padding: 24px 14px 60px;
    }

    .shine-directory-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .shine-directory-card {
        padding: 14px 14px;
    }

    .shine-directory-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px 0;
        overflow: hidden;
    }

    .shine-az-nav {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .shine-az-scroll-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 2px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .shine-az-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 4px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .shine-az-btn[data-letter="ALL"] {
        min-width: 44px;
        padding: 0 8px;
    }

    .shine-sort-wrap {
        width: 100%;
        justify-content: space-between;
        border-top: 1px dashed var(--shine-primary-10, rgba(16, 185, 129, 0.10));
        padding-top: 12px;
    }
}

@media (max-width: 420px) {
    .shine-az-scroll-container {
        gap: 4px;
    }

    .shine-az-btn {
        min-width: 29px;
        height: 29px;
        font-size: 11px;
        border-radius: 6px;
    }

    .shine-az-btn[data-letter="ALL"] {
        min-width: 38px;
        font-size: 11px;
    }
}

