:root {
  --accent: #c45c26;
  --accent-deep: #9a4318;
  --accent-soft: rgba(196, 92, 38, 0.12);
  --accent-mid: #e07a45;
  --plate: #1c1917;
  --text: #1c1917;
  --muted: #6f675e;
  --surface: #f3efe6;
  --card: #fffdf8;
  --line: #e6dfd2;
  --ok: #3d7a5a;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 16px;
  --shadow: 0 10px 24px rgba(28, 25, 23, 0.08);
  --shadow-soft: 0 1px 0 rgba(28, 25, 23, 0.04);
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-display: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
}

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand img.mark,
.brand .mark-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: block;
  object-fit: cover;
  flex-shrink: 0;
}

/* fallback se ainda houver span.mark sem img */
.brand span.mark:not(:has(img)) {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--plate) url("/assets/favicon.svg") center / cover no-repeat;
  display: inline-block;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--surface);
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--accent-deep);
  color: #fffdf8;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(28, 25, 23, 0.04);
  color: var(--text);
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.btn-danger:hover {
  background: #fecaca;
  color: #7f1d1d;
}

.hero,
.section,
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px;
}

.hero-catalog {
  min-height: auto;
  padding-top: 36px;
  padding-bottom: 28px;
}

.hero h1,
.card h2,
.catalog-card h3,
.plate-panel h2,
.toolbar h1,
.toolbar h2,
#receipt-title {
  font-family: var(--font-display);
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  margin: 16px 0 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

input,
select,
textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

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

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.ok {
  color: var(--ok);
  font-weight: 600;
}

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 48px;
  color: var(--muted);
  font-size: 0.88rem;
}

.foot strong {
  color: var(--text);
}

.foot a {
  color: var(--accent);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

/* Plate band (parceiro closing CTA) */
.plate-band {
  max-width: var(--max);
  margin: 0 auto 48px;
  padding: 0 24px;
}

.plate-panel {
  background: var(--plate);
  color: #f3efe6;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  position: relative;
  overflow: hidden;
}

.plate-panel::before {
  display: none;
}

.plate-panel > * {
  position: relative;
}

.plate-panel .eyebrow {
  color: var(--accent-mid);
}

.plate-panel h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.plate-panel .lead {
  color: #a8a29e;
}

.plate-panel .btn {
  background: var(--accent);
  color: var(--surface);
}

.plate-panel .btn:hover {
  background: var(--accent-deep);
  color: #fffdf8;
}

.plate-panel .btn-ghost {
  border-color: rgba(243, 239, 230, 0.28);
  color: #f3efe6;
  background: transparent;
}

.plate-panel .btn-ghost:hover {
  background: rgba(243, 239, 230, 0.08);
  color: #fff;
}

/* Catalog */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.catalog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.catalog-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.catalog-type {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.catalog-card .btn {
  justify-self: start;
  margin-top: 6px;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.catalog-search {
  max-width: 280px;
  width: 100%;
}

/* Booking */
.book-panel {
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 32px);
}

.price-line {
  margin: 4px 0 12px;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.pay-hint {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.9rem;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.slot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.slot.selected,
.slot:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.slot.selected {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

/* Receipt code */
.receipt-code-box {
  margin: 20px 0;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  background: var(--plate);
  text-align: center;
}

.receipt-code-box .eyebrow {
  margin: 0;
  color: var(--accent-mid);
}

.receipt-code {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--accent);
}

/* App shell — ink sidebar on paper */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--surface);
}

.sidebar {
  background: var(--plate);
  border-right: 1px solid transparent;
  padding: 20px 14px;
  color: #f3efe6;
}

.sidebar .brand {
  color: #f3efe6;
  margin-bottom: 24px;
  padding: 0 6px;
}

.sidebar .brand small,
.sidebar #shop-meta {
  color: #a8a29e !important;
  font-weight: 500;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.sidebar button {
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: #a8a29e;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.sidebar button.active,
.sidebar button:hover {
  background: rgba(196, 92, 38, 0.16);
  color: #f3efe6;
}

.sidebar button.active {
  border-left-color: var(--accent);
}

.sidebar .btn {
  margin-top: 24px;
  width: 100%;
}

.main {
  padding: 28px 24px;
}

.login-wrap {
  max-width: 420px;
  margin: 64px auto;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #e7e2d6;
  color: var(--text);
}

.badge.confirmed {
  background: #d8ebe0;
  color: #1f4d38;
}

.badge.pending {
  background: #f5e6c8;
  color: #7a4a0c;
}

.badge.canceled {
  background: #fee2e2;
  color: #991b1b;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .grid-2,
  .form-row,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(243, 239, 230, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .sidebar button {
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .sidebar button.active {
    border-bottom-color: var(--accent);
  }

  .sidebar .btn {
    width: auto;
    margin-top: 0;
  }
}
