/**
 * Kitap arşivi — intro, breadcrumb/kategori çubuğu, alfabe, grid
 */

/* —— Kütüphane intro başlığı —— */
.esmer-kitaplar-intro {
    width: 100%;
    margin-bottom: 28px;
    clear: both;
}

.esmer-library-header {
    position: relative;
    background: #fffcf5;
    padding: 40px 50px;
    border-radius: 12px;
    border: 1px solid #efe5d0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.esmer-library-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #ffba00;
}

.elh-content {
    position: relative;
    z-index: 2;
    max-width: 70%;
}

.elh-subtitle {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffba00;
    margin-bottom: 10px;
    display: block;
}

.elh-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 900;
    color: #222;
    margin: 0 0 15px;
    line-height: 1.1;
}

.elh-desc {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
    font-family: 'Manrope', sans-serif;
}

.elh-desc strong {
    color: #000;
    font-weight: 700;
}

.elh-badge {
    position: relative;
    z-index: 2;
    text-align: center;
    border: 2px solid #eee;
    padding: 15px 25px;
    border-radius: 12px;
    background: #fff;
    min-width: 100px;
}

.elh-count {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: #ffba00;
    line-height: 1;
}

.elh-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    margin-top: 5px;
    letter-spacing: 1px;
}

.elh-icon-bg {
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 180px;
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
    transform: rotate(-15deg);
}

@media (max-width: 767px) {
    .esmer-library-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .esmer-library-header::before {
        width: 100%;
        height: 6px;
        left: 0;
        top: 0;
        bottom: auto;
    }

    .elh-content {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .elh-title {
        font-size: 32px;
    }

    .elh-icon-bg {
        font-size: 120px;
        right: 50%;
        bottom: 10%;
        transform: translateX(50%);
        opacity: 0.03;
    }
}

/* Breadcrumb + kategori aynı satır */
.esmer-kitaplar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-bottom: 24px;
    padding: 14px 20px;
    background: var(--esmer-paper-card, #fff);
    border: 1px solid var(--esmer-border, #e8e4dc);
    border-radius: var(--esmer-radius, 14px);
    box-shadow: var(--esmer-shadow-sm, 0 4px 16px rgba(26, 26, 34, 0.06));
    flex-wrap: wrap;
}

.esmer-kitaplar-breadcrumbs {
    margin-bottom: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    flex: 0 0 auto;
}

.esmer-kitaplar-breadcrumbs .fa-home {
    color: #aaa;
    margin-right: 4px;
}

.esmer-kitaplar-breadcrumbs .breadcrumb_last {
    color: var(--esmer-gold-dark, #c99200);
}

/* Yatay kategori çubuğu */
.esmer-kitaplar-cat-bar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.esmer-cat-bar__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.esmer-cat-bar__item {
    position: relative;
    margin: 0;
}

/* Görünmez köprü: trigger ile dropdown arasında hover kaybolmasın */
@media (min-width: 992px) and (hover: hover) {
    .esmer-cat-bar__item.has-dropdown::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 14px;
        z-index: 119;
        pointer-events: auto;
    }
}

.esmer-cat-bar__trigger,
.esmer-cat-bar__solo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--esmer-radius-pill, 999px);
    background: var(--esmer-home-surface-muted, #faf9f6);
    border: 1px solid var(--esmer-border, #e8e4dc);
    font-family: var(--esmer-font-body, 'Manrope', sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--esmer-ink-soft, #2c3e50);
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
    line-height: 1.2;
    white-space: nowrap;
}

.esmer-cat-bar__trigger {
    appearance: none;
    -webkit-appearance: none;
}

.esmer-cat-bar__item.is-current > .esmer-cat-bar__trigger,
.esmer-cat-bar__solo.is-current,
.esmer-cat-pill.is-current {
    border-color: var(--esmer-gold, #ffba00);
    color: var(--esmer-gold-dark, #c99200);
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 186, 0, 0.15);
}

.esmer-cat-bar__trigger:hover,
.esmer-cat-bar__solo:hover,
.esmer-cat-bar__item.is-open .esmer-cat-bar__trigger {
    border-color: var(--esmer-gold, #ffba00);
    color: var(--esmer-gold-dark, #c99200);
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 186, 0, 0.15);
}

.esmer-cat-bar__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.55;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.esmer-cat-bar__item.is-open .esmer-cat-bar__caret {
    transform: rotate(180deg);
}

.esmer-cat-bar__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 120;
    min-width: 220px;
    max-width: min(360px, 90vw);
    padding: 12px;
    background: var(--esmer-paper-card, #fff);
    border: 1px solid var(--esmer-border, #e8e4dc);
    border-radius: 12px;
    box-shadow: var(--esmer-shadow-md, 0 12px 32px rgba(26, 26, 34, 0.12));
    flex-wrap: wrap;
    gap: 8px;
}

.esmer-cat-bar__item.is-open .esmer-cat-bar__dropdown {
    display: flex;
}

/* Pill / chip */
.esmer-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--esmer-radius-pill, 999px);
    background: #fff;
    border: 1px solid var(--esmer-border, #e8e4dc);
    font-family: var(--esmer-font-body, 'Manrope', sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--esmer-ink-soft, #2c3e50) !important;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
    line-height: 1.2;
}

.esmer-cat-pill:hover {
    border-color: var(--esmer-gold, #ffba00);
    color: var(--esmer-gold-dark, #c99200) !important;
    box-shadow: 0 6px 14px rgba(255, 186, 0, 0.18);
}

.esmer-cat-pill--all {
    background: rgba(255, 186, 0, 0.12);
    border-color: rgba(255, 186, 0, 0.45);
    color: var(--esmer-ink, #1a1a22) !important;
}

.esmer-kitaplar-empty {
    text-align: center;
    font-size: 1.05rem;
    color: #888;
    padding: 80px 20px;
}

.esmer-cat-pill__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: var(--esmer-radius-pill, 999px);
    background: rgba(26, 26, 34, 0.06);
    font-size: 0.68rem;
    font-weight: 800;
    color: #888;
}

.esmer-cat-pill:hover .esmer-cat-pill__count,
.esmer-cat-bar__trigger:hover .esmer-cat-pill__count {
    background: rgba(255, 186, 0, 0.25);
    color: var(--esmer-ink, #1a1a22);
}

/* Alfabe filtresi */
.esmer-alpha-container {
    width: 100%;
    margin-bottom: 32px;
    clear: both;
}

.esmer-alpha-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 12px 14px;
    background: var(--esmer-paper-card, #fff);
    border-radius: var(--esmer-radius, 12px);
    border: 1px solid var(--esmer-border, #e8e4dc);
    box-shadow: var(--esmer-shadow-sm, 0 4px 16px rgba(26, 26, 34, 0.06));
}

.alpha-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #999;
    text-decoration: none !important;
    border-radius: 6px;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
    background: #fdfdfd;
    line-height: 1.2;
}

.alpha-item:hover {
    color: var(--esmer-gold-dark, #c99200);
    border-color: var(--esmer-gold, #ffba00);
    background: #fff;
}

.alpha-item.active {
    background: var(--esmer-gold, #ffba00);
    color: #fff;
    border-color: var(--esmer-gold, #ffba00);
    box-shadow: 0 3px 8px rgba(255, 186, 0, 0.28);
}

.esmer-alpha-empty {
    text-align: center;
    padding: 48px 20px;
    background: var(--esmer-paper-card, #fff);
    border-radius: 12px;
    border: 1px solid var(--esmer-border, #e8e4dc);
    margin-top: 24px;
    clear: both;
    box-shadow: var(--esmer-shadow-sm, 0 4px 16px rgba(26, 26, 34, 0.06));
}

.esmer-alpha-empty h3 {
    margin: 0 0 10px;
    color: #333;
    font-weight: 800;
}

.esmer-alpha-empty p {
    color: #777;
    margin-bottom: 20px;
}

.esmer-alpha-empty .esmer-alpha-empty-icon {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.esmer-alpha-empty .esmer-btn-reset {
    display: inline-block;
    padding: 12px 30px;
    background: var(--esmer-gold, #ffba00);
    color: #fff;
    border-radius: 50px;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(255, 186, 0, 0.3);
}

.esmer-alpha-empty .esmer-btn-reset:hover {
    filter: brightness(1.05);
}

/* Kitap grid */
.esmer-book-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 40px !important;
    margin-top: 0;
}

.ebc-wrap {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
    border-radius: 24px;
    padding: 25px 20px 20px;
    transition: box-shadow 0.35s ease, background 0.35s ease;
}

.ebc-wrap:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
}

.ebc-card {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    text-decoration: none !important;
    border-radius: 4px 14px 14px 4px;
    overflow: hidden;
    box-shadow: 10px 15px 35px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.35s ease;
}

.ebc-wrap:hover .ebc-card {
    box-shadow: 12px 18px 38px rgba(0, 0, 0, 0.14);
}

.ebc-cover {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fdfdfd;
    border-left: 6px solid #e2e8f0;
    border-radius: 4px 14px 14px 4px;
    overflow: hidden;
}

.ebc-cover img,
.ebc-cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fdfdfd;
    border-radius: 0 12px 12px 0;
    transition: filter 0.35s ease;
}

.ebc-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Cinzel, serif;
    color: #cbd5e1;
    font-weight: 800;
}

.ebc-wrap:hover .ebc-cover img {
    filter: brightness(1.02);
}

/* Sağ alt köşe — sayfa kıvrımı */
.ebc-curl {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    z-index: 4;
    pointer-events: none;
    border-style: solid;
    border-width: 0;
    border-color: transparent;
    transition: border-width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.12));
}

.ebc-wrap:hover .ebc-curl {
    border-width: 0 0 42px 42px;
    border-color: transparent transparent #f5f0e6 #ebe4d4;
}

.ebc-curl::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0;
    border-color: transparent;
    transition: border-width 0.38s cubic-bezier(0.4, 0, 0.2, 1) 0.04s;
}

.ebc-wrap:hover .ebc-curl::after {
    border-width: 0 0 28px 28px;
    border-color: transparent transparent rgba(255, 255, 255, 0.55) rgba(0, 0, 0, 0.06);
}

.ebc-badge {
    position: absolute;
    top: 15px;
    right: -5px;
    background: #ffba00;
    color: #111;
    padding: 6px 15px 6px 10px;
    border-radius: 50px 0 0 50px;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 186, 0, 0.4);
    z-index: 10;
    border: 2px solid #fff;
    border-right: none;
}

.ebc-info {
    margin-top: 22px;
    text-align: center;
    z-index: 2;
}

.ebc-title {
    font-family: 'Cinzel', serif;
    font-size: 17px;
    font-weight: 900;
    color: #111;
    margin: 0 0 12px;
    line-height: 1.3;
}

.ebc-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.ebc-title a:hover {
    color: #ffba00;
}

.ebc-authors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ebc-author-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    margin: 4px;
}

.ebc-author-wrap:hover {
    border-color: #ffba00;
    box-shadow: 0 6px 15px rgba(255, 186, 0, 0.15);
}

.ebc-author-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f8fafc;
}

.ebc-author-name {
    font-size: 12px;
    font-weight: 800;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
}

.ebc-author-flag {
    width: 14px;
    border-radius: 2px;
    margin-left: 2px;
}

/* Sayfalama */
.esmer-pagination {
    margin-top: 80px;
    text-align: center;
}

.esmer-pagination ul.page-numbers {
    display: inline-flex !important;
    background: #fff;
    border-radius: 50px;
    padding: 5px !important;
    border: 1px solid #eee;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.esmer-pagination ul.page-numbers li {
    list-style: none !important;
    margin: 0 2px !important;
}

.esmer-pagination a.page-numbers,
.esmer-pagination span.page-numbers {
    display: block;
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none !important;
    color: #555 !important;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 800;
    transition: 0.3s;
}

.esmer-pagination a.page-numbers:hover {
    background: rgba(255, 186, 0, 0.1);
    color: #ffba00 !important;
}

.esmer-pagination span.page-numbers.current {
    background: #ffba00;
    color: #111 !important;
    box-shadow: 0 4px 10px rgba(255, 186, 0, 0.3);
}

/* Tam genişlik içerik */
body.esmer-kitaplar-archive .esmer-kitaplar-archive-body,
body.esmer-kitaplar-archive .esmer-kitaplar-archive-main {
    display: block;
    width: 100%;
    max-width: 100%;
}

.esmer-archive-hero-shell {
    width: 100%;
    margin-bottom: 24px;
    clear: both;
}

.esmer-smart-chips--flat {
    border-bottom: none;
}

body.esmer-has-archive-hero .archive-header,
body.esmer-has-archive-hero .esmer-content.full > header.archive-header {
    display: none !important;
}

.esmer-smart-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px 0;
}

.esmer-smart-chips.root-level {
    border-bottom: 1px solid var(--esmer-border, #e8e4dc);
    padding-bottom: 15px;
    margin-top: 20px;
}

.esmer-smart-chips.sub-level {
    padding-top: 15px;
}

.smart-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: #555 !important;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.smart-chip:hover {
    border-color: var(--esmer-gold, #ffba00);
    color: var(--esmer-gold-dark, #c99200) !important;
    transform: translateY(-2px);
}

.root-chip {
    background: #333;
    color: #fff !important;
    border-color: #333;
}

.root-chip:hover {
    background: #000;
    color: var(--esmer-gold, #ffba00) !important;
    border-color: #000;
}

.active-chip {
    background: var(--esmer-gold, #ffba00);
    color: #111 !important;
    border-color: var(--esmer-gold, #ffba00);
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(255, 186, 0, 0.3);
}

.chip-label {
    font-size: 12px;
    font-weight: 800;
    color: #bbb;
    text-transform: uppercase;
    margin-right: 5px;
}

.chip-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

@media (max-width: 991px) {
    .esmer-kitaplar-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .esmer-kitaplar-cat-bar {
        justify-content: flex-start;
    }

    .esmer-cat-bar__list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .esmer-cat-bar__dropdown {
        left: 0;
        right: auto;
    }
}

@media (max-width: 767px) {
    .esmer-alpha-filter-wrapper {
        gap: 3px;
        padding: 8px 10px;
    }

    .alpha-item {
        padding: 3px 6px;
        font-size: 0.65rem;
        min-width: 1.5rem;
    }
}
