/* General Typography & Colors */
.ai-tools-featured-section,
.ai-tools-categories-section,
.ai-tools-directory-section {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
    margin-bottom: 50px;
}
.ai-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ai-header-flex h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}
.ai-header-flex .view-all {
    color: #111;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* Featured Grid */
.ai-tools-grid.featured {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.ai-tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.ai-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.ai-card-content-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.ai-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}
.ai-tool-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}
.ai-card-title-group h3 {
    font-size: 16px;
    margin: 0 0 4px 0;
    font-weight: 700;
}
.ai-card-title-group p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}
.ai-card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}
.ai-tag {
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.ai-tag-price {
    background: #eef2ff;
    color: #4f46e5;
}
.ai-card-footer {
    margin-bottom: 15px;
}
.ai-rating {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.star { color: #d1d5db; }
.star.filled { color: #fbbf24; }
.ai-btn-review {
    display: block;
    text-align: center;
    width: 100%;
    padding: 8px 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}
.ai-btn-review:hover { background: #f9fafb; }
.ai-btn-review.btn-red {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.ai-btn-review.btn-red:hover {
    background: #dc2626;
}

/* Categories Grid */
.ai-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}
.ai-category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
}
.ai-category-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1);
}
.ai-cat-icon {
    font-size: 28px;
    margin-bottom: 10px;
    background: #f9fafb;
    display: inline-block;
    padding: 10px;
    border-radius: 12px;
}
.ai-category-card h4 {
    font-size: 14px;
    margin: 0 0 5px 0;
    font-weight: 600;
}
.ai-category-card p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Directory Section */
.ai-directory-section h2 { margin-bottom: 20px; font-weight: 700; font-size: 24px; }
.ai-directory-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.ai-sidebar-filters {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #f3f4f6;
    padding-right: 20px;
}
.ai-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ai-filter-header h3 { font-size: 16px; margin:0; font-weight: 600; }
.ai-filter-header .clear-all { font-size: 12px; color: #6b7280; text-decoration: none; }
.ai-filter-group { margin-bottom: 25px; }
.ai-filter-group h4 { font-size: 14px; margin: 0 0 10px 0; font-weight: 600; }
.ai-filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 10px;
    cursor: pointer;
}

.ai-directory-main { flex-grow: 1; }
.ai-directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f3f4f6;
}
#ai-results-count {
    color: #6b7280;
    font-size: 14px;
}
.ai-directory-header select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

/* List Item */
.ai-list-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 20px;
}
.ai-list-item:hover { background: #fafafa; border-radius: 8px; padding-left: 10px; padding-right: 10px; margin-left: -10px; margin-right: -10px; }
.ai-list-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}
.ai-list-info { flex: 2; min-width: 200px; }
.ai-list-info h4 { margin: 0 0 4px 0; font-size: 16px; font-weight: 600; }
.ai-list-info p { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.4; }
.ai-list-tags { flex: 1.5; display: flex; gap: 5px; flex-wrap: wrap; }
.ai-list-rating { flex: 1; font-size: 14px; display:flex; align-items:center; gap:4px; }
.ai-list-price { flex: 1; font-size: 13px; color: #6b7280; }
.ai-list-price strong { color: #111; }
.ai-list-actions { flex: 1.5; display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.ai-btn-bookmark {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.ai-btn-bookmark:hover { background: #f3f4f6; }
.ai-btn-load-more {
    display: block;
    margin: 30px auto 0;
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.ai-btn-load-more:hover { background: #f9fafb; }

@media (max-width: 768px) {
    .ai-directory-layout { flex-direction: column; }
    .ai-sidebar-filters { width: 100%; border-right: none; border-bottom: 1px solid #f3f4f6; padding-right: 0; padding-bottom: 20px; }
    .ai-list-item { flex-direction: column; align-items: flex-start; }
    .ai-list-actions { width: 100%; justify-content: flex-start; }
}
