/* Capitão Gancho / La Brasa Pizzeria - Design System & Smooth Fluid Animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f4f4f5;
  color: #18181b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Banner Urgência Superior */
.banner-top {
  background: #dc2626;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

/* Sombras e Cards com feedback tátil ultra-fluido */
.card-shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.card-shadow:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

.card-shadow:active,
.tap-card:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Botões com Micro-interações táteis */
.tap-btn {
  touch-action: manipulation;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, filter 0.18s ease, background-color 0.18s ease;
}

.tap-btn:active {
  transform: scale(0.95) !important;
}

/* Botão Redondo de "+" nos cards */
.btn-plus-icon {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.card-shadow:hover .btn-plus-icon {
  transform: rotate(90deg) scale(1.12);
}

.card-shadow:active .btn-plus-icon {
  transform: rotate(90deg) scale(0.92);
}

/* Caixa de Timer e Destaques */
.timer-box {
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.25);
}

.premium-box {
  background: linear-gradient(135deg, #004d2a 0%, #006437 100%);
  border: 2px solid #fbbf24;
}

/* Barra de Escassez */
.scarcity-wrap {
  margin: 8px 0 8px;
}

.scarcity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.scarcity-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.scarcity-live {
  font-size: 10px;
  font-weight: 900;
  color: #991b1b;
  text-transform: uppercase;
  animation: scarcityBlink 1.2s infinite;
}

.scarcity-bar {
  height: 8px;
  background: #fee2e2;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}

.scarcity-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316, #facc15);
  border-radius: 999px;
  animation: scarcityPulse 1.4s infinite;
}

@keyframes scarcityPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

@keyframes scarcityBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Pulsação Suave e Rápida */
@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.animate-pulse-fast {
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseSoft {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.animate-card-pulse {
  animation: pulseSoft 2s infinite ease-in-out;
  border: 2px solid #f97316 !important;
}

/* ==========================================================================
   CARDS DE SELEÇÃO DE SABORES, BORDAS E BEBIDAS (ANIMAÇÃO 100% FLUIDA NO CLIQUE)
   ========================================================================== */
.option-select-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: #ffffff;
  border: 2px solid #f3f4f6;
  border-radius: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-select-card:hover {
  border-color: #fecaca;
  background-color: #fffafb;
  transform: translateY(-1px);
}

.option-select-card:active {
  transform: scale(0.98) !important;
}

/* Estado Marcado (Checked) - Suporta :has e fallback de classe .is-selected */
.option-select-card:has(input:checked),
.option-select-card.is-selected {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.16) !important;
  transform: translateY(-1px) scale(1.008);
}

/* Animação com mola suave ao marcar o checkbox */
@keyframes checkSpring {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.option-select-card input[type="checkbox"]:checked,
.option-select-card.is-selected input[type="checkbox"] {
  background-color: #ef4444;
  border-color: #ef4444;
  animation: checkSpring 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-select-card input[type="radio"]:checked,
.option-select-card.is-selected input[type="radio"] {
  border-color: #ef4444;
  animation: checkSpring 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   SISTEMA DE MODAIS FLUIDOS EM TELA CHEIA (SLIDE SHEET NATIVO NAVEGADOR/MOBILE)
   ========================================================================== */
.fluid-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: #f4f4f5;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.99);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s;
  display: flex;
  flex-direction: column;
}

.fluid-modal.modal-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fluid-modal.modal-closing {
  opacity: 0;
  visibility: visible;
  transform: translateY(40px) scale(0.98);
  pointer-events: none;
}

/* Animação suave para imagem Hero do Modal */
.modal-hero-img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fluid-modal.modal-active .modal-hero-img {
  transform: scale(1);
}

/* Drink carousel cards */
.drink-card-premium {
  min-width: 145px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.drink-card-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.drink-card-premium:active {
  transform: scale(0.96);
}

.drink-card-premium img {
  height: 118px;
  object-fit: contain;
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 10px;
}

/* Esconder barra de rolagem mantendo a função */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Animação de Erro e Vibração de Seção Incompleta */
@keyframes shakeSection {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

.section-error {
  border: 2px solid #ef4444 !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.22) !important;
  animation: shakeSection 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;
}

/* Popup de Alerta ("Ops!") e Modal de Sucesso com Pop-Spring */
.spring-dialog {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

/* Pulse sutil no botão de finalizar pedido */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(22, 163, 74, 0.55); }
}

.cta-pulse-green {
  animation: ctaPulse 2.2s infinite ease-in-out;
}

@keyframes ctaPulseRed {
  0%, 100% { box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(220, 38, 38, 0.55); }
}

.cta-pulse-red {
  animation: ctaPulseRed 2.2s infinite ease-in-out;
}
