/******************************************************
 * IMPÉRIO PHARMA - ESTILOS MODERNOS (VERSÃO FINAL)
 * 
 * Índice:
 * 1. Layout Geral
 * 2. Cabeçalho e Rodapé
 * 3. Página de Marca
 * 4. Cards de Produtos
 * 5. Badges e Etiquetas de Produto
 * 6. Detalhes do Produto
 * 7. Página de Carrinho
 * 8. Responsividade
 * 9. Correções e Ajustes
 ******************************************************/

/****** 1. LAYOUT GERAL ******/

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes highlightBlink {
  0%   { box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.5); }
  50%  { box-shadow: 0 0 0 4px rgba(255, 193, 7, 0); }
  100% { box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.5); }
}

/****** 2. CABEÇALHO E RODAPÉ ******/

/* BARRA SUPERIOR */
.header-bar {
  background-color: #ffffff; /* Fundo branco */
  border-bottom: 4px solid transparent; /* Borda inferior */
  border-image: linear-gradient(to right, #d52b1e, #ffffff, #0033a0) 1; /* Degradê Paraguai */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombra sutil */
}

/* ESPECÍFICO PARA O BOTÃO ENTRAR */
#userArea a {
  background-color: #0033a0 !important; /* Fundo azul escuro */
  color: #ffffff !important; /* Texto branco */
  padding: 0.45rem 1rem !important;
  border-radius: 4px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  display: inline-block !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
  margin-left: 10px !important;
}

#userArea a i {
  color: #ffffff !important; /* Ícone também em branco */
  margin-right: 4px !important;
}

/* Campo de pesquisa na barra superior */
.search-input {
  border: 1px solid #dddddd !important;
  border-radius: 20px !important;
  padding: 8px 15px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* BARRA INFERIOR */
.footer-bar {
  background-color: #ffffff !important; /* Fundo branco */
  border-top: 4px solid transparent !important; /* Borda superior */
  border-image: linear-gradient(to right, #d52b1e, #ffffff, #0033a0) 1 !important; /* Degradê Paraguai */
  box-shadow: 0 -1px 6px rgba(0,0,0,0.1) !important; /* Sombra sutil */
  padding: 8px 0 !important;
  z-index: 100; /* Garantir que fique acima do conteúdo normal */
}

/* Botões da barra inferior */
.footer-button {
  color: #0033a0 !important; /* Azul escuro */
  font-weight: bold !important;
  font-size: 0.9rem !important;
}

.footer-button i {
  color: #0033a0 !important; /* Ícones em azul escuro */
  font-size: 1.4rem !important;
  margin-bottom: 4px !important;
}

/* Botão do Menu */
.footer-button.destaque {
  background: #0033a0 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0,51,160,0.3) !important;
  margin: 0 5px !important;
}

.footer-button.destaque i,
.footer-button.destaque span {
  color: #ffffff !important;
}

/* Badge do Carrinho */
.cart-count {
  position: absolute !important;
  top: -3px !important;
  right: 40% !important;
  background-color: #d52b1e !important; /* Vermelho do Paraguai */
  color: #ffffff !important;
  font-weight: bold !important;
  font-size: 0.75rem !important;
  min-width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
  z-index: 5; /* Garantir que fique acima do botão */
}

/****** 3. PÁGINA DE MARCA ******/

/* Estrutura da página de marca */
.pagina-marca {
  background-color: #f8f9fc;
  padding: 1rem;
  padding-bottom: 5rem;
}

/* Banner de marca mais estilizado */
.marca-banner {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 1.25rem;
  background-color: #fff;
}

.marca-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Título da marca */
.nome-marca {
  font-size: 1.75rem;
  color: #081c4b;
  font-weight: 700;
  text-align: center;
  margin: 0.75rem 0 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Aviso de frete separado */
.aviso-frete-separado {
  background-color: #fff0f0;
  border: 1px solid #ffb8b8;
  color: #d52b1e;
  padding: 1rem 1rem 1rem 3rem; /* Aumentado o padding esquerdo para o ícone */
  margin-bottom: 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-size: 0.95rem;
  line-height: 1.5;
}

.aviso-frete-separado:before {
  content: "\f071"; /* Ícone de alerta do FontAwesome */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d52b1e;
  font-size: 1.1rem;
}

/* Barra de busca na marca */
.busca-marca-container {
  position: relative;
  margin-bottom: 1.25rem;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1rem;
}

.busca-marca-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.busca-marca-input:focus {
  border-color: #0033a0;
  box-shadow: 0 0 0 3px rgba(0,51,160,0.1);
  outline: none;
}

.busca-resultados {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.busca-sugestoes {
  position: absolute;
  top: calc(100% - 12px);
  left: 0.75rem;
  right: 0.75rem;
  background-color: white;
  border: 1px solid #eee;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.busca-sugestoes.active {
  display: block;
}

.sugestao-item {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sugestao-item:hover {
  background-color: #f5f8ff;
}

.sugestao-item:last-child {
  border-bottom: none;
}

.sugestao-item-nome {
  font-weight: 500;
  color: #333;
}

.sugestao-item-categoria {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

/* Toggle de visualização grid/lista */
.visualizacao-toggle {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.visualizacao-btn {
  background-color: #f5f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.visualizacao-btn:hover {
  background-color: #eef1f6;
}

.visualizacao-btn.active {
  background-color: #0033a0;
  color: #fff;
  border-color: #0033a0;
  box-shadow: 0 2px 5px rgba(0,51,160,0.2);
}

.visualizacao-btn i {
  font-size: 1rem;
}

/* Acordeões de categorias mais modernos */
.acordion-container {
  margin-top: 1rem;
}

.acordion-item {
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  background-color: transparent;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acordion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.acordion-header {
  background: linear-gradient(135deg, #081c4b, #0033a0);
  color: #fff;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none; /* Evita seleção de texto */
}

.acordion-header:after {
  content: "\f107"; /* Ícone de seta para baixo do FontAwesome */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  transition: transform 0.3s;
}

.acordion-header.active {
  background: linear-gradient(135deg, #0033a0, #0055a4);
}

.acordion-header.active:after {
  transform: rotate(180deg);
}

.acordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #fff;
  border-radius: 0 0 8px 8px;
}

/* Lista de produtos em grid */
.lista-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
}

/* Vista em Lista */
.lista-produtos.view-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lista-produtos.view-list .card-produto {
  position: relative;
  flex-direction: row;
  height: auto;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  gap: 0.5rem;
}

.lista-produtos.view-list .card-produto img {
  width: 80px;
  height: 80px;
  border-bottom: none;
  border-right: 1px solid #f0f0f0;
  object-fit: contain;
  flex-shrink: 0;
}

.lista-produtos.view-list .info-produto {
  flex: 1;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.lista-produtos.view-list .acoes-produto {
  width: auto;
  border-top: none;
  border-left: 1px dashed #f0f0f0;
  padding: 0.5rem;
  flex-direction: column;
  align-items: center;
  margin: 0;
  display: flex;
  gap: 0.5rem;
}

.lista-produtos.view-list .acoes-produto input[type="number"] {
  width: 2.5rem;
}

/****** 4. CARDS DE PRODUTOS ******/

/* Card de produto redesenhado */
.card-produto {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  border: 1px solid #eaeaea;
}

.card-produto:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-color: #d6e2ff;
}

/* Destaque de produto após pesquisa */
.produto-destaque {
  animation: highlightBlink 1.5s ease-in-out 2;
  border: 2px dashed #ffcc80;
}

/* Imagem do produto */
.card-produto img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background-color: #f7f8fc;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.5rem;
  transition: transform 0.3s;
}

.card-produto:hover img {
  transform: scale(1.05);
}

/* Informações do produto */
.info-produto {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nome-produto {
  font-weight: 600;
  font-size: 0.95rem;
  color: #081c4b;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desc-produto {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Preços */
.preco-produto {
  margin-top: auto;
  font-size: 0.9rem;
  color: #333;
  display: flex;
  flex-direction: column;
}

.preco-original {
  text-decoration: line-through;
  color: #999;
  font-size: 0.8rem;
}

.preco-atual {
  color: #081c4b;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Ações do produto */
.acoes-produto {
  padding: 0.5rem 0.75rem 0.75rem;
  display: flex;
  gap: 0.5rem;
  border-top: 1px dashed #f0f0f0;
  margin-top: auto;
}

.acoes-produto input[type="number"] {
  width: 3rem;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0.25rem;
  font-size: 0.9rem;
}

.btn-adicionar-carrinho {
  flex: 1;
  background-color: #0033a0;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-width: 100px;
}

.btn-adicionar-carrinho:hover {
  background-color: #002780;
}

/* CSS específico apenas para o botão Adicionar (variante) */
.btn-adicionar-v2 {
  background-color: #1a73e8; 
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  text-decoration: none;
}

.btn-adicionar-v2:hover {
  background-color: #1557b2;
}

/* Ícone de carrinho embutido usando base64 para garantir compatibilidade */
.carrinho-icon {
  background-image: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZD0iTTcgMThjLTEuMSAwLTEuOTkuOS0xLjk5IDJTNS45IDIyIDcgMjJzMi0uOSAyLTItLjktMi0yLTJ6TTEgMnYyaDJsMy42IDcuNTktMS4zNSAyLjQ1Yy0uMTYuMjgtLjI1LjYxLS4yNS45NiAwIDEuMS45IDIgMiAyaDEydi0ySDcuNDJjLS4xNCAwLS4yNS0uMTEtLjI1LS4yNWwuMDMtLjEyLjktMS42M2g3LjQ1Yy43NSAwIDEuNDEtLjQxIDEuNzUtMS4wM2wzLjU4LTYuNDljLjA4LS4xNC4xMi0uMzEuMTItLjQ4IDAtLjU1LS40NS0xLTEtMUg1LjIxbC0uOTQtMkgxem0xNiAxNmMtMS4xIDAtMS45OS45LTEuOTkgMnMuODkgMiAxLjk5IDIgMi0uOSAyLTItLjktMi0yLTJ6Ii8+PC9zdmc+');
  width: 18px;
  height: 18px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 6px;
}

/****** 5. BADGES E ETIQUETAS DE PRODUTO ******/

/* Badges para produtos */
.badge {
  position: absolute;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  text-transform: uppercase;
}

/* Badge de desconto (superior direito) */
.badge-desconto {
  top: 0.5rem;
  right: 0.5rem;
  background-color: #d52b1e;
  color: white;
}

/* Badge de novidade (superior esquerdo) */
.badge-novo {
  top: 0.5rem;
  left: 0.5rem;
  background-color: #2196F3;
  color: white;
}

/* Badge de mais vendido (canto superior esquerdo, abaixo do "novo" se existir) */
.badge-popular {
  top: 2rem;
  left: 0.5rem;
  background-color: #ff9800;
  color: white;
}

/* Badge de último estoque (meio à esquerda) */
.badge-ultimo {
  top: 3.5rem;
  left: 0.5rem;
  background-color: #9c27b0;
  color: white;
}

/* Badge especial personalizado */
.badge-especial {
  top: 0.5rem;
  left: 0.5rem;
  background-color: #673ab7;
  color: white;
}

/* Badge de pré-venda */
.badge-prevenda {
  bottom: 0.5rem;
  left: 0.5rem;
  background-color: #009688;
  color: white;
}

/* Badge de frete grátis */
.badge-fretegratis {
  bottom: 0.5rem;
  right: 0.5rem;
  background-color: #4caf50;
  color: white;
}

/* Quando múltiplos badges estão presentes, ajuste posições */
.card-produto.multi-badges .badge-novo {
  top: 0.5rem;
}

.card-produto.multi-badges .badge-popular {
  top: 2.5rem;
}

.card-produto.multi-badges .badge-ultimo {
  top: 4.5rem;
}

/* Variações de posicionamento para visualização em lista */
.lista-produtos.view-list .badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
}

.lista-produtos.view-list .badge-desconto {
  top: 0.25rem;
  right: 0.25rem;
}

.lista-produtos.view-list .badge-novo,
.lista-produtos.view-list .badge-popular,
.lista-produtos.view-list .badge-ultimo,
.lista-produtos.view-list .badge-especial {
  left: auto;
  right: 0.3rem;
}

.lista-produtos.view-list .badge-novo {
  top: 0.3rem;
}

.lista-produtos.view-list .badge-popular {
  top: 1.8rem;
}

.lista-produtos.view-list .badge-ultimo {
  top: 3.3rem;
}

.lista-produtos.view-list .badge-fretegratis,
.lista-produtos.view-list .badge-prevenda {
  bottom: 0.3rem;
  left: auto;
  right: 0.3rem;
}

/****** 6. DETALHES DO PRODUTO ******/

/* Container principal */
.pagina-produto {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.625rem;
  background-color: #ffffff;
  animation: fadeIn 0.5s;
}

/* Barra voltar */
.barra-voltar {
  margin-bottom: 1rem;
}

/* Layout principal */
.produto-detalhes-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Seção de informações principais */
.produto-info-principal {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* Badges (desconto, novo, etc) */
.produto-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.produto-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.produto-badge.desconto {
  background-color: #ff3535;
  color: #fff;
}

.produto-badge.novo {
  background-color: #2196F3;
  color: #fff;
}

.produto-badge.injetavel {
  background-color: #4CAF50;
  color: #fff;
}

/* Container de imagem */
.produto-imagem-container {
  text-align: center;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.produto-imagem-grande {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

/* Informações básicas */
.produto-info-basica {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
}

.produto-marca {
  color: #0033a0;
  font-weight: 600;
  font-size: 1rem;
}

.produto-titulo-detalhes {
  font-size: 1.5rem;
  color: #333;
  margin: 0.5rem 0;
}

.produto-apresentacao {
  color: #666;
  font-size: 0.9rem;
}

/* Preços na página de detalhes */
.produto-preco-container {
  margin: 0.5rem 0;
}

/* Quantidade */
.quantidade-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  max-width: 140px;
}

.btn-quantidade {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eee;
  border: none;
  border-radius: 4px;
  font-size: 1.2rem;
  cursor: pointer;
}

.btn-quantidade:hover {
  background-color: #ddd;
}

#quantidadeInput {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Botão grande de adicionar ao carrinho */
.btn-adicionar-carrinho-grande {
  background-color: #0033a0;
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-adicionar-carrinho-grande:hover {
  background-color: #002a80;
}

/* Tabs para descrição/especificações */
.produto-detalhes-tabs {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 0.8rem;
  background-color: #f8f9fa;
  border: none;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}

.tab-btn.active {
  background-color: #fff;
  color: #0033a0;
  border-bottom: 2px solid #0033a0;
}

.tab-content {
  display: none;
  padding: 1rem;
}

.tab-content.active {
  display: block;
}

/* Descrição do produto */
.produto-descricao {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #444;
}

/* Características */
.caracteristicas-titulo,
.modo-uso-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: #333;
}

.produto-caracteristicas {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
}

.produto-caracteristicas li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.produto-caracteristicas li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #0033a0;
  font-weight: bold;
}

/* Modo de uso */
.produto-modo-uso {
  line-height: 1.6;
  color: #444;
  padding: 0.5rem 0;
}

/* Tabela de especificações */
.especificacoes-tabela {
  width: 100%;
  border-collapse: collapse;
}

.especificacoes-tabela tr {
  border-bottom: 1px solid #eee;
}

.especificacoes-tabela tr:last-child {
  border-bottom: none;
}

.especificacoes-tabela td {
  padding: 0.8rem;
}

.especificacoes-tabela td:first-child {
  font-weight: 600;
  width: 35%;
  color: #333;
}

/* Produtos relacionados */
.produtos-relacionados {
  margin-top: 2rem;
}

.secao-titulo-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.secao-titulo-container h2 {
  font-size: 1.3rem;
  color: #333;
  margin: 0;
}

.ver-mais {
  color: #0033a0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.produtos-relacionados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.produto-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.produto-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.produto-card-imagem {
  height: 140px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.produto-card-imagem img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.produto-card-info {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.produto-card-nome {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  /* Limitar a 2 linhas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-card-preco {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0033a0;
  margin-top: auto;
}

.produto-card-original {
  text-decoration: line-through;
  font-size: 0.8rem;
  color: #999;
}

/****** 7. PÁGINA DE CARRINHO ******/

/* Layout do carrinho em grid */
.carrinho-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Título da seção do carrinho */
.carrinho-secao-titulo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.carrinho-secao-titulo h3 {
  font-size: 1.2rem;
  color: #081c4b;
  margin: 0;
  font-weight: 600;
}

.badge-contagem {
  background-color: #0055a4;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Carrinho vazio */
.carrinho-vazio {
  text-align: center;
  padding: 2rem;
  background-color: #f7f9fc;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.carrinho-vazio-icon {
  font-size: 3rem;
  color: #b0bec5;
  margin-bottom: 1rem;
}

.carrinho-vazio h3 {
  color: #546e7a;
  margin-bottom: 0.5rem;
}

.carrinho-vazio p {
  color: #78909c;
  margin-bottom: 1.5rem;
}

/* Botão continuar comprando */
.btn-continuar-comprando {
  background-color: #f8f9fa;
  color: #555;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
}

.btn-continuar-comprando:hover {
  background-color: #e9ecef;
  color: #333;
}

/* Simulador de frete */
.simulador-frete-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.simulador-header {
  background: #0055a4;
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.simulador-body {
  padding: 16px;
}

.simulador-input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.simulador-input-container input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
}

.btn-simular {
  background: #0055a4;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-simular:hover {
  background-color: #003f7b;
}

.simulador-cep-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: #666;
}

.simulador-resultados {
  margin-top: 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #e9ecef;
}

.simulador-resultado-titulo {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.simulador-opcoes-frete {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.opcao-frete {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.2s;
}

.opcao-frete:hover {
  border-color: #0055a4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.opcao-frete-detalhe {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.opcao-frete-tipo {
  font-weight: 600;
  color: #333;
}

.opcao-frete-valor {
  font-weight: 700;
  color: #0055a4;
}

.simulador-frete-detalhes {
  font-size: 0.85rem;
  color: #666;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* Linha de frete no resumo */
.frete-linha {
  color: #0055a4;
  background-color: #f0f7ff;
  padding: 0.5rem;
  margin: 0.5rem -1rem;
  border-radius: 4px;
}

/* Spinner de loading do CEP */
.cep-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top-color: #0055a4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/****** 8. RESPONSIVIDADE ******/

/* Responsividade da lista de produtos */
@media (min-width: 481px) and (max-width: 768px) {
  .lista-produtos {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (min-width: 769px) {
  .lista-produtos {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .card-produto img {
    height: 150px;
  }
  
  .nome-produto {
    font-size: 1rem;
  }
  
  /* Detalhes do produto */
  .produto-info-principal {
    flex-direction: row;
  }
  
  .produto-imagem-container {
    flex: 1;
    padding: 2rem;
  }
  
  .produto-info-basica {
    flex: 1;
    padding: 2rem;
  }
  
  .produtos-relacionados-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  
  /* Carrinho */
  .carrinho-container {
    grid-template-columns: 65% 35%;
  }
}

@media (max-width: 576px) {
  .busca-marca-container {
    padding: 0.5rem;
  }
  
  .busca-marca-input {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .busca-sugestoes {
    left: 0.5rem;
    right: 0.5rem;
  }
  
  .acoes-produto {
    flex-wrap: wrap;
  }
  
  .acoes-produto input[type="number"] {
    width: 40px !important;
    padding: 0.25rem !important;
  }
  
  .btn-adicionar-carrinho {
    width: 100%;
    margin-top: 0.25rem;
  }
  
  .lista-produtos.view-list .acoes-produto {
    flex-direction: column;
  }
}

/****** 9. CORREÇÕES E AJUSTES ******/

/* Podemos ajustar a cor do valor em promo para verde */
.preco-produto strong {
  color: #28a745 !important; 
  font-weight: 700;
  font-size: 1rem;
}

/* Tornar aviso de estoque separado ainda mais chamativo */
.aviso-frete-separado {
  background-color: #fff0f0;
  border: 2px solid #ff3535;
  color: #b71c1c;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: bold;
  position: relative;
}

.aviso-frete-separado:before {
  content: "!";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ff3535;
  color: #fff;
  width: 1.2rem;
  height: 1.2rem;
  text-align: center;
  line-height: 1.2rem;
  border-radius: 50%;
  font-weight: bold;
}

/* Modal do Combo */
#modalCombo .modal-content {
  max-width: 370px;
  margin: 0 auto;
  text-align: center;
}
#comboItemsContainer {
  margin: 1rem 0;
  text-align: left;
  max-height: 250px; 
  overflow-y: auto; /* se a lista for grande */
}

/* Estilos para o sistema de cupons */
.cupom-container {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-cupom {
  padding: 0.5rem 1rem;
  background-color: #0066cc;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-cupom:hover {
  background-color: #0055aa;
}
.btn-cupom.btn-remover {
  background-color: #e74c3c;
}
.btn-cupom.btn-remover:hover {
  background-color: #c0392b;
}

/* Novo estilo para o card de cupom */
.cupom-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.cupom-header {
  background: #081c4b;
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cupom-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  align-items: center;
}

.cupom-input-container input {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* Novos estilos para o resumo de valores */
.resumo-valores-card {
  background: #f1f3fa;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.resumo-linha {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.resumo-linha:last-child {
  border-bottom: none;
}

.resumo-label {
  font-weight: 500;
  color: #555;
}

.resumo-valor {
  font-weight: 600;
  color: #081c4b;
}

.desconto-linha {
  background: #e9f7ef;
  margin: 8px -16px;
  padding: 8px 16px;
  border-bottom: none;
}

.desconto-label {
  color: #27ae60;
  font-weight: 600;
}

.desconto-valor {
  color: #27ae60;
  font-weight: 700;
}

.total-linha {
  margin-top: 8px;
  border-top: 2px solid rgba(0,0,0,0.1);
  border-bottom: none;
  padding-top: 12px;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #081c4b;
}

.total-valor {
  font-size: 1.1rem;
  font-weight: 700;
  color: #081c4b;
}

/* Estilos para o resumo no checkout */
.totais-bloco {
  background: #f8f9fc;
  border: 1px solid #d0d5de;
}

.totais-titulo {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d0d5de;
  color: #081c4b;
  font-weight: 700;
}

.resumo-valores-checkout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resumo-linha-checkout {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.resumo-label-checkout {
  font-weight: 500;
  color: #555;
}

.resumo-valor-checkout {
  font-weight: 600;
  color: #081c4b;
}

.desconto-linha-checkout {
  background: #e9f7ef;
  margin: 0 -16px;
  padding: 8px 16px;
  border-radius: 4px;
}

.desconto-label-checkout {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #27ae60;
  font-weight: 600;
}

.desconto-valor-checkout {
  color: #27ae60;
  font-weight: 700;
}

.pagamento-valor {
  font-weight: 600;
  color: #0055a4;
}

.total-linha-checkout {
  margin-top: 8px;
  border-top: 2px dashed #d0d5de;
  padding-top: 12px;
}

.total-label-checkout {
  font-size: 1.05rem;
  font-weight: 700;
  color: #081c4b;
}

.total-valor-checkout {
  font-size: 1.05rem;
  font-weight: 700;
  color: #081c4b;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 300px;
}
.toast {
  background-color: #fff;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  padding: 12px 15px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease;
  border-left: 4px solid #2196F3;
}
.toast.toast-sucesso {
  border-left-color: #4CAF50;
}
.toast.toast-erro {
  border-left-color: #F44336;
}
.toast.toast-alerta {
  border-left-color: #FF9800;
}
.toast i {
  margin-right: 10px;
  font-size: 1.1rem;
}
.toast.toast-sucesso i {
  color: #4CAF50;
}
.toast.toast-erro i {
  color: #F44336;
}
.toast.toast-alerta i {
  color: #FF9800;
}
.toast.toast-info i {
  color: #2196F3;
}
.toast.fadeOut {
  opacity: 0;
  transition: opacity 0.3s ease;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Correção crítica para modais (garantia de z-index) */
.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.modal-content {
  position: relative !important;
  z-index: 10000 !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 20px !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
  max-width: 90% !important;
  margin: 0 auto !important;
}

/* Garantir que .hidden funcione corretamente */
.hidden {
  display: none !important;
}

/* Indicador de carregamento para o botão adicionar */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-adicionar-carrinho.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-adicionar-carrinho.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  right: 10px;
  top: calc(50% - 8px);
}

