/* ===== Header & elementos globais ===== */

/* Box-sizing global (afeta header e filhos) */
* {
  box-sizing: border-box;
}

/* Variáveis usadas pelo header */
:root {
  --bg-paper: #fff8f3;  /* cor do texto/logo */
  --muted: #6b6b6b;     /* links secundários */
  --paper-light: #faf9f7; /* fundo header */
}

/* Body com padding para não cobrir conteúdo */
body {
  padding-top: 82px; /* necessário para o header fixo */
}

/* ===== Header fixo ===== */
header.container.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--paper-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 2rem;
  color: var(--bg-paper);
  z-index: 1000;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Sombra ao rolar */
body.scrolled header.container.site-header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Marca / Logo ===== */
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.brand .title {
  font-family: "Playfair Display", serif;
  color: var(--bg-paper);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

/* ===== Navegação ===== */
.nav-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-wrap a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-wrap a:hover {
  color: var(--bg-paper);
}

/* ===== “Meus livros” ===== */
.meus-livros {
  position: relative;
  display: inline-block;
}

.btn-meus-livros {
  background: none;
  border: none;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  margin-left: 18px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.btn-meus-livros:hover {
  color: var(--bg-paper);
}

/* Lista suspensa */
.lista-livros {
  display: none;
  position: absolute;
  top: 2.3rem;
  right: 0;
  background: var(--paper-light);
  border: 1px solid rgba(103, 62, 50, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1rem;
  list-style: none;
  z-index: 1001;
  min-width: 180px;
  border-radius: 6px;
}

.lista-livros.visivel {
  display: block;
}

.lista-livros li {
  margin: 0.25rem 0;
}

.lista-livros a {
  text-decoration: none;
  color: var(--bg-paper);
  font-size: 0.93rem;
}

.lista-livros a:hover {
  text-decoration: underline;
}

/* ===== Regras que podem interferir no header ===== */
header img,
header p,
header a {
  /* Garante que o header não seja afetado por estilos globais de style.css */
  max-width: none;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}