.sjseo-category-bottom {
    --sjseo-gold: #b88a2b;
    --sjseo-gold-dark: #8c6419;
    --sjseo-ink: #202020;
    --sjseo-muted: #606060;
    --sjseo-cream: #fbf8f1;
    clear: both !important;
    display: grid !important;
    flex: 0 0 100% !important;
    float: none !important;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 24px;
    width: 100% !important;
    max-width: none !important;
    margin: 56px 0 24px !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Shoptimizer repite el orden y el contador después de ul.products.
   Se oculta únicamente esa segunda copia; los controles superiores permanecen. */
body.tax-product_cat ul.products ~ .woocommerce-ordering,
body.tax-product_cat ul.products ~ .woocommerce-result-count,
body.tax-product_cat .products ~ .woocommerce-ordering,
body.tax-product_cat .products ~ .woocommerce-result-count {
    display: none !important;
}

.sjseo-duplicate-shop-control,
.sjseo-duplicate-shop-control[hidden] {
    display: none !important;
}

.sjseo-products-pagination {
    position: relative;
    z-index: 2;
}

.sjseo-products-pagination--top {
    display: flex !important;
    float: right !important;
    align-items: center;
    justify-content: flex-end;
    width: auto !important;
    margin: 0 0 20px 28px !important;
}

.sjseo-products-pagination--bottom {
    clear: both !important;
    display: flex !important;
    float: none !important;
    align-items: center;
    justify-content: flex-end;
    width: 100% !important;
    margin: 24px 0 42px !important;
}

.sjseo-products-pagination ul.page-numbers {
    position: static !important;
    display: flex !important;
    align-items: center;
    gap: 22px;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: none !important;
}

.sjseo-products-pagination ul.page-numbers li {
    position: static !important;
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.sjseo-products-pagination .page-numbers li > * {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 28px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #202020 !important;
    font-family: inherit !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    opacity: 1 !important;
    overflow: visible !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    transform: none !important;
}

.sjseo-products-pagination ul.page-numbers::before,
.sjseo-products-pagination ul.page-numbers::after,
.sjseo-products-pagination ul.page-numbers li::before,
.sjseo-products-pagination ul.page-numbers li::after,
.sjseo-products-pagination .page-numbers li > *::before,
.sjseo-products-pagination .page-numbers li > *::after {
    content: none !important;
    display: none !important;
}

.sjseo-products-pagination .page-numbers .current,
.sjseo-products-pagination a:hover,
.sjseo-products-pagination a:focus-visible {
    color: #d88900 !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination {
    clear: both !important;
    display: flex !important;
    flex: 0 0 100% !important;
    float: none !important;
    align-items: center;
    justify-content: flex-end;
    width: 100% !important;
    max-width: none !important;
    margin: 24px 0 42px !important;
    padding: 0 !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination ul.page-numbers {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: none !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination ul.page-numbers li {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination .page-numbers li > * {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 28px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #202020 !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination .page-numbers .current {
    color: #d88900 !important;
}

body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination a:hover,
body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination a:focus-visible {
    color: #b87900 !important;
}

.sjseo-category-bottom *,
.sjseo-category-bottom *::before,
.sjseo-category-bottom *::after {
    box-sizing: border-box;
}

.sjseo-category-bottom > * {
    float: none !important;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    margin: 0 !important;
}

.sjseo-category-content,
.sjseo-related-categories,
.sjseo-category-faq {
    border: 1px solid #e9dfcb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(36, 28, 13, .06);
}

.sjseo-category-content {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    padding: 34px 38px !important;
    background: linear-gradient(135deg, #fff 0%, var(--sjseo-cream) 100%);
}

.sjseo-category-content::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #d9b965, var(--sjseo-gold-dark));
}

.sjseo-category-bottom h2 {
    margin: 0 0 18px !important;
    color: var(--sjseo-ink);
    font-size: clamp(1.5rem, 2.1vw, 2rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -.02em;
}

.sjseo-category-content p {
    max-width: 920px;
    margin: 0 0 14px !important;
    color: var(--sjseo-muted);
    font-size: 16px;
    line-height: 1.75;
}

.sjseo-category-content p:last-child { margin-bottom: 0 !important; }

.sjseo-related-categories,
.sjseo-category-faq {
    padding: 30px !important;
}

.sjseo-related-categories ul {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.sjseo-related-categories li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.sjseo-related-categories a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #dfd2b8;
    border-radius: 999px;
    background: var(--sjseo-cream);
    color: #5b431c !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sjseo-related-categories a:hover,
.sjseo-related-categories a:focus-visible {
    border-color: var(--sjseo-gold);
    background: var(--sjseo-gold);
    color: #fff !important;
    transform: translateY(-1px);
}

.sjseo-category-faq details {
    margin: 0 !important;
    border-top: 1px solid #eee7da;
}

.sjseo-category-faq details:last-child { border-bottom: 1px solid #eee7da; }

.sjseo-category-faq summary {
    position: relative;
    padding: 16px 40px 16px 0;
    color: var(--sjseo-ink);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    list-style: none;
    cursor: pointer;
}

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

.sjseo-category-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 4px;
    display: grid;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--sjseo-cream);
    color: var(--sjseo-gold-dark);
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
    place-items: center;
    transform: translateY(-50%);
}

.sjseo-category-faq details[open] summary::after { content: "−"; }

.sjseo-category-faq details > div {
    padding: 0 40px 16px 0;
    color: var(--sjseo-muted);
    font-size: 14px;
    line-height: 1.65;
}

.sjseo-category-faq details > div p { margin: 0 0 10px !important; }
.sjseo-category-faq details > div p:last-child { margin-bottom: 0 !important; }

@media (max-width: 900px) {
    .sjseo-category-bottom { grid-template-columns: 1fr; margin-top: 40px !important; }
    .sjseo-category-content { grid-column: auto; }
}

@media (max-width: 600px) {
    .sjseo-category-bottom { gap: 16px; margin-top: 32px !important; }
    .sjseo-category-content,
    .sjseo-related-categories,
    .sjseo-category-faq { padding: 24px 20px !important; border-radius: 10px; }
    .sjseo-category-bottom h2 { font-size: 1.45rem !important; }
    .sjseo-category-content p { font-size: 15px; line-height: 1.65; }
    .sjseo-related-categories a { min-height: 40px; font-size: 13px; }
    body.tax-product_cat nav.woocommerce-pagination.sjseo-bottom-pagination {
        justify-content: center;
        margin: 20px 0 32px !important;
    }
    .sjseo-products-pagination--top,
    .sjseo-products-pagination--bottom {
        float: none !important;
        justify-content: center;
        width: 100% !important;
        margin: 18px 0 28px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sjseo-related-categories a { transition: none; }
}
