:root{
  --red: #e63946;
  --orange: #ff6b00;
  --black: #000;
  --muted: #aaa;
  --bg: #111;
  --card: #1a1a1a;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,0.5);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:#f1f1f1;-webkit-font-smoothing:antialiased;padding-bottom:120px}
#app{max-width:520px;margin:0 auto}

/* HEADER */
.app-header {
  background: var(--black);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* espaço entre ícone e logo */
  gap: 12px;
}

/* ícone hambúrguer */
.brand-icon {
  width: 28px;             /* um pouco maior */
  height: 28px;
  vertical-align: middle;
}

/* slot da logotipo à direita */
.logo-slot {
  width: 64px;             /* maior que antes */
  height: 64px;
  border-radius: 50%;      /* deixa redonda */
  overflow: hidden;
  flex-shrink: 0;          /* não encolhe */
}

/* imagem dentro do slot */
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



/* HERO */
.hero{padding:12px}
.hero-img{width:100%;height:160px;object-fit:cover;border-radius:14px;display:block;box-shadow:var(--shadow)}

/* CATEGORIES */
.categories{display:flex;gap:10px;padding:10px 12px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.categories::-webkit-scrollbar{display:none}
.category{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:72px}
.category-btn{background:transparent;border:0;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer}
.cat-pic{width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid transparent;box-shadow:0 8px 24px rgba(0,0,0,0.5)}
.category .label{font-size:12px;color:#fff;text-align:center}
.category.active .cat-pic{border-color:var(--orange)}

/* PRODUCTS GRID */
.catalog-title{font-size:16px;color:var(--red);margin:10px 12px 4px}
.product-grid{padding:10px 12px;display:grid;grid-template-columns:repeat(2,1fr);gap:12px}

/* CARD */
.card{background:var(--card);border-radius:12px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;cursor:pointer;color:#fff;transition:transform .14s}
.card:hover{transform:translateY(-6px)}
.card-img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:12px 12px 0 0;display:block}
.card-body{padding:10px;display:flex;flex-direction:column;gap:8px}
.card-title{font-size:14px;font-weight:700;margin:0}
.card-desc{font-size:12px;color:var(--muted);line-height:1.2}
.price{color:var(--orange);font-weight:800;font-size:13px}

/* BUTTONS */
.btn{border:0;padding:10px 12px;border-radius:12px;font-weight:800;cursor:pointer}
.btn.primary{background:var(--red);color:#fff}
.btn.outline{background:transparent;border:1px solid #333;color:#fff}

/* CART BUTTON - flutuante no canto inferior direito */
.cart-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-size: 26px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-button:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.cart-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  background: rgba(255,255,255,0.95);
  color: #111;
  padding: 6px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* MODAL - backdrop + painel (centralizado moderno) */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 200;
}

/* Cart panel */
.cart-panel {
  position: relative;
  z-index: 210;
  width: 92%;
  max-width: 640px;
  height: auto;
  max-height: 85vh;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,30,30,0.9), rgba(18,18,18,0.95));
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  overflow: hidden;
  display:flex;
  flex-direction:column;
}

/* product panel (detalhe do produto) */
.modal-panel {
  position: relative;
  z-index: 210;
  width: 92%;
  max-width: 420px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,30,30,0.95), rgba(18,18,18,0.98));
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.modal-img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.3;
}

/* botão X no canto superior direito do modal */
.modal-panel {
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #222;
  border-radius: 10px;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  z-index: 220;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: #333;
}

.modal-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.modal-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
  text-align: center;
  margin-bottom: 6px;
}

#modalAddBtn {
  width: 80%;
  max-width: 280px;
  text-align: center;
}

/* cart header */
.cart-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,0.03)}
.modal-close{background:#222;border-radius:10px;border:0;padding:6px;cursor:pointer;color:#fff}

/* cart body */
.cart-body{display:flex;gap:14px;padding-top:12px;overflow:auto}
.cart-items{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}
.cart-item{display:flex;align-items:center;gap:10px;padding:8px;background:rgba(255,255,255,0.02);border-radius:12px}
.cart-item img{width:72px;height:72px;object-fit:cover;border-radius:10px;flex-shrink:0}
.cart-item .info{flex:1;display:flex;flex-direction:column;gap:6px}
.cart-item .info .name{font-weight:700}
.cart-item .price{color:var(--orange);font-weight:800}
.qty-controls{display:flex;align-items:center;gap:8px}
.qty-controls button{background:#222;border:1px solid rgba(255,255,255,0.04);color:#fff;padding:6px 8px;border-radius:8px;cursor:pointer;font-weight:700}

/* summary */
.cart-summary{width:320px;max-width:40%;min-width:220px;padding-left:12px;display:flex;flex-direction:column;gap:10px}
.cart-summary .row{display:flex;justify-content:space-between;align-items:center}
.cart-summary .total{font-size:18px;font-weight:800}
textarea{width:100%;background:#222;color:#fff;border:1px solid #333;border-radius:8px;padding:8px}

/* responsive */
@media (max-width:640px){
  .cart-panel{ width:94%; padding:12px; }
  .cart-summary{width:100%;max-width:none}
  .cart-body{flex-direction:column}
  .cart-items{order:1}
  .cart-summary{order:2}
}

/* small utilities */
.muted{color:var(--muted);padding:16px;text-align:center}

/* === CENTRALIZAR BOTÃO "ADICIONAR" NOS CARDS === */
.card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  text-align: center;
}

/* estilo do botão nos cards */
.card-footer .btn {
  width: 90%;
  max-width: 220px;
  text-align: center;
  border-radius: 8px;
}
/* Header layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* left / right */
  gap: 12px;
  position: relative;
  padding: 0 12px; /* mantém o conteúdo afastado das bordas */
}

/* Agrupa logo + marca para ficar tudo no canto esquerdo */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* LOGO (circular, bem no canto esquerdo) */
.header-logo {
  width: 56px;            /* tamanho do círculo */
  height: 56px;
  border-radius: 50%;     /* deixa redonda */
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  margin-left: 0;         /* garante que fique encostada à esquerda */
}

/* Ajustes da marca à direita da logo */
.brand { display:flex; align-items:center; gap:8px; }
.brand-main { display:inline-flex; align-items:center; gap:6px; }
.burguer { font-size: 18px; font-weight:700; color:#fff; }

/* Ícone hambúrguer alinhado com o texto */
.brand-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Se quiser remover o espaçamento padrão do header com a borda esquerda no mobile */
@media (max-width: 420px) {
  .header-inner { padding: 0 8px; }
  .header-logo { width:48px; height:48px; }
  .burguer { font-size:16px; }
}
.dev-sign {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #fff;
  opacity: 0.7;
  margin-top: 40px;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 8px;
}

.social-links a {
  color: #ffbb00;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.9;
  transition: 0.2s;
}

.social-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
