/* ============================================================
   K Gallery — Artists Index Page Styles
   File: artists-page.css
   Enqueue via functions.php (see snippet below)
   ============================================================ */

/* ── Page wrapper ─────────────────────────────────────────── */
.kgallery-artists-page {
    background: #fafaf8;
    min-height: 60vh;
}

/* ── Page header ──────────────────────────────────────────── */
.kap-header {
    padding: 48px 40px 32px;
    border-bottom: 0.5px solid #e8e4de;
}

.kap-tag {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0097A7;
    margin-bottom: 10px;
}

.kap-title {
    font-size: 32px;
    font-weight: 500;
    color: #111;
    margin-bottom: 10px;
}

.kap-intro {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    max-width: 580px;
}

/* ── Controls bar ─────────────────────────────────────────── */
.kap-controls {
    padding: 20px 40px;
    border-bottom: 0.5px solid #e8e4de;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kap-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0.5px solid #d8d3cc;
    border-radius: 4px;
    padding: 0 12px;
    flex: 1;
    max-width: 280px;
    height: 36px;
    background: #fff;
    transition: border-color 0.15s;
}

.kap-search-wrap:focus-within {
    border-color: #0097A7;
}

.kap-search-wrap i {
    font-size: 16px;
    color: #aaa;
    flex-shrink: 0;
}

.kap-search-wrap input {
    border: none;
    background: transparent;
    font-size: 13px;
    color: #111;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.kap-search-wrap input::placeholder {
    color: #ccc;
}

.kap-count-label {
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
}

.kap-count-label span {
    font-weight: 500;
    color: #0097A7;
}

/* ── Grid wrapper ─────────────────────────────────────────── */
.kap-grid-wrap {
    padding: 32px 40px 60px;
}

.kap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

/* ── Artist card ──────────────────────────────────────────── */
.kap-card {
    border: 0.5px solid #e8e4de;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s;
    text-decoration: none;
    display: block;
}

.kap-card:hover {
    border-color: #0097A7;
    text-decoration: none;
}

.kap-card:hover .kap-overlay {
    opacity: 1;
}

/* ── Card image area ──────────────────────────────────────── */
.kap-img-wrap {
    height: 180px;
    background: #ece9e3;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Actual photo (when artist_featured_image term meta is set) */
.kap-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Initials fallback */
.kap-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #E0F7FA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #006064;
    letter-spacing: 0.05em;
    font-family: inherit;
}

/* Hover overlay */
.kap-overlay {
    position: absolute;
    inset: 0;
    background: #0199a2;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.kap-overlay span {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

/* ── Card info ────────────────────────────────────────────── */
.kap-info {
    padding: 14px 14px 16px;
}

.kap-name {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin-bottom: 0;
    line-height: 1.3;
}

.kap-exhibited {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #0097A7;
    margin-top: 6px;
}

.kap-exhibited i {
    font-size: 12px;
}

/* ── Empty / no results states ────────────────────────────── */
.kap-no-results,
.kap-empty {
    text-align: center;
    padding: 60px 0;
    color: #aaa;
    font-size: 14px;
}

/* ── Suppress Divi sidebar on this page ───────────────────── */
.kgallery-artists-page ~ #sidebar,
body.page-template-archive-artists #sidebar,
body.tax-product_artist.term-0 #sidebar {
    display: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .kap-header {
        padding: 32px 20px 24px;
    }

    .kap-controls {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .kap-search-wrap {
        max-width: 100%;
    }

    .kap-grid-wrap {
        padding: 24px 20px 48px;
    }

    .kap-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }

    .kap-img-wrap {
        height: 150px;
    }
}
