@font-face {
  font-family: 'GalanoGrotesqueRegular';
  src: url('/assets/fonts/GalanoGrotesqueRegular.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'GalanoGrotesqueBold';
  src: url('/assets/fonts/GalanoGrotesqueBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* =========================
   BASE
========================= */
body {
  margin: 0;
  font-family: 'GalanoGrotesqueRegular', sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* =========================
   BREADCRUMB
========================= */
.breadcrumb-container {
  max-width: 1300px;
  margin: 20px auto 10px;
  padding: 0 25px;
}

.breadcrumb {
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #4a6fa5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #c72041;
  text-decoration: underline;
}

.breadcrumb .sep {
  margin: 0 6px;
  color: #aaa;
}

.breadcrumb span {
  color: #333;
  font-weight: 600;
}

/* =========================
   CONTAINER PRINCIPAL
========================= */
.livro-container {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}


/* =========================
   CAPA E GALERIA
========================= */
.livro-preview {
    flex: 0 0 35%;
    min-width: 280px;
    max-width: 500px;
    text-align: center;
    display: flex;
    flex-direction: column;   /* 🔹 empilha capa e galeria */
    align-items: center;
}

/* Capa principal */
#livroCapa {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    background: #fff;
    padding: 5px;
    margin-bottom: 15px;   /* 🔹 espaço entre capa e thumbs */
}

/* =========================
   GALERIA DE THUMBS
========================= */
.livro-galeria {
    width: 100%;
    text-align: center;
}

.galeria-thumbs {
    display: flex;              /* 🔹 flex em vez de grid */
    flex-wrap: wrap;
    justify-content: center;    /* centraliza */
    gap: 12px;
    margin-top: 10px;
}

.thumb-img {
    width: 80px;
    height: 80px;
    object-fit: contain;   /* 🔹 mantém proporção */
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: transparent;      /* fundo para capas quadradas/retangulares */
    padding: 3px;          /* deixa mais uniforme */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.thumb-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}


/* =========================
   INFO PRINCIPAL
========================= */
.livro-info {
    flex: 1;
}

.livro-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: #ffe082;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
}

.tag-featured {
    background: #f8b195;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-lancamento {
    background: #4a6fa5;
    color: #fff;
}

.livro-title {
    font-size: 40px;
    font-family: 'GalanoGrotesqueBold', sans-serif;
    color: #2c3e50;
}

.author {
    font-weight: bold;
    margin-top: -10px;
    margin-bottom: 20px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.author a {
    color: #877b7b;
    text-decoration: none;
    font-weight: bold;
}

.author a:hover {
    text-decoration: underline;
    color: #502c2c;
}


/* =========================
   DISTRIBUIDORES
========================= */
.livro-buy {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.livro-buy h4 {
    font-size: 14px;
    font-weight: 600;
    color: #c72041;
    margin: 10px 20px 10px 0;
}

/* Botão "Ver lojas" outline custom */
.btn-comprar {
    padding: 8px 20px;
    margin-bottom: 20px;
    background: transparent; /* sem fundo */
    color: #c72041; 
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    border: 1px solid #c72041;
}

/* Hover -> aplica gradiente no fundo */
.btn-comprar:hover {
    background: #c72041;
    color: #fff; /* texto branco */
    transform: translateY(-2px);
}

/* Ícone alinhado */
.btn-comprar i {
    margin-right: 5px;
}


/* =========================
   MODAL LOJAS (Customizado)
========================= */
#modalLojas .modal-dialog {
    max-width: 600px; /* largura máxima */
}

#modalLojas .modal-content {
    background: #fafafa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: none;
    font-family: 'GalanoGrotesqueRegular', sans-serif;
}

#modalLojas .modal-header {
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

#modalLojas .modal-title {
    font-family: 'GalanoGrotesqueBold', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
}

/* Container de colunas */
.modal-colunas {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    margin-top: 10px;
}

/* Cada coluna */
.col-loja {
    flex: 1;
    min-width: 220px;
}

.col-loja h6 {
    font-family: 'GalanoGrotesqueBold', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #c72041;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lista de lojas */
.lista-lojas {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-lojas li {
    margin-bottom: 12px;
}

.lista-lojas li a {
    display: block;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.lista-lojas li a:hover {
    background: #c72041;
    border-color: #c72041;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-colunas {
        flex-direction: column;
        gap: 20px;
    }
}


/* =========================
   FICHA TÉCNICA
========================= */
.livro-ficha {
    margin-top: 10px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: 'GalanoGrotesqueRegular', sans-serif;
}

.livro-ficha h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #c72041;
    display: flex;
    align-items: center;
    gap: 8px;
}


.livro-ficha table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.livro-ficha th {
    text-align: left;
    padding: 8px;
    color: #c72041;
    width: 160px;
    font-weight: 600;
}

.livro-ficha td {
    padding: 8px;
    color: #333;
    border-bottom: 1px solid #eaeaea;
}

.livro-ficha tr:last-child td {
    border-bottom: none;
}


/* Estilo das abas dentro da ficha do livro */
.livro-ficha .nav-tabs {
    border-bottom: 2px solid #eaeaea; /* linha inferior */
    margin-bottom: 15px;
}

.livro-ficha .nav-tabs .nav-link {
    color: #555; /* cor padrão do texto */
    font-weight: 600;
    font-size: 15px;
    border: none; /* remove bordas do Bootstrap */
    border-bottom: 2px solid transparent; /* linha ativa vai aparecer aqui */
    transition: all 0.3s;
}

.livro-ficha .nav-tabs .nav-link:hover {
    color: #c72041; /* cor ao passar o mouse */
}

.livro-ficha .nav-tabs .nav-link.active {
    color: #c72041; /* cor da aba ativa */
    border-bottom: 2px solid #c72041; /* linha em destaque */
    background: transparent; /* sem fundo cinza */
}

/* =========================
   LINKS NA FICHA TÉCNICA
========================= */
.table-ficha a {
  color: #555;                 /* cor azul padrão */
  font-weight: 600;               /* destaque */
  text-decoration: none;          /* sem sublinhado */
  transition: color 0.2s, transform 0.2s;
}

.table-ficha a:hover {
  color: #c72041;                 /* muda para vermelho no hover */
  text-decoration: underline;     /* aparece sublinhado só no hover */
  transform: translateX(2px);     /* leve movimento p/ direita */
}


/* =========================
   SINOPSE
========================= */
.livro-sinopse {
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    margin-top: 20px;
    line-height: 1.7;
    text-align: justify;
}

.livro-sinopse h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #c72041;
    display: flex;
    align-items: center;
    gap: 8px;
}

.livro-sinopse-conteudo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}
.livro-sinopse-conteudo p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.livro-share {
  margin-top: 30px;
  text-align: left;
}
.livro-share h4 {
  margin-bottom: 10px;
  font-size: 18px;
}
.livro-share .share-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}
.livro-share .share-buttons img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.2s;
}
.livro-share .share-buttons img:hover {
  transform: scale(1.1);
}


/* =========================
   MSG QUANDO SEM DISTRIBUIDORES
========================= */
.no-distributors-message {
    margin-top: 50px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
    color: #6c757d;
    font-style: italic;
}

.no-distributors-message i {
    color: #6c757d;
    margin-right: 8px;
}



/* =========================
   MAIS LIVROS DO AUTOR
========================= */
.sessao-msm-autor {
    max-width: 1300px;
    margin: 20px auto;
    padding: 0 20px;
}

.livros-autor {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.livros-autor h4 {
    font-size: 20px;
    font-weight: 600;
    color: #585858;
    margin-bottom: 20px;
}

/* Carrossel horizontal */
.carousel-livros {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-livros::-webkit-scrollbar {
    height: 6px;
}
.carousel-livros::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.carousel-livros::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Cada livro */
.livro-card {
    flex: 0 0 auto;
    width: 150px;
    text-align: center;
    scroll-snap-align: start;
}

.livro-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.livro-card img:hover {
    transform: scale(1.05);
}

.livro-card p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.livro-card a {
    text-decoration: none;
}





/* =========================
   ANIMAÇÕES
========================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVIDADE
========================= */
@media (max-width: 900px) {
    .livro-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .livro-info {
        width: 100%;
        text-align: center;
    }
    
    .livro-tags {
        justify-content: center;
    }
    
    .author {
        justify-content: center;
    }
    
    .livro-preview {
        width: 100%;
        max-width: 300px;
    }
    
    .distributors-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 20px;
    }
    
    .livro-resellers h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .livro-sinopse {
        text-align: center;
    }

    .livro-ficha {
        text-align: center;
    }
    .livro-ficha table {
        font-size: 14px;
    }
    .livro-ficha th {
        display: block;
        width: 100%;
        color: #444;
        margin-top: 10px;
    }
    .livro-ficha td {
        display: block;
        border-bottom: none;
        padding: 4px 0 10px;
    }

}

@media (max-width: 480px) {
    .distributors-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 15px;
    }
    
    .distributor-app {
        width: 60px;
        height: 60px;
    }
    
    .distributor-app-icon {
        border-radius: 14px;
    }
    
    .distributor-app-name {
        font-size: 10px;
        bottom: -20px;
    }
    
    .initials-logo {
        font-size: 18px;
    }
    
    .livro-title {
        font-size: 28px;
    }
    
    .livro-subtitle {
        font-size: 16px;
    }

}
