/* Root variables and resets */
:root {
  --bg: #0f1115;
  --bg-elev: #151922;
  --text: #e6e9ef;
  --muted: #b3b9c6;
  --brand: #13c2ff;
  --brand-2: #7cf2d1;
  --accent: #ffb703;
  --danger: #ff5d5d;
  --success: #33d69f;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, Noto Sans, "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { padding: 0; margin: 0; list-style: none; }

/* Layout helpers */
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.1rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: #081018;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 10px 18px -10px var(--brand);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn.outline { background: transparent; color: var(--text); border-color: #2a3342; }
.btn.ghost { background: #101521; color: var(--text); border-color: #1a2030; }

/* Navbar */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 18, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1d2433;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
}
.brand .logo {
  width: 34px; height: 34px;
  border-radius: .5rem;
  background: radial-gradient(100% 100% at 0% 0%, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 12px 30px -18px var(--brand);
}
.nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav a {
  padding: .6rem .85rem;
  border-radius: .6rem;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav a.active, .nav a:hover { color: var(--text); background: #141a27; }

.actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: .65rem;
  background: #121723;
  border: 1px solid #1c2333;
  color: var(--muted);
}
.icon-btn:hover { color: var(--text); background: #171e2e; }

.menu-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
}
.hero .bg-orb {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 40vw; max-width: 680px; aspect-ratio: 1/1;
  background: radial-gradient(closest-side, rgba(19, 194, 255, 0.2), rgba(124, 242, 209, 0) 70%);
  filter: blur(30px);
  transform: translate3d(0,0,0);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}
.hero p {
  color: var(--muted);
  font-size: 1.05rem;
}
.hero .cta { margin-top: 1.25rem; display: flex; gap: .7rem; flex-wrap: wrap; }

.hero-card {
  position: relative;
  border-radius: 1rem;
  background: linear-gradient(180deg, #0f141f, #0c121b);
  border: 1px solid #1a2233;
  box-shadow: 0 10px 40px -20px var(--shadow);
  padding: 1rem;
}
/* Removed media image area for a simpler hero */

/* Carousel */
.carousel {
  margin-top: 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: .75rem;
}
.carousel .card {
  border: 1px solid #20283a;
  background: #0f141e;
  border-radius: .9rem;
  padding: .8rem;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: .8rem;
}
.badge { font-size: .75rem; color: #0b111a; background: var(--brand); padding: .25rem .55rem; border-radius: .45rem; font-weight: 800; }

/* Sections */
section { padding: 3rem 0; }
.section-header { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.section-header h2 { margin:0; font-size:1.6rem; }
.muted { color: var(--muted); }

/* Auth */
.auth-wrap { display:grid; place-items:center; min-height: calc(100vh - 64px - 160px); }
.auth-card { width:min(420px, 92%); }
.auth-card .content { padding: 1.1rem; }

/* Cards / Grid */
.card {
  background: #0f141e;
  border: 1px solid #1b2334;
  border-radius: .9rem;
  box-shadow: 0 10px 35px -24px var(--shadow);
}
.card .thumb { display:none; }
.card .content { padding: .9rem; }
.price { color: var(--brand); font-weight: 800; }

/* Optional thumbnail support for specific cards */
.card.with-thumb .thumb { display: block; overflow: hidden; border-bottom: 1px solid #1b2334; }

/* Filters */
.filters { display:flex; flex-wrap:wrap; gap:.5rem; }
.chip { padding:.5rem .75rem; border-radius:2rem; border:1px solid #212a3e; color:var(--muted); background:#0e1420; }
.chip.active, .chip:hover { color:var(--text); background:#141b2a; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display:none; align-items:center; justify-content:center; z-index: 60; }
.modal { background:#0f141e; border:1px solid #1c2436; border-radius:1rem; width:min(420px, 92%); padding:1rem; box-shadow:0 30px 60px -30px var(--shadow); }
.modal .modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.modal .modal-actions { display:flex; justify-content:flex-end; gap:.5rem; margin-top:.75rem; }
.show { display:flex !important; }

/* Forms */
form .row { display:grid; gap:.75rem; }
input, textarea, select { width:100%; padding:.8rem 1rem; border-radius:.7rem; background:#0e1420; border:1px solid #1c2436; color:var(--text); }
label { display:block; margin:.4rem 0 .25rem; color:var(--muted); font-size:.95rem; }
.field { margin:.6rem 0; }
.error { color: var(--danger); font-size: .9rem; margin-top: .25rem; }

/* Footer */
footer { padding: 2.5rem 0; border-top: 1px solid #1a2131; color: var(--muted); background: #0b0f16; margin-top: 2rem; }

/* Simplified animations */
.fade { opacity: 0; transition: opacity .5s ease; }
.fade.in-view { opacity: 1; }

/* Responsive */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; right: 1rem; top: 64px; background:#0e1420; border:1px solid #1b2334; padding:.5rem; border-radius:.8rem; flex-direction:column; }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-grid; }
}
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;

  /* CENTRALIZAÇÃO */
  justify-content: center;   /* Centraliza o grid */
  justify-items: center;      /* Centraliza os cards */
}
/* 1. O cartão deve ser um contentor Flex vertical */
.card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Garante que todos os cartões na mesma linha tenham a mesma altura */
    padding: 1rem;
    border: 1px solid #f1e8e8;
    border-radius: 8px;
}

/* 2. O conteúdo (nome, preço, descrição) deve ocupar o espaço disponível */
.card-content {
    flex-grow: 1; /* Isto "empurra" o que estiver abaixo para o fundo */
}

/* 3. O formulário do botão ficará sempre no fundo */
.cart-form {
    margin-top: auto; /* Força o formulário a colar no fundo do cartão */
    width: 100%;
}

.cart-form .btn {
    width: 100%; /* Opcional: faz o botão ocupar a largura toda para um aspeto mais limpo */
}

