@import url("./layout/header.css");
@import url("./layout/main.css");
@import url("./layout/cart/cart-list-desktop.css");
@import url("./layout/cart/cart-button-list-mobile.css");
@import url("./layout/footer.css");
@import url("./layout/modal.info.css");
@import url("./layout/payment/payment.css");
@import url("./layout/payment/carregamento.css");
@import url("./layout/modal-fechado.css");

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* ============================================================
   CANTINA IEADESI · DESIGN SYSTEM
   Variáveis canônicas — usar SOMENTE estas em todo o projeto.
   ============================================================ */
:root {
  /* Paleta */
  --primary-teal: #1a6087;
  --secondary-teal: #142454;
  --primary-orange: #f02106;
  --primary-cream: #ffffff;
  --secondary-cream: #84a4a4;

  /* Tokens semânticos */
  --color-primary: #1a6087;
  --color-danger: #f02106;
  --color-warning: #f7ab05;
  --color-success: #16a34a;
  --color-dark: #142454;
  --color-muted: #84a4a4;

  --bg-body: #f7f9fc;
  --bg-card: #ffffff;
  --bg-input: #fafbfc;
  --bg-subtle: #eef1f6;

  --text-main: #142454;
  --text-muted: #84a4a4;
  --text-on-primary: #ffffff;
  --accent-color: #f02106;
  --header-bg: rgba(255, 255, 255, 0.85);

  --border-color: rgba(20, 36, 84, 0.12);
  --border-strong: rgba(20, 36, 84, 0.22);

  --shadow-sm: 0 2px 6px rgba(20, 36, 84, 0.06);
  --shadow-md: 0 6px 18px rgba(20, 36, 84, 0.08);
  --shadow-lg: 0 22px 48px -16px rgba(20, 36, 84, 0.2);
  --shadow-accent: 0 12px 28px -10px rgba(240, 33, 6, 0.45);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --transition: all 0.25s ease;
  --transition-fast: all 0.15s ease;

  --gradient-primary: linear-gradient(135deg, #1a6087 0%, #142454 100%);
  --gradient-orange: linear-gradient(135deg, #f7ab05 0%, #f02106 100%);
  --gradient-cream: linear-gradient(135deg, #f7f9fc 0%, #eef1f6 100%);
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
html {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden; /* Impede rolagem lateral indesejada */
  position: relative;
}

/* --- Overlay --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.hidden {
  display: none !important;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 10px;
  border: 2px solid var(--bg-body);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-teal);
}

/* ============================================================
   TOAST (notificação flutuante)
   ============================================================ */
.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-teal);
  padding: 12px 18px 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  min-width: 220px;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success { border-left-color: var(--color-success); }
.toast.error   { border-left-color: var(--color-danger); }
.toast.warn    { border-left-color: var(--color-warning); }
.toast i { font-size: 1rem; }
.toast.success i { color: var(--color-success); }
.toast.error   i { color: var(--color-danger); }
.toast.warn    i { color: var(--color-warning); }
.toast.info    i { color: var(--primary-teal); }

@media (max-width: 576px) {
  .toast-stack { top: 12px; right: 12px; left: 12px; }
  .toast { min-width: 0; max-width: none; }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-subtle) 0%,
    #f4f6fb 50%,
    var(--bg-subtle) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shine 1.2s linear infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   ACESSIBILIDADE / MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
