/* ============================================================
   Catálogo de Livros — CSS
   Importe as fontes no <head> do seu HTML:
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
   ============================================================ */

/* ---------- Seção principal ---------- */
.lib-section {
    width: 100%;
    padding: 80px 0;
    font-family: 'DM Sans', sans-serif;
}

/* ---------- Header da seção ---------- */
.lib-header {
    text-align: center;
    margin-bottom: 72px;
}

.lib-sup {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #3e5bdb;
    margin-bottom: 16px;
}

.lib-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 400;
    color: #f0ede8;
    line-height: 1.2;
    margin: 0 0 20px;
}

.lib-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.lib-rule-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3e5bdb);
}

.lib-rule-line--right {
    background: linear-gradient(90deg, #3e5bdb, transparent);
}

.lib-rule-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3e5bdb;
}

/* ---------- Container ---------- */
.lib-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

/* ---------- Bloco de gênero ---------- */
.genre-block {
    margin-bottom: 72px;
}

.genre-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.genre-tag {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 2px;
    white-space: nowrap;
}

.genre-tag.terror  { background: rgba(163,45,45,0.12);  color: #f09595; border: 1px solid rgba(163,45,45,0.22); }
.genre-tag.drama   { background: rgba(55,138,221,0.10); color: #85b7eb; border: 1px solid rgba(55,138,221,0.18); }
.genre-tag.ficcao  { background: rgba(127,119,221,0.1); color: #afa9ec; border: 1px solid rgba(127,119,221,0.18); }
.genre-tag.romance { background: rgba(212,83,126,0.1);  color: #ed93b1; border: 1px solid rgba(212,83,126,0.18); }
.genre-tag.default { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.08); }

.genre-head-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent);
}

.genre-count {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    letter-spacing: 1px;
}

/* ---------- Grid do carrossel ---------- */
.carousel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* ---------- Dots ---------- */
.carousel-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
}

.dot {
    width: 16px;
    height: 2px;
    border-radius: 1px;
    border: none;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.dot.active {
    background: #1d359e;
    width: 28px;
}

.dot:hover {
    background: rgba(2, 210, 238, 0.5);
}

/* ---------- Cards dos livros ---------- */
.book-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #16181c;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.3s cubic-bezier(.25,.46,.45,.94),
                border-color 0.3s ease;
}

.book-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.14);
}

/* Área da capa */
.book-card-capa {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.book-card-capa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
    transition: transform 0.5s cubic-bezier(.25,.46,.45,.94),
                filter 0.3s ease;
}

.book-card:hover .book-card-capa img {
    transform: scale(1.06);
    filter: brightness(1);
}

.book-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10,10,12,0.9) 0%,
        rgba(10,10,12,0.35) 45%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Badge de disponibilidade */
.book-card-status {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 2px;
}

.book-card-status.disponivel {
    background: rgba(92,146,255,0.15);
    color: #7aadff;
    border: 1px solid rgba(92,146,255,0.25);
}

.book-card-status.indisponivel {
    background: rgba(226,75,74,0.12);
    color: #f09595;
    border: 1px solid rgba(226,75,74,0.2);
}

/* Ano */
.book-card-year {
    position: absolute;
    top: 11px;
    right: 10px;
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
    font-family: 'DM Sans', sans-serif;
}

/* Informações do livro */
.book-card-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
}

.book-card-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 400;
    color: #e8e4de;
    line-height: 1.35;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-autor {
    font-size: 11px;
    font-weight: 300;
    color: rgba(255,255,255,0.32);
    letter-spacing: 0.3px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-sep {
    width: 20px;
    height: 1px;
    background: #5c92ff;
    opacity: 0.5;
    margin: 10px 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.book-card:hover .book-card-sep {
    width: 36px;
    opacity: 1;
}

.book-card-genero {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.18);
}