.afmm-tax-container {
    align-items: flex-start;
}

.afmm-tax-contents {
    box-sizing: border-box;
}

.afmm-tax-archive {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px 10px 48px;
    box-sizing: border-box;
    clear: both;
    overflow: hidden;
}

.afmm-breadcrumbs {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.8;
}

.afmm-tax-header h1 {
    margin: 0 0 20px;
    line-height: 1.35;
}

.afmm-term-intro {
    display: block;
    width: 100%;
    margin: 0 0 34px;
    clear: both;
}

.afmm-term-image {
    margin: 0;
}

.afmm-term-image img {
    display: block;
    width: 100%;
    height: auto;
}

.afmm-term-description p {
    margin-top: 0;
    max-width: none;
    width: 100%;
    column-count: 1;
    column-width: auto;
    break-inside: auto;
}

.afmm-products-section,
.afmm-link-section,
.afmm-faq {
    margin: 36px 0;
    clear: both;
}

.afmm-section-title {
    margin: 0 0 18px;
    padding: 0;
    line-height: 1.45;
}

.afmm-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.afmm-product-card {
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.afmm-product-card__image {
    display: block;
    aspect-ratio: 3 / 4;
    background: #f6f7f8;
    overflow: hidden;
    border-radius: 6px;
}

.afmm-product-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.afmm-product-card__title {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 700;
}

.afmm-product-card__meta {
    display: grid;
    grid-template-columns: 5em 1fr;
    gap: 6px 10px;
    margin: 0 0 14px;
    font-size: 13px;
}

.afmm-product-card__meta dt {
    color: #666;
}

.afmm-product-card__meta dd {
    margin: 0;
}

.afmm-product-card__link {
    display: inline-block;
    font-weight: 700;
}

.afmm-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 12px 0 0;
    list-style: none;
}

.afmm-link-list > li {
    margin: 0;
    padding: 0;
}

.afmm-link-list > li::before {
    content: none !important;
    display: none !important;
}

.afmm-link-list a {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #d7dce1;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
}

.afmm-faq details {
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin: 10px 0;
    padding: 0;
    background: #fff;
    overflow: hidden;
}

.afmm-faq details:last-child {
    border-bottom: 1px solid #e1e4e8;
}

.afmm-faq summary {
    cursor: pointer;
    font-weight: 700;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 44px 14px 16px;
    list-style: none;
}

.afmm-faq summary::-webkit-details-marker {
    display: none;
}

.afmm-faq summary::before {
    content: "Q";
    display: inline-grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

.afmm-faq summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 24px;
    height: 24px;
    border: 1px solid #d7dce1;
    border-radius: 50%;
    transform: translateY(-50%);
    color: #333;
    text-align: center;
    font-size: 18px;
    line-height: 22px;
}

.afmm-faq details[open] summary::after {
    content: "-";
}

.afmm-faq details > div {
    padding: 0 16px 16px 54px;
}

.afmm-faq-question {
    display: block;
    min-width: 0;
}

.afmm-related-taxonomies {
    margin: 30px 0;
    padding: 16px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fff;
}

.afmm-related-taxonomies p {
    margin: 0.35em 0;
}

.afmm-pagination {
    margin: 28px 0;
}

.afmm-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.afmm-pagination a,
.afmm-pagination span {
    display: inline-block;
    min-width: 34px;
    padding: 6px 10px;
    border: 1px solid #d7dce1;
    text-align: center;
}

@media (max-width: 640px) {
    .afmm-term-intro {
        display: block;
    }

    .afmm-tax-archive {
        padding-right: 0;
        padding-left: 0;
    }

    .afmm-product-grid {
        grid-template-columns: 1fr;
    }
}
