/* 
  ESTILOS GERAIS
  - Layout minimalista
  - Cores quentes (laranja/vermelho) para estimular fome
  - Fundo escuro para dar foco nos cards (estilo apps modernos)
*/

:root {
  /* Paleta de cores quente */
  --color-bg: #0b0b0f;
  --color-surface: #15151c;
  --color-surface-alt: #1d1d26;
  --color-primary: #ff4b2b; /* Vermelho-alaranjado (apetite) */
  --color-primary-soft: #ff7a3c;
  --color-accent: #ffc857; /* Amarelo (atenção, fome) */
  --color-text: #f5f5f5;
  --color-text-muted: #a0a0b2;
  --color-border: #2a2a35;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #1d1d24 0, #050509 55%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* UTILITÁRIOS BÁSICOS */

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* HEADER */

.header {
  max-width: 1120px;
  margin: 24px auto 12px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      120deg,
      rgba(255, 75, 43, 0.16),
      rgba(255, 200, 87, 0.08)
    ),
    rgba(10, 10, 16, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

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

.header__logo {
  background: radial-gradient(circle at 30% 20%, #ffc857, #ff4b2b);
  border-radius: 24px;
  padding: 10px;
  font-size: 26px;
  box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.2);
}

.header__title {
  font-size: 20px;
  font-weight: 700;
}

.header__subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
}

.header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.header__pill {
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  border: 1px solid rgba(255, 200, 87, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header__pill--open {
  background: rgba(26, 162, 96, 0.2);
  border-color: rgba(26, 162, 96, 0.4);
}

.layout {
  max-width: 1120px;
  margin: 0 auto 40px;
  padding: 10px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 18px;
}

/* MENU */

.menu {
  background: rgba(8, 8, 14, 0.92);
  border-radius: var(--radius-lg);
  padding: 18px 18px 22px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.menu__header {
  margin-bottom: 16px;
}

.menu__title {
  font-size: 18px;
  margin-bottom: 4px;
}

.menu__subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* FILTROS DE CATEGORIA */

.menu__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-button {
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  background: rgba(21, 21, 28, 0.9);
  color: var(--color-text-muted);
  font-size: 12px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}

.filter-button--active,
.filter-button:hover {
  background: rgba(255, 75, 43, 0.18);
  border-color: var(--color-primary);
  color: var(--color-text);
  transform: translateY(-1px);
}

/* GRID DE PRODUTOS */

.menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

/* CARD DO PRODUTO */

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
  border-color: rgba(255, 75, 43, 0.6);
}

.product-card__top {
  display: flex;
  gap: 8px;
}

.product-card__info {
  flex: 1;
}

.product-card__name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.product-card__description {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.product-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  background: rgba(255, 200, 87, 0.12);
  color: var(--color-accent);
  margin-top: 4px;
}

.product-card__price {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.product-card__image {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #ffc857, #ff4b2b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.product-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.product-card__calories {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* BOTÕES GENÉRICOS */

.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-soft));
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 75, 43, 0.45);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 75, 43, 0.55);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background: rgba(255, 75, 43, 0.14);
}

.btn--ghost {
  background: rgba(21, 21, 28, 0.9);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 75, 43, 0.6);
  background: rgba(255, 75, 43, 0.12);
}

/* CARRINHO */

.cart {
  background: rgba(10, 10, 16, 0.98);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 12px;
}

.cart__title {
  font-size: 17px;
}

.cart__subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cart__items {
  border-radius: 14px;
  background: rgba(8, 8, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.02);
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
}

/* SE O CARRINHO ESTIVER VAZIO, ESCONDEMOS A LISTA E MOSTRAMOS UMA MSG */

.cart__empty {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ITEM DO CARRINHO */

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 6px;
  row-gap: 2px;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__name {
  font-size: 13px;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.cart-item__price {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cart-item__total {
  font-size: 13px;
  font-weight: 600;
}

.cart-item__btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(18, 18, 26, 0.9);
  color: var(--color-text);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.cart-item__btn:hover {
  border-color: var(--color-primary);
  background: rgba(255, 75, 43, 0.2);
}

/* RESUMO DO CARRINHO */

.cart__summary {
  border-radius: 14px;
  background: rgba(8, 8, 14, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.cart__row--coupon {
  color: var(--color-text-muted);
}

.cart__row--coupon small {
  display: block;
  font-size: 11px;
}

.cart__row--total {
  font-size: 14px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

/* CUPOM */

.cart__coupon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.cart__coupon-row {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.cart__coupon input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(10, 10, 16, 0.9);
  padding: 6px 10px;
  color: var(--color-text);
  font-size: 12px;
}

.cart__coupon input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.cart__coupon-hint {
  color: var(--color-text-muted);
}

.cart__coupon-message {
  font-size: 11px;
}

/* Observações */

.cart__notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.cart__notes textarea {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: rgba(10, 10, 16, 0.9);
  padding: 6px 8px;
  color: var(--color-text);
  font-size: 12px;
  resize: vertical;
}

.cart__notes textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Ações do carrinho */

.cart__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ADMIN (MODO PROFESSOR) */

.admin {
  margin-top: 18px;
  border-radius: 14px;
  background: rgba(8, 8, 14, 0.95);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
}

.admin__toggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 0;
}

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

.admin__form {
  margin-top: 8px;
  display: none; /* Começa escondido, é aberto via JS */
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.admin__form h3 {
  font-size: 13px;
  margin-bottom: 8px;
}

.admin__group {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin__group label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.admin__group input,
.admin__group textarea,
.admin__group select {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(10, 10, 16, 0.9);
  padding: 6px 8px;
  color: var(--color-text);
  font-size: 12px;
}

.admin__group--inline {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.admin__submit {
  border-radius: var(--radius-pill);
  border: none;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 200, 87, 0.16);
  color: var(--color-accent);
  cursor: pointer;
}

.admin__submit:hover {
  background: rgba(255, 200, 87, 0.25);
}

/* RESPONSIVIDADE */

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

  .cart {
    position: static;
  }
}

@media (max-width: 600px) {
  .header {
    margin: 10px;
    padding: 12px;
  }

  .layout {
    padding: 0 10px 20px;
  }

  .menu,
  .cart {
    padding: 12px;
  }

  .menu__grid {
    grid-template-columns: 1fr;
  }
}
