:root {
    --bg: #07101a;
    --panel: #0f1720;
    --muted: #a6b3bd;
    --gold: #ffd066;
    --accent: #e64b4b;
    --card: #0e1620;
    --glass: rgba(255, 255, 255, 0.04);
    --max-width: 1100px;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 80px;
}

body {
    margin: 0;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
    background: linear-gradient(180deg, var(--bg) 0%, #051119 60%);
    color: #e6eef6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Top nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 40;
    background: linear-gradient(
        180deg,
        rgba(2, 6, 10, 0.6),
        rgba(2, 6, 10, 0.2)
    );
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.logo {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--gold);
    font-weight: 700;
    font-family: "Playfair Display", serif;
}
.logo .mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2b2f7a, #9b3a3a);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: white;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.6),
        inset 0 -6px 20px rgba(255, 255, 255, 0.02);
}
.menu {
    display: flex;
    gap: 18px;
    align-items: center;
}
.menu a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}
.menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

/* Ícone Home no menu */
.menu a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    opacity: 0.75;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

/* Ajuste do link que contém o ícone */
.menu a:has(img) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
}

/* Hover igual aos links */
.menu a:has(img):hover {
    background: rgba(255, 255, 255, 0.02);
}

.menu a:has(img):hover img {
    opacity: 1;
    transform: scale(1.1);
}

.menu a:has(img):hover img {
    filter: brightness(1.2) sepia(0.4);
}

/* Hero */
header.hero {
    min-height: 78vh;
    display: grid;
    place-items: center;
    padding: 110px 20px 60px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.6)),
        url("../img/capa_de_tras.jpg") center/cover no-repeat;
    text-align: center;
}
.hero-inner {
    max-width: 1000px;
    width: 100%;
    margin: auto;
    background: linear-gradient(
        180deg,
        rgba(10, 13, 18, 0.35),
        rgba(10, 13, 18, 0.25)
    );
    padding: 32px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 8px 30px rgba(2, 6, 12, 0.7);
}
.hero h1 {
    margin: 0 0 8px;
    font-family: "Playfair Display", serif;
    font-size: clamp(28px, 4.6vw, 48px);
    color: var(--gold);
    letter-spacing: 0.5px;
}
.hero p {
    margin: 0 0 18px;
    color: #eef6ffcc;
    font-size: 1.06rem;
}
.hero .cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}
.btn-buy {
    background: linear-gradient(90deg, var(--accent), #b72a2a);
    color: white;
    box-shadow: 0 8px 26px rgba(230, 75, 75, 0.22);
}
.btn-buy:hover {
    transform: translateY(-3px);
}
.openSampleBtn {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(255, 208, 102, 0.12);
    box-shadow: inset 0 -6px 18px rgba(255, 255, 255, 0.01);
}
.openSampleBtn:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* Seção de detalhes do livro */
#detalhes-livro {
    margin-top: 40px;
    margin-bottom: 40px;
}

.detalhes-wrapper {
    align-items: center;
    gap: 32px;
}

/* Capa */
.capa-livro img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    display: block;
    margin: auto;
}

/* Infos do livro */
.info-livro h3 {
    margin: 0 0 12px;
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    color: var(--gold);
}

.info-livro .lead {
    margin: 4px 0;
    color: var(--muted);
    font-size: 1rem;
}

.info-livro .destaque {
    margin-top: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

/* Botão comprar */
.info-livro .btn-buy {
    display: inline-block;
    margin-top: 16px;
    padding: 14px 28px;
    background: linear-gradient(90deg, var(--accent), #b72a2a);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 26px rgba(230, 75, 75, 0.22);
    transition: all 0.2s ease;
}

.info-livro .btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(230, 75, 75, 0.35);
}

/* Responsivo */
@media (max-width: 800px) {
    .detalhes-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .info-livro h3 {
        font-size: 1.6rem;
        margin-top: 20px;
    }

    .info-livro .btn-buy {
        width: 100%;
    }
}

/* Container sections */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 22px;
}
h2.section-title {
    color: var(--gold);
    margin: 0 0 18px;
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.lead {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 18px;
}
.lead.info-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 1rem;
}

/* Two-column layout */
.grid {
    display: grid;
    gap: 20px;
}
.cols-2 {
    grid-template-columns: 1fr 360px;
}
@media (max-width: 900px) {
    .cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Author card */
.author {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.01)
    );
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 16px;
    align-items: center;
}
.author img {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}
.author .meta h3 {
    margin: 0;
    color: var(--gold);
}
.author .meta p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Personagens grid */
.personagens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 14px;
}
.card {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.01)
    );
    border-radius: 12px;
    padding: 16px;
    min-height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(4, 8, 14, 0.6);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(2, 6, 12, 0.65);
}

.card .avatar {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    float: left;
    margin-right: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.card h3 {
    margin: 0;
    font-size: 1.06rem;
    color: var(--gold);
}
.card p.meta {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

details.details-ficha {
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 10px;
    margin-top: 8px;
    color: var(--muted);
}
details summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gold);
}
details[open] summary::after {
    content: " ▲";
    font-size: 0.9rem;
    color: var(--muted);
}
details summary::after {
    content: " ▼";
    font-size: 0.9rem;
    color: var(--muted);
}

table.ficha {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}
table.ficha td {
    padding: 6px 8px;
    vertical-align: top;
}

/* Depoimentos stylized as speech bubbles */
.depoimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 12px;
}
.bubble {
    background: linear-gradient(
        180deg,
        rgba(20, 24, 30, 0.9),
        rgba(10, 12, 16, 0.9)
    );
    padding: 14px;
    border-radius: 14px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6);
}
.bubble::after {
    content: "";
    position: absolute;
    left: 22px;
    bottom: -12px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid rgba(20, 24, 30, 0.9);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}
.bubble img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.03);
}
.bubble .who {
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}
.bubble p {
    margin: 0;
    color: var(--muted);
    font-style: italic;
}

/* Trecho modal (PDF reader) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}
.modal.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal .panel {
    width: min(1100px, 96%);
    height: min(80vh, 920px);
    background: #0b1218;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.modal .panel .head {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.01),
        rgba(255, 255, 255, 0)
    );
}
.modal .panel .head .title {
    color: var(--gold);
    font-weight: 700;
}
.modal .panel .head .actions button {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}
.modal iframe {
    border: 0;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    background: white;
}

/* Footer */
footer.site-footer {
    margin-top: 40px;
    padding: 26px 20px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}
footer a {
    color: var(--gold);
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 720px) {
    .author {
        flex-direction: row;
        gap: 12px;
    }
    .card .avatar {
        float: none;
        margin: 0 0 12px 0;
        width: 72px;
        height: 72px;
    }
    .hero-inner {
        padding: 20px;
    }
    .nav .menu {
        display: none;
    } /* keep simple on mobile */
}

/* Botão hambúrguer */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--gold);
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -260px; /* escondida */
    width: 240px;
    height: 100%;
    background: var(--panel);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.6);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: right 0.3s ease;
    z-index: 9999;
}

.sidebar.open {
    right: 0;
}

.sidebar a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px;
    border-radius: 6px;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Botão fechar */
.sidebar .close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--gold);
    cursor: pointer;
    margin-bottom: 20px;
}

/* Ícone Home da sidebar */
.sidebar a img.sidebar-home {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.8;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        filter 0.2s ease;
    display: block;
}

/* Centraliza o link que contém o ícone */
.sidebar a:has(img.sidebar-home) {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
}

/* Hover igual aos itens do menu */
.sidebar a:has(img.sidebar-home):hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Efeito no ícone */
.sidebar a:hover img.sidebar-home {
    opacity: 1;
    transform: scale(1.12);
    filter: brightness(1.15);
}

/* Mobile */
@media (max-width: 720px) {
    .hamburger {
        display: block;
    }
    .nav .menu {
        display: none;
    }
}

/* Ícones sociais no rodapé */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
}

.social-icons a img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
    cursor: pointer;
}

/* Efeito hover */
.social-icons a img:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* Botão WhatsApp */
.btn-whatsapp {
    background: #25d366; /* Verde oficial WhatsApp */
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    text-decoration: none;
    display: inline-block;
    margin-top: 16px;
    box-shadow: 0 8px 26px rgba(37, 211, 102, 0.25);
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35);
}

.frete-gratis {
    color: #25d366;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(37, 211, 102, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    margin-left: 6px;
    display: inline-block;
}

.tipo-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.tipo-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tipo-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.tipo-btn.ativo {
    background: linear-gradient(90deg, var(--accent), #b72a2a);
    color: #fff;
    border: none;
    box-shadow: 0 4px 18px rgba(230, 75, 75, 0.25);
}

/* Botões de formato (Livreto / Bolso) */
.opcoes-formato {
    display: flex;
    gap: 10px;
    margin: 12px 0 14px;
    flex-wrap: wrap;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.toggle-btn.ativo {
    background: linear-gradient(90deg, var(--accent), #b72a2a);
    color: #fff;
    border: none;
    box-shadow: 0 6px 18px rgba(230, 75, 75, 0.3);
}

/* Transição suave de troca */
#formato,
#preco,
#descricao {
    transition: opacity 0.3s ease;
}

/* Responsividade */
@media (max-width: 720px) {
    .opcoes-formato {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .toggle-btn {
        width: 90%;
        font-size: 0.95rem;
    }

    #descricao {
        font-size: 1rem;
    }

    #preco {
        font-size: 1rem;
    }
}

/* Agradecimentos */
.agradecimentos {
    margin-top: 60px;
}

.agradecimentos .lead {
    text-align: center;
    color: var(--muted);
    margin-bottom: 30px;
}

.agradecimentos-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.agradecimento {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    line-height: 1.6;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.agradecimento:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.08);
}

.agradecimento h3 {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.agradecimento p {
    color: var(--text);
    font-size: 0.95rem;
}

/* Responsividade */
@media (max-width: 720px) {
    .agradecimento {
        padding: 16px;
    }

    .agradecimento h3 {
        font-size: 1rem;
    }

    .agradecimento p {
        font-size: 0.9rem;
    }
}
