/* ========================================
   Variáveis de cores
======================================== */

:root {
  --primary: #003d24;
  --primary-hover: #075535;
  --secondary: #c89222;
  --accent-text: #79530c;
  --background: #faf3e9;
  --white: #fffcf6;
  --text: #234536;
  --muted: #667568;
  --border: #e2d8c7;
  --success: #166534;
  --error: #b91c1c;
}

/* ========================================
   Configurações gerais
======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: var(--primary);
}

button {
  font-family: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ========================================
   Cabeçalho
======================================== */

.header {
  background-color: var(--primary);
  border-bottom: 3px solid var(--secondary);
  padding: 0;
  width: 100%;
}

/* Alinhamento da logo e do menu */

.header .header-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  max-width: none;
  min-height: 75px;
  margin: 0 auto;
  padding: 0;
  gap: 20px;
}

/* ========================================
   Nome da loja
======================================== */

.header .logo {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.header .logo span {
  color: #d9aa43;
}

/* ========================================
   Menu de navegação
======================================== */

.header nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 0 auto;
  padding: 0;
}

/* Formulário de logout */

.header nav form {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* ========================================
   Botões de navegação
======================================== */

.header nav a,
.header nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 25px;
  padding: 8px 20px;
  margin: 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.2;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Efeito ao passar o mouse */

.header nav a:hover,
.header nav button:hover {
  color: #d9aa43;
  border-color: #d9aa43;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Botão desabilitado */

.header nav button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   Botões principais
======================================== */

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 13px;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  transition: background-color 0.2s;
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   Acessibilidade
======================================== */

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
}

/* ========================================
   Mensagens de feedback
======================================== */

.message {
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

/* Mensagem de sucesso */

.message.success {
  background-color: #dcfce7;
  color: var(--success);
}

/* Mensagem de erro */

.message.error {
  background-color: #fee2e2;
  color: var(--error);
}

/* Mensagem informativa */

.message.info {
  background-color: #f5e8c8;
  color: var(--accent-text);
}

/* ========================================
   Rodapé
======================================== */

.footer {
  text-align: center;
  padding: 25px 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* ========================================
   Campanha Black Friday
======================================== */

.black-friday-banner {
  background-color: #171717;
  color: var(--white);
  width: 100%;
  padding: 9px 12px;
  text-align: center;
  font-size: 14px;
  line-height: 17px;
}

.black-friday-banner strong {
  color: #e4b54e;
}

/* Indicador de desconto */

.discount-badge {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: bold;
}

/* Preço original */

.original-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 14px;
  font-weight: normal;
}

/* Desconto no resumo da compra */

.summary-discount {
  color: var(--success);
  font-weight: bold;
}

/* ========================================
   Responsividade
======================================== */

@media (max-width: 600px) {
  .header .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    min-height: 65px;
    padding: 12px 0;
    gap: 10px;
  }

  .header .logo {
    font-size: 20px;
  }

  .header nav {
    gap: 8px;
    flex-wrap: wrap;
  }

  .header nav a,
  .header nav button {
    padding: 7px 12px;
    font-size: 12px;
  }
}
