/**
 * Brands Directory - Sophisticated modern design
 * Mobile-first, glassmorphism effects, aura visualizations
 */

/* Hero Section - Modern gradient design */
.directory-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    margin-top: -1px; /* Fix white line gap with nav */
}

.directory-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.9) 0%, 
        rgba(167, 139, 250, 0.8) 50%, 
        rgba(78, 205, 196, 0.7) 100%);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
                      radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.directory-hero__container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xxl) var(--space-l);
    text-align: center;
}

.directory-hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-l);
    line-height: 1.1;
}

.directory-hero__title em {
    color: white;
    font-style: normal;
    font-weight: 700;
}

.directory-hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xxl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Flexa-Style Unified Search System */
.unified-search-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.unified-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.search-section {
    flex: 2;
    display: flex;
    align-items: center;
    padding: var(--space-l);
    position: relative;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.search-icon {
    color: #6B7280;
    margin-right: var(--space-m);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-lg);
    color: var(--primary);
    font-weight: 500;
}

.search-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
}

.filter-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--space-l);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-section:last-child {
    border-right: none;
}

/* Force remove right border from all filter sections in hero */
.directory-hero .filter-section {
    border-right: none !important;
}

.filter-section:hover {
    background: rgba(79, 70, 229, 0.03);
}

.filter-section.active {
    background: rgba(79, 70, 229, 0.05);
}

.filter-icon {
    color: #6B7280;
    margin-right: var(--space-s);
    flex-shrink: 0;
}

.filter-label {
    color: #6B7280;
    font-size: var(--text-base);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
}

.filter-section.has-selection .filter-label {
    color: var(--accent);
    font-weight: 600;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-l);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-top: var(--space-s);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.filter-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: var(--space-m) var(--space-l);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary);
    font-weight: 500;
}

.dropdown-option:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--accent);
}

.dropdown-option.selected {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent);
    font-weight: 600;
}

.dropdown-option:disabled,
.dropdown-option[style*="pointer-events: none"] {
    opacity: 0.4 !important;
    cursor: not-allowed;
}

.dropdown-option[style*="pointer-events: none"]:hover {
    background: transparent !important;
    color: inherit !important;
}

.option-icon {
    margin-right: var(--space-s);
    font-size: 1.1em;
}

.option-text {
    flex: 1;
}

.option-count {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: auto;
}

/* Search Dropdown for Brand Suggestions */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-l);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1200;
    margin-top: var(--space-s);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.search-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.search-suggestion {
    display: flex;
    align-items: center;
    padding: var(--space-m) var(--space-l);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary);
}

.search-suggestion:hover,
.search-suggestion.highlighted,
.suggestion-item:hover,
.suggestion-item.highlighted {
    background: rgba(79, 70, 229, 0.15);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: calc(var(--space-m) - 3px);
}

/* Selected Filters Display */
.selected-filters {
    margin-top: var(--space-l);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-m);
    flex-wrap: wrap;
}

.filters-list {
    display: flex;
    gap: var(--space-s);
    flex-wrap: wrap;
}

.filter-chip {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent);
    padding: var(--space-s) var(--space-m);
    border-radius: var(--radius-l);
    font-size: var(--text-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-s);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.filter-chip-remove {
    background: rgba(79, 70, 229, 0.2);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 12px;
    transition: all 0.2s ease;
}

.filter-chip-remove:hover {
    background: rgba(79, 70, 229, 0.3);
}

.clear-all-filters {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    padding: var(--space-s) var(--space-m);
    border-radius: var(--radius-l);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Hero Tags - Like brand page tags */
.hero-tags {
    margin: var(--space-xl) 0 var(--space-l) 0;
}

.hero-tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-s);
}

.hero-tag {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-1px);
}

.hero-tag.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Advanced Filters Toggle */
.advanced-filters-toggle {
    text-align: center;
    margin: var(--space-l) 0;
}

.toggle-advanced {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-s);
    margin: 0 auto;
}

.toggle-advanced:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.toggle-advanced svg {
    transition: transform 0.3s ease;
}

.toggle-advanced.expanded svg {
    transform: rotate(180deg);
}

/* Collapsible Advanced Filters */
.advanced-filters {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: var(--space-l);
    margin: var(--space-l) 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.advanced-filters.show {
    opacity: 1;
    transform: translateY(0);
}

.advanced-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-l);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 12px;
    margin-bottom: var(--space-s);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.filter-select option {
    background: var(--primary);
    color: white;
}

/* Clear Filters Container */
.clear-filters-container {
    display: flex;
    justify-content: center;
    margin-top: var(--space-l);
}

.clear-filters {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Directory Grid Section */
.directory-grid-section {
    background: var(--surface);
    padding: var(--space-xxl) 0;
}

.directory-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-l);
}

.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.directory-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary);
    margin: 0;
}

.directory-controls {
    display: flex;
    align-items: center;
    gap: var(--space-l);
}

.sort-container {
    display: flex;
    align-items: center;
}

.sort-select {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sort-select:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sort-select option {
    background: var(--surface);
    color: var(--text-primary);
}

.view-toggles {
    display: flex;
    gap: var(--space-s);
}

.view-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 0;
    margin: 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    vertical-align: top;
    line-height: 1;
}

.view-toggle svg {
    display: block;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.view-toggle:hover,
.view-toggle.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Brand Cards Grid */
.brands-grid {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-xxl);
}

.brands-grid.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.brands-grid.view-list {
    grid-template-columns: 1fr;
    gap: var(--space-m);
}

/* Directory Brand Card Styles */
.directory-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    overflow: visible;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.directory-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.directory-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.directory-card__content {
    padding: var(--space-xl);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Visual Section with Aura */
.directory-card__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xl);
    height: 100px;
}

.directory-card__aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.mini-aura {
    width: 60px;
    height: 60px;
    position: relative;
    transform: scale(var(--aura-scale, 0.5));
}

.mini-aura__blob {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(255, 107, 107, var(--people-strength, 0.3)) 0%,
        rgba(78, 205, 196, var(--planet-strength, 0.3)) 35%,
        rgba(167, 139, 250, var(--animals-strength, 0.3)) 70%,
        transparent 100%);
    filter: blur(2px);
    animation: pulse 3s ease-in-out infinite;
}

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

.directory-card__logo {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-l);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.directory-card__logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-m);
}

.directory-card__logo-fallback {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-lg);
    border-radius: var(--radius-m);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Card Information */
.directory-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-m);
}

.directory-card__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.directory-card__score {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: var(--space-s) var(--space-m);
    border-radius: var(--radius-l);
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
    margin-left: var(--space-m);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.directory-card__score::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.directory-card__category {
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: var(--space-m);
    background: var(--accent-light);
    padding: var(--space-xs) var(--space-s);
    border-radius: var(--radius-s);
    display: inline-block;
}

.directory-card__description {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.5;
    margin-bottom: var(--space-l);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

/* Tags */
.directory-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    margin-top: auto;
    align-items: center;
}

.tags-visible {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
}

.tags-hidden {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    margin-top: var(--space-s);
}

.tags-toggle {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: var(--space-xs);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: relative;
}

.tags-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--accent);
    transform: scale(1.1);
}

.toggle-icon {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1;
}

.toggle-text {
    position: absolute;
    top: -8px;
    right: -6px;
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    border: 1px solid var(--accent);
}

.directory-card__tag {
    padding: var(--space-s) var(--space-m);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

/* Custom tooltip styles */
.directory-card__tag::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    margin-bottom: 4px;
}

.directory-card__tag::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.directory-card__tag:hover::before,
.directory-card__tag:hover::after {
    opacity: 1;
}

.directory-card__tag--cruelty-free {
    background: var(--animals-secondary);
    color: var(--animals-primary);
}

.directory-card__tag--vegan {
    background: var(--planet-secondary);
    color: var(--planet-primary);
}

.directory-card__tag--inclusive {
    background: var(--people-secondary);
    color: var(--people-primary);
}

/* PPA Breakdown for Featured Cards */
.directory-card__ppa {
    border-top: 1px solid var(--border);
    padding-top: var(--space-m);
}

.ppa-mini {
    display: flex;
    justify-content: space-around;
}

.ppa-mini__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.ppa-mini__label {
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.ppa-mini__score {
    color: var(--primary);
    font-weight: 700;
    font-size: var(--text-sm);
}

/* States */
.loading-state,
.empty-state {
    text-align: center;
    padding: var(--space-xxl);
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-l);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-l);
}

.empty-cta {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    padding: var(--space-m) var(--space-xl);
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-l);
    transition: all 0.3s ease;
}

.empty-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* Featured Categories - Sophisticated Design */
.featured-categories {
    background: var(--surface);
    padding: var(--space-xxl) 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.category-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: var(--space-xl);
    text-align: center;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.category-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(79, 70, 229, 0.1);
}

.category-card > * {
    position: relative;
    z-index: 2;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--space-l);
    filter: grayscale(0.1);
    display: block;
}

.category-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-m);
    letter-spacing: -0.02em;
}

.category-count {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    margin: 0;
    background: var(--accent-light);
    color: var(--accent);
    padding: var(--space-xs) var(--space-s);
    border-radius: var(--radius-s);
    display: inline-block;
}

/* Newsletter Section */
.directory-newsletter {
    background: var(--primary);
    color: white;
    padding: var(--space-xxl) 0;
}

/* FORCE LEFT ALIGNMENT FOR FILTER SECTIONS */
.directory-hero .directory-hero__container .filter-section,
html body .directory-hero .directory-hero__container .filter-section {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    width: 100% !important;
}

.directory-hero .filter-tags,
.directory-hero .filter-tags--categories,
.directory-hero .filter-tags--values,
html body .directory-hero .filter-tags,
html body .directory-hero .filter-tags--categories,
html body .directory-hero .filter-tags--values {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: left !important;
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .directory-hero {
        min-height: 50vh;
    }
    
    .directory-hero__container {
        padding: var(--space-xl) var(--space-m);
    }
    
    .unified-search {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .search-section,
    .filter-section {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: var(--space-m);
    }
    
    .filter-section:last-child {
        border-bottom: none;
    }
    
    .filter-label {
        font-size: var(--text-sm);
    }
    
    .search-input {
        font-size: var(--text-base);
    }
    
    .advanced-filters-grid {
        grid-template-columns: 1fr;
        gap: var(--space-m);
    }
    
    .brands-grid.view-grid {
        grid-template-columns: 1fr;
    }
    
    .directory-header {
        flex-direction: column;
        gap: var(--space-m);
        align-items: center;
    }
    
    .directory-controls {
        flex-direction: column;
        gap: var(--space-m);
        width: 100%;
    }
    
    .view-toggles {
        justify-content: center;
    }
    
    .sort-container {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .directory-card__content {
        padding: var(--space-m);
    }
    
    .directory-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-s);
    }
    
    .directory-card__score {
        margin-left: 0;
        align-self: flex-start;
    }
}

/* Load More Button Styling */
.lazy-loading-section {
    margin-top: var(--space-xl);
    text-align: center;
}

.load-more-btn {
    background: var(--accent) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: var(--space-m) var(--space-xl) !important;
    font-size: var(--text-lg) !important;
    font-weight: 700 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--space-s);
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    min-width: 200px;
    text-decoration: none !important;
}

.load-more-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4) !important;
    background: var(--accent-dark) !important;
    color: white !important;
}

.load-more-btn:active {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2) !important;
}

.load-more-text {
    font-size: var(--text-lg);
    line-height: 1;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-s);
    padding: var(--space-l);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}