
:root {
  --primary: #1F2937; /* cinza grafite sofisticado */
  --accent: #2563EB;  /* azul confiável (ação principal) */
  --accent-hover: #1E4ED8;
  --light: #F9FAFB; /* fundo header quase branco elegante */
  --gray: #F6F7F9;  /* fundo geral cinza bem claro */
  --card: #FFFFFF; /* cards brancos */
  --border: #E5E7EB;
  --muted: #6B7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--gray);
  color: var(--primary);
  -webkit-font-smoothing: antialiased;
}

header {
  background: #1E3A8A;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  gap: 30px;
}

header .logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  text-decoration: none;
}

.slogan {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

header .search-box {
  flex: 1;
  max-width: 650px;
}

header nav {
  flex: 0 0 auto;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  text-decoration: none;
}

.logo:visited,
.logo:hover,
.logo:focus,
.logo:active {
  color: #FFFFFF;
  text-decoration: none;
}

nav a {
  margin-left: 25px;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  transition: 0.2s;
  font-size: 14px;
}

nav a:hover {
  color: #FFFFFF;
}
.menu-dropdown {
  margin-left: 25px;
  position: relative;
  display: inline-block;
}
.menu-dropdown summary {
  list-style: none;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 14px;
}
.menu-dropdown summary::-webkit-details-marker {
  display: none;
}
.menu-dropdown[open] summary,
.menu-dropdown summary:hover {
  color: #FFFFFF;
}
.menu-dropdown-panel {
  position: absolute;
  top: 130%;
  left: 0;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  padding: 8px;
  z-index: 30;
}
.menu-dropdown-panel a {
  margin: 0;
  display: block;
  color: #111827;
  padding: 8px 10px;
  border-radius: 8px;
}
.menu-dropdown-panel a:hover {
  background: #F3F4F6;
  color: #111827;
}

.hero {
  padding: 40px 20px;
  text-align: center;
  background: var(--gray);
}

.hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 600px;
}

.search-box input {
  padding: 10px 14px;
  width: 100%;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,106,0,0.15);
}

.search-box button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.search-box button:hover {
  background: var(--accent-hover);
}

.section {
  padding: 80px 60px;
}

.section h2 {
  font-size: 26px;
  margin-bottom: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: var(--card);
  padding: 0;
  border-radius: 18px;
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  transition: 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.card p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.card strong {
  font-size: 18px;
  color: var(--primary);
}

.card .distance {
  margin-top: 6px;
  font-size: 13px;
  color: #4B5563;
  font-weight: 600;
}
.card .distance.status-estoque {
  color: #374151;
}
.card .distance.status-aberto {
  color: #15803D;
}
.card .distance.status-fechado {
  color: #DC2626;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center center;
  background: #FFFFFF;
  display: block;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

footer {
  background: var(--gray);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 30px;
  text-align: center;
  margin-top: 60px;
  font-size: 14px;
}

@media (max-width: 768px) {
  header {
    padding: 20px;
    flex-direction: column;
    gap: 15px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .search-box input {
    width: 100%;
  }

  .section {
    padding: 60px 20px;
  }
}

@media (min-width: 1400px) {
  .cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* ============================= */
/* 🔵 CADASTRO DE LOJAS */
/* ============================= */

.cadastro-container {
  max-width: 600px;
  margin: 80px auto;
  background: var(--card);
  padding: 40px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.cadastro-container h1 {
  font-size: 22px;
  margin-bottom: 25px;
  text-align: center;
}

/* Inputs do cadastro */
.cadastro-container input[type="text"],
.cadastro-container input[type="email"],
.cadastro-container input[type="password"],
.cadastro-container input[type="number"],
.cadastro-container textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--light);
  color: var(--primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cadastro-container input[type="text"]::placeholder,
.cadastro-container input[type="email"]::placeholder,
.cadastro-container input[type="password"]::placeholder,
.cadastro-container input[type="number"]::placeholder,
.cadastro-container textarea::placeholder {
  color: var(--muted);
}

.cadastro-container input[type="text"]:focus,
.cadastro-container input[type="email"]:focus,
.cadastro-container input[type="password"]:focus,
.cadastro-container input[type="number"]:focus,
.cadastro-container textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Botão do cadastro */
.cadastro-container button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.cadastro-container button:hover {
  background: var(--accent-hover);
}

/* Botoes de mostrar/ocultar senha nao devem herdar width:100% */
.senha-wrap .senha-toggle {
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
  border: none;
  background: transparent;
  color: #6B7280;
  box-shadow: none;
}
.cadastro-container .senha-wrap .senha-toggle,
.cadastro-container .senha-wrap .senha-toggle:hover,
.cadastro-container .senha-wrap .senha-toggle:focus,
.cadastro-container .senha-wrap .senha-toggle:active {
  background: transparent;
  color: #6B7280;
  box-shadow: none;
  transform: translateY(-50%);
}
.senha-wrap .senha-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}


/* Input de arquivo no padrão do sistema */
input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #0d6efd; /* ajuste para a cor principal do seu sistema */
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #0b5ed7;
}

input[type="file"]::file-selector-button:active {
  transform: scale(0.98);
}

/* fallback Safari antigo */
input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}





/* Mensagem de retorno */
.mensagem-sucesso {
  color: green;
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

.mensagem-erro {
  color: red;
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

/* ============================= */
/* 🔥 MODAL DE MENSAGEM */
/* ============================= */

.modal-mensagem {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-in-out;
}

/*modal de avisos de sucesso e erro*/
.modal-conteudo {
  background: var(--card);
  padding: 25px 40px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  min-width: 250px;
  animation: scaleIn 0.2s ease-in-out;
}

/* Animações do modal de avisos e erro*/

/* ============================= */
/* 🔥 ANIMAÇÃO MODAL */
/* ============================= */

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}



/* ============================= */
/* 🔥 MENU MOBILE */
/* ============================= */

.menu-mobile-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color:  white;
    cursor: pointer;
}

/* ============================= */
/* 🔥 MOBILE + TABLET */
/* ============================= */

@media (max-width: 1024px) {

    .menu-mobile-btn {
        display: block;
        margin-left: 0;
        grid-area: toggle;
        justify-self: end;
        align-self: start;
    }

    header {
        padding: 16px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
          "brand toggle"
          "search search";
        align-items: center;
        gap: 12px 10px;
    }

    header .header-brand {
        grid-area: brand;
        min-width: 0;
    }

    header .search-box {
        grid-area: search;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    nav {
        position: fixed;
        top: 0;
        right: -260px;
        height: 100vh;
        background: #1E3A8A;
        width: 250px;
        padding: 40px 20px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
        display: flex;
        flex-direction: column;
        gap: 20px;
        transition: right 0.3s ease;
    }

    nav a {
        margin-left: 0;
        display: block;
        width: 100%;
    }

    nav.active {
        right: 0;
    }
    .menu-dropdown {
        margin-left: 0;
        width: 100%;
    }
    .menu-dropdown summary {
        display: block;
        width: 100%;
    }
    .menu-dropdown-panel {
        position: static;
        margin-top: 8px;
        box-shadow: none;
    }

   


}

 /* =============================== */
 /* 🔥 BOTÕES PADRÃO DO SISTEMA */
 /* =============================== */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s ease;
  text-decoration: none;
}

/* =================== */
/* SUCCESS */
/* =================== */
.btn-success {
  background: #10B981;
  color: white;
}

.btn-success:hover {
  background: #0f9f6a;
  transform: translateY(-2px);
}

.btn-card {
  background: #1E3A8A;
  color: white;
}

.btn-card:hover {
  background: #1A347A;
  transform: translateY(-2px);
}

/* =================== */
/* WARNING */
/* =================== */
.btn-warning {
  background: #F59E0B;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* =================== */
/* DANGER */
/* =================== */
.btn-danger {
  background: #EF4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* =================== */
/* DARK */
/* =================== */
.btn-dark {
  background: var(--primary);
  color: white;
}

.btn-dark:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* =================== */
/* DEFAULT */
/* =================== */
.btn-default {
  background: var(--border);
  color: var(--primary);
}

.btn-default:hover {
  background: #d1d5db;
  transform: translateY(-2px);
}
