/* ============================================
   KHALEEJI ADS — MODERN DESIGN
   CLEAN CSS — NOVEMBER 2026
   ============================================ */

:root {
    --ka-blue: #2563eb;
    --ka-green: #16a34a;
    --ka-dark: #172b4d;
    --ka-text: #1e293b;
    --ka-muted: #64748b;
    --ka-border: #e2e8f0;
    --ka-bg: #f4f7fb;
}

/* BASE */

body.layout_frontend {
    background: var(--ka-bg) !important;
    color: var(--ka-text);
    font-family: Arial, Helvetica, sans-serif;
}

body.layout_frontend .wrap {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 5px 30px rgba(15,23,42,0.04);
}

body.layout_frontend a {
    text-decoration: none;
}

/* TOP CATEGORY SECTION */

body.layout_frontend
.widget_text:has(.ka-categories) {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body.layout_frontend
.widget_text:has(.ka-categories) > .widget_body {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.layout_frontend .ka-categories {
    margin: 18px 0 32px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.layout_frontend .ka-category-heading {
    margin-bottom: 20px;
}

body.layout_frontend .ka-category-heading h2 {
    color: var(--ka-dark);
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 6px;
}

body.layout_frontend .ka-category-heading p {
    color: var(--ka-muted);
    font-size: 14px;
    margin: 0;
}

body.layout_frontend .ka-category-grid {
    display: grid;
    grid-template-columns:
        repeat(6, minmax(0,1fr));
    gap: 12px;
}

body.layout_frontend .ka-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    min-height: 155px;
    padding: 18px 10px;
    background: #fff;
    border: 1px solid var(--ka-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 3px 12px rgba(15,23,42,0.04);
    text-decoration: none !important;
    transition: transform .2s, box-shadow .2s;
}

body.layout_frontend .ka-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15,23,42,0.09);
}

body.layout_frontend .ka-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    padding: 13px;
    border-radius: 22px;
    box-sizing: border-box;
}

body.layout_frontend .ka-category-icon img {
    width: 100%;
    max-width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
}

body.layout_frontend .ka-category-title {
    display: block;
    color: var(--ka-text);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

body.layout_frontend .ka-category-card:hover
.ka-category-title {
    color: var(--ka-blue);
}

/* LATEST ADS GALLERY — WIDGET 38 */

body.layout_frontend
.widget_listing.widget_38 {
    margin: 30px 0 35px;
}

body.layout_frontend
.widget_listing.widget_38 .widget_title {
    color: var(--ka-dark) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 0 0 20px !important;
    padding: 0 0 12px !important;
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs {
    display: grid !important;
    grid-template-columns:
        repeat(3,minmax(0,1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    float: none !important;
    overflow: visible !important;
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs > a {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid var(--ka-border) !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(15,23,42,0.05);
    transition: transform .2s, box-shadow .2s;
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs > a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15,23,42,0.10);
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs > a > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs > a > .title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: ellipsis;
    color: var(--ka-text) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    padding: 12px 14px 15px !important;
    min-height: 42px;
    text-align: left !important;
}

body.layout_frontend
.widget_listing.widget_38
.thumbs.list_style_thumbs > a:hover > .title {
    color: var(--ka-blue) !important;
}

body.layout_frontend
.widget_listing.widget_38 .view_more {
    margin-top: 22px !important;
    text-align: center !important;
}

body.layout_frontend
.widget_listing.widget_38 .view_more a {
    display: inline-block;
    padding: 10px 20px;
    background: #eff6ff;
    color: var(--ka-blue) !important;
    border-radius: 9px;
    font-weight: 600;
    text-decoration: none !important;
}

/* BOTTOM CUSTOM PHP CATEGORY WIDGET */

body.layout_frontend
.widget_text:has(.ka-browse) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.layout_frontend
.widget_text:has(.ka-browse) > .widget_body {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

body.layout_frontend .ka-browse {
    margin: 36px 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--ka-border);
    font-family: Arial, Helvetica, sans-serif;
}

body.layout_frontend .ka-browse h2 {
    color: var(--ka-dark);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}

body.layout_frontend .ka-browse-intro {
    color: var(--ka-muted);
    font-size: 14px;
    margin: 0 0 22px;
}

body.layout_frontend .ka-browse-grid {
    display: grid;
    grid-template-columns:
        repeat(3,minmax(0,1fr));
    gap: 16px;
}

body.layout_frontend .ka-browse-card {
    min-width: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--ka-border);
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(15,23,42,0.04);
    align-self: start;
}

body.layout_frontend .ka-browse-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
}

body.layout_frontend .ka-browse-card h3 a {
    color: var(--ka-dark);
    text-decoration: none;
}

body.layout_frontend .ka-browse-card h3 a:hover {
    color: var(--ka-blue);
}

body.layout_frontend .ka-browse-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.layout_frontend .ka-browse-links li {
    margin: 0;
    padding: 0;
}

body.layout_frontend .ka-browse-links a {
    display: block;
    padding: 7px 0;
    color: #475569 !important;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

body.layout_frontend .ka-browse-links a:hover {
    color: var(--ka-blue) !important;
}

body.layout_frontend .ka-browse-card details {
    margin-top: 12px;
}

body.layout_frontend .ka-browse-card summary {
    color: var(--ka-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

body.layout_frontend .ka-browse-card summary:hover {
    text-decoration: underline;
}

/* RESPONSIVE */

@media (max-width: 1099px) {
    body.layout_frontend .ka-category-grid {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 900px) {
    body.layout_frontend .ka-browse-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    body.layout_frontend
    .widget_listing.widget_38
    .thumbs.list_style_thumbs {
        grid-template-columns:
            repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width: 599px) {
    body.layout_frontend .ka-category-grid,
    body.layout_frontend .ka-browse-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
        gap: 10px;
    }

    body.layout_frontend .ka-category-card {
        min-height: 130px;
        padding: 12px 8px;
    }

    body.layout_frontend .ka-category-icon {
        width: 65px;
        height: 65px;
        padding: 10px;
    }

    body.layout_frontend .ka-category-icon img {
        width: 45px;
        height: 45px;
    }

    body.layout_frontend .ka-category-title {
        font-size: 12px;
    }

    body.layout_frontend
    .widget_listing.widget_38
    .thumbs.list_style_thumbs {
        gap: 10px !important;
    }

    body.layout_frontend
    .widget_listing.widget_38
    .thumbs.list_style_thumbs > a > img {
        height: 130px !important;
    }

    body.layout_frontend
    .widget_listing.widget_38
    .thumbs.list_style_thumbs > a > .title {
        font-size: 12px !important;
        padding: 10px !important;
    }

    body.layout_frontend .ka-browse-card {
        padding: 12px;
    }

    body.layout_frontend .ka-browse-card h3 {
        font-size: 15px;
    }

    body.layout_frontend .ka-browse h2 {
        font-size: 21px;
    }
}

@media (max-width: 380px) {
    body.layout_frontend .ka-browse-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.layout_frontend .ka-category-card,
    body.layout_frontend
    .widget_listing.widget_38
    .thumbs.list_style_thumbs > a {
        transition: none;
    }
}