/**
 * Frontend styles for Category SEO Content & Header
 * Developed by: Sahariar Sultan Masuk (https://sahariar.com)
 */

/* Top Category Header Box & H1 */
.wc-cat-seo-top-header {
    margin-top: 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    clear: both !important;
}

.wc-cat-seo-h1 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #3749bb !important; /* Star Tech blue heading */
    margin: 15px 0 10px 0 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

/* Category Description Font Size Increase & High Contrast */
.term-description,
.term-description p,
.page-description,
.page-description p,
.archive-description,
.archive-description p,
.woocommerce-products-header__description,
.woocommerce-products-header__description p,
.wc-cat-seo-top-description,
.wc-cat-seo-top-description p,
.ast-archive-description,
.ast-archive-description p,
.woocommerce-products-header p,
.woocommerce-archive-header p,
.site-main > header p {
    font-size: 15.5px !important;
    line-height: 1.75 !important;
    color: #24292f !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    margin-bottom: 12px !important;
}

.term-description p:last-child,
.wc-cat-seo-top-description p:last-child {
    margin-bottom: 0 !important;
}

/* Bottom SEO Content Block (100% Full Width) */
.wc-cat-seo-bottom-block {
    margin-top: 45px !important;
    margin-bottom: 40px !important;
    padding: 30px 35px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    grid-column: 1 / -1 !important; /* Spans full grid width if inside CSS Grid */
    flex: 1 1 100% !important;      /* Spans full flex width if inside Flexbox */
}

.wc-cat-seo-bottom-content {
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    color: #333333 !important;
    width: 100% !important;
}

/* Headings within Bottom Content */
.wc-cat-seo-bottom-content h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
}

.wc-cat-seo-bottom-content h3 {
    font-size: 16.5px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
}

.wc-cat-seo-bottom-content h2:first-child,
.wc-cat-seo-bottom-content h3:first-child {
    margin-top: 0 !important;
}

.wc-cat-seo-bottom-content p {
    margin-bottom: 14px !important;
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    color: #333333 !important;
}

.wc-cat-seo-bottom-content ul,
.wc-cat-seo-bottom-content ol {
    margin: 12px 0 18px 24px !important;
    padding: 0 !important;
}

.wc-cat-seo-bottom-content li {
    margin-bottom: 6px !important;
}

/* Links */
.wc-cat-seo-bottom-content a {
    color: #d10024 !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
    transition: color 0.15s ease !important;
}

.wc-cat-seo-bottom-content a:hover {
    color: #3749bb !important;
    text-decoration: underline !important;
}

/* Price List & Comparison Table Styling */
.wc-cat-seo-bottom-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    background: #ffffff !important;
    font-size: 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.wc-cat-seo-bottom-content table th {
    background-color: #f9fafb !important;
    color: #111827 !important;
    font-weight: 700 !important;
    text-align: left !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #e5e7eb !important;
    border-top: 1px solid #e5e7eb !important;
}

.wc-cat-seo-bottom-content table td {
    padding: 11px 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #374151 !important;
    vertical-align: middle !important;
}

.wc-cat-seo-bottom-content table tr:last-child td {
    border-bottom: none !important;
}

.wc-cat-seo-bottom-content table tr:nth-child(even) {
    background-color: #fafbfc !important;
}

.wc-cat-seo-bottom-content table tr:hover {
    background-color: #f3f4f6 !important;
}

.wc-cat-seo-bottom-content table th:last-child,
.wc-cat-seo-bottom-content table td:last-child {
    text-align: right !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wc-cat-seo-bottom-block {
        padding: 18px 15px !important;
        margin-top: 28px !important;
    }
    
    .wc-cat-seo-h1 {
        font-size: 20px !important;
    }

    .wc-cat-seo-bottom-content table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}
