@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Montserrat", sans-serif;
    background: #09090B;
    color: #ffffff;
}

main {
    width: 100%;
    flex: 1 0 auto;
}

.breadcrumbs-section {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 3rem 54px 0.75rem;
}

.breadcrumbs-wrap {
    margin: 0 auto;
}

.breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    line-height: 1.25;
    color: #ffffff;
    white-space: nowrap;
    max-width: 100%;
}

.breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #a1a1a1;
}

.breadcrumbs .separator {
    color: #ffffff;
    flex-shrink: 0;
}

.breadcrumbs .current-page {
    color: #b9b9bb;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.ai-tools-hero {
    width: 100%;
    padding: 3.5rem 54px 2.5rem;
}

.ai-tools-hero-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.ai-tools-hero-copy {
    max-width: 640px;
    flex: 1 1 auto;
}

.ai-tools-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3.6vw, 2rem);
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.ai-tools-hero p {
    margin: 16px 0 0;
    color: #ffffff;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    line-height: 1.55;
    font-weight: 200;
}

.ai-tools-search {
    width: min(100%, 420px);
    height: 52px;
    flex: 0 0 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-radius: 999px;
    background: #161618;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-tools-search .fa-magnifying-glass {
    font-size: 0.95rem;
    color: #ffffff;
    flex-shrink: 0;
}

.ai-tools-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
}

.ai-tools-search input::placeholder {
    color: #8a8a90;
    font-weight: 300;
}

.ai-tools-search button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ai-tools-search button:hover,
.ai-tools-search button:focus-visible {
    color: #2cc00f;
}

.ai-tools-search:focus-within {
    border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1100px) {
    .ai-tools-hero-inner {
        gap: 32px;
    }

    .ai-tools-search {
        flex-basis: 340px;
        width: min(100%, 340px);
    }
}

@media (max-width: 900px) {
    .breadcrumbs-section {
        padding: 1.5rem 1.5rem 0.65rem;
    }

    .ai-tools-hero {
        padding: 2rem 1.5rem 2.75rem;
    }

    .ai-tools-featured {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .ai-tools-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .ai-tools-hero-copy {
        max-width: none;
    }

    .ai-tools-search {
        width: 100%;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .breadcrumbs-section,
    .ai-tools-hero,
    .ai-tools-featured,
    .ai-tools-seo,
    .ai-tools-faq {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .breadcrumbs {
        font-size: 0.875rem;
    }

    .ai-tools-hero h1 {
        font-size: 1.85rem;
    }

    .ai-tools-hero p {
        font-size: 0.92rem;
    }

    .ai-tools-search {
        height: 48px;
        padding: 0 14px;
    }
}

.ai-tools-featured {
    width: 100%;
    padding: 0 54px 2.75rem;
}

.ai-tools-featured[hidden] {
    display: none !important;
}

.ai-tools-featured-inner {
    max-width: 1300px;
    margin: 0 auto;
    
}

.ai-tools-featured h2 {
    margin: 0 0 22px;
    font-size: clamp(1.7rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.ai-tools-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.ai-tool-card--featured .ai-tool-card__top {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 0;
}

.ai-tool-card--featured .ai-tool-card__logo {
    width: 44px;
    height: 44px;
}

.ai-tool-card--featured h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.05rem;
    font-weight: 400;
}

.ai-tool-card--featured .ai-tool-card__preview {
    margin-top: 14px;
}

.ai-tool-card--featured .ai-tool-card__featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.ai-tool-card--featured .ai-tool-card__stats {
    flex-shrink: 0;
}

.ai-tool-card--featured .ai-tool-card__featured-category {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 70%;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-tools-directory {
    width: 100%;
    padding: 20px 54px 3.5rem;
}

.ai-tools-seo {
    width: 100%;
    padding: 100px 54px 4rem;
}

.ai-tools-seo-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.ai-tools-seo-inner h2 {
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-align: center;
}

.ai-tools-seo-inner > p {
    margin: 0 0 28px;
    max-width: 1100px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.7;
    text-align: center;
}

.ai-tools-seo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 40px;
}

.ai-tools-seo-grid article {
    padding: 22px 22px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: #0c0c0e;
}

.ai-tools-seo-grid h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ai-tools-seo-grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

.ai-tools-seo-grid a {
    color: #2cc00f;
    text-decoration: none;
}

.ai-tools-seo-grid a:hover {
    text-decoration: underline;
}

.ai-tools-faq {
    width: 100%;
    padding: 0 54px 5rem;
}

.ai-tools-faq-inner {
    max-width: 900px;
    margin: 0 auto;
}

.ai-tools-faq-inner h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-align: center;
}

.ai-tools-faq-intro {
    margin: 14px auto 0;
    max-width: 640px;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.6;
}

.ai-tools-faq-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-tools-faq-item {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 18px;
    overflow: hidden;
}

.ai-tools-faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    color: #000000;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    user-select: none;
}

.ai-tools-faq-item summary::-webkit-details-marker {
    display: none;
}

.ai-tools-faq-item summary span {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.ai-tools-faq-item summary i {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    color: #ffffff;
    background: #09090B;
    transition: transform 0.25s ease, background 0.2s ease;
}

.ai-tools-faq-item[open] summary i {
    transform: rotate(180deg);
    background: linear-gradient(180deg, #17a504 0%, #07a121 100%);
}

.ai-tools-faq-answer {
    padding: 0 24px 20px;
}

.ai-tools-faq-answer p {
    margin: 0;
    color: #535353;
    font-size: 1rem;
    line-height: 1.6;
}

.ai-tools-directory-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.ai-tools-sidebar {
    position: sticky;
    top: 88px;
    padding: 22px 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #0c0c0e;
}

.ai-tools-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.ai-tools-sidebar__head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ai-tools-sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #221E49;
    color: #ffffff;
    cursor: pointer;
}

.ai-tools-filter-group + .ai-tools-filter-group {
    margin-top: 18px;
}

.ai-tools-filter-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.ai-tools-filter-group__toggle i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.ai-tools-filter-group.is-open .ai-tools-filter-group__toggle i {
    transform: rotate(180deg);
}

.ai-tools-filter-group__body {
    display: none;
    padding-top: 12px;
}

.ai-tools-filter-group.is-open .ai-tools-filter-group__body {
    display: grid;
    gap: 10px;
}

.ai-tools-filter-empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    font-weight: 300;
}

#ai-tools-category-filters .ai-tools-filter-option.is-collapsed {
    display: none;
}

.ai-tools-filter-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2cc00f;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    width: fit-content;
}

.ai-tools-filter-more:hover {
    color: #48d52b;
}

.ai-tools-filter-more i {
    font-size: 0.7rem;
}

.ai-tools-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    font-weight: 300;
    cursor: pointer;
}

.ai-tools-filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ai-tools-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: transparent;
}

.ai-tools-filter-option input:checked + .ai-tools-check {
    border-color: #2cc00f;
    box-shadow: inset 0 0 0 4px #0c0c0e;
    background: #2cc00f;
}

.ai-tools-stars {
    display: inline-flex;
    gap: 3px;
    color: #2cc00f;
    font-size: 0.78rem;
}

.ai-tools-filter-actions {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-tools-filter-apply,
.ai-tools-filter-reset {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.ai-tools-filter-apply {
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, #17a504 0%, #07a121 100%);
}

.ai-tools-filter-apply:hover {
    filter: brightness(1.08);
}

.ai-tools-filter-reset {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    background: transparent;
}

.ai-tools-filter-reset:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.ai-tools-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    min-width: 0;
}

.ai-tools-pill {
    height: 38px;
    padding: 0 16px;
    font-weight: 300;
    border-radius: 999px;
    background-color: #252527;
    color: #ffffff;
    border: 0;
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
}

.ai-tools-pill:hover,
.ai-tools-pill[aria-pressed="true"] {
    color: #2cc00f;
    filter: brightness(1.06);
}

.ai-tools-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.ai-tools-toolbar__copy h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.ai-tools-toolbar__copy p {
    margin: 6px 0 0;
    color: #b9b9bb;
    font-size: 0.95rem;
    font-weight: 300;
}

.ai-tools-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ai-tools-filter-toggle {
    display: none;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.9rem;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ai-tools-sort {
    position: relative;
}

.ai-tools-sort__trigger {
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #f1f1f1;
    color: #111111;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.ai-tools-sort__trigger i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.ai-tools-sort.is-open .ai-tools-sort__trigger i {
    transform: rotate(180deg);
}

.ai-tools-sort__menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 170px;
    padding: 8px;
    border-radius: 14px;
    background: #f1f1f1;
}

.ai-tools-sort.is-open .ai-tools-sort__menu {
    display: grid;
    gap: 4px;
}

.ai-tools-sort__option {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #111111;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    padding: 9px 10px;
    cursor: pointer;
}

.ai-tools-sort__option:hover,
.ai-tools-sort__option:focus-visible {
    background: #e7e7e7;
}

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ai-tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
}

a.ai-tool-card {
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

a.ai-tool-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.ai-tool-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.ai-tool-card__logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #000000;
    flex-shrink: 0;
    overflow: hidden;
}

.ai-tool-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ai-tool-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    color: #ffffff;
}

.ai-tool-card__badge--editors {
    background: #4f6bff;
}

.ai-tool-card__badge--trending {
    background: #2cc00f;
}

.ai-tool-card__badge--popular {
    background: #ff4d9a;
}

.ai-tool-card h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.ai-tools-grid .ai-tool-card h3,
.ai-tool-related-grid .ai-tool-card h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.ai-tool-card__desc {
    margin: 14px 0 0;
    color: #b9b9bb;
    font-size: 0.9rem;
    font-weight: 300;
    padding-top: 12px;
    line-height: 1.4;
}

.ai-tools-grid .ai-tool-card__desc,
.ai-tool-related-grid .ai-tool-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.4em * 3);
}

.ai-tool-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.ai-tools-grid .ai-tool-card__tags,
.ai-tool-related-grid .ai-tool-card__tags {
    align-content: flex-start;
    min-height: 62px;
    max-height: 62px;
    overflow: hidden;
}

.ai-tool-card__tags span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 400;
}

.ai-tool-card__meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.ai-tools-grid .ai-tool-card__meta,
.ai-tool-related-grid .ai-tool-card__meta {
    margin-top: auto;
    padding-top: 16px;
    flex-shrink: 0;
}

.ai-tool-card__stats {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 200;
}

.ai-tool-card__stats .fa-star {
    color: #2cc00f;
}

.ai-tool-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ai-tool-card__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    color: #2cc00f;
    text-align: right;
}

.ai-tool-card__price span {
    font-size: 0.72rem;
    font-weight: 400;
}

.ai-tool-card__price strong {
    font-size: 1.3rem;
    font-weight: 700;
}

.ai-tool-card__preview {
    margin-top: 14px;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    background: #000000;
    overflow: hidden;
    flex-shrink: 0;
}

.ai-tool-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ai-tools-grid-status {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    font-weight: 300;
}

.ai-tools-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2.5rem;
}

.ai-tools-pagination[hidden] {
    display: none !important;
}

.ai-tools-pagination__btn {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: #252527;
    color: #ffffff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ai-tools-pagination__btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #17a504 0%, #07a121 100%);
    border-color: transparent;
    color: #ffffff;
}

.ai-tools-pagination__btn.is-active {
    background: linear-gradient(180deg, #17a504 0%, #07a121 100%);
    border-color: transparent;
    color: #ffffff;
}

.ai-tools-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ai-tools-sidebar-backdrop {
    display: none;
}

@media (max-width: 1200px) {
    .ai-tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .ai-tools-directory-inner {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 20px;
    }

    .ai-tools-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ai-tools-directory {
        padding: 0 1.5rem 3.5rem;
    }

    .ai-tools-seo {
        padding: 8px 1.5rem 3rem;
    }

    .ai-tools-faq {
        padding: 0 1.5rem 4rem;
    }

    .ai-tools-seo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-tools-directory-inner {
        grid-template-columns: 1fr;
    }

    .ai-tools-filter-toggle {
        display: inline-flex;
    }

    .ai-tools-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(360px, 88vw);
        max-height: none;
        margin: 0;
        border-radius: 0 18px 18px 0;
        z-index: 1300;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        display: flex;
        flex-direction: column;
    }

    .ai-tools-filter-actions {
        margin-top: auto;
    }

    .ai-tools-sidebar.is-open {
        transform: translateX(0);
    }

    .ai-tools-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .ai-tools-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1290;
    }

    .ai-tools-sidebar-backdrop[hidden] {
        display: none;
    }

    .ai-tools-main {
        min-width: 0;
    }

    .ai-tools-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        width: calc(100% + 3rem);
        max-width: none;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        margin-bottom: 24px;
        padding: 2px 1.5rem 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .ai-tools-pills::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 640px) {
    .ai-tools-seo-grid {
        grid-template-columns: 1fr;
    }

    .ai-tools-grid,
    .ai-tools-featured-grid {
        grid-template-columns: 1fr;
    }

    .ai-tools-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-tools-toolbar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .ai-tools-pagination {
        margin-top: 1.5rem;
        gap: 6px;
    }

    .ai-tools-pagination__btn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .ai-tools-directory,
    .ai-tools-seo,
    .ai-tools-faq {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ai-tools-pills {
        width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
