/* ==========================================================
   RESET / BASE
========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primaria: #7b2cbf;
    --primaria-dark: #5a189a;

    --texto: #111;
    --texto-suave: #555;

    --bg: #ffffff;
    --cinza: #f4f4f4;

    --radius: 10px;
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.06);
}

body {
    background: var(--bg);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    color: var(--texto);
    line-height: 1.6;
}

/* ==========================================================
   CONTAINER PRINCIPAL
========================================================== */

.livro-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 12px 40px;
}

/* ==========================================================
   BREADCRUMB
========================================================== */

.breadcrumb {
    font-size: 0.85rem;
    color: var(--texto-suave);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.breadcrumb span:last-child {
    font-weight: 600;
    color: var(--texto);
}

/* ==========================================================
   LAYOUT PRINCIPAL
========================================================== */

.livro-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

@media (min-width: 900px) {
    .livro-layout {
        display: grid;
        grid-template-columns: 360px 1fr;
        gap: 40px;
        align-items: flex-start;
    }
}

/* ==========================================================
   CAPA + AÇÕES LATERAIS
========================================================== */

.livro-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.capa-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
}

.capa-imagem {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.capa-imagem img {
    width: 100%;
    max-width: 260px;
    height: 380px;
    object-fit: contain;
    object-position: center;
    border-radius: calc(var(--radius) - 4px);
}

@media (min-width: 900px) {
    .capa-imagem img {
        max-width: 300px;
        height: 440px;
    }
}

.capa-acoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.acao-icone {
    margin: 0;
}

.btn-icone-estante {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--cinza);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    font-size: 1.2rem;
    color: var(--texto-suave);
}

.btn-icone-estante:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.09);
}

.btn-icone-estante.na-estante {
    background: var(--primaria);
    color: #fff;
}

.btn-ler-side {
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: var(--radius);
    background: #111;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-ler-side:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.13);
}

/* Mobile: ações em linha abaixo da capa */
@media (max-width: 600px) {
    .capa-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .capa-acoes {
        flex-direction: row;
        justify-content: center;
    }
}

/* ==========================================================
   PARTILHAR
========================================================== */

.partilhar-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
}

.partilhar-titulo {
    font-weight: 600;
    color: var(--texto-suave);
    margin-right: 4px;
}

.partilhar-box button {
    background: var(--cinza);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.partilhar-box button:hover {
    background: #e2e2e2;
    transform: translateY(-1px);
}

@media (min-width: 900px) {
    .partilhar-box {
        justify-content: flex-start;
    }
}

/* ==========================================================
   DETALHES DO LIVRO
========================================================== */

.livro-detalhes {
    text-align: left;
}

.livro-titulo {
    font-size: 1.9rem;
    color: var(--primaria);
    margin-bottom: 10px;
}

.detalhes-info p {
    color: var(--texto-suave);
    margin-bottom: 6px;
    font-size: 0.98rem;
}

.detalhes-info strong {
    color: var(--texto);
}

/* ==========================================================
   AVALIAÇÃO
========================================================== */

.avaliacao-box {
    background: var(--cinza);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    margin: 18px 0 10px;
    font-size: 0.95rem;
}

/* ==========================================================
   ABAS
========================================================== */

.livro-abas {
    margin-top: 12px;
}

.abas-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.abas-nav::-webkit-scrollbar {
    display: none;
}

.aba-btn {
    background: var(--cinza);
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.aba-btn:hover {
    transform: translateY(-1px);
}

.aba-btn.active {
    background: var(--primaria);
    color: #fff;
}

.aba {
    display: none;
    margin-top: 18px;
    text-align: left;
    font-size: 0.96rem;
}

.aba.active {
    display: block;
}

.aba h3 {
    margin-bottom: 8px;
}

/* ==========================================================
   FORMULÁRIOS (AVALIAÇÃO / COMENTAR)
========================================================== */

.form-avaliacao {
    margin-top: 4px;
}

.form-avaliacao label {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.form-avaliacao textarea,
.form-avaliacao select {
    width: 100%;
    background: var(--cinza);
    padding: 12px 12px;
    border-radius: var(--radius);
    border: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
    resize: vertical;
}

.btn-avaliar {
    width: 100%;
    max-width: 240px;
    background: var(--primaria);
    padding: 11px 14px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.btn-avaliar:hover {
    background: var(--primaria-dark);
    transform: translateY(-1px);
}

/* ==========================================================
   COMENTÁRIOS
========================================================== */

.comentario {
    background: var(--cinza);
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 0.92rem;
}

.comentario small {
    font-size: 0.8rem;
    color: var(--texto-suave);
}

/* ==========================================================
   RELACIONADOS
========================================================== */

.relacionados {
    max-width: 1200px;
    margin: 10px auto 0;
    padding: 25px 0 10px;
    text-align: center;
}

.relacionados h2 {
    margin-bottom: 18px;
    font-size: 1.3rem;
}

.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
}

.rel-card {
    text-decoration: none;
    color: inherit;
}

.rel-card img {
    width: 70%;
    height: 180px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    padding: 2px;
    box-shadow: var(--shadow-soft);
}

.rel-card p {
    margin-top: 6px;
    font-size: 0.9rem;
}

/* ==========================================================
   FOOTER
========================================================== */
footer,
.footer,
#footer {
    padding-top: 40px !important;
}

/* ======================================================
   FOOTER — protegido
====================================================== */
footer,
.footer,
#footer {
  background: #1a1423 !important;
  color: #fff !important;
}
body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}
