﻿* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Poppins", sans-serif;
  background-image: url(../img/background.png);
}

/* ===== NAVBAR ===== */
.navbar-top {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100vw;
}

/* ===== LINHA SUPERIOR ===== */
.top-line {
  width: 100%;
  height: 10px;
  background: linear-gradient(to right, #4b0000, #7a0000, #4b0000);
}

.logo {
  width: 165px;
  height: 80px;
  margin: 0;
  flex-shrink: 0;
}

.navbar-title {
  display: none !important;
}

.carrinho {
  width: 40px;
  height: 45px;
  cursor: pointer;
  margin-right: 1%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

}

.carrinho:hover {
  transform: scale(1.1);
  background: rgba(211, 152, 88, 0.1);

   }

/* ===== SIDEBAR ===== */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  right: 0;
  background: linear-gradient(180deg, #5e0b0b 0%, #3b0000 50%, #2a0000 100%);
  overflow-x: hidden;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-top: 60px;
  z-index: 1001;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar a {
  display: block;
  padding: 18px 25px;
  color: #f1f1f1;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.35s ease;
  border-left: 4px solid transparent;
  position: relative;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: rgba(211, 152, 88, 0.12);
  transition: width 0.35s ease;
  z-index: -1;
}

.sidebar a:hover {
  color: #D39858;
  border-left-color: #D39858;
  padding-left: 35px;
  background-color: rgba(211, 152, 88, 0.08);
}

.sidebar a:hover::before {
  width: 100%;
}

.close-btn {
  display: none;
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== NAV ICONS ===== */
.nav-icons {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
}

.menu-icon {
  font-size: 35px;
  cursor: pointer;
  color: #851616;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-icon:hover {
  transform: scale(1.15);
  color: #D39858;
  background: rgba(211, 152, 88, 0.1);
}

.user-wrapper {
  display: flex;
  flex-direction: column;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 4px;
  border-radius: 8px;
}

.user-wrapper:hover {
  transform: scale(1.1);
  background: rgba(211, 152, 88, 0.1);
}

.user-wrapper:hover img {
  filter: brightness(1.15);
}

.user-wrapper img {
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

#user-name-display {
  color: #5e0b0b;
  font-size: 12px;
  margin-top: 3px;
  display: none;
  font-weight: bold;
}

.lupa-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  padding: 5px;
}

.lupa-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lupa-icon:hover {
  transform: scale(1.1);
  background: rgba(211, 152, 88, 0.1);
}

.lupa-icon img {
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

.lupa-icon:hover img {
  filter: brightness(1.15);
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-box.active {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  z-index: 1002;
  display: flex !important;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-box.active input {
  width: 100% !important;
  padding: 12px 15px;
  font-size: 16px;
}

/* ===== BARRA DE CATEGORIAS ===== */
.categorias-nav {
  width: 100%;
  background: transparent;
  border-top: 2px solid #5e0b0b;
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

.categorias-nav ul {
  display: flex;
  list-style: none;
  gap: 65px;
}

.categorias-nav a {
  font-family: "Georgia", serif;
  font-weight: 600;
  text-decoration: none;
  font-size: 23px;
  color: #a86a0a;
  position: relative;
  padding-bottom: 4px;
  transition: color .3s ease;
}

.categorias-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #5e0b0b;
  transition: width .3s ease;
}

.categorias-nav a:hover {
  color: #5e0b0b;
}

.categorias-nav a:hover::after {
  width: 100%;
}

/* ===== CARROSSEL PRINCIPAL (BANNERS) - NOVO ===== */
.banner-carousel-container {
  width: 100%;
  max-width: 1200px;
  height: 400px; /* 🛑 ALTURA FIXA: Essencial para funcionar */
  margin: 40px auto 20px auto;
  overflow: hidden; /* 🛑 ESCONDER: Essencial para deslizar */
  border-radius: 25px;
  position: relative;
  box-shadow: 0px 6px 20px rgba(0,0,0,0.2);
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}

.banner-item {
  min-width: 100%; /* 🛑 LARGURA TOTAL: Essencial para o cálculo do JS */
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ===== INDICADORES DO BANNER ===== */
.banner-indicators {
  position: absolute;
  bottom: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  background: #5e0b0b;
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer; /* Adicione cursor */
}

.banner-dot.active {
  opacity: 1;
  transform: scale(1.3);
}

/* (Não se esqueça de aplicar as correções de altura nas Media Queries para .banner-carousel-container e .banner-item) */

/* ===== CARROSSEL ===== */
.carousel {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 40px auto 20px auto;
  overflow: auto;
  border-radius: 25px;
  position: relative;
  box-shadow: 0px 6px 20px rgba(0,0,0,0.2);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== INDICADORES ===== */
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #5e0b0b;
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dot.active {
  opacity: 1;
  transform: scale(1.3);
}

/* ===== TÍTULO ===== */
.titulo-destaques {
  font-family: Georgia, serif;
  margin-top: 5%;
  font-size: 32px;
  font-weight: bold;
  color: #5e0b0b;
  margin-left: 5%;
  position: relative;
}

.titulo-destaques::after {
  content: "";
  width: 95%;
  height: 2px;
  background: #5e0b0b;
  position: absolute;
  bottom: -10px;
  left: 0;
}

/* ===== PRODUTOS ===== */
.produtos-carousel {
  position: relative;
  width: 100%;
  margin: 10px auto 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-seta {
  background: #8B0000;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%; 
  font-size: 22px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  transition: 0.3s;
}

.prod-seta.esquerda { left: 50px; }
.prod-seta.direita { right: 50px; }

.prod-seta:hover {
  background: #a30000;
}

.produtos-track-container {
  width: 85%;
  overflow: hidden;
  height: auto;
}

.produtos-track,
.mv-track,
.recomendados-track,
.romance-track,
.ficcao-track,
.aventura-track,
.filosofia-track,
.hqs-track {
  display: flex;
  gap: 25px;
  padding: 10px 0;
  transition: transform 0.4s ease;
  overflow: visible;
  flex-wrap: nowrap;
}

.produtos-track::-webkit-scrollbar {
  display: none;
}

.mv-track {
  display: flex;
  gap: 25px;
  padding: 10px 0;
  transition: transform 0.4s ease;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.mv-track::-webkit-scrollbar {
  display: none;
}

.prod-card {
  width: 250px;
  background: #ffffffdd;
  border-radius: 15px;
  padding: 12px;
  text-align: center;
  box-shadow: 0px 4px 14px rgba(0,0,0,0.15);
}

.prod-card img {
  width: 210px;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;

}

.prod-card .titulo {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  height: 32px;
  overflow: hidden;
}

.prod-card .preco {
  margin-top: 8px;
  color: green;
  font-size: 17px;
  font-weight: bold;
}

.produtos-track,
.mv-track,
.recomendados-track,
.romance-track,
.ficcao-track,
.aventura-track,
.filosofia-track,
.hqs-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 25px; /* Ou o valor que você está usando */
  
  /* Adicione/Mantenha esta linha para garantir que o track se estenda */
  width: fit-content; 
  min-width: 100%;
}

/* Garanta que o container de visualização esconde o excesso */
.produtos-track-container {
  overflow: hidden; /* Isso deve permanecer aqui, e não no track */
  width: 85%; /* Ou o valor que você está usando */
  height: auto;
}

/* ========================================================= */
/* ==================  POPUP LOGIN / CADASTRO =============== */
/* ========================================================= */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 9999;
}

.popup-overlay.show {
  opacity: 1;
}

.popup-box {
  background: #fff;
  width: 350px;
  padding: 25px;
  border-radius: 12px;
  transform: scale(0.8);
  opacity: 0;
  animation: popupStart 0.25s forwards ease-out;
  position: relative;
}

@keyframes popupStart {
  from {
      opacity: 0;
      transform: scale(0.8);
  }
  to {
      opacity: 1;
      transform: scale(1);
  }
}

.popup-box h2 {
  text-align: center;
  margin-bottom: 15px;
}

.popup-box input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#btnCadastrar {
  width: 100%;
  padding: 10px;
  background: rgb(108, 3, 1);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}
#btnCadastrar:hover {
  background: rgb(182, 93, 92);
}

.closePopup {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  cursor: pointer;
}


/* ===========================
   POPUP LOGIN / CADASTRO (estilo Littera)
   =========================== */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: none; /* controlado por JS */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.18s ease;
}

.popup-overlay.show {
  display: flex;
  opacity: 1;
}

/* Caixa central */
.popup-box {
  width: 520px;               /* largura parecida com as imagens */
  max-width: 92%;
  background: #fff;
  border-radius: 14px;
  padding: 34px 38px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  position: relative;
  transform: translateY(-10px) scale(0.96);
  opacity: 0;
  animation: popupEnter 0.26s ease forwards;
}

/* animação de entrada (scale + fade) */
@keyframes popupEnter {
  from { transform: translateY(-10px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* X centralizado no topo */
.closePopup {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  background: transparent;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cabeçalho grande centralizado */
.popup-box h2 {
  text-align: center;
  margin: 6px 0 22px;
  font-family: Georgia, serif;
  font-size: 28px;
  color: #222;
  font-weight: 700;
}

/* Campos de input grandes como no exemplo */
.popup-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 14px;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  font-size: 15px;
  outline: none;
}

.popup-box input::placeholder {
  color: #9b9b9b;
}

/* Botão principal verde escuro (estilo das imagens) */
.btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  border-radius: 10px;
  border: none;
  background: rgb(108, 3, 1);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0,0,0,0.06);
}

.btn-primary:hover {
  background: rgb(182, 93, 92);
}

/* Link de troca (cadastre-se / já tem conta) */
.auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: rgb(108, 3, 1);
}
.auth-switch a {
  color:  rgb(148, 35, 33);
  font-weight: 700;
  text-decoration: none;
}

/* tela individual escondida */
.hidden { display: none !important; }

.account-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 10000;
}

.account-modal.show {
  opacity: 1;
  visibility: visible;
}

.account-card {
  width: 360px;
  max-width: 90%;
  background: #fdf9f4;
  border-radius: 18px;
  padding: 26px 28px 30px;
  box-shadow: 0 25px 45px rgba(24, 5, 0, 0.35);
  border: 1px solid rgba(133, 22, 22, 0.15);
  position: relative;
}

.account-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: #7a3a05;
  cursor: pointer;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #d8a05d;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff8f0;
}

.account-avatar img {
  width: 32px;
  height: 32px;
}

.account-name {
  font-size: 20px;
  color: #c17824;
  font-weight: 700;
  margin: 0;
}

.account-email {
  font-size: 14px;
  color: #6b4c3b;
  margin: 2px 0 0;
}

.account-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.account-btn.primary {
  background: #c5843e;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.account-btn.secondary {
  background: transparent;
  border: 2px solid #c5843e;
  color: #4a2c17;
}

.account-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5c0000;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #4b2c1b;
}

.account-permission {
  font-weight: 600;
}

.account-config {
  border: none;
  background: none;
  color: #4b2c1b;
  cursor: pointer;
  font-weight: 600;
}

.account-logout {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  background: #5c0000;
  color: #fff;
  cursor: pointer;
}

/* responsividade */
@media (max-width: 560px) {
  .popup-box { width: 92%; padding: 22px; }
  .popup-box h2 { font-size: 22px; }
  .btn-primary { padding: 12px; font-size: 15px; }
}

/* Nome do usuário (sob o ícone) - já existente no seu CSS, reforço aqui */
#user-name-display {
  color: #5e0b0b;
  font-size: 12px;
  margin-top: 3px;
  display: none;
  font-weight: 700;
}





/* ===== RODAPÉ ===== */
.footer {
  background-color:#570202;
  color: #ffffff;
  padding: 40px 60px 20px;
  margin-top: 60px;
  font-family: "Poppins", sans-serif;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #ffe6c8;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin: 6px 0;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: #ffe6c8;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #ffe6c8;
  padding-top: 15px;
  margin-top: 30px;
  font-size: 0.9rem;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
  color: inherit;
}


/* caixa escondida no começo */
.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 400px;
  margin: 0 10px;
}

.search-box {
  display: none;
  width: 100%;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #7c0909;
  border-radius: 6px;
  font-size: 14px;
}

/* quando ativa */
.search-box.active {
  display: block;
}

.lupa-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.lupa-icon:hover {
  opacity: 0.8;
}

.lista-resultados {
  width: 90%;
  max-width: 900px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.livro-card-busca {
  display: flex;
  gap: 20px;
  padding: 15px;
  border: 1px solid #900;
  border-radius: 10px;
  background: #fff;
}

.livro-card-busca img {
  width: 120px;
  border-radius: 6px;
}


/* MENU LATERAL DE CATEGORIAS */
.categorias-laterais {
  position: absolute;
  top: 110px;             /* Ajusta conforme sua navbar */
  left: 0;
  width: 230px;
  background: #ffffff;
  border-right: 2px solid #8B0000;
  padding: 20px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 20;
}

.categorias-laterais h3 {
  margin: 0 0 15px;
  font-size: 20px;
  color: #8B0000;
  font-weight: bold;
}

.categorias-laterais ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categorias-laterais ul li {
  margin-bottom: 12px;
}

.categorias-laterais ul li a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  transition: 0.3s;
  padding: 5px;
  display: block;
  border-radius: 6px;
}

.categorias-laterais ul li a:hover {
  background: #8B0000;
  color: #fff;
}

 
/* Corre��es para carross�is */ 
.romance-track, .ficcao-track, .aventura-track { 
  display: flex; 
  flex-direction: row; 
  gap: 12px; 
  padding: 20px 0; 
  overflow-x: auto; 
  scroll-behavior: smooth; 
} 
.prod-card { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
} 
.produtos-track, .romance-track, .ficcao-track, .aventura-track { 
  overflow: hidden !important; 
  transition: transform 0.3s ease; 
} 
.prod-card:hover { 
  transform: scale(1.05); 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); 
} 
.prod-card { 
  transition: all 0.3s ease; 
} 
.prod-card:hover { 
  transform: scale(1.05) translateY(-5px); 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); 
  filter: brightness(1.1); 
} 
.produtos-track, .romance-track, .ficcao-track, .aventura-track { 
  padding-right: 20px; 
} 
.filosofia-track, .hqs-track { 
  display: flex; 
  flex-direction: row; 
  gap: 12px; 
  padding: 20px 0; 
  overflow: hidden !important; 
  transition: transform 0.3s ease; 
  padding-right: 20px; 
}

@media (max-width: 1440px) {
    .logo {
        width: 150px;
        height: 70px;
        margin-left: 10%;
    }
    
    .carrinho, .lupa-icon img {
        width: 35px;
        height: 40px;
    }
    
    .categorias-nav ul {
        gap: 40px;
    }
    
    .categorias-nav a {
        font-size: 20px;
    }
}

@media (max-width: 1200px) {
    .navbar-top {
        padding: 0px 15px;
    }
    
    .logo {
        width: 140px;
        height: 65px;
        margin-left: 5%;
    }
    
    .nav-icons {
        gap: 15px;
    }
    
    .categorias-nav ul {
        gap: 30px;
    }
    
    .categorias-nav a {
        font-size: 18px;
    }
    
    .carousel-item {
        height: 300px;
    }
    
    .productos-carousel {
        padding: 20px 10px;
    }
    
    .titulo-destaques {
        font-size: 28px;
        margin: 30px 20px;
    }
}

@media (max-width: 992px) {
    .navbar-top {
        padding: 0px 10px;
    }
    
    .logo {
        width: 120px;
        height: 55px;
        margin-left: 2%;
    }
    
    .search-box {
        width: 80%;
        right: 50%;
        transform: translateX(50%);
    }
    
    .search-box input {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .nav-icons {
        gap: 12px;
    }
    
    .carrinho, .lupa-icon img, .user-icon {
        width: 32px;
        height: 35px;
    }
    
    .categorias-nav ul {
        gap: 20px;
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    .categorias-nav a {
        font-size: 16px;
    }
    
    .carousel-item {
        height: 250px;
    }
    
    .carousel {
        margin: 20px auto;
    }
    
    .productos-carousel {
        padding: 20px 0;
    }
    
    .titulo-destaques {
        font-size: 24px;
        margin: 25px 15px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .search-box {
        display: none;
    }
    
    .nav-icons {
        gap: 15px;
    }
    
    .carrinho {
        width: 32px;
        height: 36px;
    }
    
    .lupa-icon img {
        width: 32px;
        height: 32px;
    }
    
    .menu-icon {
        font-size: 28px;
    }
    
    .user-wrapper {
        padding: 0;
    }
    
    .user-wrapper img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .navbar-top {
        flex-wrap: wrap;
        padding: 10px 10px;
    }
    
    .logo {
        width: 100px;
        height: 45px;
        margin-left: 0;
        margin-top: 2%;
    }
    
    .search-box {
        width: 90%;
        display: none;
    }
    
    .search-box.active {
        display: block;
        position: absolute;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
    }
    
    .search-box input {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .nav-icons {
        gap: 10px;
        margin-right: 0;
    }
    
    .carrinho, .lupa-icon img, .user-icon {
        width: 28px;
        height: 32px;
    }
    
    #user-name-display {
        display: none;
    }
    
    .categorias-nav {
        padding: 10px 0;
        border-top: 1px solid #5e0b0b;
    }
    
    .categorias-nav ul {
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0 10px;
    }
    
    .categorias-nav a {
        font-size: 13px;
        padding-bottom: 2px;
    }
    
    .carousel-item {
        height: 200px;
    }
    
    .carousel {
        margin: 15px auto;
    }
    
    .titulo-destaques {
        font-size: 20px;
        margin: 20px 10px;
    }
    
    .productos-carousel {
        margin: 15px 0;
        padding: 15px 10px;
    }
    
    .prod-seta {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .footer {
        padding: 30px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-section h2 {
        font-size: 18px;
    }
    
    .popup-box {
        width: 90%;
        max-width: 100%;
        padding: 20px;
    }
    
    .popup-box h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .popup-box input {
        padding: 10px;
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .btn-primary {
        padding: 10px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .categorias-laterais {
        width: 200px;
        height: calc(100vh - 100px);
    }
    
    .navbar-title {
        display: block;
    }
    
    .categorias-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        border-top: 2px solid #5e0b0b;
        border-bottom: none;
        padding: 10px 0;
        justify-content: center;
        z-index: 999;
        margin-bottom: 0;
    }
    
    .categorias-nav ul {
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .categorias-nav {
        display: none;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .user-wrapper {
        padding: 0;
    }
    
    .user-wrapper img {
        width: 32px;
        height: 32px;
    }
    
    .carrinho {
        width: 32px;
        height: 36px !important;
        margin: 0 !important;
    }
    
    .lupa-icon img {
        width: 32px;
        height: 32px;
        margin: 0 !important;
    }
    
    .menu-icon {
        font-size: 28px;
    }
    
    .search-box {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .navbar-top {
        padding: 8px;
        justify-content: center;
    }
    
    .logo {
        width: 60px;
        height: 30px;
        margin-left: 0;
        margin-top: 1%;
    }
    
    .navbar-title {
        font-size: 18px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    .nav-icons {
        gap: 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        border-top: 2px solid #5e0b0b;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
        z-index: 999;
    }
    
    .carrinho {
        width: 32px;
        height: 36px;
    }
    
    .lupa-icon img {
        width: 32px;
        height: 32px;
    }
    
    .user-icon {
        width: 32px;
        height: 32px;
    }
    
    .search-box {
        display: none;
    }
    
    .menu-icon {
        font-size: 28px;
    }
    
    .categorias-nav {
        display: none;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .carousel-item {
        height: 150px;
    }
    
    .titulo-destaques {
        font-size: 18px;
        margin: 15px 8px;
    }
    
    .productos-track-container {
        padding: 0 5px;
    }
    
    .prod-seta {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .footer {
        padding: 20px 10px;
    }
    
    .footer-section h2 {
        font-size: 16px;
        margin: 10px 0 5px;
    }
    
    .footer-section p, .footer-section a {
        font-size: 12px;
    }
    
    .footer-bottom {
        font-size: 11px;
        padding: 10px;
    }
    
    .popup-box {
        width: 95%;
        padding: 15px;
        border-radius: 8px;
    }
    
    .popup-box h2 {
        font-size: 18px;
    }
    
    .popup-box input {
        padding: 8px;
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .btn-primary {
        padding: 8px;
        font-size: 13px;
    }
    
    .categorias-laterais {
        display: none;
    }
    
    .search-box {
        position: fixed;
        top: 90px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 500px;
        z-index: 1002;
        display: flex !important;
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .search-box input {
        width: 100% !important;
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .livro-card-busca {
        flex-direction: column;
        gap: 10px;
    }
    
    .livro-card-busca img {
        width: 100%;
        max-width: 100px;
    }
}

@media (max-width: 360px) {
    .logo {
        width: 70px;
        height: 35px;
    }
    
    .navbar-top {
        padding: 5px;
    }
    
    .categorias-nav a {
        font-size: 10px;
    }
    
    .carousel-item {
        height: 120px;
    }
    
    .titulo-destaques {
        font-size: 16px;
        margin: 10px 5px;
    }
}

#popupOverlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#popupOverlay.show {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#cart-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#cart-modal.show {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#checkout-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#checkout-modal.show {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.reservas-badge-icon { position: absolute; top: -5px; right: -5px; background: red; color: white; border-radius: 50%; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; z-index: 10; } .reservas-badge-icon.hidden { display: none !important; }

.cart-container {
  position: relative;
  display: inline-block;
}

#cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
}

/* ===== MELHORIAS DE RESPONSIVIDADE E ALINHAMENTO ===== */

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
}

.search-box {
  display: flex !important;
  width: 100%;
  background: #f5f5f5;
  border-radius: 25px;
  padding: 8px 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.search-box:hover {
  background: #ffffff;
  border-color: #D39858;
}

.search-box input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  outline: none;
  padding: 0;
}

.search-box input::placeholder {
  color: #999;
}

.cart-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 5px;
  border-radius: 8px;
  min-height: 50px;
}

.logo {
  width: 140px;
  height: 70px;
  margin: 0;
}

@media (max-width: 768px) {
  .search-container {
    flex: 1;
    max-width: 300px;
    margin: 0 10px;
  }
  
  .search-box {
    padding: 6px 15px;
  }
  
  .search-box input {
    font-size: 13px;
  }
  
  .logo {
    width: 100px;
    height: 50px;
  }
  
  .navbar-top {
    padding: 10px 15px;
  }
}

@media (max-width: 768px) {
  .search-container {
    display: none !important;
  }
  
  .navbar-top .search-container.active {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 1 !important;
    background: white;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 998;
    box-sizing: border-box;
  }

  .search-container.active .search-box {
    width: 100%;
    flex: 1;
  }

  .lupa-icon {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .search-container {
    display: none !important;
  }

  .navbar-top .search-container.active {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 1 !important;
    background: white;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 998;
    box-sizing: border-box;
  }
  
  .search-box {
    padding: 5px 12px;
  }
  
  .logo {
    width: 80px;
    height: 40px;
  }
  
  .nav-icons {
    gap: 10px;
  }
  
  .lupa-icon,
  .user-wrapper img,
  .carrinho {
    width: 32px !important;
    height: 32px !important;
  }

  .lupa-icon img {
    width: 100% !important;
    height: 100% !important;
  }
}

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5000;
  backdrop-filter: blur(5px);
  padding: 20px;
  align-items: center !important;
  justify-content: center !important;
}

.popup-overlay.show {
  display: flex !important;
}

.popup-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.4s ease-out;
  margin: auto;
}

@media (max-width: 480px) {
  .popup-overlay {
    padding: 10px;
  }
  
  .popup-box {
    width: 95%;
    padding: 20px;
  }
}

@media (max-width: 360px) {
  .popup-box {
    width: 98%;
    padding: 18px;
  }
}
