/* Kafkas: rich text (product descriptions, blog posts). */
/* Rich text inside product cards and blog posts */
.kafkas-prose { color: #475569; line-height: 1.8; }
.kafkas-prose > *:first-child { margin-top: 0; }
.kafkas-prose h2 { margin: 2rem 0 .75rem; font-size: 1.375rem; line-height: 1.3; font-weight: 800; color: #0f172a; }
.kafkas-prose h3 { margin: 1.5rem 0 .5rem; font-size: 1.125rem; line-height: 1.4; font-weight: 700; color: #0f172a; }
.kafkas-prose p { margin: 0 0 1rem; }
.kafkas-prose ul { list-style: none; margin: .5rem 0 1.25rem; padding: 0; }
.kafkas-prose ul li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
.kafkas-prose ul li::before { content: ""; position: absolute; left: .25rem; top: .7em; width: .45rem; height: .45rem; border-radius: 9999px; background: #0ea5e9; }
.kafkas-prose ol { list-style: decimal; margin: .5rem 0 1.25rem; padding-left: 1.5rem; }
.kafkas-prose a { color: #0284c7; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.kafkas-prose a:hover { color: #0369a1; }
.kafkas-prose strong { color: #0f172a; }
.kafkas-prose table { width: 100%; margin: 1rem 0; font-size: .875rem; }
.kafkas-prose th, .kafkas-prose td { padding: .5rem .75rem; border-bottom: 1px solid #f1f5f9; text-align: left; }
/* Page texts: contents list and a row of pictures. */
.kafkas-prose .kafkas-toc { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid #e2e8f0; border-radius: .875rem; background: #f8fafc; }
.kafkas-prose .kafkas-toc p { margin: 0 0 .375rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.kafkas-prose .kafkas-toc ul { margin: 0; }
.kafkas-prose .kafkas-toc li { margin-bottom: .25rem; }
.kafkas-prose h2[id] { scroll-margin-top: 10rem; }
.kafkas-prose .kafkas-text-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.kafkas-prose .kafkas-text-gallery figure { margin: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: .875rem; background: #fff; }
.kafkas-prose .kafkas-text-gallery img { display: block; width: 100%; height: 9rem; object-fit: contain; padding: .5rem; }
.kafkas-prose .kafkas-text-gallery figcaption { padding: .5rem .75rem; border-top: 1px solid #f1f5f9; font-size: .75rem; line-height: 1.1rem; color: #64748b; }
@media (min-width: 768px) { .kafkas-prose .kafkas-text-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Text pages (legal pages): tables stay inside the card on phones. */
body.page .kafkas-prose th, body.page .kafkas-prose td { vertical-align: top; overflow-wrap: anywhere; }
body.page .kafkas-prose th { font-weight: 700; color: #0f172a; }
@media (max-width: 639px) {
    body.page .kafkas-prose table { table-layout: fixed; font-size: .8125rem; }
    body.page .kafkas-prose th, body.page .kafkas-prose td { padding: .5rem .375rem; }
}

/* Product card on phones: two columns, compact card (title, price, add to cart, details). */
@media (max-width: 639px) {
    html body .product-card > div:last-child { padding: .75rem !important; }
    html body .product-card .product-image { padding: .5rem !important; }
    html body .product-card h3 { font-size: .8125rem !important; line-height: 1.15rem !important; }
    html body .product-card .product-card__tagline,
    html body .product-card .product-card__excerpt,
    html body .product-card .product-card__vehicles,
    html body .product-card .product-card__sku,
    html body .product-card .quick-view-btn { display: none !important; }
    html body .product-card .product-card__actions { grid-template-columns: minmax(0, 1fr) !important; padding-top: .375rem !important; }
    html body .product-card .product-card__power { font-size: .625rem !important; left: .5rem; bottom: .5rem; }
    html body .product-card .product-image > span:not(.product-card__power) { font-size: .5625rem !important; padding: .15rem .5rem !important; left: .5rem; top: .5rem; max-width: 80%; }
    html body .product-card .mt-auto { padding-top: .5rem !important; }
    html body #rec-products-grid, html body ul.products:not(.kafkas-list) { gap: .625rem !important; }
}

@media (min-width: 640px) {
    html body .sm\:pb-10 {
        padding-bottom: 17px;
    }
}

/* Page text placed in an Elementor page (text widget): the same card as on template-drawn pages. */
.kafkas-page-text-wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem 3rem; }
.kafkas-page-text-wrap > .kafkas-prose { padding: 1.25rem; border: 1px solid #e2e8f0; border-radius: 1rem; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
@media (min-width: 640px) { .kafkas-page-text-wrap { padding: 0 1.5rem 3rem; } .kafkas-page-text-wrap > .kafkas-prose { padding: 2rem; } }
