/* Estilos para modal de pedidos e bottom nav */
.bottom-nav-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.12);
  z-index: 10000;
  display: none;
}
.bottom-nav-mobile-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  max-width: 600px;
  margin: 0 auto;
}
.bottom-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 8px;
  transition: color 0.2s;
  gap: 4px;
}
.bottom-nav-link i,
.bottom-nav-link iconify-icon {
  font-size: 1.3rem;
  color: inherit;
}
.bottom-nav-link span {
  font-size: 0.7rem;
}
.bottom-nav-link.active {
  color: var(--primary-color);
}
.bottom-nav-link-orders {
  position: relative;
}
.bottom-nav-badge {
  position: absolute;
  top: 0;
  right: 15px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
}
@media (max-width: 1024px) {
  #bottom-nav-mobile {
    display: block !important;
  }
  body {
    padding-bottom: 70px;
  }
  
  /* Esconder carrinho flutuante desktop no mobile */
  .carrinho-flutuante {
    display: none !important;
  }
  
  /* Botão flutuante de carrinho para mobile */
  #carrinho-flutuante-mobile {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 10040;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
  }
  
  /* Ajustar posição baseado na presença da bottom nav */
  /* Se bottom nav estiver visível (sempre em mobile/tablet), ajustar posição */
  #carrinho-flutuante-mobile {
    bottom: 90px; /* Espaço para a bottom nav */
  }
  
  #carrinho-flutuante-mobile:hover,
  #carrinho-flutuante-mobile:active {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
  
  #carrinho-flutuante-mobile i {
    font-size: 1.5rem;
    color: white;
  }
  
  #carrinho-flutuante-mobile .carrinho-badge-mobile {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
  }
  
  #carrinho-flutuante-mobile .carrinho-badge-mobile.ativo {
    display: flex;
  }
  
  /* Modal carrinho mobile */
  #modal-carrinho-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10045;
    align-items: flex-end;
  }
  
  #modal-carrinho-mobile.show {
    display: flex;
  }
  
  #modal-carrinho-mobile-content {
    background: white;
    width: 100%;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }
  
  #modal-carrinho-mobile.show #modal-carrinho-mobile-content {
    transform: translateY(0);
  }
  
  #modal-carrinho-mobile-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 24px 24px 0 0;
  }
  
  #modal-carrinho-mobile-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
  }
  
  #modal-carrinho-mobile-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
  }
  
  #modal-carrinho-mobile-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--surface-card);
    color: var(--text-primary);
  }
  
  #modal-carrinho-mobile-footer {
    padding: 20px;
    border-top: 2px solid var(--border-color);
    background: var(--surface-card);
  }
  
  .carrinho-mobile-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--surface-soft);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
  }
  
  .carrinho-mobile-item-info {
    flex: 1;
  }
  
  .carrinho-mobile-item-nome {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1rem;
  }
  
  .carrinho-mobile-item-detalhes {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
  }
  
  .carrinho-mobile-item-preco {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
  }
  
  .carrinho-mobile-item-remover {
    background: #f44336;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
  }
  
  .carrinho-mobile-item-remover:active {
    background: #d32f2f;
    transform: scale(0.95);
  }
  
  .carrinho-mobile-resumo {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface-soft);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
  }
  
  .carrinho-mobile-resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
  }
  
  .carrinho-mobile-resumo-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 12px;
    border-top: 2px solid var(--border-color);
    margin-top: 12px;
  }
  
  .btn-carrinho-mobile-finalizar {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  
  .btn-carrinho-mobile-finalizar:active {
    transform: scale(0.98);
  }
  
  .btn-carrinho-mobile-limpar {
    width: 100%;
    background: #f44336;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .btn-carrinho-mobile-limpar:active {
    transform: scale(0.98);
  }
  
  .carrinho-mobile-hint {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
  }
  
  .carrinho-mobile-vazio {
    text-align: center;
    padding: 60px 20px;
  }
  
  .carrinho-mobile-vazio i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
  }
  
  .carrinho-mobile-vazio h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
  }
  
  .carrinho-mobile-vazio p {
    color: var(--text-muted);
    font-size: 0.9rem;
  }
}

@media (min-width: 769px) {
  /* Esconder botão flutuante mobile no desktop */
  #carrinho-flutuante-mobile {
    display: none !important;
  }
  
  #modal-carrinho-mobile {
    display: none !important;
  }
  
  #bottom-nav-mobile {
    display: none !important;
  }
}

.pedidos-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  border: 2px solid white;
}

.pedido-card-modal {
  background: var(--surface-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pedido-card-modal:active {
  transform: scale(0.98);
}

.pedido-header-modal {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pedido-codigo-modal {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.pedido-status-modal {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pedido-status-modal.pendente { background: #fff3cd; color: #856404; }
.pedido-status-modal.em_andamento { background: #d1ecf1; color: #0c5460; }
.pedido-status-modal.pronto { background: #d4edda; color: #155724; }
.pedido-status-modal.concluido { background: #d4edda; color: #155724; }
.pedido-status-modal.cancelado { background: #f8d7da; color: #721c24; }

.pedido-info-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.pedido-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.pedido-info-label {
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pedido-info-value {
  font-weight: 600;
  color: #999;
}

.pedido-valor-modal {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
