:root{
  --azul:#033d93;
  --azul2:#071f57;
  --amarelo:#ffd200;
  --amarelo2:#ffb300;
  --branco:#fff;
  --cinza:#f3f6fb;
  --texto:#10213f;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--cinza);
  color:var(--texto);
}

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

.topo{
  background:linear-gradient(135deg,var(--azul2),var(--azul));
  color:#fff;
  padding:14px 16px;
  position:sticky;
  top:0;
  z-index:5;
  box-shadow:0 4px 18px #0002;
}

.wrap{
  max-width:1180px;
  margin:auto;
}

.topo .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900;
}

.brand img{
  width:auto;
  max-width:190px;
  height:82px;
  object-fit:contain;
  background:transparent;
  display:block;
}

.menu{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
}

.menu a{
  display:inline-flex;
  padding:10px 14px;
  border-radius:999px;
  font-weight:800;
  white-space:nowrap;
}

.menu a:hover{
  background:rgba(255,255,255,.14);
}

.top-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.cart{
  background:var(--amarelo);
  color:var(--azul2);
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
}

.hero{
  background:#fff;
  padding:28px 16px;
  border-bottom:5px solid var(--amarelo);
}

.hero .wrap{
  display:grid;
  grid-template-columns:minmax(260px,380px) 1fr;
  gap:24px;
  align-items:center;
}

.hero img{
  max-width:380px;
  width:100%;
  object-fit:contain;
}

.hero h1{
  margin:0;
  color:var(--azul2);
  font-size:36px;
}

.hero p{
  font-size:18px;
}

.busca{
  display:flex;
  gap:10px;
  margin-top:16px;
}

.busca input{
  flex:1;
  padding:14px;
  border:2px solid #d8e0ef;
  border-radius:12px;
  font-size:16px;
}

.btn{
  border:0;
  border-radius:12px;
  padding:14px 18px;
  background:linear-gradient(135deg,var(--amarelo),var(--amarelo2));
  font-weight:900;
  color:var(--azul2);
  cursor:pointer;
  display:inline-block;
  text-align:center;
}

.btn:hover{
  filter:brightness(.98);
}

.categorias{
  display:flex;
  gap:10px;
  overflow:auto;
  padding:18px 0;
}

.cat{
  background:#fff;
  border:1px solid #e3e8f2;
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
  white-space:nowrap;
}

.cat.ativa{
  background:var(--azul);
  color:#fff;
}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  padding:12px 0 40px;
}

.produto{
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 7px 24px #05214d18;
  border:1px solid #e2e8f3;
  display:flex;
  flex-direction:column;
}

.foto{
  height:220px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.foto img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.semfoto{
  font-size:54px;
}

.info{
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}

.nome{
  font-weight:900;
  color:var(--azul2);
  min-height:44px;
}

.preco{
  font-size:24px;
  font-weight:900;
  color:var(--azul);
}

.estoque{
  font-size:13px;
  font-weight:800;
}

.ok{color:#108a37}
.esgotado{color:#b00020}

.produto .acoes{
  padding:0 16px 16px;
}

.btn.full{
  width:100%;
  text-align:center;
}

.btn.disabled{
  background:#d9d9d9;
  color:#777;
  cursor:not-allowed;
}

.box{
  background:#fff;
  border-radius:18px;
  box-shadow:0 7px 24px #05214d18;
  padding:20px;
  margin:22px 0;
}

.table{
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td{
  padding:12px;
  border-bottom:1px solid #e6ebf5;
  text-align:left;
  vertical-align:middle;
}

.qty{
  width:70px;
  padding:9px;
  border:1px solid #ccd5e6;
  border-radius:10px;
}

.total{
  font-size:26px;
  font-weight:900;
  text-align:right;
  color:var(--azul);
}

.checkout{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:22px;
}

.form input,
.form select,
.form textarea{
  width:100%;
  padding:13px;
  border:1px solid #ccd5e6;
  border-radius:12px;
  margin-bottom:12px;
  font-size:16px;
}

.pix{
  text-align:center;
}

.pix img{
  max-width:300px;
  width:100%;
  border:1px solid #e5e5e5;
  border-radius:16px;
}

.copy{
  width:100%;
  min-height:120px;
  border:1px solid #ccd5e6;
  border-radius:12px;
  padding:12px;
}

.badge,
.pill{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  background:#edf2ff;
}

.badge.pendente{
  background:#fff3cd;
  color:#856404;
}

.badge.pago{
  background:#d4edda;
  color:#155724;
}

.aviso{
  background:#fff7d2;
  border:1px solid #ffdf6b;
  padding:12px;
  border-radius:12px;
  margin:12px 0;
}

.painel-status{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-top:18px;
}

.painel-status div{
  background:#f5f8ff;
  border:1px solid #dfe8f8;
  border-radius:16px;
  padding:16px;
  text-align:center;
}

.painel-status b{
  display:block;
  font-size:30px;
  color:var(--azul);
}

/* ADMIN */
.admin-layout{
  display:grid;
  grid-template-columns:250px 1fr;
  min-height:100vh;
}

.sidebar{
  background:#071f57;
  color:#fff;
  padding:20px;
}

.sidebar img{
  width:180px;
  max-width:100%;
  display:block;
  margin:0 auto 18px;
  background:#fff;
}

.sidebar a{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  margin:5px 0;
  font-weight:800;
  color:#fff;
}

.sidebar a:hover,
.sidebar a.ativo{
  background:#ffd200;
  color:#071f57;
}

.admin-main,
.main{
  padding:24px;
  width:100%;
  overflow-x:hidden;
}

.admin-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.form-grid .full{
  grid-column:1/-1;
}

.field label{
  font-weight:900;
  display:block;
  margin-bottom:6px;
}

.field input,
.field textarea,
.field select{
  width:100%;
  padding:12px;
  border:1px solid #ccd5e6;
  border-radius:12px;
  background:#fff;
}

.field textarea{
  min-height:130px;
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.actions form{
  margin:0;
}

.thumb{
  width:70px;
  height:70px;
  object-fit:contain;
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
}

.danger{
  background:#c62828!important;
  color:#fff!important;
}

.okbtn{
  background:#0a8f3c!important;
  color:#fff!important;
}

pre{
  font-family:Consolas,monospace;
}

/* Miniaturas admin produtos */
.table-scroll{
  width:100%;
  overflow-x:auto;
}

.admin-produtos-table{
  table-layout:fixed;
  width:100%;
}

.admin-produtos-table th,
.admin-produtos-table td{
  vertical-align:middle;
}

.produto-foto-cell{
  width:110px!important;
  max-width:110px!important;
  min-width:110px!important;
  text-align:center;
}

.produto-miniatura-box{
  width:86px!important;
  height:86px!important;
  max-width:86px!important;
  max-height:86px!important;
  margin:auto;
  border:1px solid #e5eaf5;
  border-radius:12px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.produto-miniatura-admin{
  width:86px!important;
  height:86px!important;
  max-width:86px!important;
  max-height:86px!important;
  object-fit:contain!important;
  display:block!important;
}

.sem-miniatura{
  font-size:32px;
  color:#999;
}

.admin-produtos-table .actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.admin-produtos-table .actions form{
  margin:0;
}

.opcoes-produto{
  background:#f6f9ff;
  border:1px solid #dfe8f8;
  border-radius:16px;
  padding:14px;
  margin:16px 0;
}

.opcao-grupo{
  margin-bottom:12px;
}

.opcao-grupo label{
  font-weight:900;
  display:block;
  margin-bottom:6px;
  color:var(--azul2);
}

.opcao-grupo select{
  width:100%;
  padding:13px;
  border:1px solid #ccd5e6;
  border-radius:12px;
  background:#fff;
  font-size:16px;
}

#opcoesTable input{
  width:100%;
  padding:10px;
  border:1px solid #ccd5e6;
  border-radius:10px;
  background:#fff;
}

#opcoesTable th,
#opcoesTable td{
  vertical-align:middle;
}

@media(max-width:900px){
  .grid{
    grid-template-columns:repeat(2,1fr);
  }

  .hero .wrap,
  .checkout,
  .form-grid{
    grid-template-columns:1fr;
  }

  .hero h1{
    font-size:28px;
  }

  .painel-status{
    grid-template-columns:repeat(2,1fr);
  }

  .topo .wrap{
    flex-direction:column;
  }

  .brand img{
    max-width:240px;
    height:auto;
  }

  .admin-layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    padding:14px;
  }
}

@media(max-width:560px){
  .grid{
    grid-template-columns:1fr;
  }

  .painel-status{
    grid-template-columns:1fr;
  }
}


/* ===== Correção hover amarelo ===== */
.sidebar a:hover,
.sidebar a.ativo,
.sidebar a:focus{
  background:#ffd200 !important;
  color:#071f57 !important;
}

.btn:hover,
button:hover,
input[type="submit"]:hover{
  background:linear-gradient(135deg,#ffd200,#ffb300) !important;
  color:#071f57 !important;
  filter:none !important;
}

.menu a:hover,
.cart:hover{
  background:#ffd200 !important;
  color:#071f57 !important;
}

.cat:hover{
  background:#ffd200 !important;
  color:#071f57 !important;
  border-color:#ffd200 !important;
}

.table a:hover{
  color:#071f57 !important;
}

a:hover{
  color:inherit;
}
