:root {
  --primary: #0077c2;
  --primary-hover: #005c99;
  --secondary: #2b282d;
  --background: #fff;
  --text: #252525;
  --cor_produto: #FFFFFF;
  --cor_botao: #0077c2;
  --cor_botao_hover: #005c99;
  --cor_menu: #0077c2;
  --cor_menu_hover: #dedede;
  --accent: #ff0303;
}

/* Estilos Base */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: var(--background);
  color: var(--text);
}

/* Header e Navegação */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cor_menu);
  color: white;
  padding: 0 2rem;
  height: 125px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 120px;
  margin-left: 85%;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Botão do menu mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  transition: color 0.2s ease;
}

.menu-toggle:hover {
  color: #ffffff;
}

.menu-toggle:focus {
  outline: none;
}

.menu-toggle i {
  transition: transform 0.2s ease;
}

/* Navegação */
nav {
  position: relative;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}

nav a:hover { 
  color: var(--cor_menu_hover); 
}

/* Garantir que o menu seja visível em desktop */
@media(min-width: 701px) {
  nav {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  
  nav ul {
    flex-direction: row !important;
    padding: 0 !important;
    height: auto !important;
  }
  
  nav ul li {
    border-bottom: none !important;
  }
  
  nav ul li a {
    display: inline !important;
    padding: 0 !important;
    font-size: inherit !important;
  }
}

/* Layout Principal */
main {
  max-width: 960px;
  margin: 2rem auto;
  min-height: 70vh;
  padding: 0 1rem;
}

/* Seções e Headers */
.page-title {
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0 0 2rem 0;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.sessao-pagina {
  margin-bottom: 3rem;
}

/* Melhorias de acessibilidade */
address {
  font-style: normal;
  line-height: 1.8;
}

address a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

address a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Responsivo para headers */
@media(max-width: 700px) {
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Lista de Ofertas */
.ofertas-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Cards de Oferta */
.oferta-card {
  background: var(--cor_produto);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .08s;
  max-width: 300px;
  min-width: 280px;
  height: 620px;
  max-height: 620px;
  min-height: 620px;
  margin: 0 auto 20px auto;
  padding: 10px;
  border: 1px solid #ccc;
}

.oferta-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}

.oferta-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-bottom: 1px solid #eee;
  background: #fff;
  display: block;
  border-radius: 10px;
  justify-content: center;
}

.oferta-info {
  display: flex;
  flex-direction: column;
  padding: 15px;
  height: 350px;
}

.oferta-titulo {
  font-size: 1.05em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text);
  max-height: 150px;
  min-height: 90px;
  line-height: 1.3;
  overflow: hidden;
  /* text-overflow: ellipsis; */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* -webkit-box-orient: vertical; */
}

/* Estilo para a descrição detalhada (requisicao) */
.oferta-requisicao {
  background: linear-gradient(135deg, #e3f2fd, #f1f8ff);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0 12px 0;
  font-size: 0.9em;
  line-height: 1.4;
  color: #2c5282;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  /* text-overflow: ellipsis; */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  /* -webkit-box-orient: vertical; */
}

.oferta-requisicao i {
  color: var(--primary);
  margin-right: 6px;
  font-size: 0.9em;
}

.oferta-requisicao::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.oferta-marketplace {
  font-size: .95em;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
}

.oferta-preco-container {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 8px;
  height: 40px;
  padding: 5px;
}

.preco-promo {
  font-size: 1.5em;
  font-weight: 700;
  color: #0077c2;
  line-height: 1;
}

.preco-normal {
  font-size: 1em;
  color: #888;
  text-decoration: line-through;
  line-height: 1;
}

.oferta-desconto {
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 20px;
  height: 25px;
}

.oferta-actions {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Botões */
.btn {
  background: var(--cor_botao);
  color: #fff;
  padding: 12px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  text-align: center;
  margin: 10px;
  width: 100%;
  text-decoration: none;
}

.footer-link {
  color: #6ab7ff ;
  text-decoration: none;
  font-size: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 10px;
  margin-right: 10px;
  text-align: center;
}

.btn:hover {
  background: var(--cor_botao_hover);
}

/* Modal */
.modal-bg {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(30,30,30,0.7); 
  display: none; 
  z-index: 1000;
  align-items: center; 
  justify-content: center;
}

.modal-bg.fadeIn,
.modal-bg[style*="block"],
.modal-bg[style*="flex"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
  position: relative;
  margin: 0;
  transform: none;
}

/* Estilo para a seção de descrição detalhada no modal */
.modal-requisicao {
  background: linear-gradient(135deg, #f8f9ff, #e8f4fd);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-requisicao h4 {
  color: var(--primary);
  margin: 0 0 15px 0;
  font-size: 1.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  border-bottom: 2px solid rgba(0, 119, 194, 0.2);
  padding-bottom: 10px;
}

.modal-requisicao h4 i {
  margin-right: 8px;
  color: var(--accent);
  font-size: 1.2em;
}

.modal-requisicao p {
  margin: 0;
  line-height: 1.6;
  color: #2c5282;
  font-size: 1em;
  text-align: justify;
}

/* Estilo para botão de detalhes */
.btn-detalhes {
  background: linear-gradient(135deg, var(--accent), #ff8533);
  border: none;
  margin: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

.btn-detalhes:hover {
  background: linear-gradient(135deg, #e55a00, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
}

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

.modal-close {
  position: absolute;
  right: 20px; 
  top: 20px;
  background: none; 
  border: none; 
  color: #888;
  font-size: 1.5em; 
  cursor: pointer;
  transition: color .15s;
}

.modal-close:hover { 
  color: var(--accent);
}

.modal img { 
  width: 100%; 
  border-radius: 8px; 
  margin-bottom: 1rem; 
}

.modal .oferta-preco, 
.modal .oferta-desconto { 
  font-size: 1.3em; 
}

/* Cards de Cupom */
.cupom-card {
  background: var(--cor_produto);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 350px;
  min-width: 350px;
  margin: 0 auto 20px auto;
  padding: 16px;
  border: 1px solid #ccc;
  transition: transform .08s;
}

.cupom-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cupom-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.cupom-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}

.cupom-marketplace {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  margin: 10px 0;
}

.cupom-marketplace img {
  height: 70px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.cupom-desconto {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--accent);
  margin: 10px 0 18px 0;
  text-align: center;
}

.cupom-codigo {
  width: 100%;
  margin-bottom: 16px;
}

.codigo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  width: 330px;
  margin-bottom: 15px;
}

.codigo-container code {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.2em;
    color: var(--text);
    border: 1px dashed #ccc;
    width: 320px;
    text-align: center;
    word-break: break-all;
    margin-bottom: 5px;
}

.btn-copiar {
  background: var(--cor_botao);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.btn-copiar:hover {
  background: var(--cor_botao_hover);
  text-decoration: none;
  color: white;
}

.btn-copiar.copiado {
  background: #28a745;
}

.cupom-vencimento {
  font-size: 0.95em;
  color: #666;
  margin: 0 0 10px 0;
  text-align: center;
}

.condicoes-label {
  font-size: 0.95em;
  color: #888;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  cursor: pointer;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  transition: background 0.2s;
  text-align: center;
}

.condicoes-label:hover {
  background: #eee;
}

.condicoes-label::after {
  content: '▼';
  margin-left: 5px;
  transition: transform 0.3s;
  display: inline-block;
}

.condicoes-label.expandido::after {
  transform: rotate(180deg);
}

.condicoes-cupom {
  font-size: 0.9em;
  color: #666;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 4px;
  line-height: 1.4;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  width: 100%;
  margin-bottom: 0;
}

.condicoes-cupom.expandido {
  max-height: 200px;
  overflow-y: auto;
}

.aviso-redirecionamento {
  margin-top: 8px;
  padding: 5px;
  color: #d6d6d6;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

/* Toast de notificação */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  min-width: 200px;
}

.toast.visible {
  opacity: 1;
}

/* Mensagens e Notificações */
.error-message {
  text-align: center;
  color: #ff0000;
  padding: 20px;
  background: #ffeeee;
  border-radius: 8px;
  margin: 20px;
}

.sem-ofertas {
  background-color: #f7f7f7;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  margin: 20px auto;
  max-width: 500px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sem-ofertas p {
  margin: 10px 0;
  color: #555;
  font-size: 16px;
}

.sem-ofertas p:first-child {
  font-weight: bold;
  font-size: 18px;
}

.notification-banner {
  background-color: #FFF3CD;
  color: #856404;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #FFEEBA;
  position: relative;
}

.notification-banner button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  font-size: 16px;
  color: #856404;
  opacity: 0.7;
}

.notification-banner button:hover {
  opacity: 1;
}

/* Loading */
.loading {
  text-align: center;
  padding: 30px;
  color: #777;
  font-size: 16px;
  position: relative;
}

.loading::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  margin: 15px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Busca */
.busca-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto 25px auto;
}

.campo-busca {
  flex-grow: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px 0 0 6px;
  font-size: 15px;
  color: var(--text);
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.campo-busca:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.btn-buscar {
  background: var(--cor_botao);
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-buscar:hover {
  background: var(--cor_botao_hover);
}

.btn-limpar-busca {
  background: #f44336;
  color: white;
  border: none;
  padding: 0 15px;
  border-radius: 6px;
  margin-left: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-limpar-busca:hover {
  background: #d32f2f;
}

.resultados-info {
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 14px;
  padding: 12px;
  background: rgba(var(--primary-rgb), 0.05);
  border-radius: 6px;
  max-width: 600px;
  margin: 0 auto 20px auto;
}

.resultados-info #total-resultados {
  font-weight: bold;
  color: var(--primary);
}

.resultados-info #termo-buscado {
  font-style: italic;
  font-weight: 600;
}

/* Responsivo */
@media(max-width: 700px) {
  header {
    padding: 0 1rem;
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
  }
  
  .logo img {
    width: 80px;
    margin-left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--cor_menu);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  nav.menu-aberto {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    padding: 60px 0 0 0;
    height: 100%;
  }
  
  nav ul li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  nav ul li a {
    display: block;
    padding: 15px 20px;
    font-size: 1.1em;
  }
  
  nav ul li a:hover {
    background: rgba(255,255,255,0.1);
  }
  
  /* Overlay para menu mobile */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .menu-overlay.ativo {
    opacity: 1;
    visibility: visible;
  }
  
  .ofertas-lista { 
    grid-template-columns: 1fr;
  }
  
  /* Ajustes para oferta-requisicao em mobile */
  .oferta-requisicao {
    font-size: 0.85em;
    padding: 8px 10px;
    margin: 6px 0 10px 0;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .oferta-card {
    height: 580px;
    max-height: 580px;
    min-height: 580px;
  }
  
  .oferta-info {
    height: 320px;
    padding: 12px;
  }
  
  .oferta-titulo {
    font-size: 1em;
    min-height: 45px;
  }
  
  /* Modal responsivo */
  .modal {
    margin: 20px;
    max-width: calc(100% - 40px);
    padding: 1.5rem;
  }
  
  .modal-requisicao {
    padding: 15px;
    margin: 15px 0;
  }
  
  .modal-requisicao h4 {
    font-size: 1em;
  }
  
  .cupom-card {
    max-width: 100%;
    margin: 0 0 20px 0;
  }
  
  .codigo-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .codigo-container code {
    text-align: center;
  }
  
  .btn-copiar {
    width: 100%;
  }
  
  .busca-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .campo-busca {
    width: 100%;
  }
  
  .btn-buscar {
    width: 100%;
  }
  
  .btn-limpar-busca {
    width: 100%;
  }
} 