:root {
  --black: #1A1A1A;
  --grey-900: #4A4A4A;
  --grey-700: #6A6A6A;
  --grey-500: #8A8A8A;
  --grey-200: #E5E5E5;
  --grey-100: #F5F5F5;
  --grey-50: #FAFAFA;
  --white: #FFFFFF;
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-light: #FEE2E2;
  --orange: #F47521;
  --success: #10B981;
  --blue: #2563EB;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--grey-50);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 120px;
}
.app { max-width: 720px; margin: 0 auto; background: var(--white); min-height: 100vh; box-shadow: 0 0 40px rgba(0,0,0,0.05); }

/* Top bar */
.topbar {
  background: var(--black);
  color: var(--white);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.topbar .brand small { display: block; font-size: 0.625rem; opacity: 0.6; font-weight: 400; }
.step-pill {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 100px;
}

/* Loading */
.loading { text-align: center; padding: 80px 24px; color: var(--grey-500); }

/* Hero with turma info */
.hero {
  padding: 24px;
  background: var(--grey-50);
  border-bottom: 1px solid var(--grey-200);
}
.hero h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.hero p { font-size: 0.875rem; color: var(--grey-700); }
.hero .data-pill {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8125rem;
  background: var(--red-light);
  color: var(--red-dark);
  padding: 6px 12px;
  border-radius: 100px;
  font-weight: 600;
}

/* Section */
.section { padding: 24px; }
.section h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 12px; }
.section p.lead { font-size: 0.875rem; color: var(--grey-700); margin-bottom: 16px; }

/* Categoria pills */
.cat-nav {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  overflow-x: auto;
  background: var(--white);
  position: sticky;
  top: 56px;
  z-index: 9;
  border-bottom: 1px solid var(--grey-200);
}
.cat-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--grey-100);
  border: none;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--grey-900);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}
.cat-pill.active { background: var(--black); color: var(--white); }

/* Kit obrigatório banner */
.kit-banner {
  margin: 16px 24px;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.kit-banner-text { font-size: 0.875rem; }
.kit-banner-text strong { display: block; font-size: 1rem; margin-bottom: 4px; }

/* Kit principal card */
.kit-main {
  margin: 16px 24px;
  padding: 20px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 16px;
  display: flex;
  gap: 16px;
}
.kit-main-img {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--grey-900), var(--black));
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.kit-main-info { flex: 1; }
.kit-main-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; }
.kit-main-tag {
  display: inline-block;
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  background: var(--black);
  color: var(--white);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.kit-main-content { font-size: 0.8125rem; color: var(--grey-700); margin-bottom: 8px; }
.kit-main-price { font-size: 1.25rem; font-weight: 800; }

/* Produtos grid */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 24px 16px 24px;
}
@media (min-width: 600px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
.prod-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.15s;
}
.prod-card.in-cart {
  border-color: var(--red);
  border-width: 2px;
}
.prod-img {
  aspect-ratio: 1;
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.prod-info { padding: 10px 12px; }
.prod-name { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.prod-price { font-size: 0.875rem; font-weight: 700; margin-bottom: 8px; }
.btn-add {
  width: 100%;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-add:hover { border-color: var(--red); color: var(--red); }
.prod-card.in-cart .btn-add { display: none; }
.qty-ctrl { display: none; align-items: center; border: 1px solid var(--red); border-radius: 6px; overflow: hidden; }
.prod-card.in-cart .qty-ctrl { display: flex; }
.qty-btn {
  width: 32px; height: 28px;
  background: var(--red); color: var(--white);
  border: none; cursor: pointer; font-weight: 700;
}
.qty-val { flex: 1; text-align: center; font-weight: 700; font-size: 0.875rem; color: var(--red); }

/* Cart bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 100;
}
.cart-summary { flex: 1; }
.cart-total-label { font-size: 0.6875rem; color: var(--grey-700); text-transform: uppercase; letter-spacing: 0.05em; }
.cart-total { font-size: 1.25rem; font-weight: 800; }
.cart-count { font-size: 0.75rem; color: var(--grey-700); }
.btn-checkout {
  padding: 14px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.btn-checkout:hover { background: var(--red-dark); }
.btn-checkout:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--white);
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 24px;
}
@media (min-width: 720px) {
  .modal-bg { align-items: center; }
  .modal { border-radius: 16px; max-height: 90vh; }
}
.modal h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.modal p { font-size: 0.875rem; color: var(--grey-700); margin-bottom: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--grey-200); border-radius: 8px;
  font-family: inherit; font-size: 0.9375rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8125rem; color: var(--grey-700); margin-bottom: 16px; }
.consent input { margin-top: 3px; }

.summary-box {
  background: var(--grey-50);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.summary-line { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 4px 0; }
.summary-line.total { font-weight: 800; font-size: 1.125rem; border-top: 1px solid var(--grey-200); margin-top: 8px; padding-top: 12px; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--red); color: var(--white);
  border: none; border-radius: 8px;
  font-weight: 700; font-size: 1rem;
  cursor: pointer; font-family: inherit;
}
.btn-primary:disabled { opacity: 0.5; cursor: wait; }
.btn-secondary {
  width: 100%; margin-top: 8px;
  padding: 12px;
  background: transparent; color: var(--grey-700);
  border: 1px solid var(--grey-200); border-radius: 8px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}

/* Success state */
.success { padding: 40px 24px; text-align: center; }
.success .icon { font-size: 4rem; color: var(--success); margin-bottom: 16px; }
.success h2 { color: var(--success); margin-bottom: 8px; }
.success .ref {
  display: inline-block; margin: 16px 0;
  background: var(--red); color: var(--white);
  font-weight: 800; font-size: 1.25rem;
  padding: 8px 16px; border-radius: 8px;
  font-family: 'Consolas', monospace;
}

.error-msg {
  background: var(--red-light); color: var(--red-dark);
  padding: 12px; border-radius: 8px;
  font-size: 0.875rem; margin-bottom: 16px;
}

.iban-box {
  background: var(--grey-100);
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  text-align: left;
}
.iban-box strong { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--grey-700); letter-spacing: 0.05em; margin-bottom: 8px; }
.iban-box .iban { font-family: 'Consolas', monospace; font-size: 1rem; font-weight: 700; }

/* Recovery section */
.recover-section { background: var(--grey-50); border-top: 1px solid var(--grey-200); padding: 32px 24px; margin-top: 24px; }
.recover-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--black); }
.recover-section .sub { font-size: 0.8125rem; color: var(--grey-700); margin-bottom: 16px; max-width: 540px; line-height: 1.5; }
.recover-form { display: flex; gap: 8px; flex-wrap: wrap; max-width: 540px; }
.recover-form input { flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid var(--grey-300); border-radius: 8px; font-family: inherit; font-size: 0.9375rem; }
.recover-form input:focus { outline: none; border-color: var(--red); }
.recover-form button { padding: 10px 18px; background: var(--black); color: var(--white); border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.875rem; white-space: nowrap; }
.recover-form button:hover { background: var(--grey-900); }
.recover-form button:disabled { background: var(--grey-300); cursor: not-allowed; }
.recover-msg { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: 0.875rem; max-width: 540px; line-height: 1.5; }
.recover-msg.ok { background: #D1FAE5; color: #065F46; border: 1px solid #10B981; }
.recover-msg.err { background: var(--red-light); color: var(--red-dark); border: 1px solid var(--red); }
