/* GEO AI Optimizer Pro — Frontend Styles */

.geoai-product-frontend-wrap,
.geoai-category-frontend-wrap {
    direction: rtl;
    margin-top: 32px;
    margin-bottom: 32px;
}

/* Summary block */

.geoai-summary-block {
    background: #f8fbff;
    border: 1px solid #d4e8f7;
    border-radius: 10px;
    padding: 22px 24px;
    margin-top: 24px;
    margin-bottom: 24px;
    font-family: inherit;
}

.geoai-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 18px;
}

.geoai-ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    flex: 0 0 auto;
}

.geoai-summary-header h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #005177;
    flex: 0 1 auto;
}

.geoai-badge-ai {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.2;
    background: #0073aa;
    color: #fff;
    border-radius: 999px;
    white-space: nowrap;
}

.geoai-summary-text {
    font-size: 15px;
    line-height: 1.95;
    color: #333;
}

.geoai-summary-text p {
    margin: 0 0 14px 0;
}

.geoai-summary-text p:last-child {
    margin-bottom: 0;
}

.geoai-short-answer {
    background: #fff;
    border-right: 4px solid #0073aa;
    padding: 12px 14px;
    border-radius: 0 6px 6px 0;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.8;
}

.geoai-takeaways {
    margin-top: 18px;
}

.geoai-takeaways strong {
    display: block;
    margin-bottom: 10px;
}

.geoai-takeaways ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.geoai-takeaways li {
    position: relative;
    margin: 0 0 10px 0;
    padding-right: 16px;
    font-size: 14px;
    line-height: 1.85;
}

.geoai-takeaways li:last-child {
    margin-bottom: 0;
}

.geoai-takeaways li::before {
    content: "•";
    position: absolute;
    right: 0;
    top: 0;
    color: #46b450;
    font-weight: 700;
}

.geoai-who-for,
.geoai-who-not-for {
    font-size: 14px;
    line-height: 1.85;
    color: #555;
    padding: 12px 14px;
    background: #f0f7fd;
    border-radius: 6px;
    margin-top: 16px;
}

/* Product + Category details blocks */

.geoai-product-details-block,
.geoai-category-details-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.geoai-product-field,
.geoai-category-field {
    display: block;
    margin: 0 0 30px 0;
    padding: 0 0 24px 0;
    border-bottom: 1px solid #eceff3;
}

.geoai-product-field:last-child,
.geoai-category-field:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.geoai-product-field + .geoai-product-field,
.geoai-category-field + .geoai-category-field {
    margin-top: 10px;
}

.geoai-product-field strong,
.geoai-category-field strong {
    display: block;
    margin: 0 0 12px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #1d2327;
}

.geoai-field-content {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.95;
    color: #333;
}

.geoai-product-field strong + .geoai-field-content,
.geoai-category-field strong + .geoai-field-content {
    margin-top: 12px;
}

.geoai-product-field .geoai-field-content + .geoai-field-content,
.geoai-category-field .geoai-field-content + .geoai-field-content {
    margin-top: 16px;
}

.geoai-field-content p {
    margin: 0 0 14px 0;
}

.geoai-field-content p:last-child {
    margin-bottom: 0;
}

.geoai-field-content ul,
.geoai-field-content ol,
.geoai-bullet-list {
    margin: 8px 0 0 0;
    padding-right: 22px;
    padding-left: 0;
}

.geoai-field-content ul li,
.geoai-field-content ol li,
.geoai-bullet-list li {
    margin: 0 0 10px 0;
    line-height: 1.9;
}

.geoai-field-content ul li:last-child,
.geoai-field-content ol li:last-child,
.geoai-bullet-list li:last-child {
    margin-bottom: 0;
}

/* FAQ */

.geoai-faq-block {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: 28px;
    margin-bottom: 28px;
}

.geoai-faq-block > strong {
    display: block;
    margin-bottom: 18px;
    font-size: 15px;
    color: #1d2327;
}

.geoai-faq-item-front {
    border-bottom: 1px solid #e8e8e8;
    padding: 18px 0;
    margin: 0 0 8px 0;
}

.geoai-faq-item-front:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.geoai-faq-q {
    font-weight: 600;
    font-size: 15px;
    color: #1d2327;
    margin-bottom: 10px;
    line-height: 1.8;
}

.geoai-faq-a {
    font-size: 14px;
    color: #555;
    padding-right: 22px;
    line-height: 1.95;
}

.geoai-faq-a p {
    margin: 0 0 12px 0;
}

.geoai-faq-a p:last-child {
    margin-bottom: 0;
}

/* Sources */

.geoai-sources-block {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    direction: rtl;
    margin-top: 24px;
    margin-bottom: 24px;
}

.geoai-sources-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.geoai-sources-header h4 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.geoai-sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.geoai-source-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.8;
}

.geoai-source-item:last-child {
    border-bottom: none;
}

.geoai-source-item a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.geoai-source-item a:hover {
    text-decoration: underline;
}

.geoai-source-publisher {
    color: #666;
}

.geoai-source-date {
    color: #999;
    font-size: 12px;
}

/* Freshness badge */

.geoai-freshness-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.geoai-fresh-green {
    background: #e6f4ea;
    color: #1b5e20;
    border: 1px solid #a8d5b0;
}

.geoai-fresh-yellow {
    background: #fff8e1;
    color: #7c4a00;
    border: 1px solid #ffe082;
}

.geoai-fresh-red {
    background: #fce8e8;
    color: #c62828;
    border: 1px solid #f9a8a8;
}

/* Responsive */

@media (max-width: 767px) {
    .geoai-summary-block,
    .geoai-product-details-block,
    .geoai-category-details-block,
    .geoai-faq-block,
    .geoai-sources-block {
        padding: 16px 18px;
    }

    .geoai-summary-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .geoai-badge-ai {
        margin-right: 0;
    }

    .geoai-field-content,
    .geoai-summary-text,
    .geoai-faq-a {
        font-size: 14px;
    }

    .geoai-product-field,
    .geoai-category-field {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
}
/* ════════════════════════════════════════════════════════
   GEOAI — Footnotes Block
   ════════════════════════════════════════════════════════ */
.geoai-footnotes-block {
    background: #f8f9fa;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 24px 0;
    direction: rtl;
    font-size: 14px;
    line-height: 1.7;
}
.geoai-footnote-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
}
.geoai-footnote-item:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.geoai-footnote-prefix { font-weight: 700; color: #1a3a52; display: inline; margin-left: 4px; }
.geoai-footnote-text   { color: #333; display: inline; }
.geoai-footnote-closing {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid #0073aa;
    font-weight: 700;
    color: #0073aa;
    font-size: 14px;
}

/* ════════════════════════════════════════════════════════
   GEOAI — Combined Related Section (posts + products)
   ════════════════════════════════════════════════════════ */
.geoai-related-block {
    margin: 24px 0;
    direction: rtl;
}
.geoai-related-header { margin-bottom: 14px; }
.geoai-related-title-text {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 6px;
    display: inline-block;
}

/* ── Posts row ── */
.geoai-related-posts-row { margin-bottom: 0; }

.geoai-related-grid {
    display: grid;
    gap: 14px;
}
.geoai-related-cols-2 { grid-template-columns: repeat(2, 1fr); }
.geoai-related-cols-3 { grid-template-columns: repeat(3, 1fr); }
.geoai-related-cols-4 { grid-template-columns: repeat(4, 1fr); }

.geoai-related-card {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.geoai-related-card:hover {
    box-shadow: 0 5px 18px rgba(0,0,0,.11);
    transform: translateY(-2px);
}
.geoai-related-card-link { text-decoration: none; color: inherit; display: block; }
.geoai-related-img-wrap { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.geoai-related-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.geoai-related-card:hover .geoai-related-img { transform: scale(1.04); }
.geoai-related-body { padding: 10px 12px; }
.geoai-related-post-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 5px;
}
.geoai-related-excerpt { font-size: 12px; color: #666; line-height: 1.5; margin: 0; }

/* ── Row separator (between posts row and products row) ── */
.geoai-related-row-separator {
    border: none;
    border-top: 1px dashed #dde3ec;
    margin: 16px 0;
}

/* ── Products row ── */
.geoai-related-products-row { margin-top: 0; }

/* ════════════════════════════════════════════════════════
   GEOAI — WooCommerce Product / Category Grid
   (used inside related block and standalone on term pages)
   ════════════════════════════════════════════════════════ */
.geoai-woo-embed-block {
    display: grid;
    gap: 12px;
    direction: rtl;
}
.geoai-woo-embed-cols-2 { grid-template-columns: repeat(2, 1fr); }
.geoai-woo-embed-cols-3 { grid-template-columns: repeat(3, 1fr); }
.geoai-woo-embed-cols-4 { grid-template-columns: repeat(4, 1fr); }
.geoai-woo-embed-cols-5 { grid-template-columns: repeat(5, 1fr); }

.geoai-woo-embed-item {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.geoai-woo-embed-item:hover {
    box-shadow: 0 5px 18px rgba(0,0,0,.11);
    transform: translateY(-2px);
}
.geoai-woo-embed-link { text-decoration: none; color: inherit; display: block; }
.geoai-woo-embed-img-wrap { aspect-ratio: 1; overflow: hidden; }
.geoai-woo-embed-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.geoai-woo-embed-item:hover .geoai-woo-embed-img { transform: scale(1.04); }

/* Product body — compact, no large gaps */
.geoai-woo-embed-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.geoai-woo-embed-name {
    display: block;
    font-size: 13px;
    font-weight: 700;         /* bold but NOT a heading */
    color: #1a1a1a;
    line-height: 1.35;
    margin: 0;
}
.geoai-woo-embed-price {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0073aa;
    margin: 0;
}

/* ── Standalone embed (on term/category pages) ── */
.geoai-woo-embed-block + .geoai-woo-embed-block { margin-top: 14px; }

/* ════════════════════════════════════════════════════════
   GEOAI — Taxonomy / Category GEO blocks
   ════════════════════════════════════════════════════════ */
.geoai-term-geo-block .geoai-term-ai-desc,
.geoai-term-geo-block .geoai-term-guide {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    color: #333;
    line-height: 1.7;
}
.geoai-term-geo-block .geoai-term-ai-desc strong,
.geoai-term-geo-block .geoai-term-guide strong {
    display: block;
    margin-bottom: 4px;
    color: #1a3a52;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .geoai-related-cols-3,
    .geoai-related-cols-4,
    .geoai-woo-embed-cols-3,
    .geoai-woo-embed-cols-4,
    .geoai-woo-embed-cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .geoai-related-grid,
    .geoai-woo-embed-block { grid-template-columns: repeat(2, 1fr) !important; }
}
