:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --text: #1E2421;
  --muted: #666E6A;
  --border: #EAE3D7;
  --accent: #D95338;
  --accent-hover: #BF432A;
  --accent-soft: #FCECE8;
  --green: #2F6F4E;
  --green-soft: #E7F3EC;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(30, 36, 33, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 96px;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-logo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #F5F2EB;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 36, 33, 0.08);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.16);
}

.brand h1 {
  font-family: 'Fredoka', 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text);
}

.brand p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.closed {
  background: #F4E6E6;
  color: #A63636;
}

/* Category Bar */
.category-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-pill:hover {
  border-color: var(--accent);
}

.category-pill.active {
  background: var(--text);
  color: #FFFFFF;
  border-color: var(--text);
}

/* Main Menu */
.main-content {
  padding-top: 24px;
}

.closed-banner {
  background: #FFF3F1;
  border: 1px solid #F2C1B8;
  color: #9A3321;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.loading-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.category-section {
  margin-bottom: 32px;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
  border-color: #DACBB6;
}

.product-thumb {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.product-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.product-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.product-price {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text);
}

.btn-add {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #F3C7BC;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qty-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Floating Cart Bar */
.floating-cart {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.floating-cart-btn {
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(217, 83, 56, 0.34);
  transition: transform 0.15s ease, background 0.15s ease;
}

.floating-cart-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.cart-badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 22, 0.45);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 28px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.cart-item-price {
  font-size: 0.82rem;
  color: var(--muted);
}

.summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.summary-box.compact {
  padding: 12px 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-total {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}

.summary-box.compact .summary-total {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-full {
  width: 100%;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

.btn-link:hover {
  color: var(--text);
}

/* Form */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  background: #FFFFFF;
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 83, 56, 0.12);
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.payment-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.payment-option input {
  width: auto;
  margin-top: 3px;
}

.payment-option-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.payment-option-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

.form-error {
  background: #FFF0EE;
  border: 1px solid #F2BCB4;
  color: #A63322;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* Confirmation */
.confirmation-card {
  text-align: center;
  padding: 8px 0;
}

.confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.order-code-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

.order-code {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 16px;
}

.confirmation-details {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.confirmation-details p {
  margin-bottom: 6px;
}

.confirmation-details ul {
  margin: 8px 0 8px 18px;
}

.next-stage-note {
  text-align: left;
  background: #F4F8F5;
  border: 1px dashed #B8D4C2;
  color: #2B5940;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.pix-confirm-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.pix-confirm-box h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.pix-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.pix-qr-img {
  width: 190px;
  height: 190px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto 10px;
}

.pix-code-box {
  width: 100%;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  resize: none;
  margin-bottom: 8px;
}

.pix-link-btn {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.pix-link-btn:hover {
  text-decoration: underline;
}

.whatsapp-cta-wrap {
  margin-bottom: 12px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: background 0.15s ease;
}

.btn-whatsapp:hover {
  background: #1FB858;
}

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